01-19-2010
In my home directory in server , you will find a file called sa15 that contains sar data
To read this file, run:
sar -f sa15
We will need to parse the output, send last 48 hrs of data and email it....
This is the requirement.
Please could you write a sample program.
(Means that awk is what we need to parse, and by combining it with ksh we can email whatever you want)
Your help would be appreciated
10 More Discussions You Might Find Interesting
1. Solaris
Hi,
Anyone knows how to extract sar command output to excel or Is there any free grapical tools to extract this sar log file. thanks, regards (2 Replies)
Discussion started by: vijill
2 Replies
2. Shell Programming and Scripting
Hi all
i want to send the output of a command by email, i have done this
<comand> | mail -s <subject> <email address>
which works well, but if the command retunrs noting then i just get a blank email, is there a way to stop this
thanks
Adam (4 Replies)
Discussion started by: ab52
4 Replies
3. Solaris
I was reviewing yesterday's sar file and came across this strange output! What in the world? Any reason why there's output like that?
SunOS unixbox 5.10 Generic_144488-07 sun4v sparc SUNW,T5240 Solaris
00:00:58 device %busy avque r+w/s blks/s avwait avserv
11:20:01 ... (4 Replies)
Discussion started by: dangral
4 Replies
4. AIX
Hi
i have a script which executes daily through cron. The output of the script is appended to a log file everyday
It also emails me the output of the logfile as we have the mailx command in the script
The below is my requirement :
Normally When I get the email it sends the entire content... (3 Replies)
Discussion started by: newtoaixos
3 Replies
5. Shell Programming and Scripting
This is my first time writing a script and Im having some trouble,
Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage
I tried grep
Obviosly that hasnt worked,
Any... (8 Replies)
Discussion started by: jay02
8 Replies
6. Solaris
One of my servers giving all zero sar output. Could anyone explain this behaviour.
Thanks
CHaandana
Sample:
10:43:37 %usr %sys %wio %idle
16:15:01 2 1 0 97
16:20:02 2 1 0 97
16:25:02 2 1 0 97
16:30:01 ... (3 Replies)
Discussion started by: chaandana
3 Replies
7. UNIX for Advanced & Expert Users
Hi All,
Sorry, for the double posting. Don't know how to move to a different forum.
I am very new to Unix. I have a test server running FreeBSD 10.1 and SendMail 8.14.9.
I need to filter incoming emails based on the sender's email address or domain and forward them to another address on a... (1 Reply)
Discussion started by: simplemind
1 Replies
8. Solaris
We're experiencing some intermittent freezes on one of our systems and I'm trying to figure out what is happening.
We're running Solaris 10 zones mounting shares from netapp through nfs.
On the zone that freezes we have sar running and are getting this output:
SunOS prodserver 5.10... (3 Replies)
Discussion started by: Jyda
3 Replies
9. Red Hat
I am facing situation where sar -u command is showing 0 for all cps, so does it mean all the cpus are fully utilized, os is oracle Linux 6.8
01:34:13 PM all 0 0 0 0 0.00 0 (2 Replies)
Discussion started by: manoj.solaris
2 Replies
10. Shell Programming and Scripting
hi ,
i have written below piece of code to meet the requirement but i am stuck in the logic here.
the requirement are:
1) to send the sql out put to email body with proper formatting.
2) if count_matching = Yes then mail should triggered with the subject line ... (10 Replies)
Discussion started by: itzkashi
10 Replies
sadc(8) BSD System Manager's Manual sadc(8)
NAME
sadc -- system activity data collector
SYNOPSIS
/usr/lib/sa/sadc [-m mode] [t n] [ofile]
DESCRIPTION
The sadc tool is used to collect cumulative system activity data. The sample system data is collected at intervals t seconds apart, in a
loop n times. The binary sample data is written to ofile if specified. Otherwise, the binary data is written to stdout. If the ofile file
does not exist, it is created, otherwise it is truncated.
sadc is intended to be used as the engine behind the sar(1) command, and is not typically invoked on the command line. Two shell scripts,
sa1 and sa2, are provided to drive the typical sampling, saving, and reporting process.
OPTIONS
The following options modify the way data is collected by sadc.
-m mode Modify the collection of system statistics as specified by mode. Currently only one mode is supported.
PPP By default, the collection of ppp network interface statistics is turned off. This is because the number of ppp connec-
tions can be very high, causing the raw data file to grow unexpectedly large, especially when samples are collected at
short intervals. Use the PPP mode to turn the collection back on.
EXAMPLES
/usr/lib/sa/sadc 15 20 /tmp/sample.out
This call collects 20 samples at 15 second intervals. The binary data is written to the /tmp/sample.out file
FILES
/var/log/sa/sadd Default daily activity file that holds the binary sampling data. dd are digits that represent the day of the month.
/usr/lib/sa/sa1 Shell script used to drive the sar data collection.
/usr/lib/sa/sa2 Shell script used to drive the sar data reporting.
SEE ALSO
fs_usage(1), netstat(1), sar(1), sc_usage(1), top(1), vm_stat(1), iostat(8), sa1(8), sa2(8)
Mac OS X Jul 25 2003 Mac OS X