getHPConfig.sh
3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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/