Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Feb 2009
    Posts
    33

    Default API for getting server load

    Hi

    Is there any API now for getting the server load ?

    Thanks
    ██SunShell Hosting
    ██Reliable Reseller Hosting Since 2006
    ██whmphp

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by whmphp View Post
    Hi

    Is there any API now for getting the server load ?

    Thanks
    Yes, the loadavg function in the XML-API will give you the load average for the past one, five and fifteen minutes in XML format.

  3. #3
    lvt
    lvt is offline
    Member
    Join Date
    May 2009
    Posts
    36

    Default

    Quote Originally Posted by cPanelDavidG View Post
    Yes, the loadavg function in the XML-API will give you the load average for the past one, five and fifteen minutes in XML format.
    Can you please give an exemple with complete syntax ? Thanks.

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by lvt View Post
    Can you please give an exemple with complete syntax ? Thanks.
    Sure, here's the raw URL you would pass to your server (where SERVER represents your server's hostname, any IP associated with the server or any domain associated with the server):

    https://SERVER:2087/xml-api/loadavg

    You can use Matt's PHP 5 class for the XML API if you wish to have easier access to this functionality via PHP 5: http://forums.cpanel.net/f42/xmlapi-...ss-111897.html

  5. #5
    lvt
    lvt is offline
    Member
    Join Date
    May 2009
    Posts
    36

    Default

    Thanks David, so it's only for WHM and not cPanel account, that's why it doesn't work for me

  6. #6
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by lvt View Post
    Thanks David, so it's only for WHM and not cPanel account, that's why it doesn't work for me
    Correct, this function is only available to those with WHM access.

Similar Threads & Tags
Similar threads

  1. Server API?
    By DaveTomneyUK in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-31-2010, 09:59 AM
  2. Server API
    By andyy in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 08-09-2006, 11:14 AM
  3. Server Load in the Red when running WHM/cPanel on server with multiple cpus
    By IdeaHamster in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-19-2004, 05:24 AM
  4. server over load load average: 69.93
    By alzoor in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 12-29-2003, 04:34 AM
  5. Replies: 0
    Last Post: 06-30-2003, 01:58 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube