LVE-Stats 0.x

Navigation:  Deprecated >

LVE-Stats 0.x

Previous pageReturn to chapter overviewNext page

NOTE. LVE-STATS-0.X IS NO LONGER SUPPORTED, PLEASE USE LVE-STATS 2

 

lve-stats package collects LVE usage statistics and allows to query the data.

 

To install, run:

 

$ yum install lve-stats

 

If you are already running lve-stats (in case you are running cPanel LVE plugin), run:

 

$ yum update lve-stats

 

This should also be updated automatically next time your system runs system wide update.

 

The package installs lvestats-server. You can re-start the server by running:

 

$ service lvestats restart

 

The package creates sqlite database /var/lve/lveinfo.db that stores history information about LVE usage. Up to two months of hourly info is stored for each client. The data for the last hour is stored with 5 minutes interval, and the data for the past 10 minutes is stored with 1 minute interval.

 

LVE Stats updates /var/lve/info every few seconds. That info is used by LVE Manager plugin.

 

Package consists of lveinfo utility to query LVE usage, and lvechart that allows you to chart usage for individual LVE.

 

To query historical LVE info, lveinfo command provided. It is located at /usr/sbin/lveinfo:

 

# /usr/sbin/lveinfo [OPTIONS]
-h --help              : this help screen
-v, --version          : version number
-d, --display-username : try to convert LVE id into username when possible
-f, --from=            : run report from date and time in YYYY-MM-DD HH:MM format
     if not present last 10 minutes are assumed
-t, --to=              : run report up to date and time in YYYY-MM-DD HH:MM format
     if not present, reports results up to now
-o, --order-by=        : orders results by one of the following:
     cpu_avg          : average CPU usage
     cpu_max          : max CPU usage
     mep_avg          : average number of entry processes (concurrent connections)
     mep_max          : max number of entry processes (concurrent connections)
     vmem_avg         : average virtual memory usage
     vmem_max         : max virtual memory usage
     pmem_avg         : average physical memory usage
     pmem_max         : max physical memory usage
     nproc_avg        : average number of processes usage
     nproc_max        : max number of processes usage
     io_avg           : average IO usage
     io_max           : max IO usage
     total_mem_faults : total number of out of virtual memory faults (deprecated since 0.8-6)
     total_vmem_faults: total number of out of virtual memory faults (since 0.8-6)
     total_pmem_faults: total number of out of physical memory faults (since 0.8-6)
     total_mep_faults : total number of entry processes faults (deprecated since 0.8-6)
     total_ep_faults  : total number of entry processes faults (since 0.8-6)
     total_nproc_faults: total number of number of processes faults (since 0.8-6)
     any_faults       : total number of any types of faults (since 0.8-6)
   --id=              : LVE id -- will display record only for that LVE id
-u, --user=            : Use username instead of LVE id, and show only record for that user
-l, --limit=           : max number of results to display, 10 by default
-c, --csv              : display output in CSV format
-b, --by-usage         : show LVEs with usage (averaged or max) within 90% percent of the limit
     available values:
     cpu_avg          : average CPU usage
     cpu_max          : max CPU usage
     mep_avg          : average number of entry processes (concurrent connections)
     ep_avg           : average number of entry processes (since 0.8-6)
     mep_max          : max number of entry processes (concurrent connections)
     ep_max           : max number of entry processes (since 0.8-6)    
     mem_avg          : average virtual memory usage
     mem_max          : max virtual memory usage
     vmem_avg         : average virtual memory usage
     vmem_max         : max virtual memory usage
     pmem_avg         : average physical memory usage
     pmem_max         : max physical memory usage
     nproc_avg        : average number of processes
     nproc_max        : max number of processes
     io_avg           : average IO usage
     io_max           : max IO usage
-p, --percentage       : defines percentage for --by-usage option
-f, --by-fault         : show LVEs which failed on max entry processes limit or memory limit
     available values: mem, mep.
     since 0.8-6      : vmem, pmem, ep, nproc
   --show-all         : since 0.8-6 only columns for enabled limits will show up.
-r, --threshold        : in combination with --by-fault, shows only LVEs with number of faults above threshold specified
   --server_id        : used in combination with centralized storage, to access info from any server
   --show-all         : full output (show all limits); brief output by default
 

 

 

Output

 

ID

LVE Id or username

aCPU

Average CPU usage

mCPU

Max CPU usage

lCPU

CPU Limit

aEP

CPU Limit

mEP

Max Entry Processes

lEP

Entry Proc limit

aNPROC

Average Number of Processes

mNPROC

Max Number of Processes

lNPROC

Number of Processes limit

aVMEM

Average virtual Memory Usage

mVMEM

Max virtual Memory Usage

lVMEM

Virtual Memory Limit

aPMEM

Average physical Memory Usage

mPMEM

Max physical Memory Usage

lPMEM

Physical Memory Limit

aIO

Average IO usage

mIO

Max IO usage

lIO

IO Limit

fVMEM

Out Of Virtual Memory Faults

fPMEM

Out Of Physical Memory Faults

fEP

Entry processes faults

fNPROC

Number of processes faults

 

* only enabled limits will show up

 

 

Examples

 

Display top 10 users, by max CPU usage, from Oct 10, 2010 to Oct 15, 2010. Display username if possible:

 

$ lveinfo --from='2010-10-10' --to='2010-10-15' -o cpu_max --display-username
ID        aCPU        mCPU        lCPU        aEP        mEP        lEP        aMem        mMem        lMem        MemF        MepF
777        7        9        10        0        0        25        10M        15M        1G        0        0
300        2        8        10        0        1        25        1M        3M        1G        0        0
web2        1        6        10        0        0        25        17K        18M        1G        0        0
web1        0        0        10        0        0        25        204K        1M        1G        0        0

 

Display LVE info about user web2, from Oct 10, 2010 to Oct 15, 2010:

 

$ lveinfo --from='2010-10-10' --to='2010-10-15' --user=web2 --display-username
ID        aCPU        mCPU        lCPU        aEP        mEP        lEP        aMem        mMem        lMem        MemF        MepF
web2        1        6        10        0        0        25        10M        15M        1G        0        0