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.

Access server stats outside of CPanel

Discussion in 'General Discussion' started by closet geek, Mar 19, 2004.

  1. closet geek

    closet geek Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    hi!

    I'd love to be able to have the full server status report (with the green - I hope ;) - lights) saying which services are running & CPU load on a page on my site, is there anyway I can do this? :)

    cg
     
  2. closet geek

    closet geek Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    ??

    anyone?

    cg
     
  3. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    I don't think there's any easy way. I'll do it for you for a couple bucks, but here's how I would do it:

    Make a new account. Don't give it much space, make it a demo account.

    Add a new file to the theme:

    /usr/local/cpanel/base/frontend/xxxxxxxx/status.html

    where xxxxxxxxx is your theme.

    The file contains 1 line:
    <cpanel Serverinfo="servicestatus()">

    Then.... on your site, where you want the status table (must be a php file)

    PHP:
    <?php include("http://user:pass@yoursite.com:2082/frontend/xxxxxxxxxx/status.html"); ?>
    fopen wrappers must be turned on, and if you're using phpsuexec, make sure the php file is not world readable.
     
  4. closet geek

    closet geek Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    thank you :)

    cg
     
Loading...

Share This Page