I didn't.
ps -p `cat pidfile` -o args=
Returns something like
perl assp.pl
Is it running? Yes. Is it running the same thing as it's supposed to run? Yes.
An explanation:
ps
show processes-p
show process of a specific id`cat pidfile`
the `
"backticks" mean to execute what's in between them and use it in the command line as text. cat
means the same thing as type
in Windows: output the contents of the file. pidfile
is the filename that holds the pid/process ID of the application that's running.-o
show only what I want to showargs=
show the full execution line of the process. The =
is to give a column name to the "args
" column. If you specify no column name, it doesn't list one.
No comments:
Post a Comment