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.

apachetop?

Discussion in 'EasyApache' started by MACscr, Aug 23, 2011.

  1. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Is there something available like apachetop that will allow me to watch stats of apache and files being loaded in real time? I just hating seeing 30 httpd processes that are spawned, but have no clue what all of them are. Doing a trace on each just takes to much time. Suggestions?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Do you mean like using this command:

    Code:
    watch -n 10 "httpd fullstatus"
    This would put the command httpd fullstatus on watch and refresh every 10 seconds.
     
  3. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Unfortunately that doesnt seem to give the same type of useful information. Here is a screenshot of apache top on an ubuntu server: 2011-08-23_1807 - MACscr's library

    Maybe the issue is that on the ubuntu server, its only a single site and running mod_php?

    There must be a way to do something like this on cpanel server running suphp.
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    It really helps to indicate when a program specifically called apachetop is what is being requested. To install on CentOS, here is the way to do it:

    Code:
    cd /root
    wget http://www.webta.org/apachetop/apachetop-0.12.6.tar.gz
    yum install readline-devel
    yum install ncurses-devel
    tar xvzf apachetop-0.12.6.tar.gz 
    cd apachetop-0.12.6
    ./configure
    make && make install
    apachetop -f /usr/local/apache/logs/access_log
    The last line is simply the path to the log files. If all domains aren't outputting entries into the access_log, you can instead monitor the domlogs for individual users by running default to that user's domlog file such as /usr/local/apache/domlogs/domain.com instead.
     

Share This Page