HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Collect for sar1 / sa2
Operating System - HP-UX
1834770
Members
2901
Online
110070
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
08-12-2002 11:12 AM
08-12-2002 11:12 AM
Collect for sar1 / sa2
Hello everybody,
In my crontab there are the entries for the sar command:
0 * * * * /usr/lbin/sa/sa1
59 23 * * * /usr/lbin/sa/sa2 -s 0:01 -e 23:59 -i 300 -A
The problem is the sa2 not run becase permission problems. I set the permissions for 555, but the files in the /var/adm/sa not be format (sardd).
How I do for format the files collect previously?
Regards and Thanks for all.
Andr??
P.S. Sorry for the english
In my crontab there are the entries for the sar command:
0 * * * * /usr/lbin/sa/sa1
59 23 * * * /usr/lbin/sa/sa2 -s 0:01 -e 23:59 -i 300 -A
The problem is the sa2 not run becase permission problems. I set the permissions for 555, but the files in the /var/adm/sa not be format (sardd).
How I do for format the files collect previously?
Regards and Thanks for all.
Andr??
P.S. Sorry for the english
Andre Augusto
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2002 11:19 AM
08-12-2002 11:19 AM
Re: Collect for sar1 / sa2
Hello,
You can sar with -d option..
sar -d /var/adm/sa/sadates.
-USA..
You can sar with -d option..
sar -d /var/adm/sa/sadates.
-USA..
Good Luck..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2002 11:30 AM
08-12-2002 11:30 AM
Re: Collect for sar1 / sa2
Hi Andre,
This is what the sar cron job looks like on my system,
0,5,10,15,20,25,30,35,40,45,50,55 * * * 0-6 /usr/lib/sa/sa1
57 23 * * 0-6 /usr/lib/sa/sa2 -s 0:00 -e 23:55 -i 300 -A
/usr/lib/sa/sa1
#! /usr/bin/sh
# @(#) $Revision: 72.3 $
# sa1.sh
DATE=`date +%d`
ENDIR=/usr/lbin/sa
DFILE=/var/adm/sa/sa$DATE
cd $ENDIR
if [ $# = 0 ]
then
exec $ENDIR/sadc 1 1 $DFILE
else
exec $ENDIR/sadc $* $DFILE
/usr/lib/sa/sa2
#! /usr/bin/sh
# @(#) $Revision: 72.1 $
# sa2.sh
DATE=`date +%d`
RPT=/var/adm/sa/sar$DATE
DFILE=/var/adm/sa/sa$DATE
ENDIR=/usr/sbin
cd $ENDIR
$ENDIR/sar $* -f $DFILE > $RPT
find /var/adm/sa \( -name 'sar*' -o -name 'sa*' \) -mtime +7 -exec rm {} \;
Do the daily sa files exist under /var/adm/sa
Hope this helps.
Regds
This is what the sar cron job looks like on my system,
0,5,10,15,20,25,30,35,40,45,50,55 * * * 0-6 /usr/lib/sa/sa1
57 23 * * 0-6 /usr/lib/sa/sa2 -s 0:00 -e 23:55 -i 300 -A
/usr/lib/sa/sa1
#! /usr/bin/sh
# @(#) $Revision: 72.3 $
# sa1.sh
DATE=`date +%d`
ENDIR=/usr/lbin/sa
DFILE=/var/adm/sa/sa$DATE
cd $ENDIR
if [ $# = 0 ]
then
exec $ENDIR/sadc 1 1 $DFILE
else
exec $ENDIR/sadc $* $DFILE
/usr/lib/sa/sa2
#! /usr/bin/sh
# @(#) $Revision: 72.1 $
# sa2.sh
DATE=`date +%d`
RPT=/var/adm/sa/sar$DATE
DFILE=/var/adm/sa/sa$DATE
ENDIR=/usr/sbin
cd $ENDIR
$ENDIR/sar $* -f $DFILE > $RPT
find /var/adm/sa \( -name 'sar*' -o -name 'sa*' \) -mtime +7 -exec rm {} \;
Do the daily sa files exist under /var/adm/sa
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2002 11:59 AM
08-12-2002 11:59 AM
Re: Collect for sar1 / sa2
I do a copy of file sa2 to my home directory and change the DATE variable to "30". I run the program and the file sar30 was format like I want (/usr/lbin/sa/sa2 -s 0:01 -e 23:59 -i 300 -A).
Thanks for Sanjay and Uday for yours help.
Hugs for all.
Andr??
Phrase of the year: "Todo mundo inventa mas s?? o Brasil pode ser Penta"
Thanks for Sanjay and Uday for yours help.
Hugs for all.
Andr??
Phrase of the year: "Todo mundo inventa mas s?? o Brasil pode ser Penta"
Andre Augusto
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP