Re: tmpfs
Andrew <[email protected]> Thu, 21 Nov 2024 10:11:07 +0200
| Newsgroups | gmane.linux.leaf.user |
|---|---|
| Message-ID | <[email protected]> |
hi. did you try to check which deleted logfiles are still opened by running processes? try to run 'lsof /var/log' to see which files are currently opened; deleted ones are marked as (deleted) - they aren't displayed, but are still allocated on FS (until file is closed). On 11/20/24 23:03, Boris via leaf-user wrote: > Hej Erich, > > Am 20.11.24 um 01:09 schrieb Erich Titl: >> Hi Boris >> >> Am 19.11.2024 um 22:47 schrieb Boris: >>> Hej Erich, >>> >> ... >> >>> aproximately 25 MB while being rotated (kept) 4 days. >>> >>> So, if there are 36 MB logged (and compressed) in 4 days and the box >>> ia up for 10 days, we don't even reach the 121 MB from df . >>> >>> Funny, isn't it? >>> >>> With the uncompressed logs, df -h shows >>> tmpfs 800.0M 149.0M 651.0M 19% /var/log >>> >>> For me it smells like tmpfs does not release former occupied storage >>> after logrotating. >> >> I doubt this, in my case to clear the space a correct restart of the >> service was needed. > > At the risk of revealing my complete cluelessness: Which service > (daemon) are you restarting correctly?? > > [snip] > >>> >>> My habit ist to reboot the box when finding it on 100%. >> >> Well right, this clears the memory storage. >> >> what you can do is play with the LOGSIZE parameter. It determines if >> a log gets rotated and if I am not mistaken it is in KB. Then to >> watch what logrotate does you can always start it like >> >> sh -x /usr/bin/logrotate >> >> You will see that savelog is used to compress and rename the file >> > > Thank you for explaining that to me. > > Indeed, executing logratate without changing any parameter does eefect > _something_: > > # df -h > tmpfs 800.0M 133.0M 667.0M 17% /var/log > # sh -x /usr/bin/logrotate > Hangup > # df -h > tmpfs 800.0M 130.1M 669.9M 16% /var/log > > I'll follow your hint and experiment with LOGSIZE, which now is > # grep LOGSIZE * > hostapd:LOGSIZE=1024 > lighttpd:LOGSIZE=1024 > ntp:LOGSIZE=4096 > pppd:LOGSIZE=1024 > shorewall:LOGSIZE=1024 > shorewall6:LOGSIZE=1024 > syslog:# NOTE: depends if LOGSIZE has been reached > syslog:# LOGSIZE - size in kb when logrotate move and compress log files > syslog:LOGSIZE=1024 > ulogd:LOGSIZE=1024 > > Thanks, > > > Boris > > > ------------------------------------------------------------------------ > leaf-user mailing list: [email protected] > https://lists.sourceforge.net/lists/listinfo/leaf-user > Support Request -- http://leaf-project.org/ ------------------------------------------------------------------------ leaf-user mailing list: [email protected] https://lists.sourceforge.net/lists/listinfo/leaf-user Support Request -- http://leaf-project.org/