1752572 Members
4667 Online
108788 Solutions
New Discussion юеВ

Re: how to install sar

 
SOLVED
Go to solution
ng_7
Regular Advisor

how to install sar

hi, i accidentally delete sar from my usr/bin, and now sar is not function any more. can please tell me how do i install back my sar. thanks a lot.

regards
ng
12 REPLIES 12
skt_skt
Honored Contributor
Solution

Re: how to install sar

YOu may just copy from anothe server
Senthil Kumar .A_1
Honored Contributor

Re: how to install sar

How about coping the sar executable from another HPUX box and putting it back on /usr/bin. By the way, sar is not installed as a independent product in hpux, I beleive it is part of HPUX OS bundle. If you do not have any other machine in the network, let me know, may be I can attach a sar binary to this post..


SK
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Patrick Wallek
Honored Contributor

Re: how to install sar

Even better, restore from you latest backup.

You DO have a backup, right?
ng_7
Regular Advisor

Re: how to install sar

thanks, i try copy from other unix box and try run it and got this error. pls help. Thanks

db1:/backup# sar
sar: Can't open /var/adm/sa/sa08


regards
alson
Senthil Kumar .A_1
Honored Contributor

Re: how to install sar

try

sar 5 60 (run every 5 sec's for 60 times)

This should work ,as it would output to the STDOUT.

SK
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Dennis Handly
Acclaimed Contributor

Re: how to install sar

>i try copy from other unix box and try run it and got this error.

Did you make sure it has the same permissions?
(I guess that's not it since it has 555.)

Are you root?
ng_7
Regular Advisor

Re: how to install sar

hi, this is my some information for you guy,

db1:/usr/bin# id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)
db1:/usr/bin#
db1:/usr/bin# ll sar
-rwxrwxrwx 1 root sys 45056 Jun 6 17:07 sar
db1:/usr/bin# sar
sar: Can't open /var/adm/sa/sa11


thanks
Bill Hassell
Honored Contributor

Re: how to install sar

You did not delete sar -- it is running correctly. You CANNOT run sar without a parameter or it will try to open the file mentioned in the error message. It is not an interactive program so as a minimum, you must run sar like this:

sar 1

or

sar -d 1

Otherwise, the man page documents how to use the special sar files.


Bill Hassell, sysadmin
Yogeeraj_1
Honored Contributor

Re: how to install sar

hi,

Please check.

$ sar
sar: Can't open /var/adm/sa/sa11
$

Where 11 is today's date!

/var/adm/sa/sa11 is an example of the standard system activity daily data file /var/adm/sa/sadd for the current day dd.

Generally file format is: /var/adm/sa/sadd
daily data file, where dd is two digits representing the day of the month.

Below a few examples of the SAR command:

Watch CPU activity evolve for 5 seconds:

sar 1 5

Watch CPU activity evolve for 10 minutes and save data:

sar -o temp 60 10

Review disk and tape activity from that period later:

sar -d -f temp

Review cpu utilization on a multi-processor system later:
sar -u -M -f temp


kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)