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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAR command in Shell for Media Server CPU real-time utilization

Status
Not open for further replies.

telecomPA

MIS
Jul 9, 2007
413
0
0
US
hi all, a while back someone i worked with showed me how she could see real-time CPU utilization of one of our PBX's. i asked her what the command was and she gave me the following:

sar -u -f sa20

the SAR command shows CPU utilization
the -u parameter is for utilization
the -f paramteter is for file name
the sa20 is the file name

so the command works, but it's a log, not real-time information. does anyone here know how to view CPU utilization on a S85xx or S87xx server?

thanks in advance.
 
/usr/bin/sar -A -f /var/log/sa/saXX (raw files saXX interpreted sarXX - use this
command if not interpreted yet, cron does once a day 23:53)

dadmin@S8300> pwd
/var/log/sa
dadmin@S8300> ls -ltr | tail -9
-rw-r--r-- 1 adm adm 881238 Sep 14 23:53 sar14
-rw-r--r-- 1 adm adm 601584 Sep 14 23:55 sa14
-rw-r--r-- 1 adm adm 96191 Sep 14 23:55 sard14
-rw-r--r-- 1 adm adm 881238 Sep 15 23:53 sar15
-rw-r--r-- 1 adm adm 601584 Sep 15 23:55 sa15
-rw-r--r-- 1 adm adm 96191 Sep 15 23:55 sard15
-rw-r--r-- 1 adm adm 236184 Sep 16 09:20 sa16
-rw-r--r-- 1 adm adm 37566 Sep 16 09:20 sard16
-rw-r--r-- 1 adm adm 905886 Sep 16 09:21 sard07

dadmin@S8300> ls -l sa*16 | grep Sep
-rw-r--r-- 1 adm adm 238272 Sep 16 09:25 sa16
-rw-r--r-- 1 adm adm 37566 Sep 16 09:20 sard16

/usr/bin/sar -A -f /var/log/sa/sa16

# file sard16 will have interpreted information from sa16
# On cm4 and higher it looks like it creates updated sardXX every 5 minutes

dadmin@S8300> date
Fri Sep 16 09:30:03 PDT 2011
dadmin@S8300> ls -l sa*16 | grep Sep
-rw-r--r-- 1 adm adm 240360 Sep 16 09:30 sa16
-rw-r--r-- 1 adm adm 37901 Sep 16 09:25 sard16
dadmin@S8300> ls -l sa*16 | grep Sep
-rw-r--r-- 1 adm adm 240360 Sep 16 09:30 sa16
-rw-r--r-- 1 adm adm 38236 Sep 16 09:30 sard16

dadmin@S8300> vi sard16


A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

37 years Bell, AT&T, Lucent, Avaya
Tier 3 for 27 years and counting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top