December 12th, 2010, 11:11 PM
Could not get script name running from ps -ef command ?
i have one perl script called sendsms.pl. After i execute the perl script as background process and run ps -ef, it did not display the filename. It was display as "/usr/bin/perl". How could execute the perl program and display the filename using ps command ?
#ps -ef |grep send
#ps -ef |grep perl
xxxx 1234 640 2 Dec 11 /usr/bin/perl
December 13th, 2010, 02:29 PM
It will depend upon what version of Unix you are using. A good place to start, for any version is with man ps. What is happening is that your script (presumably starting with #!/usr/bin/perl) is being read and interpreteted by perl, hence perl is the running process you see. There are options to ps that permit extra info to be shown, try:
to show the pid, the user and , hopefully, the command line plus arguments - which should be perl and your script.
ps -eo pid,user,args | grep perl
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc