monit-general
[Top][All Lists]
Advanced

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

Re: loadavg and memusage display during init


From: Martin Pala
Subject: Re: loadavg and memusage display during init
Date: Wed, 08 Sep 2004 22:58:01 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Debian/1.7.2-4

Can you try this patch?

Martin

Index: monitor.h
===================================================================
RCS file: /cvsroot/monit/monit/monitor.h,v
retrieving revision 1.154
diff -r1.154 monitor.h
284d283
< typedef struct mysysteminfo {
285a285,286
> /** Defines data for systemwide statistic */
> typedef struct mysysteminfo {
287d287
< 
291d290
< 
295d293
< 
298a297
> 
Index: p.y
===================================================================
RCS file: /cvsroot/monit/monit/p.y,v
retrieving revision 1.183
diff -r1.183 p.y
1379,1380d1378
<   time(&systeminfo.collected);
< 
Index: process.c
===================================================================
RCS file: /cvsroot/monit/monit/process.c,v
retrieving revision 1.9
diff -r1.9 process.c
102a103,105
>   memset(&systeminfo, 0, sizeof(SystemInfo_T));
>   time(&systeminfo.collected);
> 
120a124
>   ASSERT(systeminfo.mem_kbyte_max > 0);
125a130
>     s->inf->ppid=leaf->ppid;
151,152c156
<           (int) ((double) leaf->mem_kbyte_sum * 1000.0 /
<                  systeminfo.mem_kbyte_max);
---
>         (int)((double) leaf->mem_kbyte_sum * 1000.0 / 
> systeminfo.mem_kbyte_max);
154,155c158
<           (int)((double) leaf->mem_kbyte * 1000.0 /
<                 systeminfo.mem_kbyte_max);
---
>         (int)((double) leaf->mem_kbyte * 1000.0 / systeminfo.mem_kbyte_max);
160a164
>     s->inf->ppid=0;
183a188,189
>   ASSERT(systeminfo.mem_kbyte_max > 0);
> 
202c208
<       
---
> 
204c210
<           (int) ((double) systeminfo.total_mem_kbyte * 1000.0 /
---
>         (int)((double) systeminfo.total_mem_kbyte * 1000.0 /

reply via email to

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