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!

running sar without giving the -f flag (sa files have #mmdd format) 1

Status
Not open for further replies.

joephilip

MIS
Apr 29, 2002
41
0
0
US
In our HP-UX 11.11 box, sar data is generated in a slightly diferent name
formatted file like /var/adm/sa/sa0323 - usually it is sa#dd; but in our
case it is sa#mmdd. I guess it is set by the script /usr/lbin/sa/sa1.

So, when I do
sar -u , sar complains that /var/adm/sa/sa23 is not found. I can un like
sar -u -f /var/adm/sa/sa0323.

However, I want to avoid typing the full file name every time I run the sar
ie, I just want to run sar as:
sar -u
or sar -d etc without the filename?

How do I do that?
 
You could create an alias, e.g....

alias sar-u='sar -u -f /var/adm/sa/sa`date +%m%d`'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top