A
A
Artem2013-01-29 16:56:05
Perl
Artem, 2013-01-29 16:56:05

How to find the process file?

There is a server on FreeBSD 6.4. I noticed strange processes on it:

# ps -U www | grep perl
14695  ??  Rs   938:10,45 mail (perl5.8.9)
14696  ??  Rs   948:30,79 mail (perl5.8.9)
29638  ??  Rs   835:28,49 mail (perl5.8.9)


I so understand that it is any Perl'ovy script sends mail. How to find this script?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Dmitry T., 2013-01-30
@tyzhnenko

Try it with procfs.

mount -t procfs proc /proc
cat /proc/14695/cmdline

A
ash_kgd, 2013-01-29
@ash_kgd

Try citforum.ru/operating_systems/unix/kravchuk/7.shtml , perhaps you will find the answer here.

E
Eddy_Em, 2013-01-29
@Eddy_Em

But like this:

lsof -p $(pgrep perl| tr '\n' ',')

?

E
Evgeny Yablokov, 2013-01-29
@Gular

lsof by pid will show the files and sockets used by the process.

V
Valentine, 2013-01-30
@vvpoloskin

On Linux it works like this:
ls -l /proc/$PID/exe
Maybe you should also dig into /proc/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question