The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

path of script from pid process

Discussion in 'General Discussion' started by upsforum, Aug 20, 2007.

  1. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    Dear,

    is possible get the path of php script from a PID process?
     
  2. astopy

    astopy Well-Known Member

    Joined:
    Apr 3, 2003
    Messages:
    165
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Check out some of the files in /proc/PID/ (obviously inserting the relevant number in place of PID). You'll need to be quick, as once the process terminates that directory will be gone.
     
  3. arhs

    arhs Well-Known Member

    Joined:
    Jul 4, 2003
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    Do this:

    ls -lah /proc/PID
     
  4. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    dr-xr-xr-x 3 nobody nobody 0 Aug 20 17:02 ./
    dr-xr-xr-x 214 root root 0 Aug 20 04:07 ../
    -r-------- 1 root root 0 Aug 20 17:13 auxv
    -r--r--r-- 1 root root 0 Aug 20 17:12 cmdline
    lrwxrwxrwx 1 root root 0 Aug 20 17:13 cwd -> /home/*******/public_html/
    -r-------- 1 root root 0 Aug 20 17:12 environ
    lrwxrwxrwx 1 root root 0 Aug 20 17:13 exe -> /usr/local/apache/bin/httpd*
    dr-x------ 2 root root 0 Aug 20 17:13 fd/
    -rw-r--r-- 1 root root 0 Aug 20 17:13 loginuid
    -r--r--r-- 1 root root 0 Aug 20 17:13 maps
    -rw------- 1 root root 0 Aug 20 17:13 mem
    -r--r--r-- 1 root root 0 Aug 20 17:13 mounts
    -rw-r--r-- 1 root root 0 Aug 20 17:13 oom_adj
    -r--r--r-- 1 root root 0 Aug 20 17:13 oom_score
    lrwxrwxrwx 1 root root 0 Aug 20 17:13 root -> //
    -r--r--r-- 1 root root 0 Aug 20 17:12 stat
    -r--r--r-- 1 root root 0 Aug 20 17:13 statm
    -r--r--r-- 1 root root 0 Aug 20 17:12 status
    dr-xr-xr-x 3 root root 0 Aug 20 17:13 task/
    -r--r--r-- 1 root root 0 Aug 20 17:13 wchan

    OK .... and now?
     
  5. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    Your question is how to get the path of php script from a PID process and arhs already answer your question. So.... :confused:
     
Loading...

Share This Page