Forum
  1. Forums
  2. General
  3. Programming for CloudLinux
  1. Bino Oetomo
  2. Friday, May 25, 2018
  3.  Subscribe via email
Dear All.

I'm working on capturing /proc/lve/list and throw it to influxDB.
It works good in Version 6 (centos6), but failed in Version 7 (centos 7).

Here is from the version 6


9:LVE EP lCPU lIO CPU MEM IO lMEM lEP nCPU fMEM fEP lMEMPHY lCPUW lNPROC MEMPHY fMEMPHY NPROC fNPROC lIOPS IOPS lNETO lNETI NETO NETI
0 0 10000 1024 0 0 0 262144 20 1 0 0 262144 100 100 0 0 0 0 1024 0 0 0 0 0
5 0 5000 5120 0 0 0 262144 20 1 0 0 262144 100 100 0 0 0 0 1024 0 0 0 0 0
501 0 20000 1024 0 0 0 196608 15 2 0 0 131072 100 100 0 0 0 0 1024 0 0 0 0 0


With above output, it's easy to parse the data and form a JSON
all lines have 25 values

the first data of 2nd lines and the rest ... can be maped to username

and here from version 7

10:LVE lCPU lCPUW nCPU lEP lNPROC lMEM lMEMPHY lIO lIOPS lNETO lNETI EP CPU MEM IO fMEM fEP MEMPHY fMEMPHY NPROC fNPROC IOPS NETO NETI
0,0 10000 100 1 20 100 0 262144 1024 1024 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0,99 120000 100 12 0 0 0 524288000 0 0 0 0 0 161500 6339346 0 11520168 0 0 6945 0 0 0 719175 77878949 7037131
0,984 120000 100 12 0 0 0 524288 0 0 0 0 0 770280087 08208 0 0 0 0 0 0 267 28253 10692


With above output .... for me it's dificult to form a JSON.
a. The first line (header) have 25 data, while the rest have 26 datas
b. first data of 2nd lines and the rest ... is comma seperated value (decimals ?)

Sincerely
-bino-
Rate this post:
  1. 30.05.2018 11:05:19
  2. # 1
Igor Ghertesco Accepted Answer
Posts: 132
Joined: 07.08.2015
0
Votes
Undo
Hello,

This is the output from the latest kernel with reseller limits support. The current format of the first column is: Reseller_ID,LVE_ID

We will update our doc section soon: https://docs.cloudlinux.com/index.html?reading_lve_usage.html
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Remove Upload Files (Maximum File Size: 2 MB)
You may insert polls into your post. The poll would then appear in the post.
Vote Options
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.