Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 949
  • Last Modified:

Configuring sar on solaris 7

How do I configure the sar utility on solaris 7 O/S?
0
chakryreddy
Asked:
chakryreddy
  • 2
  • 2
  • 2
1 Solution
 
liddlerCommented:
It depends on what you want sar to do, are you just looking at particular info, or all system info, or a regular report.
sar -A gives all system output

If you get an error saying something like
sar: can't open /var/adm/sa/sa26
do mkdir  /var/adm/sa/sat26
and it will work
0
 
soupdragonCommented:
I'm assuming you want sar to give you historical info - by default this is turned off. Simply edit the sys crontab and uncomment the 3 lines for sar in there.

#0 * * * 0-6 /usr/lib/sa/sa1
#20,40 8-17 * * 1-5 /usr/lib/sa/sa1
#5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A

This causes sar to take regular snapshots, every 20 mins Mon - Fri 08:00 - 18:00, every hour at other times. Produces a text sar report every weekday at 18:05.

SD
0
 
chakryreddyAuthor Commented:
I did uncomment the sys crontab by loging as root but it didnot help. How do I get the sys crontab to work then?

Many thanks.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
soupdragonCommented:
If you have edited it by hand, cron is not aware of the changes made. Ensdure your $EDITOR is set to vi and simply call crontab -e sys and save the changes (wq!) to make the changes take effect.

Alternatively stop and start the cron process using
'sh /etc/rc2.d/S75cron stop; sh /etc/rc2.d/S75cron start'

You should then see calls to run the cron tasks every 20 minutes in the cron log file /var/cron/log, and a file of cron data being appended to in /var/adm/sa/sarNN where NN is todays date. Every day the summary file will be created namd /var/adm/sa/saNN.

Calling sar should now list the performance snapshots every 20 minutes. You can specify start and end times as well as the sar file to read from - see the sar manpage.
0
 
liddlerCommented:
Also ensure that sys is not in /etc/cron.d/cron.deny file and if there is a /etc/cron.d/cron.allow file, then sys is in there
0
 
chakryreddyAuthor Commented:
Thanks a lot guys. Its working now.

I changed the sys crontab after setting the EDITOR and also adding the sys name in the cron.allow file.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now