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.

Service Status

Discussion in 'General Discussion' started by ShoeMZ, Jun 1, 2008.

  1. ShoeMZ

    ShoeMZ Registered

    Joined:
    Mar 18, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    How would I go about using PHP to display the server status data on an external page? I'm not looking for a really complicated premade script, just something simple.
     
  2. dansgalaxy

    dansgalaxy Well-Known Member

    Joined:
    Jan 29, 2007
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Reading, UK
    cPanel Access Level:
    Root Administrator
    Me too, been looking for this for ages :s

    Dan
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    There are many third party PHP scripts that do this without interfacing through cPanel/WHM.
     
  4. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
  5. wizzy420

    wizzy420 Well-Known Member

    Joined:
    Nov 13, 2007
    Messages:
    125
    Likes Received:
    2
    Trophy Points:
    18
    Little overdue for a security kernel upgrade there, eh? You're at 6 and the current release is 21.

    W
     
  6. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Thats is kinda of strange, been running updates, after I saw your post I ran a yum update and I was able to go up to .14 for an openvz kernel on the main node. Anyway, thanks!!
     
  7. dansgalaxy

    dansgalaxy Well-Known Member

    Joined:
    Jan 29, 2007
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Reading, UK
    cPanel Access Level:
    Root Administrator
    if that script was free it would be perfect.

    however im trying to figure out my problem with this code:

    PHP:
    <?php 

    $user 
    'user'
    $pass '*********; 
    $url = '
    xdnet.co.uk';

    $page = file_get_contents("http://$user:$pass@$url:2082/frontend/x3/status.html"); 


    $pattern = "#<table>(.*?)</table>#";
    $int = preg_match($pattern, $page, $match); 

    echo count($match);
    echo $match[0];
    ?>
    not sure why it isnt working, i know its retrieving the page fine, but cant seem to grab whats between the <table> tags (the table of the status etc)

    Any ideas please tell! :)
    Dan
     
  8. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,130
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    It's a very cool tool. May I ask 2 questions?

    1) Does anybody know of a similar tool, but freeware?

    2) Using this tool with another cron intensive monitoring tools at the same time, like APF, CSF or so, may affect the server performance?

    Thanks
     
  9. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    This method is unreliable as it relies on parsing data from cPanel-generated pages. That output is always subject to change.

    It's not terribly difficult to build a custom script to generate this output for you. You don't need to rely on cPanel/WHM for this particular information.
     
  10. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    I tried a couple of free ones but they were unrelaible, I found them via a google search or at hot scripts. The 2k software was not too expensive and I do not see a server load from it.
     
  11. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,130
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    Interesting. You can set the refresh delay for the data output?
    I'm looking for a not so real time behaviour, like the Service Status from WHM.
     
  12. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
  13. UBERHOST

    UBERHOST Well-Known Member

    Joined:
    Jan 13, 2008
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    California, US
    Thanks for sharing that, Randy. I'm off to buy, and will let them know you referred us.

    Cheers,
    Rick
     
  14. dansgalaxy

    dansgalaxy Well-Known Member

    Joined:
    Jan 29, 2007
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Reading, UK
    cPanel Access Level:
    Root Administrator
    I got that script to work, im just working on some styling and i will post it, it should be fairly reliable and i will be changing it anyway along with any cPanel changes so shouldnt be any issues.

    Its easy and a free method so im not going to moan ;)

    Dan
     
  15. UBERHOST

    UBERHOST Well-Known Member

    Joined:
    Jan 13, 2008
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    California, US
    As cheap as Status2k is for a polished script that works across multiple servers, I couldn't be arsed to monkey with anything else. It's $10.95 twice yearly, or $49.95 lifetime.
     
  16. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,130
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    The 2k software require that you have installed the SSH2 PHP PECL module (that's what 2k's support guy told me). So I wonder what I need to pay attention and have in mind before installing and using SSH2. Is this mod fully compatible with cPanel and won't interact negatively, right? Any tips?
     
  17. Downthe.NET

    Downthe.NET Member

    Joined:
    Jun 30, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Status2k is so hassle free... The admin panel allows you to see the apache processes and log all the way around your server.

    Status2k is also unlimited domain in licensing, so you can use it on all of the domains that you own. For $20 yearly (or 5c per day!) it's well worth the price...
     
  18. scribby

    scribby Member

    Joined:
    Aug 25, 2004
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    You only need to install SSH2 if you have SUPHP or PHPSUEXEC.
     
Loading...

Share This Page