Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

svmon output filtering...

Status
Not open for further replies.

ogniemi

Technical User
Nov 7, 2003
1,041
PL
Hello,
The following command:

svmon -Pgt 3 -i 60 |/opt/freeware/bin/grep -A 1 Pid|awk '{print $5}'

gives the following output:

Pgsp
14522

Pgsp
13608

Pgsp
6715

Pgsp
14522

Pgsp
13608

Pgsp
6715
........
........
........


Ho to get each svmon cycle in new colum to get something like below:

Pgsp Pgsp Pgsp
14522 14522 14522

Pgsp Pgsp Pgsp
13608 13608 13608

Pgsp Pgsp Pgsp
6715 6715 6715


thx in advance, r.


 
Perhaps change...

awk '{print $5}'

...to...

awk '{a[NR%9]=a[NR%9] $5 "\t"}END{for(x=1;x<9;x++)print a[x]}'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top