Configuring sar on solaris 7

Posted on 2003-03-26
Medium Priority
Last Modified: 2013-12-21
How do I configure the sar utility on solaris 7 O/S?
Question by:chakryreddy
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
LVL 18

Expert Comment

ID: 8210677
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

Expert Comment

ID: 8210738
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.


Author Comment

ID: 8216648
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.
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more


Accepted Solution

soupdragon earned 400 total points
ID: 8216744
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.
LVL 18

Expert Comment

ID: 8216763
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

Author Comment

ID: 8216937
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.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month12 days, 18 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question