script to capture certain output


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting script to capture certain output
# 8  
Old 08-14-2008
Bug

Quote:
Originally Posted by broli
with awk it would be easier

awk 'NR==8 { print $5 } \
NR==9 { print $5 }\
NR==10 { print $5 }' datafile

acomplish the first part ....
it means he is taking 8th 9th and 10th lines of the o/p and printing 5th field of each line
# 9  
Old 08-14-2008
Try this:
Code:
awk '
        /Collected/
        /B3692A/ { print $5, $7; getline; print }
        /^(CPU|Disk|Mem) Util/ { print $1, $5 }
        /Top disk user/ { print "" ; print; print "" }
' inputfile

# 10  
Old 08-14-2008
try this
awk 'NR==1{print $0}\
NR==6{printf "%s %s\n",$5,$7}\
NR==7{print $0}\
NR==8 {printf "%s %s\n",$1,$5}\
NR==9 {printf "%s %s\n",$1,$5}\
NR==10{printf "%s %s\n",$1,$5}' inputfile >> outputfile

Last edited by vidyadhar85; 08-14-2008 at 09:45 PM..
# 11  
Old 08-14-2008
i've tried both methods;

1)
[UXHUBT01:fara]/home/support/fara#cat test3.sh
awk '
/home/support/fara/output.out
/B3692A/ { print $5, $7; getline; print }
/^(CPU|Disk|Mem) Util/ { print $1, $5 }
/Top disk user/ { print "" ; print; print "" }
' /home/support/fara/HUBK01_glance.out

[UXHUBT01:fara]/home/support/fara#
[UXHUBT01:fara]/home/support/fara#./test3.sh
syntax error The source line is 2.
The error context is
>>> /home/support/fara/output. <<< out
awk: Quitting
The source line is 2.

2)
[UXHUBT01:fara]/home/support/fara#cat test4.sh
awk 'NR==1{print $0}\
NR==6{printf "%s %s\n",$5,$7}\
NR==7{print $0}\
NR==8 {printf "%s %s\n",$1,$5}\
NR==9 {printf "%s %s\n",$1,$5}\
NR==10{printf "%s %s\n",$1,$5}' /home/support/fara/HUBK01_glance.out >>/home/support/fara/output.out

[UXHUBT01:fara]/home/support/fara#cat output.out
B3692A GlancePlus C.03.72.00 15:02:45 UXHUBK01 9000/800 Current Avg High
32% 32%
--------------------------------------------------------------------------
IO Users=
Idx Type
--------------------------------------------------------------------------



Any advise?
# 12  
Old 08-14-2008
plz provide the exact HUBK01_glance.out file.. because the file what you provided gives the expected o/p with our codes...
# 13  
Old 08-14-2008
vidyadhar85,
this is only half of it..

B3692A GlancePlus C.03.72.00 15:02:45 UXHUBK01 9000/800 Current Avg High
-------------------------------------------------------------------------------
CPU Util SSSSSSSSSSSSSNNNNNNAUUUU | 50% 50% 50%
Disk Util F | 1% 1% 1%
Mem Util SSSSSSSSUUUUUUUUUUUUBBBBB | 49% 49% 49%
Swap Util UUUURRRRRRRRRRRRR | 32% 32% 32%
-------------------------------------------------------------------------------
IO BY FILE SYSTEM Users= 10
Idx File System Device Type Logl IO Phys IO
--------------------------------------------------------------------------------
1 / /dev/vg00/lvol3 vxfs 114.2/114.2 2.8/ 2.8
2 /stand /dev/vg00/lvol1 hfs 8.5/ 8.5 0.0/ 0.0
3 /var /dev/vg00/lvol8 vxfs 10.0/ 10.0 0.0/ 0.0
4 /usr /dev/vg00/lvol7 vxfs 1749/ 1749 0.0/ 0.0
5 /tmp /dev/vg00/lvol4 vxfs 0.0/ 0.0 0.0/ 0.0
6 /oracle /dev/vg00/lvol10 vxfs 0.0/ 0.0 0.0/ 0.0
7 /opt /dev/vg00/lvol6 vxfs 4.2/ 4.2 0.0/ 0.0
8 /home /dev/vg00/lvol5 vxfs 0.0/ 0.0 0.0/ 0.0
9 /IA_FBMI /dev/vg00/fbmi vxfs 0.0/ 0.0 0.0/ 0.0
10 swap device /dev/vg00/lvol2 hfs 0.0/ 0.0 0.0/ 0.0
11 swap device /dev/vg00/lvol9 hfs 0.0/ 0.0 0.0/ 0.0
12 /DIFF_appli /dev/vg04/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
13 /DIFFBTM_appli /dev/vg04/lvol2 vxfs 97.1/ 97.1 7.1/ 7.1
14 /HUB_appli /dev/vg03/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
15 /HUB_data /dev/vg03/lvol2 vxfs 0.0/ 0.0 0.0/ 0.0
16 /HUB_log /dev/vg03/lvol3 vxfs 0.0/ 0.0 0.0/ 0.0
17 /HUBBTM_appli /dev/vg03/lvol4 vxfs 0.0/ 0.0 0.0/ 0.0
18 /HUBBTM_log /dev/vg03/lvol5 vxfs 3.5/ 3.5 6.4/ 6.4
19 /HUBBTM_data /dev/vg03/lvol6 vxfs 79.2/ 79.2 32.8/ 32.8
20 /HSTBTM_appli /dev/vg03/lvol7 vxfs 1.4/ 1.4 3.5/ 3.5
21 /oracle9i/client /dev/vg03/lvol8 vxfs 0.0/ 0.0 0.0/ 0.0
22 /HST_appli /dev/vg05/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0

