- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: sar output
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2009 09:57 PM
тАО05-11-2009 09:57 PM
sar output
how to check the prevous day sar output.what is the syntax for it
Regards
Rkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2009 10:15 PM
тАО05-11-2009 10:15 PM
Re: sar output
look these files /var/adm/sa/saxx where xx is two digits representing the date.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2009 10:24 PM
тАО05-11-2009 10:24 PM
Re: sar output
So if today is 12 May, and you want to look at yesterday's sar data for cpu utilization instead of:
sar -u 2 10
you would do:
sar -u -f /var/adm/sa/sa11
To setup accounting in the first place - carry out the following steps:
-Create the following directory, owned by user adm
/var/adm/sa
-Make sure user adm is allowed to use cron and add the following entried to the file /var/spool/cron/crontabs/adm
# adm crontab file for
#
# Run Daily Accounting
0 4 * * 1-6 /usr/sbin/acct/runacct 2> /var/adm/acct/nite/fd2log
#
# Check size of /var/adm/pacct
0 * * * * /usr/sbin/acct/ckpacct
#
# Create summary files
15 5 1 * * /usr/sbin/acct/monacct
#
# Collect system accounting information and store in binary format
0 7-17 * * * /usr/lib/sa/sa1 1200 3
#
# Write a daily report to /var/adm/sa/sadd (where dd is day number)
0 18 * * 1-6 /usr/lib/sa/sa2 -s 7:00 -e 18:01 -i 3600 -A
#
# Disk Accounting
0 2 * * 4 /usr/sbin/acct/dodisk
-Remove all comments from /etc/fstab, as some of the accounting tools can't process them
-Set flag to 1 in /etc/rc.config.d/acct, as follows:
START_ACCT=1
-Comment out ├в date├в commands in the /usr/sbin/acct/dodisk script - otherwise you get a pointless email from cron to the adm account every day with the date in it.
-Set up /etc/acct/holidays for the current year. You need to figure out the "day of the year" for every public holiday where you are...
After this has been done, and the scripts have been allowed to run for >24 hours, you will start to see data in /var/adm/sa
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2009 10:29 PM
тАО05-11-2009 10:29 PM
Re: sar output
provided you have a scheduled crontab job
00 * * * * /usr/lib/sa/sa1 1200 3
the syntax is
sar -f /var/adm/sa/sadd
(where dd is the day dd)
Without the -f it reads the current day
If you do not have the cronjob, then
sar data is not stored, then you
cannot retrieve it either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2009 10:41 PM
тАО05-11-2009 10:41 PM
Re: sar output
1st you need to take sar output into a file see the example
The following command stores system activity data in a file /home/root/sar.data 360 times,
once every 10 seconds (total time one hour).
#sar -o /home/root/sar.data 10 360
This file can be analyzed later by using the following command.
#sar -f /home/root/sar.data
Suraj