I have aix v4.3 running on RS6000 hardware. How can I get hardware configuration information from the system. I can't power down or reboot as it is a 7/24 operation.
#!/bin/ksh
I realise that you've already got what you need, but for anyone else, here's a script that I use to get configuration data of AIX.
It lists VG, PV and LV information as well as OS and hardware stuff, and puts it all in a file /tmp/lvl2_report.txt.
Hope it helps.
Dave V.
#############################################################
# File: RS_MOT
# Author: dave v.
# Date: 08/01/01
# Version: draft
#############################################################
# Description:
# Builds report on disk storage configuration that can be
# used for RS service schedule report (Level 2).
#############################################################
# Modifications:
#
#############################################################
# Usage:
# RS_MOT
#
# Output:
# Formatted report in text file - /tmp/lvl2_report.txt
#############################################################
#############################################################
# Set variables
#############################################################
bold=`tput smso`
norm=`tput rmso`
vg_list=`lsvg`
t_getdata="Gathering data on..."
name_technician=""
typeset -i count=$INITIAL_COUNT
#############################################################
# Start of functions
#############################################################
usage () {
read cont?"ERROR: Command does note require any arguments. Continue (y|n): "
typeset -u read
case $read in
Y ) get_volume_group_info ;;
N ) exit 1 ;;
* ) exit 1 ;;
esac
}
get_technician_name() {
tput cup 3 5
read name_technician?"Please enter name of system analyst: "
tput cup 5 5
echo "Thank you. Name supplied was ${name_technician}."
tput cup 6 5
echo "Report file: ${OUTPUT_FILE}"
sleep 2
}
end_function() {
tput cup 10 31
echo "Completed. "
}
end_report() {
tput cup 15 10
echo "\nReport compiled ${REPORT_DATE}" >> $OUTPUT_FILE
echo "Support Analyst: ${name_technician}" >> $OUTPUT_FILE
echo "\n\nEND OF REPORT FOR ${HOSTNAME}" >> $OUTPUT_FILE
echo "${bold}REPORT COMPLETED${norm}"
}
#############################################################
# End of functions
# Start of main program
#############################################################
clear
if [ $# -ne 0 ]
then
usage
fi
Here is one I use when I'm interested more in just disk and fileystem layout. I got this from the AIX Survival Guide by Andreas Siegert. He states it is from a collection not necessarily invented by him, but it grew out of self-made and copied functions.
Dave's gives much more information. This one is helpful when all you really want to know is where you have room to put a filesystem.
========================================
#!/usr/bin/ksh
# diskinfo
export LANG=C
export LC_MESSAGES=en_US
DoPV=0
DoFS=0
DoLV=0
DoNA=0
if [[ $# -ge 1 ]] ; then
for opt
do
case $opt in
-d) DoPV=1
;;
-f) DoFS=1
;;
-l) DoLV=1
;;
-n) DoNA=1
;;
*) echo "Unknown parameter $opt"
echo "Usage:\n$(basename $0) [-d][-f][-l][-n]"
echo " -d: disks and volume groups"
echo " -f: file systems"
echo " -l: logical volumes without file systems"
echo " -n: unallocated disks"
exit 1
;;
esac
done
else
DoPV=1
DoFS=1
DoLV=1
DoNA=1
fi
echo "Disk report for $(hostname -s) (machine id $(uname -m))\n"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.