Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    lvt
    lvt is offline
    Member
    Join Date
    May 2009
    Posts
    36

    Default cPanel : General account information

    I need help to display the following information just like cPanel does :

    Disk Usage : 48.12/300 MB
    Bandwidth : 31.79/3000.00 MB
    Subdomains : 0/100
    Parked Domains : 0/0
    Addon Domains : 0/0
    MySQL : 4/100
    MySQL Disk Space : 1.16/251.88 MB
    Email Accounts : 2/100
    Email Forwarders : 5/unlimited
    Auto-Responders : 0/unlimited
    Email Filters : 0/unlimited
    FTP Accounts : 1/100
    For now I've figured out some information using StarsBar function

    Email Accounts : 2/100
    FTP Accounts : 1/100
    MySQL : 4/100

    Please help me with the other account information, especially Bandwidth & Disk usage.

    Thanks.

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

    Default

    To my knowledge, Bandwidth & Disk usage can only obtain by using WHM "showbw" & "accountsummary" functions, can it be done via cPanel API without using WHM username / password ?

  3. #3
    Member
    Join Date
    Dec 2008
    Posts
    153

    Default

    I am not sure about that, but I wouldnt doubt it. as of now, my script grabs it out of the clients account with the clients pw

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

    Default

    Quote Originally Posted by jhyland87 View Post
    I am not sure about that, but I wouldnt doubt it. as of now, my script grabs it out of the clients account with the clients pw
    Are you using cPanel API or other scripts ?

    I modified a PHP script and put it in one of my website, this script will receive queries from other websites then grab XML data from WHM and finally return this data to the websites that request it. For the moment it's my only solution (tested succesfully) because I have several WHM and I don't want to put WHM accesskey manually in every script installed on the websites (imagine if I change the accesskey there will be lot of works).

    But the solution only works for the websites hosted by me, if the websites are with other resellers it will not work because I don't have their WHM accesskey, so if it can be done with cPanel's API that's great.

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

    Default

    Another question : does Mysql databases share the same disk space with the website ? If not how to grab the information about its disk usage ?

  6. #6
    Member
    Join Date
    Dec 2008
    Posts
    153

    Default

    Quote Originally Posted by lvt View Post
    Another question : does Mysql databases share the same disk space with the website ? If not how to grab the information about its disk usage ?
    Thats a good question, something id be interested in knowing as well

  7. #7
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by lvt View Post
    I need help to display the following information just like cPanel does :



    For now I've figured out some information using StarsBar function

    Email Accounts : 2/100
    FTP Accounts : 1/100
    MySQL : 4/100

    Please help me with the other account information, especially Bandwidth & Disk usage.

    Thanks.
    Here's a related thread:

    http://forums.cpanel.net/f42/script-...el-111697.html

    For Bandwidth usage and Disk Usage, you would use these parameters in your series of piped arguments (read the thread and it'll make more sense):

    Code:
    diskusage|bandwidthusage

  8. #8
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by lvt View Post
    To my knowledge, Bandwidth & Disk usage can only obtain by using WHM "showbw" & "accountsummary" functions, can it be done via cPanel API without using WHM username / password ?
    Yes, use the API call I mentioned above. You can call the XML API for the cPanel account, just use the cPanel user's credentials to authenticate and use port 2083 (port 2082 if using plain-text HTTP) instead of ports 2087, 2086.

  9. #9
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by lvt View Post
    Another question : does Mysql databases share the same disk space with the website ? If not how to grab the information about its disk usage ?
    As of writing, database disk space is not always counted as part of the user's disk consumption. This will be resolved fully in cPanel/WHM 11.25. However, there is no built-in way for retrieving the disk space consumed only by databases via our APIs at this time.

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

    Default

    Thanks David, you're always helpful.

Similar Threads & Tags
Similar threads

  1. I can only see the "general account information"
    By Laura91 in forum New User Questions
    Replies: 1
    Last Post: 06-28-2009, 05:40 AM
  2. How do i remove the General server information?
    By punjabipredator in forum New User Questions
    Replies: 11
    Last Post: 09-28-2006, 07:59 PM
  3. General account information data
    By Shane_F in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-09-2006, 09:58 AM
  4. cpanel home page error in "General account information:"
    By david510 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 12-05-2005, 09:39 PM
  5. Getting the General account information on another site.
    By jarandm in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-19-2005, 09:35 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube