- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Sar Question
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
Forums
Discussions
Discussions
Discussions
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
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
11-07-2000 08:15 AM
11-07-2000 08:15 AM
This is something I think I should know but it has been giving me a problem. I am trying to run SAR as a Cron job to collect performance data. Here is the cron entry:
5 18 * * 1-5 /usr/lbin/sa/sa2 -s 8:00 -e 18.01 -i 1800 -u -b -d -w -q
But this is the e-mail I get everday:
sar: Can't open /var/adm/sa/sa06
*************************************************
Cron: The previous message is the standard output
and standard error of one of your crontab commands:
/usr/lbin/sa/sa2 -s 8:00 -e 18.01 -i 1800 -u -b -d -w -q
I looked at the file permissions and that looks good, I even tried to create the files ahead of time and that didn?t work. What am I missing? Thanks in advance.
Robert Smith
Systems Administrator
Biomatrix Inc.
(201) 945-9550
Solved! Go to Solution.
- Tags:
- sar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 08:19 AM
11-07-2000 08:19 AM
Re: Sar Question
Hi Robert,
The sar program is looking for the binary file /usr/adm/sa/saXX, where XX
is the current date of the month. To create this file, do the following:
/usr/lib/sa/sadc /usr/adm/sa/sa`date +%d`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 08:21 AM
11-07-2000 08:21 AM
Re: Sar Question
make sure that the directory /var/adm/sa has been created. It isn't created by default - you have to create it:
mkdir -p /var/adm/sa
viola!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 08:23 AM
11-07-2000 08:23 AM
Re: Sar Question
Sorry Robert... Here is the correct path:
/var/adm/sa/saXX, when XX is the current month.
You will need to create the file by:
/var/lib/sa/sadc /var/adm/sa/sa`date +%d`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 08:35 AM
11-07-2000 08:35 AM
SolutionThis script runs sar every 5 min (300 seconds) for 10 hours
I start it at 08:00 hrs each morning
-----------------------Cut here--------------------------------
#!/bin/sh
# sardump
# 5 minutes
period=${1:-"300"}
# 10 hours worth
iterations=${2:-"120"}
echo "sar: $iterations iterations at $period second intervals"
/usr/sbin/sar -ubdcvwq
-o /var/adm/sa/sa`date +%d`
$period
$iterations > /dev/null
-----------------------Cut here--------------------------------
Crontab entry is :-
00 08 * * * /sardump
Modify the switches to suit.
HTH
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 09:00 AM
11-07-2000 09:00 AM
Re: Sar Question
There is a mistake in your cron, your start is 8.00 and stop is 18.01 for Monday to Friday. So you cann't set the cron time for 18.05.
Anyway, create the /var/adm/sa directory, then update your cron file as follows:
0 6-22 * * * /usr/lbin/sa/sa1 1200 4
30 18 * * * /usr/lbin/sa/sa2 -s 00:00 -e 20:00 1800 -u -b -d -w -q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 09:00 AM
11-07-2000 09:00 AM
Re: Sar Question
Can do a mkdir for that directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 05:29 PM
11-07-2000 05:29 PM
Re: Sar Question
FYI, the XX in "var/adm/sa/saXX" is not the current monthname but the day of the month. SAR will maintain only 31 of these files, overwriting the previous month's day with the current month's day giving you a backlog of one month's data.
Just making sure, the problem you were having was that cron was not looking in
/var/adm/sa.