02-10-2012
You can for example use sar to monitor your server. With "-v" option it will output "proc-sz" column which is number of processes+4.
This User Gave Thanks to bartus11 For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
find /oracle/sydf/arch -mtime +2 -name 'sydf*' -type f -exec rm -f {} \;
this means after 48 hours remove the files.....
i am not sure about the command
type f -exec rm -f {} \;
does it means, check for files, then execute it ..
then what doesw the {} and \ and ; means ? (1 Reply)
Discussion started by: yls177
1 Replies
2. Shell Programming and Scripting
I need to be able to do the following:
Find files in multiple directories that are 6 hours older than the current time?
I am using KSH
I tried mmtime but it was not a valid option
Any help would be great. Thank you! (2 Replies)
Discussion started by: llsmr777
2 Replies
3. UNIX for Advanced & Expert Users
I ran grep -v * trying to reverse grep a word before a colon, and discovered it runs a command I had run earlier today.
Why? (3 Replies)
Discussion started by: glev2005
3 Replies
4. UNIX for Dummies Questions & Answers
When I ran the following find command under a "regular" user is completes but it limited because of perms.
find / -name "*.*" | xargs grep something > ok
But when I try to run it under su, it hangs and never completes.
Any suggestion? (4 Replies)
Discussion started by: shorty
4 Replies
5. Shell Programming and Scripting
Hi, I have written a script and placed in an application and the script can be executed manually only. But somehow one of the method in the script is being called and bringing the application down. But we are not able to find any instance of script running.
Is there a way to findout whether the... (1 Reply)
Discussion started by: Satyak
1 Replies
6. Shell Programming and Scripting
Hi Guys,
Good day! I hope you could help me on this, I have a file that conatins output upon executing cat /var/log/messages, then what I want is to get the logs that has been generated only starting from 24-hours earlier at the time of actual execution of the script. Is this possible?
Best... (9 Replies)
Discussion started by: rymnd_12345
9 Replies
7. Shell Programming and Scripting
How can I print ONLY processes running for more than 24 hours. Using ps command or any other method
I use this to get a whole list.
ps -eo pid,pcpu,pmem,user,args,etime,cmd --sort=start_time
We can also sort the outout of the above command to list processes older than 24 hours using... (9 Replies)
Discussion started by: anil510
9 Replies
8. AIX
Hi all,
I have about 5-6 daemons specific to my application running in the background. I am trying to write a script to stop them. Usually, I run them as a non-root ID, which is fine. But for some reason the client insists on using root.
I do have sudo.
I just tried something like this
... (4 Replies)
Discussion started by: jeffs42885
4 Replies
9. UNIX for Beginners Questions & Answers
Hi,
Is it possible to display processes which have been running for more than a 5hrs using a variation of the ps -ef command?
Regards,
Manny (5 Replies)
Discussion started by: mantas44
5 Replies
10. UNIX for Beginners Questions & Answers
HI
can someone help me to check the process running more than 2 hours.
I have the below command which shows the time and process id, however, I only need the processes running more than 2 hours. (8 Replies)
Discussion started by: Vinod
8 Replies
sag(1) User Commands sag(1)
NAME
sag - system activity graph
SYNOPSIS
sag [-e time] [-f file] [-i sec] [-s time] [-T term] [-x spec] [-y spec]
DESCRIPTION
The sag utility graphically displays the system activity data stored in a binary data file by a previous sar(1) run. Any of the sar data
items may be plotted singly or in combination, as cross plots or versus time. Simple arithmetic combinations of data may be specified. sag
invokes sar and finds the desired data by string-matching the data column header (run sar to see what is available). The sag utility
requires a graphic terminal to draw the graph, and uses tplot(1) to produce its output. When running Solaris 2.x and OpenWindows, perform
the following steps:
1. Run an "xterm" as a Tektronics terminal: prompt# xterm -t
2. In the "xterm" window, run sag specifying a tek terminal: prompt# sag -T tek options
OPTIONS
The following options are supported and passed through to sar (see sar(1)):
-e time Select data up to time. Default is 18:00.
-f file Use file as the data source for sar. Default is the current daily data file /usr/adm/sa/sadd.
-i sec Select data at intervals as close as possible to sec seconds.
-s time Select data later than time in the form hh[:mm]. Default is 08:00.
-T term Produce output suitable for terminal term. See tplot(1) for known terminals. Default for term is $TERM.
-x spec x axis specification with spec in the form:
name[op name]...[lo hi]
name is either a string that will match a column header in the sar report, with an optional device name in square brackets, for
example, r+w/s[dsk-1], or an integer value. op is + - * or / surrounded by blank spaces. Up to five names may be specified.
Parentheses are not recognized. Contrary to custom, + and - have precedence over * and /. Evaluation is left to right. Thus,
A/A+B*100 is evaluated as (A/(A+B))*100, and A+B/C+D is (A+B)/(C+D). lo and hi are optional numeric scale limits. If unspecified,
they are deduced from the data.
Enclose spec in double-quotes ("") if it includes white space.
A single spec is permitted for the x axis. If unspecified, time is used.
-y spec y axis specification with spec in the same form as for -x. Up to 5 spec arguments separated by a semi-colon (;) may be given for
-y. The -y default is:
-y"%usr0100;%usr+%sys0100;%usr+%sys+%wio0100"
EXAMPLES
Example 1: Examples of the sag command.
To see today's CPU utilization:
example$ sag
To see activity over 15 minutes of all disk drives:
example$ TS=`date +%H:%M`
example$ sar -o /tmp/tempfile 60 15
example$ TE=`date +%H:%M`
example$ sag -f /tmp/tempfile -s $TS -e $TE -y "r+w/s[dsk]"
FILES
/usr/adm/sa/sadd daily data file for day dd
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWaccu |
+-----------------------------+-----------------------------+
SEE ALSO
sar(1), tplot(1), attributes(5)
SunOS 5.10 4 Mar 1998 sag(1)