Configuring sar on solaris 7

How do I configure the sar utility on solaris 7 O/S?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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.

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.
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.