Re: [Nagios-devel] File Descriptor Leak.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] File Descriptor Leak.

Post by Guest »

Thanks for the note - I'll get this fixed in CVS. BTW, if you are
still using 1.0a7 it is definitely time to upgrade.


On 11 Feb 2003 at 10:45, Vijay Gadad wrote:

> NOTE: I've fixed this problem in 1.0a7. I haven't verified the leak is present in the latest version. Looking at the code (xdata/xpdfile.c rev. 1.3), I believe it's still there.
>
> [root@tn-s0-101-2 bin]# lsof -p `cat /var/run/nagios.pid` | egrep perf.log
> nagios 25966 root 6w REG 8,9 3828 1053 /var/log/nagios/hostperf.log
> nagios 25966 root 7w REG 8,9 295729 1055 /var/log/nagios/serviceperf.log
> [root@tn-s0-101-2 bin]# kill -HUP `cat /var/run/nagios.pid`
> [root@tn-s0-101-2 bin]# lsof -p `cat /var/run/nagios.pid` | egrep perf.log
> nagios 25966 root 6w REG 8,9 3828 1053 /var/log/nagios/hostperf.log
> nagios 25966 root 7w REG 8,9 296219 1055 /var/log/nagios/serviceperf.log
> nagios 25966 root 8w REG 8,9 3828 1053 /var/log/nagios/hostperf.log
> nagios 25966 root 9w REG 8,9 296219 1055 /var/log/nagios/serviceperf.log
>
> Here's where I've added fclose() calls:
>
> --- /scratch2/nagios-cvs/nagios/xdata/xpdfile.c Sun Dec 1 20:30:12 2002
> +++ ./xpdfile.c Mon Feb 10 17:48:16 2003
> @@ -213,6 +213,10 @@
> free(xpdfile_host_perfdata_file);
> free(xpdfile_service_perfdata_file);
>
> + /* close files */
> + fclose(xpdfile_host_perfdata_fp);
> + fclose(xpdfile_service_perfdata_fp);
> +
> return OK;
> }
>
>
>
>
> Vijay Gadad
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld
> http://www.vasoftware.com
> _______________________________________________
> Nagios-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-devel
>



Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked