1753756 Members
4863 Online
108799 Solutions
New Discussion юеВ

unable to run sar

 
SOLVED
Go to solution
Phani kumar V
Advisor

unable to run sar

unable to use sar, on HP-ux 11i v3.
we are getting error below.

#sar
sar: Can't open /var/adm/sa/sa17
9 REPLIES 9
Suraj K Sankari
Honored Contributor

Re: unable to run sar

Hi,

Some files are missing or may be permission could be change.

post output or "whereis sar"

Suraj
George_Dodds
Honored Contributor

Re: unable to run sar

You need /var/adm/sa directory to store sar data. it's asking for sa17 as 17 is todays date.

It could be a permissions issue on the directory if it is there.
Nido
Trusted Contributor

Re: unable to run sar

Hello Phani,

Check files under /var/adm/sa.
Above message expects file /var/adm/sa/sa17, which is not present.

For an example , To get the current statistics:
You may run sar 2 2

HP-UX nido B.11.00 U 9000/800 06/17/09

02:41:26 %usr %sys %wio %idle
02:41:28 2 3 5 90
02:41:30 1 3 1 95

Average 2 3 3 92


Check the man page of sar for details:

Cheers!!
" Let Villagers Be Happy!! "
SoorajCleris
Honored Contributor

Re: unable to run sar

Normally if you give ony #sar the result wil be like this only. Always give the interval and count.

you may see the example below

# sar
sar: Can't open /var/adm/sa/sa17
[rx260-15]/
# uname -r
B.11.23
[rx260-15]/
# sar
sar: Can't open /var/adm/sa/sa17
[rx260-15]/
# sar -d 1 1

HP-UX rx260-15 B.11.23 U ia64 06/17/09

03:48:23 device %busy avque r+w/s blks/s avwait avserv
03:48:24 c2t1d0 4.95 0.50 8 127 0.00 17.96
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Phani kumar V
Advisor

Re: unable to run sar

Hi All,

Thanks for responding

#sar 2 2

HP-UX UAT B.11.31 U ia64 06/17/09

13:12:52 %usr %sys %wio %idle
13:12:54 0 0 0 100
13:12:56 0 0 0 99

#whereis sar
sar: /usr/sbin/sar /usr/bin/sar /usr/share/man/man1m.Z/sar.1m

The directory sa is not present in /var/adm
sh: /var/adm/sa: not found.

Please give me what steps do i need to take.

Thanks,
Phani Kumar
Nido
Trusted Contributor
Solution

Re: unable to run sar

Hi Phani,

mkdir /var/adm/sa

I'll encourage you to read man page for sar.

Cheers!!
" Let Villagers Be Happy!! "
Phani kumar V
Advisor

Re: unable to run sar

Hi Nido

Thanks now i am able to run and sar.

Thanks
Phani Kumar

Suraj K Sankari
Honored Contributor

Re: unable to run sar

Hi,
>>Please give me what steps do i need to take.

Check with other hp server create a new directiory under /var/adm
#mkdir sa
give proper owner and permission as other
server

then check with "sar"

Suraj
Phani kumar V
Advisor

Re: unable to run sar

Thanks to all