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.

how much ram used each account holder.

Discussion in 'cPanel Developers' started by smartshovon, Oct 3, 2013.

  1. smartshovon

    smartshovon Member

    Joined:
    Sep 30, 2013
    Messages:
    24
    Likes Received:
    1
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    how i can check which account used how much ram.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. KostonConsulting

    KostonConsulting Well-Known Member

    Joined:
    Jun 17, 2010
    Messages:
    255
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    San Francisco, CA
    cPanel Access Level:
    Root Administrator
    cPanel doesn't provide per user memory usage information via API (or non-API unless I'm mistaken). If you're on CentOS, I'd recommend installing smem:

    Code:
    #yum install smem
    
    You can get per user memory usage with the -u flag like so:

    Code:
    # smem -u
    User     Count     Swap      USS      PSS      RSS 
    haldaemon     1     1612        4       14      112 
    dbus         1      320        4       23      136 
    xfs          1      396       60       69      164 
    cpanel       1        0      136      281     1092 
    mailnull     1      328      324      331      808 
    postgres     5     1960      596      785     2748 
    named        1     1788     2600     2611     3112 
    tomcat       1    36136    20468    20491    21092 
    mysql        1    47316    29516    29551    30204 
    mailman      9      628    49676    50298    62484 
    root        55    13484   126880   151425   210068 
    nobody      10     6476   172896   179761   252260
    
    However, to get this information remotely (or via WHM addon), you will need an interface for that. You can create a custom API module for this. Here's an example where I created a custom module to get the main domain for an account. You can use the sample principles but instead parse and return the output from #smem -u | grep $user (or something similar).

    http://forums.cpanel.net/f42/cant-get-accounts-primary-main-domain-name-350881.html
     
Loading...
Similar Threads - much ram used
  1. odmink0
    Replies:
    0
    Views:
    236

Share This Page