Results 1 to 6 of 6
Hi,
I have a few installations of MailScanner which I have done over several months. I know MailScanner is running, and can it see it appear using 'top' whenever someone ...
- 02-22-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 15
How to see the location of a program currently running?
Hi,
I have a few installations of MailScanner which I have done over several months. I know MailScanner is running, and can it see it appear using 'top' whenever someone sends an email, but how do I find out exactly *which* MailScanner installation it is running?
e.g. if I have one MailScanner installed at /directory1 and another MailScanner installed at /directory2 then how do I see which one is actually appearing in 'top'.
This is probably a rather basic/dumb question so apologies...
- 02-22-2008 #2Linux Newbie
- Join Date
- Nov 2007
- Location
- Planet Earth
- Posts
- 152
You can use the /proc filesystem like this:
Of course, [the_pid_of_your_program] can be obtainer from top or ps.Code:cat /proc/[the_pid_of_your_program]/cmdline
Another option is:
HugoCode:head -1 /proc/[the_pid_of_your_program]/maps
EOF
- 02-22-2008 #3
top command
while seeing the top command, press "c" .. it will display the path...
is it showing ??? reply us..
- 02-22-2008 #4Just Joined!
- Join Date
- Feb 2008
- Posts
- 15
Sathiya: thanks for the info about 'top' - pressing 'c' shows more info for most processes running but when it comes to MailScanner it still doesn't show the path. Instead it shows things like "Mailscanner: waiting for messages" and "Mailscanner: checking with SpamAssassin".
Hugo: using cat /proc/[the_pid_of_your_program]/cmdline shows the same messages as above.
The 'head' command, for some reason, shows:
08048000-08148000 r-xp 00000000 08:05 1737038 /usr/bin/perl
Cheers
- 02-22-2008 #5Just Joined!
- Join Date
- Feb 2008
- Posts
- 18
Just to mention it: there is a command "which" .
--Japser.
- 02-22-2008 #6Linux Newbie
- Join Date
- Nov 2007
- Location
- Planet Earth
- Posts
- 152


Reply With Quote

