[Nagiosplug-devel] regarding RRD, MRTG, xpdfile

BOLLENGIER Eric ebollengier at sigma.fr
Fri Apr 25 08:01:19 CEST 2003


> > 
> > You can do something like
> > [root at nagios log]# > srvperf.log

> I don't get it.  what do you mean?  Seems like you are writing to a file? and then closing it?

see your system or shell lesson :) (in c close(open("file", "w")) ;

> 1) mv /opt/nagios/var/hostperf.log /opt/nagios/var/hostperf.log.roll
> 2) /etc/rc.d/init.d/nagios restart

Try something like :

cp /opt/nagios/var/hostperf.log /opt/nagios/var/hostperf.log.roll
perl -e "open(FP, '>/opt/nagios/var/hostperf.log') ; close(FP) ;" 

or 
cp /opt/nagios/var/hostperf.log /opt/nagios/var/hostperf.log.roll
> /opt/nagios/var/hostperf.log

And you truncate it without change is descriptor...

> > Hier, i don't agree with you... if you have 2000 services...
> 
> Here are some stats for a 551MHz Intell box:

I agree with you, it works pretty good with the truncate method,
and you leave nagios alone.

Regards





More information about the Devel mailing list