Top disk user: PID 24728, hublogd 14.2 IOs/sec S - Select a Disk
Page 1 of 1



Data Collected: 05/17/08 15:02:45

Refresh Interval: 600 seconds

GlancePlus Started/Reset: 05/17/08 15:02:44
B3692A GlancePlus C.03.72.00 15:12:45 UXHUBK01 9000/800 Current Avg High
-------------------------------------------------------------------------------
CPU Util SSSSSSSSSSSSSNNNNNAUUUU | 47% 47% 50%
Disk Util F | 3% 2% 3%
Mem Util SSSSSSSSUUUUUUUUUUUUBBBBB | 49% 49% 49%
Swap Util UUUURRRRRRRRRRRRR | 32% 32% 32%
-------------------------------------------------------------------------------
IO BY FILE SYSTEM Users= 10
Idx File System Device Type Logl IO Phys IO
--------------------------------------------------------------------------------
1 / /dev/vg00/lvol3 vxfs 24.5/ 24.8 1.5/ 1.5
2 /stand /dev/vg00/lvol1 hfs 1.1/ 1.1 0.0/ 0.0
3 /var /dev/vg00/lvol8 vxfs 4.7/ 4.7 3.8/ 3.7
4 /usr /dev/vg00/lvol7 vxfs 1819/ 1819 1.9/ 1.9
5 /tmp /dev/vg00/lvol4 vxfs 0.0/ 0.0 0.1/ 0.1
6 /oracle /dev/vg00/lvol10 vxfs 0.0/ 0.0 0.0/ 0.0
7 /opt /dev/vg00/lvol6 vxfs 144.5/144.1 0.2/ 0.2
8 /home /dev/vg00/lvol5 vxfs 0.0/ 0.0 0.0/ 0.0
9 /IA_FBMI /dev/vg00/fbmi vxfs 0.0/ 0.0 0.0/ 0.0
10 swap device /dev/vg00/lvol2 hfs 0.0/ 0.0 0.0/ 0.0
11 swap device /dev/vg00/lvol9 hfs 0.0/ 0.0 0.0/ 0.0
12 /DIFF_appli /dev/vg04/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
13 /DIFFBTM_appli /dev/vg04/lvol2 vxfs 59.1/ 59.2 7.9/ 7.9
14 /HUB_appli /dev/vg03/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
15 /HUB_data /dev/vg03/lvol2 vxfs 0.0/ 0.0 0.0/ 0.0
16 /HUB_log /dev/vg03/lvol3 vxfs 0.0/ 0.0 0.0/ 0.0
17 /HUBBTM_appli /dev/vg03/lvol4 vxfs 0.4/ 0.4 0.0/ 0.0
18 /HUBBTM_log /dev/vg03/lvol5 vxfs 5.1/ 5.1 4.5/ 4.5
19 /HUBBTM_data /dev/vg03/lvol6 vxfs 3323/ 3315 64.8/ 64.7
20 /HSTBTM_appli /dev/vg03/lvol7 vxfs 1.2/ 1.2 2.2/ 2.2
21 /oracle9i/client /dev/vg03/lvol8 vxfs 1.2/ 1.1 0.0/ 0.0
22 /HST_appli /dev/vg05/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0

Top disk user: PID 25712, hub_masterd 16.2 IOs/sec S - Select a Disk
Page 1 of 1



Data Collected: 05/17/08 15:12:45

Refresh Interval: 600 seconds

