Sar statistic.


 
Thread Tools Search this Thread
Operating Systems Solaris Sar statistic.
# 1  
Old 12-02-2008
Sar statistic.

I've been enabled sar in solaris.
Quote:
bash-3.00# svcs -a|grep sar
online Nov_18 svc:/system/sar:default
in crontab:
Quote:
#crontab -e sys
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
and target dir where binar files is situated:
Quote:
bash-3.00# ls -la /var/adm/sa/
total 3134
drwxrwxr-x 2 adm sys 512 Dec 2 13:22 .
drwxrwxr-x 9 root sys 512 Nov 26 03:10 ..
-rw-r--r-- 1 sys sys 180576 Dec 1 23:00 sa01
-rw-r--r-- 1 sys sys 102600 Dec 2 13:20 sa02
-rw-r--r-- 1 sys sys 45144 Nov 25 23:00 sa25
-rw-r--r-- 1 sys sys 180576 Nov 26 23:00 sa26
-rw-r--r-- 1 sys sys 180576 Nov 27 23:00 sa27
-rw-r--r-- 1 sys sys 180576 Nov 28 23:00 sa28
-rw-r--r-- 1 sys sys 98496 Nov 29 23:00 sa29
-rw-r--r-- 1 sys sys 98496 Nov 30 23:00 sa30
-rw-r--r-- 1 sys sys 54501 Dec 1 18:05 sar01
-rw-r--r-- 1 root root 0 Nov 25 16:04 sar25
-rw-r--r-- 1 sys sys 54501 Nov 26 18:05 sar26
-rw-r--r-- 1 sys sys 54501 Nov 27 18:05 sar27
-rw-r--r-- 1 sys sys 54501 Nov 28 18:05 sar28
-rw-r--r-- 1 root root 196449 Dec 1 12:48 sar_all
1.But sar indexing files as day(by default) from 1 to 30(31), how to add total date as prefix instead day prefix?
2.in my script for sar statistic i do command:
Quote:
#!/usr/bin/bash
sar -A -f /var/adm/sa/sa01 >> /var/adm/sa/sar_all_month
.....
....
....
....
sar -A -f /var/adm/sa/sa31 >> /var/adm/sa/sar_all_month
Somebody suggest me about that What variables and iterations are suitable in that case? Instead 30 lines for every day statistic.
Please help.Smilie
# 2  
Old 12-16-2008
Sar reuses these files each month. There's no easy way of changing these file names from within SAR, except maybe by recompiling binaries.

Why do you need the sar data files to be renamed using the full date? It would most probably be far easier to create a cron job which copies the files at the end of each month, before SAR starts to reuse the files in /var/adm/sa/
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract and parse XML data (statistic value) to csv

Hi All, I need to parse some statistic data from the "measInfo" -eg. 25250000 (as highlighted) and return the result into line by line, and erasing all other unnecessary info/tag. Thought of starting with grep "measInfoID="25250000" but this only returns 1 line. How do I get all the output... (8 Replies)
Discussion started by: jackma
8 Replies

2. Shell Programming and Scripting

text pattern count statistic

Hi all is it possible to have a text pattern count statistic by using simple script instead count it one by one ? apple apple boy boy boy boy cat cat cat cat cat dog.... ... apple = 3 boy = 4 (3 Replies)
Discussion started by: samoptimus
3 Replies

3. Shell Programming and Scripting

need perl script to get a comprehend statistic of network activity in a LAN

need perl script to get a comprehend statistic of network activity in a LAN. The purpose is to get each indivisual data usages statistics so that I can determine who is doing the network congestion in terms of bandwidth usages both in real time and retrospectively.. Thanks in... (4 Replies)
Discussion started by: rrd1986
4 Replies

4. Red Hat

HELP: NMON unable to display all the statistic specified via putty

Hi guys, I got this problem with NMON unable to display all the statistics specified via putty. I believe this is due to libncurses rather than NMON and also the env variable $TERM. Currently, the $TERM is set to "xterm" which should be compatible with NMON display. Is there any ways that... (0 Replies)
Discussion started by: DrivesMeCrazy
0 Replies

5. AIX

SAR

I am running below script to display last 48 hour data but the output is not displaying heading - AIX eqrdb26u1 1 6 00CFD5E34C00 01/21/10 System configuration: lcpu=8 ent=2.00 mode=Uncapped 22:31:40 %usr %sys %wio %idle physc %entc and footer - Average 25 9 ... (1 Reply)
Discussion started by: noorm
1 Replies

6. Solaris

Network interface statistic reset

Hi, all! Can anybody tell me how can I reset network statistic, which could be seen by command 'netstat -i' or 'dladm show-dev -s'? Thank you for advance Christian (2 Replies)
Discussion started by: Inventor
2 Replies

7. AIX

Process Statistic

Hi, I used prstat to show the process statistics in Solaris and top in HP-UNIX, Can somebody tell me what is the command we use in AIX UNIX? I searched through search engines, I didn't find any. Thanks. (5 Replies)
Discussion started by: shahnazurs
5 Replies

8. AIX

sar

I am trying to set up sar on my AIX server. We have been running sar and getting reports on out Linux boxes in the past but would like to try to do the same in AIX. On my Linux i have a sar.sh that looks like this: #!/bin/bash LC_ALL=C sar -A -f /var/log/sa/sa27 > /server023.txt LC_ALL=C sar -A... (1 Reply)
Discussion started by: seacros
1 Replies

9. HP-UX

Fiber Channel statistic & error level

I need information what maximum error level on FC card need clasification of critical level (SAN mass storidge) Please write screenshot from utility fcutil whith test option. Pawel (0 Replies)
Discussion started by: pawel_ul
0 Replies

10. AIX

Memory usage statistic? (topas, nmon)

hi, how can i diplay: - the ammount RAM used /free - ammount of ram used from a pid or prozess we have the problem, that malloc is returing a NULL pointer errno = 12 ( not enough space). but i think there is still ram free. nmon : shows all memory used ? Memory Use Physical Virtual... (7 Replies)
Discussion started by: Lazzar
7 Replies
Login or Register to Ask a Question