Nov 27, 2020
5
2
3
Nottz
cPanel Access Level
Root Administrator
Hey,

I'm been working with the cPanel API multiple versions for the last few months. My plan to get get the RAM, CPU allocation and usage from the cPanel account with CloudLinux installed.

Does anyone know LVEInfo:getUsage endpoint or has used it before?

I'm getting an array from Data with 40 different array returned and can't see any documentation on what the results mean as the the API docs - cPanel API 2 Functions - LVEInfo::getUsage - Developer Documentation - cPanel Documentation

Result is as follows:

Code:
array:1 [▼
  "cpanelresult" => array:5 [▼
    "module" => "LVEInfo"
    "event" => array:1 [▶]
    "data" => array:41 [▼
      0 => array:42 [▶]
      1 => array:42 [▶]
      2 => array:42 [▶]
      3 => array:42 [▶]
      4 => array:42 [▶]
      5 => array:42 [▶]
      6 => array:42 [▶]
      7 => array:42 [▶]
      8 => array:42 [▶]
      9 => array:42 [▶]
      10 => array:42 [▶]
      11 => array:42 [▶]
      12 => array:42 [▶]
      13 => array:42 [▶]
      14 => array:42 [▶]
      15 => array:42 [▶]
      16 => array:42 [▶]
      17 => array:42 [▶]
      18 => array:42 [▶]
      19 => array:42 [▶]
      20 => array:42 [▶]
      21 => array:42 [▶]
      22 => array:42 [▶]
      23 => array:42 [▶]
      24 => array:42 [▶]
      25 => array:42 [▶]
      26 => array:42 [▶]
      27 => array:42 [▶]
      28 => array:42 [▶]
      29 => array:42 [▶]
      30 => array:42 [▶]
      31 => array:42 [▶]
      32 => array:42 [▶]
      33 => array:42 [▶]
      34 => array:42 [▶]
      35 => array:42 [▶]
      36 => array:42 [▶]
      37 => array:42 [▶]
      38 => array:42 [▶]
      39 => array:42 [▶]
      40 => array:42 [▶]
    ]
    "func" => "getUsage"
    "apiversion" => 2
  ]
]

Example:

     0 => array:42 [▼
        "lcpu" => "100"
        "lIOPS" => "1024"
        "ememf" => "lveok"
        "empcpu" => "lveok"
        "aNproc" => "0"
        "lMemStr" => "0"
        "mep" => "1"
        "mMem" => "144068608"
        "to" => "11-27 07:03"
        "mepf" => "0"
        "eapcpu" => "lveok"
        "lPMem" => "2147483648"
        "apcpu" => 0
        "eaep" => "lveok"
        "IOf" => "0"
        "emMem" => "lveok"
        "aPMem" => "34975744"
        "acpu" => "0"
        "emep" => "lveok"
        "mIO" => "0.0"
        "eaMem" => "lveok"
        "aIOPS" => "0"
        "aMemStr" => "137.4M"
        "lNproc" => "100"
        "lep" => "20"
        "mpcpu" => 0
        "mPMem" => "34975744"
        "pmemf" => "0"
        "nprocf" => "0"
        "lMem" => "0"
        "mcpu" => "0"
        "emepf" => "lveok"
        "mMemStr" => "137.4M"
        "aIO" => "0.0"
        "mIOPS" => "0"
        "mNproc" => "0"
        "memf" => "0"
        "lIO" => "10240.0"
        "aep" => "1"
        "cpuf" => "0"
        "aMem" => "144068608"
        "from" => "11-27 07:02"
      ]
Running CLOUDLINUX 7.9 kvm [r226]
cPanel v90.0.17


Does anyone know where I find documentation of the results or if maybe the array shouldn't show so many results?
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,357
546
273
cPanel Access Level
Root Administrator
Hey there! By default, the output reports the last 24 hours, although the last hour's worth of data will not be complete. If I check a user on my end and search for the "from" time value, we can see this is hourly:

Code:
[email protected] [/]# cpapi2 --user=username LVEInfo getUsage | grep from
      from: 11-27 09:51
      from: 11-27 09:46
      from: 11-27 09:30
      from: 11-27 09:20
      from: 11-27 09:00
      from: 11-27 08:00
      from: 11-27 07:00
      from: 11-27 06:00
      from: 11-27 05:00
      from: 11-27 04:00
      from: 11-27 03:00
      from: 11-27 02:00
      from: 11-27 01:00
      from: 11-27 00:00
      from: 11-26 23:00
      from: 11-26 22:00
      from: 11-26 21:00
      from: 11-26 20:00
      from: 11-26 19:00
      from: 11-26 18:00
      from: 11-26 17:00
      from: 11-26 16:00
      from: 11-26 15:00
      from: 11-26 14:00
      from: 11-26 13:00
      from: 11-26 12:00
      from: 11-26 11:00
      from: 11-26 10:00
      from: 11-26 09:00
The output shows you the details for each hour over the last 24 hours, with the second half of the output being the individual LVE values.

Does that help clear things up or were you looking for additional information?
 
  • Like
Reactions: FlippinSlipper