sar command not reporting


 
Thread Tools Search this Thread
Operating Systems Solaris sar command not reporting
# 1  
Old 10-15-2007
sar command not reporting

I am running Solaris 10 in a sparc environment.

I have the sys crontab setup to use sar to gather data and report it.
My sys crontab entry looks like this:

0,5,10,15,20,25,30,35,40,45,50,55 * * * 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

I can manually run the sar command and it will report sar data to the screen: i.e. if I run sar 1 10 it will report, to the screen, 10 instances every one second

However, whenever I depend on the cron job to run sar and report back the statistics in the /var/adm/saXX files, it will not report.

If I run the sar command by itself, I get the message:
sar: can't open /var/adm/sa/sa19

My question is this, why is the cron job not saving the data in the
/var/adm/saXX file?


On a server in which sar is reporting correctly, I can run the sar command (no arguments or switches) by itself and it will correctly report as follows:

SunOS cl1eriaps04 5.10 Generic_125100-08 sun4v 10/15/2007

00:00:00 %usr %sys %wio %idle
00:05:00 0 0 0 100
00:10:00 0 0 0 100
00:15:01 0 0 0 100
00:20:00 0 0 0 100
00:25:00 0 0 0 100
00:30:00 0 0 0 100
00:35:00 0 0 0 100
00:40:01 0 0 0 100
00:45:00 0 0 0 100
# 2  
Old 10-15-2007
Just FYI...I solved the problem. Seems as though I did not stop/start the cron service daemon after modifying the cron file to enable sar. Running the following command fixed my problem:

svcadm restart svc:/system/cron:default
# 3  
Old 02-17-2009
same here

I have Linux SuSE 10 built recently, when I type: 
> sar
Cannot open /var/log/sa/sa17: No such file or directory

(today is Feb 17)

Please help what's wrong there, is there package missing or I should use different utility? SmilieSmilieSmilieSmilie

Thanks

- sumulu
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Need help on sar command.

Hi, how to find out actual utilization of memory using sar -r in Linux, I understand Linux keep entire memory in cache/buffers. I would like to know how to find out actual usage of memory (1 Reply)
Discussion started by: manoj.solaris
1 Replies

2. UNIX for Dummies Questions & Answers

sar command for Solaris/AIX

Hello, Can you please explain me how to parameter and use "sar" command on Solaris (AIX) ? When I use it on Solaris I got the following error : bash-3.00# sar sar: data file not in sar format Thanks, (2 Replies)
Discussion started by: adilyos
2 Replies

3. Solaris

Unix restarts error in sar command

Hi Folks, I am again here with a peculier problem. Please see the code root@celdws01: # sar -u -f /var/adm/sa/sa21 SunOS celdws01 5.9 Generic_118558-34 sun4u 12/21/2011 10:10:09 %usr %sys %wio %idle 10:10:09 unix restarts Can anyone help me in... (9 Replies)
Discussion started by: vivek.goel.piet
9 Replies

4. Shell Programming and Scripting

Setup of sar command for CPU measures

I receive on a daily basis CPU measures on a UNIX Server (AIX 5.3 version, korn shell). These CPU measures are provided by Omnivision tool. We could see that Omnivision daily stats are not always equal to NMON stats regarding CPU level. On my side (I work in an IT Production Support Team, not... (0 Replies)
Discussion started by: Scofield38
0 Replies

5. Shell Programming and Scripting

Problem with sar command in cron job

HI, I have a problem with 'sar' command. I am using the sar comman in script.when i execute the script manually using ./filenae, i am getting the desired output. But when i put the script in cron job i am not getting the desired value. Below is the script.. sar > $_LOCATION/sar.txt... (2 Replies)
Discussion started by: ahamed
2 Replies

6. Shell Programming and Scripting

Any alternative of sar command

Hi all, I am using linux box ...i dont find the manual entry of sar command through man sar ...it is in unix not in linux although i have to check the cpu utilization and paging...any alternative of sar command.. Thanks Vijay Sahu (1 Reply)
Discussion started by: vijays3
1 Replies

7. Solaris

problem with sar command

hi all:- when i try to use sar command i get this error how can i fix it bash-3.00# sar -A sar: can't open /var/adm/sa/sa16 No such file or directory (5 Replies)
Discussion started by: sharkux
5 Replies

8. UNIX for Dummies Questions & Answers

Question about SAR command

Hi, # SAR -u 5 5 shows this 10:01:32 AM CPU %user %nice %system %iowait %idle 10:01:37 AM all 1.90 0.00 1.20 96.90 0.00 10:01:42 AM all 1.30 0.00 1.70 97.00 0.00 10:01:47 AM all 4.30 0.00 ... (1 Reply)
Discussion started by: egorig
1 Replies

9. AIX

sar or glace quivalent command in AIX?

I'm new to the AIX environment, and I need to check the system state at certain interval (10 minutes) to see when it's saturated to take an appropriate actions. Any help is appreciated. (1 Reply)
Discussion started by: pdtak
1 Replies

10. UNIX for Dummies Questions & Answers

Can't understand sar command

HI Experts, Can anyone pls help me to understand this.. >sar 20:05:00 1 2 1 96 20:10:00 2 2 10 87 20:15:00 1 2 19 78 20:20:00 1 2 14 83 20:25:00 1 2 16 81 20:30:00 1 ... (1 Reply)
Discussion started by: shaan_dmp
1 Replies
Login or Register to Ask a Question