monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[monit] Problem in calculating total cpu and memory percentage


From: Neelam Baliyan
Subject: [monit] Problem in calculating total cpu and memory percentage
Date: Tue, 10 Nov 2009 23:11:15 -0800 (PST)

Hi,
Actually i am try to find total memory and cpu percentage.
memory Percentage:-

in file process.c you used the formula given below :-

systeminfo.total_mem_percent= (int)(1000 *
(double)systeminfo.total_mem_kbyte / (double)systeminfo.mem_kbyte_max;

Why you multiple it by 1000 ?

CPU percentage :-
1. why cpu percentage is dependent on the previous values ?

in file process/sysdep_LINUX.c you used the formula given below :-

si->total_cpu_user_percent =(int)(1000 * (double)(cpu_user - old_cpu_user) /
delta);

why the value is multiply by 1000 here also ?

I m try to find out the total percentage of memory and cpu usgae.

Thanks
Neelam
-- 
View this message in context: 
http://old.nabble.com/Problem-in-calculating-total-cpu-and-memory-percentage-tp26297017p26297017.html
Sent from the monit-general mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]