![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Identifying and grouping OS processes and APP processes | wilsonee | SUN Solaris | 2 | 09-30-2008 06:26 AM |
| du from list with du of list total | Movomito | Shell Programming and Scripting | 3 | 05-04-2008 06:33 PM |
| Monitoring Processes - Killing hung processes | ukndoit | UNIX for Advanced & Expert Users | 4 | 01-17-2008 01:30 AM |
| how to generate a random list from a given list | mskcc | Shell Programming and Scripting | 3 | 05-30-2006 12:30 AM |
| Comparing a distinct value in 1 list with another list | manualvin | Shell Programming and Scripting | 6 | 06-22-2004 03:42 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
If your flavor of Unix supports /proc filesystem then it should be pretty easy to get a little bit of information.
do "cd /proc" and if it works, do an "ls" you should see a bunch of folders, one per running pid. You can read this directory in c like any other (see man page for opendir). If the flavor of Unix you are using doesn't support this, then you are hosed and back to either a popen for "ps" or looking up the source for it. Last edited by DreamWarrior; 04-02-2008 at 01:25 PM. |
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
Hm, this indeed seems an easy way to get a list of process-IDs. However, the information inside /proc/<processID> seems to be platform-dependent (and hard to understand anyway). Is there perhaps a way to get information about a process with a specific known ID?
|
|
#10
|
|||
|
|||
|
There are different variants of how /proc works but on Linux for example, /proc/12345 contains information about process 12345; if that is not what you want, then perhaps you can explicate on what in particular you are looking for.
Also look at the proc(5) manual page, which documents the facility. (On Linux, at least, the documentation there was somewhat stale, last time I looked; but in general, it's probably correct.) |
|
#11
|
||||
|
||||
|
Try this command
$ top
$ pstree Good luck |
|
#12
|
|||
|
|||
|
Can someone please answer my query?
I need to know whether I can find out the complete list of processes that ran on a server instance in a UNIX Box under a particular user ID on a particular date. |
|
#13
|
|||
|
|||
|
Quote:
Coming back to the question. Yes, its possible. Only tweak needed is to extract process information and apply all the filters that you are interested in. |
|
#14
|
|||
|
|||
|
just try in ur c code
system(ps -eaf); it will fill ur screen with the list of process running on ur unix system.. |
|||
| Google The UNIX and Linux Forums |