help: how to find what .php file useing cpu and memory ?

Discussion in 'Site & Server Administration' started by nikolaaa, Nov 8, 2006.

  1. #1
    I have problem with my virtaul server. It's going out of ram.
    How to find which scripts use more memory?
    I have 5-7 sites on that server but only two are very busy.
    I guess that problem is in one of script on my sites:
    phpbb forum,
    phpadsnew banner script,
    my cms script or
    phparcadescript (games script)...


    Can you tell me how to find which script or which part of script useing lot of mysql queries and cpu time?


    I have "Virtuozzo Power Panel (VZPP)", "Web Host Manager (WHM)", cPanel and ssh root access.
     
    nikolaaa, Nov 8, 2006 IP
  2. Estevan

    Estevan Peon

    Messages:
    120
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    0
    #2
    ps auxwww you find the process
     
    Estevan, Nov 8, 2006 IP
  3. nikolaaa

    nikolaaa Well-Known Member

    Messages:
    1,594
    Likes Received:
    73
    Best Answers:
    0
    Trophy Points:
    145
    #3
    ps auxwww
    shows me process but not php pages.
    i want to find how much memory and proc useing
    forum/viewtopic.php
    mygames/showgames.php
    etc...
     
    nikolaaa, Nov 8, 2006 IP
  4. MrGeeK

    MrGeeK Peon

    Messages:
    350
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #4
    turn on mod_status in apache and enable extended status info

    Srv PID Acc M CPU SS Req Conn Child Slot Client VHost Request
    0-54 27151 0/49/177 _ 0.05 14 0 0.0 0.40 1.83 86.80.89.197 znoc.co.nz GET /navbar/umdatabase.gif HTTP/1.1
    1-54 26230 2/195/195 K 1.10 10 0 0.0 6.75 6.75 59.100.102.195 pimpin-myspace.com GET /images/snow.gif HTTP/1.1
    2-54 26231 0/189/189 _ 1.86 14 0 0.0 2.49 2.49 86.80.89.197 znoc.co.nz GET /navbar/forums.gif HTTP/1.1
     
    MrGeeK, Nov 11, 2006 IP