GlancePlus Started/Reset: 05/17/08 15:02:44
B3692A GlancePlus C.03.72.00 15:22:46 UXHUBK01 9000/800 Current Avg High
-------------------------------------------------------------------------------
CPU Util SSSSSSSSSSSSNNNNNAUUUU | 44% 46% 50%
Disk Util F | 2% 2% 3%
Mem Util SSSSSSSSUUUUUUUUUUUUBBBBB | 49% 49% 49%
Swap Util UUUURRRRRRRRRRRRR | 32% 32% 32%
-------------------------------------------------------------------------------
IO BY FILE SYSTEM Users= 9
Idx File System Device Type Logl IO Phys IO
--------------------------------------------------------------------------------
1 / /dev/vg00/lvol3 vxfs 22.2/ 23.5 1.5/ 1.5
2 /stand /dev/vg00/lvol1 hfs 1.1/ 1.1 0.0/ 0.0
3 /var /dev/vg00/lvol8 vxfs 4.3/ 4.5 3.4/ 3.6
4 /usr /dev/vg00/lvol7 vxfs 1835/ 1827 1.7/ 1.8
5 /tmp /dev/vg00/lvol4 vxfs 0.0/ 0.0 0.1/ 0.1
6 /oracle /dev/vg00/lvol10 vxfs 0.0/ 0.0 0.0/ 0.0
7 /opt /dev/vg00/lvol6 vxfs 96.3/120.2 0.1/ 0.1
8 /home /dev/vg00/lvol5 vxfs 0.0/ 0.0 0.0/ 0.0
9 /IA_FBMI /dev/vg00/fbmi vxfs 0.0/ 0.0 0.0/ 0.0
10 swap device /dev/vg00/lvol2 hfs 0.0/ 0.0 0.0/ 0.0
11 swap device /dev/vg00/lvol9 hfs 0.0/ 0.0 0.0/ 0.0
12 /DIFF_appli /dev/vg04/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
13 /DIFFBTM_appli /dev/vg04/lvol2 vxfs 50.3/ 54.8 7.6/ 7.8
14 /HUB_appli /dev/vg03/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
15 /HUB_data /dev/vg03/lvol2 vxfs 0.0/ 0.0 0.0/ 0.0
16 /HUB_log /dev/vg03/lvol3 vxfs 0.0/ 0.0 0.0/ 0.0
17 /HUBBTM_appli /dev/vg03/lvol4 vxfs 0.4/ 0.4 0.0/ 0.0
18 /HUBBTM_log /dev/vg03/lvol5 vxfs 3.2/ 4.1 4.5/ 4.5
19 /HUBBTM_data /dev/vg03/lvol6 vxfs 64.3/ 1689 45.9/ 55.3
20 /HSTBTM_appli /dev/vg03/lvol7 vxfs 1.1/ 1.2 2.2/ 2.2
21 /oracle9i/client /dev/vg03/lvol8 vxfs 1.4/ 1.3 0.0/ 0.0
22 /HST_appli /dev/vg05/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0

Top disk user: PID 25712, hub_masterd 17.2 IOs/sec S - Select a Disk
Page 1 of 1



Data Collected: 05/17/08 15:22:46

Refresh Interval: 600 seconds

GlancePlus Started/Reset: 05/17/08 15:02:44
B3692A GlancePlus C.03.72.00 15:32:48 UXHUBK01 9000/800 Current Avg High
-------------------------------------------------------------------------------
CPU Util SSSSSSSSSSSSNNNNNAUUUU | 45% 45% 50%
Disk Util F | 2% 2% 3%
Mem Util SSSSSSSSUUUUUUUUUUUUBBBBB | 49% 49% 49%
Swap Util UUUURRRRRRRRRRRRR | 32% 32% 32%
-------------------------------------------------------------------------------
IO BY FILE SYSTEM Users= 9
Idx File System Device Type Logl IO Phys IO
--------------------------------------------------------------------------------
1 / /dev/vg00/lvol3 vxfs 22.2/ 23.1 1.5/ 1.5
2 /stand /dev/vg00/lvol1 hfs 1.1/ 1.1 0.0/ 0.0
3 /var /dev/vg00/lvol8 vxfs 4.7/ 4.6 3.5/ 3.5
4 /usr /dev/vg00/lvol7 vxfs 1834/ 1829 1.6/ 1.7
5 /tmp /dev/vg00/lvol4 vxfs 0.0/ 0.0 0.0/ 0.1
6 /oracle /dev/vg00/lvol10 vxfs 0.0/ 0.0 0.0/ 0.0
7 /opt /dev/vg00/lvol6 vxfs 144.1/128.2 0.1/ 0.1
8 /home /dev/vg00/lvol5 vxfs 0.0/ 0.0 0.0/ 0.0
9 /IA_FBMI /dev/vg00/fbmi vxfs 0.0/ 0.0 0.0/ 0.0
10 swap device /dev/vg00/lvol2 hfs 0.0/ 0.0 0.0/ 0.0
11 swap device /dev/vg00/lvol9 hfs 0.0/ 0.0 0.0/ 0.0
12 /DIFF_appli /dev/vg04/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
13 /DIFFBTM_appli /dev/vg04/lvol2 vxfs 49.3/ 52.9 7.7/ 7.7
14 /HUB_appli /dev/vg03/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
15 /HUB_data /dev/vg03/lvol2 vxfs 0.0/ 0.0 0.0/ 0.0
16 /HUB_log /dev/vg03/lvol3 vxfs 0.0/ 0.0 0.0/ 0.0
17 /HUBBTM_appli /dev/vg03/lvol4 vxfs 0.4/ 0.4 0.0/ 0.0
18 /HUBBTM_log /dev/vg03/lvol5 vxfs 3.2/ 3.8 4.5/ 4.5
19 /HUBBTM_data /dev/vg03/lvol6 vxfs 64.0/ 1148 45.7/ 52.1
20 /HSTBTM_appli /dev/vg03/lvol7 vxfs 1.2/ 1.2 2.2/ 2.2
21 /oracle9i/client /dev/vg03/lvol8 vxfs 1.1/ 1.2 0.0/ 0.0
22 /HST_appli /dev/vg05/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0

Top disk user: PID 25712, hub_masterd 16.3 IOs/sec S - Select a Disk
Page 1 of 1



Data Collected: 05/17/08 15:32:48

Refresh Interval: 600 seconds

GlancePlus Started/Reset: 05/17/08 15:02:44
B3692A GlancePlus C.03.72.00 15:42:49 UXHUBK01 9000/800 Current Avg High
-------------------------------------------------------------------------------
CPU Util SSSSSSSSSSSSSNNNNNNNNAUUUU | 52% 47% 52%
Disk Util F | 3% 2% 3%
Mem Util SSSSSSSSUUUUUUUUUUUUBBBBB | 49% 49% 49%
Swap Util UUUURRRRRRRRRRRRR | 32% 32% 32%
-------------------------------------------------------------------------------
IO BY FILE SYSTEM Users= 9
Idx File System Device Type Logl IO Phys IO
--------------------------------------------------------------------------------
1 / /dev/vg00/lvol3 vxfs 27.1/ 24.1 1.6/ 1.5
2 /stand /dev/vg00/lvol1 hfs 1.1/ 1.1 0.0/ 0.0
3 /var /dev/vg00/lvol8 vxfs 4.0/ 4.4 4.1/ 3.7
4 /usr /dev/vg00/lvol7 vxfs 1723/ 1803 1.9/ 1.8
5 /tmp /dev/vg00/lvol4 vxfs 1.2/ 0.3 0.3/ 0.1
6 /oracle /dev/vg00/lvol10 vxfs 0.0/ 0.0 0.0/ 0.0
7 /opt /dev/vg00/lvol6 vxfs 68.6/113.3 0.1/ 0.1
8 /home /dev/vg00/lvol5 vxfs 0.0/ 0.0 0.0/ 0.0
9 /IA_FBMI /dev/vg00/fbmi vxfs 0.0/ 0.0 0.0/ 0.0
10 swap device /dev/vg00/lvol2 hfs 0.0/ 0.0 0.0/ 0.0
11 swap device /dev/vg00/lvol9 hfs 0.0/ 0.0 0.0/ 0.0
12 /DIFF_appli /dev/vg04/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
13 /DIFFBTM_appli /dev/vg04/lvol2 vxfs 228.2/ 96.7 8.7/ 8.0
14 /HUB_appli /dev/vg03/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
15 /HUB_data /dev/vg03/lvol2 vxfs 0.0/ 0.0 0.0/ 0.0
16 /HUB_log /dev/vg03/lvol3 vxfs 0.0/ 0.0 0.0/ 0.0
17 /HUBBTM_appli /dev/vg03/lvol4 vxfs 0.4/ 0.4 0.0/ 0.0
18 /HUBBTM_log /dev/vg03/lvol5 vxfs 62.6/ 18.5 9.8/ 5.8
19 /HUBBTM_data /dev/vg03/lvol6 vxfs 539.5/995.7 89.7/ 61.5
20 /HSTBTM_appli /dev/vg03/lvol7 vxfs 2.8/ 1.6 2.6/ 2.3
21 /oracle9i/client /dev/vg03/lvol8 vxfs 1.2/ 1.2 0.0/ 0.0
22 /HST_appli /dev/vg05/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0

Top disk user: PID 25712, hub_masterd 20.3 IOs/sec S - Select a Disk
Page 1 of 1



Data Collected: 05/17/08 15:42:49

Refresh Interval: 600 seconds

