Displaying CPU, Memory & IO limits

Navigation:  Integration Guide >

Displaying CPU, Memory & IO limits

Previous pageReturn to chapter overviewNext page

Most control panels choose to display CloudLinux usage & limits to end customers. To simplify that, we lve-stats exports a file that can be easily read and processed by a control panel to display the necessary information.

 

The information is located in the /var/lve/info file. This information is updated every 5 minutes, and contains default limits (first line), as well as usage and limits for all customers. If a customer is not present in the file, it means that customer is not active (no scripts were executed recently for the customer), and a customer has default limits (so you can display no usage, and default limits in the control panel for that customer.

 

The data is stored in a form of one line per customer, with coma separated values.

 

0

user id

1

entry processes

2

entry processes limit

3

CPU

4

CPU limit

5

Virtual Memory

6

Virtual Memory Limit

7

Number of virtual memory faults

8

Number of entry processes faults

9

Physical Memory Limit

10

Physical Memory

11

Number of Physical memory faults

12

Number of processes limit

13

Number of processes

14

Number of processes fault

15

Reserved

16

IO Usage

17

IO Limit

 

With LVE version 4 (CloudLinux lve0.x) only the first 9 parameters are available. You can check the the version by reading the first byte of /proc/lve/list.

 

On the version 6 all 15 parameters should be available.

 

There is only 2 LVE versions currently used in production. Future versions might add more fields, but will not alter order of existing fields.

 

Memory is defined in 4KB pages (so, 1024 would mean 1024 4KB pages, or 4MB).

 

IO is defined as KB/s.

 

CPU is defined as % of total number of cores on a server.