cannot find the path to a running process on a host.
I looked and tried some suggestions in forums to no avail.
can someone please help? I need to know where this process is starting from as we have several versions in multiple directories
--------- Process name
1201 1 0 Feb 14 ? 17151:37 ./pis2
--------- I'm running
uname -a
SunOS 5.10 Generic_141444-09 sun4v sparc SUNW,SPARC-Enterprise-T5120
your ./pis2 process is running under PID 1 with a PPID 0 which is quiet interesting ... i would suggest running lsof on the PID but that will not be accurate with that PID 1 (see man lsof ) ... try running the lsof on the different versions of the file ... also check if any of them execs to run in the background ...
also check the svcsadm for services that you are not familiar with ... if still an issue, reboot the server when you have the time and see if the process still comes up ...
Just Ice & DGPickett>>
lsof was the first command I tried , but it is not available on this install. So no go there
---------------------------
jlliagre >> I will try your command s -l /proc/<pid>/path/a.out I tried to run other similar command but
could not see content just garble data. But I try it tomorrow as I'm not at work at this moment
-----------------------
bartus11 >> pwdx - Ok I will try it if it is available on the solaris
I usually had no problem finding this info on redhat with lsof or from proc directory ,, I tried bunch of other code I found online but no dice ..
I hope to have better luck the two commands suggested here .. I will report back
pwdx is definitely a standard Solaris command and shows the current directory of a process. This is enough to answer your question given the relative PATH used to run your command.
The solution I suggested is more general and hopefully doesn't output garbled data.
The lsof tool is open source written at Perdue originally, so you can port it in if the local security model allows. Vic Abell's Home Page
Since all executables are sym linked into /proc as a.out on Solaris, that is the native solution. The ls -l of the sym link shows the ortiginal position. It might get funny if the executable is deleted, as in sent to */lost+found/ until all fd are closed.
No, 17 years old, but /proc is an area many try to stay out of! If nothing else, it is not UNIX portable. It is probably mostly fake, like /dev/fd/0 -- not really there, but intercepted and equivalents used, like dup( 0 ) for open( "/dev/fd/0", ... ). http://en.wikipedia.org/wiki/Procfs\#Solaris