GlancePlus Started/Reset: 05/17/08 15:02:44
B3692A GlancePlus C.03.72.00 15:52:50 UXHUBK01 9000/800 Current Avg High
-------------------------------------------------------------------------------
CPU Util SSSSSSSSSSSSSNNNNNNNNNNARUUUU | 57% 49% 57%
Disk Util FFV | 5% 3% 5%
Mem Util SSSSSSSSUUUUUUUUUUUUBBBBB | 49% 49% 49%
Swap Util UUUURRRRRRRRRRRRR | 32% 32% 32%
-------------------------------------------------------------------------------
IO BY FILE SYSTEM Users= 9
Idx File System Device Type Logl IO Phys IO
--------------------------------------------------------------------------------
1 / /dev/vg00/lvol3 vxfs 23.4/ 23.9 1.6/ 1.5
2 /stand /dev/vg00/lvol1 hfs 1.1/ 1.1 0.0/ 0.0
3 /var /dev/vg00/lvol8 vxfs 5.5/ 4.7 4.4/ 3.8
4 /usr /dev/vg00/lvol7 vxfs 1698/ 1782 2.0/ 1.8
5 /tmp /dev/vg00/lvol4 vxfs 4.2/ 1.1 0.4/ 0.2
6 /oracle /dev/vg00/lvol10 vxfs 0.0/ 0.0 0.0/ 0.0
7 /opt /dev/vg00/lvol6 vxfs 203.3/131.3 0.2/ 0.1
8 /home /dev/vg00/lvol5 vxfs 0.0/ 0.0 0.0/ 0.0
9 /IA_FBMI /dev/vg00/fbmi vxfs 0.0/ 0.0 0.1/ 0.0
10 swap device /dev/vg00/lvol2 hfs 0.0/ 0.0 0.0/ 0.0
11 swap device /dev/vg00/lvol9 hfs 0.0/ 0.0 0.0/ 0.0
12 /DIFF_appli /dev/vg04/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
13 /DIFFBTM_appli /dev/vg04/lvol2 vxfs 261.2/129.6 9.0/ 8.2
14 /HUB_appli /dev/vg03/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
15 /HUB_data /dev/vg03/lvol2 vxfs 0.0/ 0.0 0.0/ 0.0
16 /HUB_log /dev/vg03/lvol3 vxfs 0.0/ 0.0 0.0/ 0.0
17 /HUBBTM_appli /dev/vg03/lvol4 vxfs 0.5/ 0.4 0.0/ 0.0
18 /HUBBTM_log /dev/vg03/lvol5 vxfs 59.6/ 26.7 12.5/ 7.2
19 /HUBBTM_data /dev/vg03/lvol6 vxfs 631.7/922.9 113.7/ 71.9
20 /HSTBTM_appli /dev/vg03/lvol7 vxfs 2.8/ 1.8 2.8/ 2.4
21 /oracle9i/client /dev/vg03/lvol8 vxfs 1.2/ 1.2 0.0/ 0.0
22 /HST_appli /dev/vg05/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0

Top disk user: PID 25712, hub_masterd 20.3 IOs/sec S - Select a Disk
Page 1 of 1



Data Collected: 05/17/08 15:52:50

Refresh Interval: 600 seconds

GlancePlus Started/Reset: 05/17/08 15:02:44
B3692A GlancePlus C.03.72.00 16:02:51 UXHUBK01 9000/800 Current Avg High
-------------------------------------------------------------------------------
CPU Util SSSSSSSSSSSSSSNNNNNNNNNNNRUUUUU | 61% 51% 61%
Disk Util FFFV | 8% 4% 8%
Mem Util SSSSSSSSUUUUUUUUUUUUBBBBB | 49% 49% 49%
Swap Util UUUURRRRRRRRRRRR | 32% 32% 32%
-------------------------------------------------------------------------------
IO BY FILE SYSTEM Users= 9
Idx File System Device Type Logl IO Phys IO
--------------------------------------------------------------------------------
1 / /dev/vg00/lvol3 vxfs 18.3/ 23.0 1.4/ 1.5
2 /stand /dev/vg00/lvol1 hfs 1.1/ 1.1 0.0/ 0.0
3 /var /dev/vg00/lvol8 vxfs 1084/184.4 72.6/ 15.3
4 /usr /dev/vg00/lvol7 vxfs 1675/ 1764 1.9/ 1.8
5 /tmp /dev/vg00/lvol4 vxfs 0.0/ 0.9 0.0/ 0.2
6 /oracle /dev/vg00/lvol10 vxfs 0.0/ 0.0 0.0/ 0.0
7 /opt /dev/vg00/lvol6 vxfs 68.3/120.8 0.1/ 0.1
8 /home /dev/vg00/lvol5 vxfs 0.0/ 0.0 0.0/ 0.0
9 /IA_FBMI /dev/vg00/fbmi vxfs 0.0/ 0.0 0.0/ 0.0
10 swap device /dev/vg00/lvol2 hfs 0.0/ 0.0 0.0/ 0.0
11 swap device /dev/vg00/lvol9 hfs 0.0/ 0.0 0.0/ 0.0
12 /DIFF_appli /dev/vg04/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
13 /DIFFBTM_appli /dev/vg04/lvol2 vxfs 171.1/136.5 8.7/ 8.3
14 /HUB_appli /dev/vg03/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
15 /HUB_data /dev/vg03/lvol2 vxfs 0.0/ 0.0 0.0/ 0.0
16 /HUB_log /dev/vg03/lvol3 vxfs 0.0/ 0.0 0.0/ 0.0
17 /HUBBTM_appli /dev/vg03/lvol4 vxfs 0.4/ 0.4 0.0/ 0.0
18 /HUBBTM_log /dev/vg03/lvol5 vxfs 75.8/ 34.9 9.5/ 7.5
19 /HUBBTM_data /dev/vg03/lvol6 vxfs 3948/ 1427 125.8/ 80.9
20 /HSTBTM_appli /dev/vg03/lvol7 vxfs 2.3/ 1.9 2.7/ 2.5
21 /oracle9i/client /dev/vg03/lvol8 vxfs 1.2/ 1.2 0.0/ 0.0
22 /HST_appli /dev/vg05/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0

