I'm new to influxdb.  I tried to calculate the CPU usage.

Data inserted into influxdb with 5mins interval. 

my Calculation for Every 5mins: 

CPU_usage = [ ssCpuRawUser / 
(ssCpuRawUser+ssCpuRawNice+ssCpuRawSystem+ssCpuRawIdle+ssCpuRawSoftIRQ) ] * 
100

Please share me the query for the above calculation

Here is the value inserted into influxdb:
time hostname idle           nice oid system user        value
2016-11-29T12:02:25.278201112Z "dev.app1.local" 109864350 108493 1689895 
3204339 
2016-11-29T12:02:25.282359773Z "dev.app1.local" "ssCpuRawUser" 3204339
2016-11-29T12:02:25.286145038Z "dev.app1.local" "ssCpuRawNice" 108493
2016-11-29T12:02:25.290602074Z "dev.app1.local" "ssCpuRawSystem"       
 1689895
2016-11-29T12:02:25.294064947Z "dev.app1.local" "ssCpuRawIdle" 109864350
2016-11-29T12:02:25.297439427Z "dev.app1.local" "ssCpuRawInterrupt" 22029
2016-11-29T12:02:25.300748476Z "dev.app1.local" "ssCpuRawSoftIRQ" 71358
2016-11-29T12:02:25.303927833Z "dev.app1.local" "ssCpuRawKernel" 0
2016-11-29T12:02:25.307150225Z "dev.app1.local" "ssCpuRawWait" 59377
2016-11-29T12:07:20.890506803Z "dev.app1.local" 109892078 108526 1690392 
3205285 
2016-11-29T12:07:20.895151041Z "dev.app1.local" "ssCpuRawUser" 3205285
2016-11-29T12:07:20.898875923Z "dev.app1.local" "ssCpuRawNice" 108526
2016-11-29T12:07:20.902326522Z "dev.app1.local" "ssCpuRawSystem"       
 1690392
2016-11-29T12:07:20.905513396Z "dev.app1.local" "ssCpuRawIdle" 109892078
2016-11-29T12:07:20.90856002Z "dev.app1.local" "ssCpuRawInterrupt" 22042
2016-11-29T12:07:20.911568897Z "dev.app1.local" "ssCpuRawSoftIRQ" 71392
2016-11-29T12:07:20.914664004Z "dev.app1.local" "ssCpuRawKernel" 0
2016-11-29T12:07:20.917818936Z "dev.app1.local" "ssCpuRawWait" 59390


-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/20c75b6c-041d-4d26-949c-f90ea0e84e75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to