Sponsored Content
Top Forums Shell Programming and Scripting Warning in Top 10 cpu consuming processes Post 302444214 by rajamadhavan on Wednesday 11th of August 2010 07:43:14 AM
Old 08-11-2010
BSD is one of the oldest derivative of Unix operating system. BSD uses options with no dash. Recent forms of ps commands supports all three forms, no dash, single dash and double dashes...


Here is the statement from ps man page...

Code:
NAME
       ps - report a snapshot of the current processes.

SYNOPSIS
       ps [options]

DESCRIPTION
       ps displays information about a selection of the active processes. If you want a repetitive
       update of the selection and the displayed information, use top(1) instead.

       This version of ps accepts several kinds of options:
       1   UNIX options, which may be grouped and must be preceded by a dash.
       2   BSD options, which may be grouped and must not be used with a dash.
       3   GNU long options, which are preceded by two dashes.

This User Gave Thanks to rajamadhavan For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How Can I Have Top Display The Top 20 Processes??

how can i do that in a script withough havin the script halt at the section where the top command is located. am writign a script that will send me the out put of unx commands if the load average of a machine goes beyond the recommended number. top -n 20 i want to save this output to a file... (1 Reply)
Discussion started by: TRUEST
1 Replies

2. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

3. AIX

Command to find TOP 5 Memory consuming process

HI All, Can anyone send me a command to find TOP 5 Memory consuming process. It would be lelpful if I get output something like below processname - pid - memory(in MB) - command I tried few commands from the internet but the result only give the real memory usage or pagging, I want total... (4 Replies)
Discussion started by: bce_groups
4 Replies

4. AIX

Need a list of top 10 CPU using processes (also top 10 memory hogs, separately)

Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold I use top on other... (5 Replies)
Discussion started by: thenomad
5 Replies

5. UNIX for Dummies Questions & Answers

How To Scroll Processes In top?

I'm using top to view processes. But, I do not know how to scroll down the list to view what is not showed in the terminal window. Anyone know how to do this? (1 Reply)
Discussion started by: keenansnews
1 Replies

6. Shell Programming and Scripting

Print 10 most CPU-intensive processes (wo/ top)

ps -eo pid,comm,%cpu lists all processes (in increasing PID number). How to get only the top-10 most CPU intensive ones? I know about top: this is BASH exercise. I tried redirecting above code to cut ps -eo pid,comm,%cpu | cut -f2but ps' output isn't TAB delimited. How can I otherwise use... (5 Replies)
Discussion started by: courteous
5 Replies

7. Shell Programming and Scripting

Discrepancy in finding the top memory consuming processes

When I run 'top' command,I see the following Memory: 32G real, 12G free, 96G swap free Though it shows as 12G free,I am not able to account for processes that consume the rest 20G. In my understanding some process should be consuming atleast 15-16 G but I am not able to find them. Is... (1 Reply)
Discussion started by: prasperl
1 Replies

8. Shell Programming and Scripting

Unix shell script to query linux top consuming processes

Hi All, O/S: Linux 86x64 Red Hat I have a sql script that queries top consuming processes of Linux using TOP commnd. Now I need to automate this task and pass the top processes i.e., PID to the sql script through unix shell script. Could anyone please let me know how to achieve this. ... (2 Replies)
Discussion started by: a1_win
2 Replies

9. UNIX for Dummies Questions & Answers

Finding the most memory consuming processes in Linux

Platform: Oracle Linux 6.4 To find the most memory consuming processes, I tried the following 2 methods 1. Method1 # ps aux | head -1 ; ps aux | sort -nk +4 | tail -7 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 95 0.0 0.0 0 0 ? ... (2 Replies)
Discussion started by: kraljic
2 Replies

10. UNIX for Beginners Questions & Answers

Top 5 cpu and Mem consuming process and files and suggestion for health check

I am middle of writing health check scripts, can you pls share commands on how I can get cpu and Mem of top consuming process info at the moment? Also can u suggest ideas on what all I can look for as a part do health check on red hat Linux server? I searched on site before posting, but... (2 Replies)
Discussion started by: Varja
2 Replies
dtruss(1m)							   USER COMMANDS							dtruss(1m)

NAME
dtruss - process syscall details. Uses DTrace. SYNOPSIS
dtruss [-acdeflhoLs] [-t syscall] { -p PID | -n name | command } DESCRIPTION
dtruss prints details on process system calls. It is like a DTrace version of truss, and has been designed to be less intrusive than truss. Of particular interest is the elapsed times and on cpu times, which can identify both system calls that are slow to complete, and those which are consuming CPU cycles. Since this uses DTrace, only users with root privileges can run this command. OPTIONS
-a print all details -b bufsize dynamic variable buffer size. Increase this if you notice dynamic variable drop errors. The default is "4m" for 4 megabytes per CPU. -c print system call counts -d print relative timestamps, us -e print elapsed times, us -f follow children as they are forked -l force printing of pid/lwpid per line -L don't print pid/lwpid per line -n name examine processes with this name -o print on-cpu times, us -s print stack backtraces -p PID examine this PID -t syscall examine this syscall only EXAMPLES
run and examine the "df -h" command # dtruss df -h examine PID 1871 # dtruss -p 1871 examine all processes called "tar" # dtruss -n tar run test.sh and follow children # dtruss -f test.sh run the "date" command and print elapsed and on cpu times, # dtruss -eo date FIELDS
PID/LWPID Process ID / Lightweight Process ID RELATIVE relative timestamps to the start of the thread, us (microseconds) ELAPSD elapsed time for this system call, us CPU on-cpu time for this system call, us SYSCALL(args) system call name, with arguments (some may be evaluated) DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver- bose descriptions explaining the output. EXIT
dtruss will run forever until Ctrl-C is hit, or if a command was executed dtruss will finish when the command ends. AUTHOR
Brendan Gregg [Sydney, Australia] SEE ALSO
procsystime(1M), dtrace(1M), truss(1) version 0.80 Jun 17, 2005 dtruss(1m)
All times are GMT -4. The time now is 12:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy