monit-general
[Top][All Lists]
Advanced

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

[monit] problem in calculating process wise CPU.


From: Neelam Baliyan
Subject: [monit] problem in calculating process wise CPU.
Date: Tue, 5 Jan 2010 22:03:36 -0800 (PST)

Hi,

There is a problem in process wise CPU calculation ,
by formula:-

pt[i].cpu_percent =
(int)(1000*((double)(pt[i].cputime-pt[i].cputime_prev)/(pt[i].time-pt[i].time_prev))/
systeminfo.cpus);

1. It always give constant value.

2. why we are deviding it by systeminfo.cpus?

3. what is paronia ? monit used it like below but if our process is taking
100% CPU,monit will constant cpu_percent value to 50% why ?

/* Just for paranoia! */
        if(pt[i].cpu_percent > 1000 / systeminfo.cpus)
        {
            pt[i].cpu_percent = 1000 / systeminfo.cpus;

        }

Thanks & Regards
Neelam

-- 
View this message in context: 
http://old.nabble.com/-monit--problem-in-calculating-process-wise-CPU.-tp27026788p27026788.html
Sent from the monit-general mailing list archive at Nabble.com.





reply via email to

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