How are average values in lveinfo over period calculated

Average values in lveinfo are taken from current one-minute average. The calculations of all averages (aCPU, aPMEM aIO) are following:
– every minute lvestats write current average CPU usage value per minute;
– every 5 minutes lvestats calculates 5 minutes average based on previous 1 minute average (sum all and divide by 5);
– every hour it calculates 1 hour average based on previously calculated 5 minutes (summ all then divide by 12);

This way we can keep important data and save enough space of lvestats database.

To make the situation clear lets split lveinfo output to different sections:

 

From To aCPU mCPU lCPU aIO mIO lIO aEP mEP lEP aVMem mVMem lVMem aPMem mPMem lPMem aNproc mNproc lNproc EPf VMemF PMemF NprocF

Hourly:

04-24 02:00 04-24 03:00 0 4 4 3 169 5120 1 10 10 37.7M 209.6M 4.0G 23.4M 110.7M 4.0G 0 1 30 1 0 0 0
04-24 03:00 04-24 04:00 0 4 4 1 178 5120 1 10 10 53.2M 246.1M 4.0G 31.6M 126.5M 4.0G 0 1 30 0 0 0 0
04-24 04:00 04-24 05:00 0 2 4 0 73 5120 1 5 10 48.8M 139.0M 4.0G 30.4M 82.2M 4.0G 0 1 30 0 0 0 0

5min:

04-24 05:00 04-24 05:05 0 1 4 0 8 5120 1 3 10 50.7M 78.2M 4.0G 31.0M 46.6M 4.0G 0 0 30 0 0 0 0
04-24 05:05 04-24 05:10 0 0 4 0 0 5120 1 3 10 44.9M 74.7M 4.0G 28.1M 43.3M 4.0G 0 0 30 0 0 0 0
04-24 05:10 04-24 05:15 0 0 4 0 12 5120 1 2 10 36.4M 61.9M 4.0G 23.6M 42.1M 4.0G 0 0 30 0 0 0 0

1min:

04-24 05:14 04-24 05:15 0 0 4 0 3 5120 1 3 10 40.4M 74.2M 4.0G 23.7M 41.0M 4.0G 0 0 30 0 0 0 0
04-24 05:15 04-24 05:16 0 0 4 0 0 5120 1 1 10 24.5M 30.6M 4.0G 16.1M 21.9M 4.0G 0 0 30 0 0 0 0
04-24 05:16 04-24 05:17 0 0 4 0 0 5120 1 2 10 28.3M 47.8M 4.0G 17.8M 27.0M 4.0G 0 0 30 0 0 0 0

Leave a Reply

Your email address will not be published. Required fields are marked *