getHPConfig.sh 3.71 KB
LANG=en_US
export LANG

# 0.get uname
uname -a >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 1.get cpu
ioscan -fnk | grep processor >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 2.get machinfo
/usr/contrib/bin/machinfo >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 3.get inside disk
ioscan -fnkC disk | grep GST >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 4.get netstat
netstat -in | grep -v Mtu | grep -v 127.0.0.1 | grep -v none >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 5.get lanscan
lanscan | grep -v Hardware | grep -v Path >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 6.get swapinfo
swapinfo -atm  >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 7.get lvname
vgdisplay -v |grep 'LV Name' >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 8.get lvsize
vgdisplay -v |grep 'LV Size' >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 9.get fileSystem
bdf >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 10.get cluster
cmviewcl -l cluster >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 11.get uptime
uptime | awk '{print $3" "$4}' >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 12.get VGState
vgdisplay | grep -v "vgdisplay:"| grep -E "VG Name|VG Status" >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 13.get sar
sar -v 1 >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 14.get maxuprc and max_thread_proc
/usr/sbin/kcusage |grep max_thread_proc >> ../result_temp/hpConfigResult
/usr/sbin/kcusage |grep maxuprc >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 15.get syslog
ps -ef |grep syslog |grep -v grep >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

# 16.Machine Serial Number
/usr/contrib/bin/machinfo |grep 'Machine serial number:' >> ../result_temp/hpConfigResult
echo "*******************************************************************************************#" >> ../result_temp/hpConfigResult

mv ../result_temp/hpConfigResult ../result/