Hot answers tagged process
Here's one way of doing it. In Solaris you would use the pargs -ae <pid> command for this. The line that says argv: will tell you what executable is running. This is however not enough as you do not know the current directory of that process when it was started so if arg0 is not fully qualified then you don't have the full path to the running ...
Start by investigating the relations between parent/child processes using a command such as ps -AF --forest. The Parent Process ID (PPID) will either be the process that spawned the process in question, or 1 if it forked or became orphaned. The --forest switch to PS displays a graphical representation of this relationship. Deamons are usually started with ...
You can use pwdx in solaris and linux. pwdx <pid_number> example: pwdx $$ 25711: /export/home/pippo
I think your console window is trucating the output. Try ps -ef ww, as suggested here
The most direct Solaris equivalent is /proc/<pid>/path/a.out For example: % ls -l /proc/$$/path/a.out lrwxrwxrwx 1 alanc staff 0 Mar 13 21:16 /proc/2892/path/a.out -> /usr/bin/tcsh*
For Ubuntu, I think Upstart is what you are looking for. http://askubuntu.com/questions/19320/how-to-enable-or-disable-services This AskUbuntu question has excellent info on getting started with what you are doing. In a nutshell, copy the following to /etc/init/mybinary.conf. description "My Binary" author "Jakub Arnold ...
Only top voted, non community-wiki answers of a minimum length are eligible