Sponsored Content
Operating Systems AIX Process ids consuming huge resources ? Post 302424410 by bakunin on Tuesday 25th of May 2010 07:27:46 AM
Old 05-25-2010
[QUOTE=sidharthmellam;302424325]
what is the command to check process ids , which are running from long time and which are consuming more cpu?[quote]

Use "ps" and consult its (rather exhaustive) man page by issuing "man ps". For instance, use:

Code:
ps -eo "%U %p %P | %C %z %t | %c %a"

Additionally there are a lot of other tools displaying basically the same info as the above command but in somewhat "cooked" form: "topas" (IBMs own tool), "nmon" (freeware package), "monitor" (freeware) and probably some others.


Quote:
Originally Posted by sidharthmellam
i have a pid :3223722 which is running since from long time,
Code:
ps -ef | grep 3223722
ps3adm 1458336 2187476   0 05:24:31 pts/17  0:00 grep 3223722

This suggests, that there is no such process, so you can't see, which resources it is using. Of course "grep" finds itself running in the process list when it runs and so reports one hit. To filter that out you could use:

Code:
ps -<some options> | grep -v grep | grep <PID>

If this command doesn't turn up with any output the PID is simply not used.

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. Programming

List of Thread IDs of a process

Hello, Can some one tell how to read the thread IDs of the current process in Sun Solaris. Any help will be appreciated. regards, Murali (0 Replies)
Discussion started by: hmurali
0 Replies

2. UNIX for Dummies Questions & Answers

How ti kill a process which is consuming so much time

There is a process which is consuming too much time.. how to find that process and kill it. (3 Replies)
Discussion started by: shreenivas
3 Replies

3. AIX

Process consuming most memory

How can i find the processes that is consuming most memory? I tried TOPAS and SVMON and this didn't gave me the desired result. (1 Reply)
Discussion started by: shabu
1 Replies

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

5. Solaris

Help to trace process consuming more space

Hi all, We have a server having much processes running. It is very difficuilt to trace the exact consuming more memory. Howerver, it shows CPU usage in sequence but how memory? Tried working with TOP command. Please let me know if something not clear. Thanks, Deepak (5 Replies)
Discussion started by: naw_deepak
5 Replies

6. UNIX for Dummies Questions & Answers

Scripting - process and user ids...Help please

Hello all: Working on a job I was asked get a simple script to perform the following task and would like to ask for some help. I'm looking forward to learning more and diving deeper into the World of Open Source servers. I need a script for a Unix server, using as few lines as possible, that... (4 Replies)
Discussion started by: moahten
4 Replies

7. AIX

Which process was consuming most memory in the Past?

Hello There are options / commands to check which process is consuming maximum memory However is there any command/mechanism which will tell us which process was consuming maximum memory in specific time interval in the past? I heard nmon report can help in this regard. is there any... (5 Replies)
Discussion started by: Chetanz
5 Replies

8. Shell Programming and Scripting

ps returning more process ids

Please help me with this question I have a tantan.sh under /home/mydir which is a caller to another script "tantan.sh" under /home/anotherdir ----------------------------------------------------------- /home/mydir/tantan.sh ------------------------------------------------------------... (6 Replies)
Discussion started by: guruincredible
6 Replies

9. Shell Programming and Scripting

Search process ids

Hi, I have four tomcat instances named PNK, PNK1, PNK2, PNK3. All are running on the same server. To kill tomcat instance I usually do below for PNK1,PNK2,PNK3 kill -9 `ps -ef|grep tomcat|grep PNK1|grep -v grep|awk '{print $2}'` But the above command does not work for PNK. Can some... (7 Replies)
Discussion started by: lpprasad321
7 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
Tcl_DetachPids(3)					      Tcl Library Procedures						 Tcl_DetachPids(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_DetachPids, Tcl_ReapDetachedProcs, Tcl_WaitPid - manage child processes in background SYNOPSIS
#include <tcl.h> Tcl_DetachPids(numPids, pidPtr) Tcl_ReapDetachedProcs() Tcl_Pid Tcl_WaitPid(pid, statusPtr, options) ARGUMENTS
int numPids (in) Number of process ids contained in the array pointed to by pidPtr. int *pidPtr (in) Address of array containing numPids process ids. Tcl_Pid pid (in) The id of the process (pipe) to wait for. int *statusPtr (out) The result of waiting on a process (pipe). Either 0 or ECHILD. int options (in) The options controlling the wait. WNOHANG specifies not to wait when checking the process. _________________________________________________________________ DESCRIPTION
Tcl_DetachPids and Tcl_ReapDetachedProcs provide a mechanism for managing subprocesses that are running in background. These procedures are needed because the parent of a process must eventually invoke the waitpid kernel call (or one of a few other similar kernel calls) to wait for the child to exit. Until the parent waits for the child, the child's state cannot be completely reclaimed by the system. If a parent continually creates children and doesn't wait on them, the system's process table will eventually overflow, even if all the children have exited. Tcl_DetachPids may be called to ask Tcl to take responsibility for one or more processes whose process ids are contained in the pidPtr array passed as argument. The caller presumably has started these processes running in background and does not want to have to deal with them again. Tcl_ReapDetachedProcs invokes the waitpid kernel call on each of the background processes so that its state can be cleaned up if it has exited. If the process has not exited yet, Tcl_ReapDetachedProcs does not wait for it to exit; it will check again the next time it is invoked. Tcl automatically calls Tcl_ReapDetachedProcs each time the exec command is executed, so in most cases it is not necessary for any code outside of Tcl to invoke Tcl_ReapDetachedProcs. However, if you call Tcl_DetachPids in situations where the exec command may never get executed, you may wish to call Tcl_ReapDetachedProcs from time to time so that background processes can be cleaned up. Tcl_WaitPid is a thin wrapper around the facilities provided by the operating system to wait on the end of a spawned process and to check a whether spawned process is still running. It is used by Tcl_ReapDetachedProcs and the channel system to portably access the operating sys- tem. KEYWORDS
background, child, detach, process, wait Tcl Tcl_DetachPids(3)
All times are GMT -4. The time now is 05:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy