Help using top and ps


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help using top and ps
# 1  
Old 12-18-2008
Question Help using top and ps

help! i need help with locating where a program is being run from. when i type top -i it only lists the name and minimal info, not the programs location from where it is being ran. i ask because i just used the same named executable, a.exe for all the processes and have lost the schedule detailing the process. any answers would be much appreciated. thanks
# 2  
Old 12-18-2008
Depends on what you mean by "location". To see who started whom, you can either just follow the ppid -> pid -> ppid -> pid..... you get displayed via "ps -ef" for example or maybe you have such a tool like pstree which shows it in ascii graphics if you want (switch -a).
# 3  
Old 12-18-2008
this is what happens when i type top -i,

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25143 x 20 0 526m 198m 1048 R 100 5.0 21647:25 a.exe
25213 x 20 0 526m 201m 1048 R 100 5.1 21622:55 a.exe
25104 x 20 0 526m 199m 1048 R 98 5.0 21659:29 a.exe
32188 x 20 0 526m 201m 1048 R 98 5.1 54162:28 a.exe
29373 x 20 0 12808 1008 692 R 0 0.0 0:00.00 top

what i want is a command that will tell me the pid and where the specific program is running from, its location. thanks
# 4  
Old 12-18-2008
I know no ps switch to get that info; so for example PID 25143:

Code:
cd /proc/25143
ls -la exe

Will show a link to the executable and it's full path. At least on my Debian box.
# 5  
Old 12-18-2008
Power

zaxxon, i am unbelievably grateful. muchos gracias Smilie!!!!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Top command

Hi All, i am using the below command and once get the output and i need to keep the first batch only.in this case how to do this one. please help me on thistop -b -n 5 >top.txt Thanks, (3 Replies)
Discussion started by: bmk
3 Replies

2. Shell Programming and Scripting

Help with top command

Currently when i run top command i get the following columns . CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND In this how to remove '%WCPU' column ? Thanks very much in advance . (6 Replies)
Discussion started by: kpravinraj
6 Replies

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

4. AIX

Top command in AIX 4.2 (no topas, no nmon, no top)?

Is there a 'top' command equivalent in AIX 4.2 ? I already checked and I do not see the following ones anywhere: top nmon topas (1 Reply)
Discussion started by: Browser_ice
1 Replies

5. HP-UX

Using TOP

Hey guys, the top format in HP-UX has the size which is the total virtual size and the res which is the resident size. What are these size and res? (1 Reply)
Discussion started by: sbn
1 Replies

6. Solaris

Top

How to display and update information about the top processes on the system(like "top" in Unix ) (1 Reply)
Discussion started by: iwbasts
1 Replies

7. UNIX for Dummies Questions & Answers

The value in TOP command

https://www.unix.com/showpost.php?p=98416&postcount=8 Referring to the post above... what is the unit that is measured in the TOP command under LOAD? (1 Reply)
Discussion started by: nickk
1 Replies

8. HP-UX

HP-UX and 'top'

I've been working with an HP-UX system (RP5400 Series PA-RISC server) for about a year that hosts some middleware. The middleware sits between an Oracle DB (on another box) and the client applications running on about 800 PCs. From the beginning, I've noticed that 'top' reports between 0.0% and... (8 Replies)
Discussion started by: deckard
8 Replies

9. SCO

HP-UX top command

Is there a command in SCO Unix that does the same as the top command in HPUX. The command displays the jobs using the most system resources. Thanks You (0 Replies)
Discussion started by: joestrosser
0 Replies

10. 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
Login or Register to Ask a Question