Top disk user: PID 2890, opcmsga 68.0 IOs/sec S - Select a Disk
Page 1 of 1



Data Collected: 05/17/08 16:02:51

Refresh Interval: 600 seconds

GlancePlus Started/Reset: 05/17/08 15:02:44
B3692A GlancePlus C.03.72.00 16:12:52 UXHUBK01 9000/800 Current Avg High
-------------------------------------------------------------------------------
CPU Util SSSSSSSSSSSSSNNNNNNNNUUUU | 51% 51% 61%
Disk Util F | 3% 4% 8%
Mem Util SSSSSSSSUUUUUUUUUUUUBBBBB | 49% 49% 49%
Swap Util UUUURRRRRRRRRRRR | 31% 31% 32%
-------------------------------------------------------------------------------
IO BY FILE SYSTEM Users= 8
Idx File System Device Type Logl IO Phys IO
--------------------------------------------------------------------------------
1 / /dev/vg00/lvol3 vxfs 16.5/ 22.1 1.5/ 1.5
2 /stand /dev/vg00/lvol1 hfs 1.1/ 1.1 0.0/ 0.0
3 /var /dev/vg00/lvol8 vxfs 4.8/158.8 3.9/ 13.7
4 /usr /dev/vg00/lvol7 vxfs 1782/ 1766 1.8/ 1.8
5 /tmp /dev/vg00/lvol4 vxfs 0.0/ 0.8 0.2/ 0.2
6 /oracle /dev/vg00/lvol10 vxfs 0.0/ 0.0 0.0/ 0.0
7 /opt /dev/vg00/lvol6 vxfs 144.2/124.1 0.2/ 0.1
8 /home /dev/vg00/lvol5 vxfs 0.0/ 0.0 0.0/ 0.0
9 /IA_FBMI /dev/vg00/fbmi vxfs 0.0/ 0.0 0.0/ 0.0
10 swap device /dev/vg00/lvol2 hfs 0.0/ 0.0 0.0/ 0.0
11 swap device /dev/vg00/lvol9 hfs 0.0/ 0.0 0.0/ 0.0
12 /DIFF_appli /dev/vg04/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
13 /DIFFBTM_appli /dev/vg04/lvol2 vxfs 105.8/132.1 8.4/ 8.3
14 /HUB_appli /dev/vg03/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
15 /HUB_data /dev/vg03/lvol2 vxfs 0.0/ 0.0 0.0/ 0.0
16 /HUB_log /dev/vg03/lvol3 vxfs 0.0/ 0.0 0.0/ 0.0
17 /HUBBTM_appli /dev/vg03/lvol4 vxfs 0.4/ 0.4 0.0/ 0.0
18 /HUBBTM_log /dev/vg03/lvol5 vxfs 3.7/ 30.4 5.0/ 7.2
19 /HUBBTM_data /dev/vg03/lvol6 vxfs 247.4/ 1259 74.2/ 80.0
20 /HSTBTM_appli /dev/vg03/lvol7 vxfs 1.3/ 1.8 2.5/ 2.5
21 /oracle9i/client /dev/vg03/lvol8 vxfs 1.1/ 1.2 0.0/ 0.0
22 /HST_appli /dev/vg05/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0

Top disk user: PID 25712, hub_masterd 17.8 IOs/sec S - Select a Disk
Page 1 of 1



Data Collected: 05/17/08 16:12:52

Refresh Interval: 600 seconds

GlancePlus Started/Reset: 05/17/08 15:02:44
B3692A GlancePlus C.03.72.00 16:22:53 UXHUBK01 9000/800 Current Avg High
-------------------------------------------------------------------------------
CPU Util SSSSSSSSSSSSSNNNNNNNNNUUUU | 53% 51% 61%
Disk Util F | 4% 4% 8%
Mem Util SSSSSSSSUUUUUUUUUUUUBBBBB | 48% 49% 49%
Swap Util UUUURRRRRRRRRRRR | 31% 31% 32%
-------------------------------------------------------------------------------
IO BY FILE SYSTEM Users= 8
Idx File System Device Type Logl IO Phys IO
--------------------------------------------------------------------------------
1 / /dev/vg00/lvol3 vxfs 15.1/ 21.2 1.5/ 1.5
2 /stand /dev/vg00/lvol1 hfs 1.1/ 1.1 0.0/ 0.0
3 /var /dev/vg00/lvol8 vxfs 4.4/139.5 3.8/ 12.4
4 /usr /dev/vg00/lvol7 vxfs 1779/ 1768 1.7/ 1.8
5 /tmp /dev/vg00/lvol4 vxfs 0.0/ 0.7 0.0/ 0.1
6 /oracle /dev/vg00/lvol10 vxfs 0.0/ 0.0 0.0/ 0.0
7 /opt /dev/vg00/lvol6 vxfs 96.4/120.7 0.1/ 0.1
8 /home /dev/vg00/lvol5 vxfs 0.0/ 0.0 0.0/ 0.0
9 /IA_FBMI /dev/vg00/fbmi vxfs 0.0/ 0.0 0.0/ 0.0
10 swap device /dev/vg00/lvol2 hfs 0.0/ 0.0 0.0/ 0.0
11 swap device /dev/vg00/lvol9 hfs 0.0/ 0.0 0.0/ 0.0
12 /DIFF_appli /dev/vg04/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
13 /DIFFBTM_appli /dev/vg04/lvol2 vxfs 102.9/128.5 8.4/ 8.3
14 /HUB_appli /dev/vg03/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
15 /HUB_data /dev/vg03/lvol2 vxfs 0.0/ 0.0 0.0/ 0.0
16 /HUB_log /dev/vg03/lvol3 vxfs 0.0/ 0.0 0.0/ 0.0
17 /HUBBTM_appli /dev/vg03/lvol4 vxfs 0.4/ 0.4 0.0/ 0.0
18 /HUBBTM_log /dev/vg03/lvol5 vxfs 57.5/ 33.8 14.8/ 8.1
19 /HUBBTM_data /dev/vg03/lvol6 vxfs 241.2/ 1131 71.0/ 78.8
20 /HSTBTM_appli /dev/vg03/lvol7 vxfs 1.3/ 1.8 2.3/ 2.4
21 /oracle9i/client /dev/vg03/lvol8 vxfs 1.5/ 1.2 0.0/ 0.0
22 /HST_appli /dev/vg05/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0

Top disk user: PID 25712, hub_masterd 17.7 IOs/sec S - Select a Disk
Page 1 of 1



Data Collected: 05/17/08 16:22:53

Refresh Interval: 600 seconds

GlancePlus Started/Reset: 05/17/08 15:02:44
B3692A GlancePlus C.03.72.00 16:32:54 UXHUBK01 9000/800 Current Avg High
-------------------------------------------------------------------------------
CPU Util SSSSSSSSSSSSSNNNNNNUUUU | 46% 51% 61%
Disk Util F | 3% 3% 8%
Mem Util SSSSSSSSUUUUUUUUUUUBBBBB | 48% 49% 49%
Swap Util UUUURRRRRRRRRRRR | 31% 31% 32%
-------------------------------------------------------------------------------
IO BY FILE SYSTEM Users= 8
Idx File System Device Type Logl IO Phys IO
--------------------------------------------------------------------------------
1 / /dev/vg00/lvol3 vxfs 15.2/ 20.5 1.5/ 1.5
2 /stand /dev/vg00/lvol1 hfs 1.1/ 1.1 0.0/ 0.0
3 /var /dev/vg00/lvol8 vxfs 4.7/124.5 3.6/ 11.4
4 /usr /dev/vg00/lvol7 vxfs 1806/ 1772 1.7/ 1.8
5 /tmp /dev/vg00/lvol4 vxfs 0.0/ 0.6 0.0/ 0.1
6 /oracle /dev/vg00/lvol10 vxfs 0.0/ 0.0 0.0/ 0.0
7 /opt /dev/vg00/lvol6 vxfs 144.1/123.3 0.1/ 0.1
8 /home /dev/vg00/lvol5 vxfs 0.0/ 0.0 0.0/ 0.0
9 /IA_FBMI /dev/vg00/fbmi vxfs 0.0/ 0.0 0.0/ 0.0
10 swap device /dev/vg00/lvol2 hfs 0.0/ 0.0 0.0/ 0.0
11 swap device /dev/vg00/lvol9 hfs 0.0/ 0.0 0.0/ 0.0
12 /DIFF_appli /dev/vg04/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
13 /DIFFBTM_appli /dev/vg04/lvol2 vxfs 85.0/123.6 8.3/ 8.3
14 /HUB_appli /dev/vg03/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0
15 /HUB_data /dev/vg03/lvol2 vxfs 0.0/ 0.0 0.0/ 0.0
16 /HUB_log /dev/vg03/lvol3 vxfs 0.0/ 0.0 0.0/ 0.0
17 /HUBBTM_appli /dev/vg03/lvol4 vxfs 0.4/ 0.4 0.0/ 0.0
18 /HUBBTM_log /dev/vg03/lvol5 vxfs 82.6/ 39.2 4.9/ 7.8
19 /HUBBTM_data /dev/vg03/lvol6 vxfs 194.0/ 1027 64.9/ 77.3
20 /HSTBTM_appli /dev/vg03/lvol7 vxfs 1.3/ 1.7 2.3/ 2.4
21 /oracle9i/client /dev/vg03/lvol8 vxfs 1.1/ 1.2 0.0/ 0.0
22 /HST_appli /dev/vg05/lvol1 vxfs 0.0/ 0.0 0.0/ 0.0

Top disk user: PID 25712, hub_masterd 17.1 IOs/sec S - Select a Disk
Page 1 of 1
# 14  
Old 08-14-2008
Quote:
Originally Posted by fara_aris
i've tried both methods;

1)
[UXHUBT01:fara]/home/support/fara#cat test3.sh
awk '
/home/support/fara/output.out
/B3692A/ { print $5, $7; getline; print }
/^(CPU|Disk|Mem) Util/ { print $1, $5 }
/Top disk user/ { print "" ; print; print "" }
' /home/support/fara/HUBK01_glance.out

[UXHUBT01:fara]/home/support/fara#
[UXHUBT01:fara]/home/support/fara#./test3.sh
syntax error The source line is 2.
The error context is
>>> /home/support/fara/output. <<< out
awk: Quitting
The source line is 2.
The output file does not belong there. Put it at the end, e.g.

Code:
' /home/support/fara/HUBK01_glance.out > /home/support/fara/output.out

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Grep -P does not capture the desired output

Hi, I'm trying to filter the following output to only display information about an alarm where the Status: corresponds to Set. -------------------------------------------------------- Description: hw_optics: RX POWER LANE-0 LOW ALARM Location: Optics0/0/0/21... (6 Replies)
Discussion started by: sand1234
6 Replies

2. Shell Programming and Scripting

Capture output from expect script

Hi I am new to Expect scripting. I have to connect to a remote server and capture the output. Here I need output of " send "list registered\r"" to be stored in a file. but after execution, /tmp/capture.txt is of 0 byte #!/usr/bin/expect spawn ssh abc@10.10.10.10 -p 5022 expect... (2 Replies)
Discussion started by: bns928
2 Replies

3. Shell Programming and Scripting

Want ro capture the debug in output file

I want to capture the debug for the below command in output file . i tried like this but its not working: sh -xv <scriptname> >> output.log i want the output in a log file. Anyone plz help in this (2 Replies)
Discussion started by: chakkaravarthy
2 Replies

4. Shell Programming and Scripting

How to capture output to log file

Hi I have a script that will run multiple unix & sql commands. I want to see the output as well as capture it to a log file for further analysis. Is there an easy way to do that instead of adding "tee -a logfile" on everyline or even on the execute line (i.e. script | tee -s logfile). Thanks (1 Reply)
Discussion started by: nimo
1 Replies

5. Shell Programming and Scripting

Script to capture snoop output

Hi Everyone :), Need your advice as I'm new to UNIX scripting.. I'm trying to write a script to capture snoop output for 5 minutes for every hour for 24 hours. To stop snoop, I need to press Control-C to break it. This is what I got so far, but now I'm stuck! :confused: The script: # cat... (2 Replies)
Discussion started by: faraaris
2 Replies

6. Shell Programming and Scripting

Enter the command to capture output--help

&& echo "PLEASE enter the command to capture output" || echo "Processing your command manual" x=$# echo $x while do while man $@ | read -r line do >$@.txt ... (1 Reply)
Discussion started by: rrd1986
1 Replies

7. Shell Programming and Scripting

Capture Shell Script Output To A File

Hi, I am running a shell script called dbProcess.sh which performs shutdown and startup of various Oracle instances we have.At the time of execution the script produces the following output to the command line window $./dbProcess.sh stop #### Run Details ###### Hostname : server-hop-1... (4 Replies)
Discussion started by: rajan_san
4 Replies

8. UNIX for Advanced & Expert Users

Capture output to file and printer

Hi All : I wanted a unix command by which I could be able to print the output to a file and at the same time to a printer. Any help will be greatly appreciated. Regards, Ramamurthy Dasari (1 Reply)
Discussion started by: rdasari
1 Replies

9. Shell Programming and Scripting

Capture scp output

I have a simple script that uses scp to copy some files from one server to another. I want to capture the files that are copied but simple redirection to a file does not work. So I want to capture this output from the scp command in a log file. -bash-3.00$ scp -pr /export/jumpstart/Files... (7 Replies)
Discussion started by: Tornado
7 Replies

10. Shell Programming and Scripting

Capture output from interactive script

I have written a menu driven script to walk users through bringing up and down an application process. Sometimes the user tells me the script does not work taking the application down, but he can't recall seeing an error message. Is there a way to capture std out and stderr out from an... (6 Replies)
Discussion started by: MizzGail
6 Replies
Login or Register to Ask a Question