Sponsored Content
Full Discussion: Sar statistic.
Operating Systems Solaris Sar statistic. Post 302263641 by sotich82 on Tuesday 2nd of December 2008 06:12:44 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
sar(1M) 						  System Administration Commands						   sar(1M)

NAME
sar, sa1, sa2, sadc - system activity report package SYNOPSIS
/usr/lib/sa/sadc [t n] [ofile] /usr/lib/sa/sa1 [t n] /usr/lib/sa/sa2 [-aAbcdgkmpqruvwy] [-e time] [-f filename] [-i sec] [-s time] DESCRIPTION
System activity data can be accessed at the special request of a user (see sar(1)) and automatically, on a routine basis, as described here. The operating system contains several counters that are incremented as various system actions occur. These include counters for CPU utilization, buffer usage, disk and tape I/O activity, TTY device activity, switching and system-call activity, file-access, queue activ- ity, inter-process communications, and paging. For more general system statistics, use iostat(1M), sar(1), or vmstat(1M). sadc and two shell procedures, sa1 and sa2, are used to sample, save, and process this data. sadc, the data collector, samples system data n times, with an interval of t seconds between samples, and writes in binary format to ofile or to standard output. The sampling interval t should be greater than 5 seconds; otherwise, the activity of sadc itself may affect the sam- ple. If t and n are omitted, a special record is written. This facility can be used at system boot time, when booting to a multi-user state, to mark the time at which the counters restart from zero. For example, when accounting is enabled, the svc:/system/sar:default ser- vice writes the restart mark to the daily data file using the command entry: su sys -c "/usr/lib/sa/sadc /var/adm/sa/sa'date +%d'" The shell script sa1, a variant of sadc, is used to collect and store data in the binary file /var/adm/sa/sadd, where dd is the current day. The arguments t and n cause records to be written n times at an interval of t seconds, or once if omitted. The following entries in /var/spool/cron/crontabs/sys will produce records every 20 minutes during working hours and hourly otherwise: 0 * * * 0-6 /usr/lib/sa/sa1 20,40 8-17 * * 1-5 /usr/lib/sa/sa1 See crontab(1) for details. The shell script sa2, a variant of sar, writes a daily report in the file /var/adm/sa/sardd. See the OPTIONS section in sar(1) for an explanation of the various options. The following entry in /var/spool/cron/crontabs/sys will report important activities hourly during the working day: 5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A FILES
/tmp/sa.adrfl address file /var/adm/sa/sadd Daily data file /var/adm/sa/sardd Daily report file /var/spool/cron/crontabs/sys ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWaccu | +-----------------------------+-----------------------------+ SEE ALSO
crontab(1), sag(1), sar(1), svcs(1), timex(1), iostat(1M), svcadm(1M), vmstat(1M), attributes(5), smf(5) NOTES
The sar service is managed by the service management facility, smf(5), under the service identifier: svc:/system/sar Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser- vice's status can be queried using the svcs(1) command. SunOS 5.11 20 Aug 2004 sar(1M)
All times are GMT -4. The time now is 12:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy