Date: Mon, 12 Sep 2011 22:48:50 +0300 From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= <kes-kes@yandex.ru> To: Robert Bonomi <bonomi@mail.r-bonomi.com> Cc: freebsd-questions@freebsd.org, net-snmp-coders@lists.sourceforge.net Subject: BUG: snmpd or How to check where space is LOST Message-ID: <1779163157.20110912224850@yandex.ru> In-Reply-To: <201109120728.p8C7SMiK040538@mail.r-bonomi.com> References: <1227884793.20110912085127@yandex.ru> <201109120728.p8C7SMiK040538@mail.r-bonomi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Çäðàâñòâóéòå, Robert. Âû ïèñàëè 12 ñåíòÿáðÿ 2011 ã., 10:28:22: >> From kes-kes@yandex.ru Mon Sep 12 00:51:16 2011 >> Date: Mon, 12 Sep 2011 08:51:27 +0300 >> From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= <kes-kes@yandex.ru> >> To: Robert Bonomi <bonomi@mail.r-bonomi.com> >> Subject: Re[2]: How to check where space is LOST >> >> Caoaanoaoeoa, Robert. >> >> u ienaee 12 naioyaoy 2011 a., 4:33:25: >> >> >> From owner-freebsd-questions@freebsd.org Sun Sep 11 17:23:57 2011 >> >> Date: Mon, 12 Sep 2011 01:23:32 +0300 >> >> From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= <kes-kes@yandex.ru> >> >> To: freebsd-questions@freebsd.org >> >> Subject: How to check where space is LOST >> >> >> >> Hi. >> >> >> >> I notice that some times /var is overfull >> >> >> >> # df -h >> >> Filesystem Size Used Avail Capacity Mounted on >> >> /dev/ad1s1d 989M 349M 561M 38% /var >> >> >> >> # cd /var/ >> >> >> >> # du -h -d 1 >> >> 98M . >> >> >> >> If I just #reboot system. I get that on /var is only 98M used. >> >> >> >> # df -h >> >> Filesystem Size Used Avail Capacity Mounted on >> >> /dev/ad1s1d 989M 98M 891M 12% /var >> >> >> >> How to obtain what take space on /var >> >> RB> Probably, you *don't*. <grin> >> >> RB> "df" _is_ telling the truth. >> RB> 'du' is, arguably, 'telling lies'. >> >> RB> The difference concerns files that have been deleted (rm) _after_ >> RB> they have been opened, and not yet closed. The file handle/descriptor >> RB> that has the file open silll has access to all the data in the file. >> RB> but *NOTHING*ELSE* -- inlcuding 'du' -- can access that file, so the >> RB> space occupied by that deletedd file is not counted. >> >> RB> Note: this *IS* a FAQ. >> >> thank you very much. >> >> fstat -f /var tell me that process snmpd with file descriptor 3 take >> spece: RB> It's not unreasonable that snmpd (the 'simple network management protocol' RB> daemon) needs a *lot* of private storage. RB> In short, don't worry about it. Ok, How you can explain this: # df -h /dev/ad1s1d 989M 138M 772M 15% /var # fstat -f /var USER CMD PID FD MOUNT INUM MODE SZ|DV R/W root snmpd 20545 3 /var 47141 -rw------- 37217152 w root snmpd 20545 8 /var 47159 -rw-r----- 728 r snmpd has 35MB of space # find /var -inum 47141 -ls output is empty (( # /usr/local/etc/rc.d/snmpd restart Stopping snmpd. Starting snmpd. # df -h /dev/ad1s1d 989M 102M 808M 11% /var # fstat -f /var/ USER CMD PID FD MOUNT INUM MODE SZ|DV R/W root snmpd 40766 3 /var 47171 -rw------- 23311 w root snmpd 40766 8 /var 47159 -rw-r----- 728 r after 3-4 weeks and snmpd overfull /var filesystem (((( Test on other system: # df -h /dev/ad0s1d 6.7G 2.1G 4.1G 34% /var # fstat -f /var | grep snmp root snmpd 7140 3 - 588866 -rw-r--r-- 947424261 w root snmpd 7140 8 /var 588842 -rw-r----- 728 r # /usr/local/etc/rc.d/snmpd restart Stopping snmpd. Waiting for PIDS: 7140. Starting snmpd. # fstat -f /var | grep snmp root snmpd 23376 3 /var 588894 -rw-r--r-- 132 w root snmpd 23376 8 /var 588872 -rw-r----- 728 r # df -h /dev/ad0s1d 6.7G 1.2G 5G 19% /var It seems that that is the BUG of snmpd # snmpd -v NET-SNMP version: 5.5 Web: http://www.net-snmp.org/ Email: net-snmp-coders@lists.sourceforge.net # uname -a FreeBSD flux 9.0-CURRENT FreeBSD 9.0-CURRENT #4: Fri Jun 10 01:30:12 UTC 2011 adm@:/usr/obj/usr/src/sys/PAE_KES i386 -- Ñ óâàæåíèåì, Êîíüêîâ mailto:kes-kes@yandex.ru
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1779163157.20110912224850>