Re: tmpfs

Erich Titl <[email protected]> Sat, 23 Nov 2024 23:47:10 +0100
Newsgroups gmane.linux.leaf.user
Message-ID <[email protected]>
Hi Boris

Am 23.11.2024 um 23:21 schrieb Boris:
> Hej Erich,
> 
> Am 21.11.24 um 23:34 schrieb Erich Titl:
>> Hi Boris
>>
>> Am 21.11.2024 um 23:13 schrieb Boris:
>>> Am 20.11.24 um 23:04 schrieb Erich Titl:
>>>> Hi Boris
>>>>
>> ...>
>>> Hej Erich,
>>>
>>> sure you read the statement from Andrew and my following answer. 
>>> Think we prooved the cause that you found in the savelog script in 
>>> the same time.
>>>
>>> I found POSTROTATE_EXEC in /usr/bin/logratate that perhaps might be 
>>> used for restarting the causing dameons. I think that could easy be 
>>> done for the two dameons in my case, but it could be hard to 
>>> integrate for possible other loaded pakets.
>>
>> No, the DAEMON parameter should take care of that and it typically does.
>> We need to know why in your case this did not happpen. Please reveal 
>> again the contents of /etc/logrotate.d/ntp and /etc/logrotate.d/ 
>> hostapd. Also check hostapd.conf to know where it logs to.
> 
> OK, here is the content of /etc/logrotate.d/ntp
> 
> LOGS_WEEKLY="ntpd"
> LOGSIZE=4096
> DAEMON=rsyslog
> METHOD=restart
> COMPRESS_ALL=1

Now as ntpd does its own logging the DAEMON looks wrong. it should be ntp.

> 
> and hostapd
> 
> LOGS_DAILY="hostapd.log"
> LOGSIZE=1024
> DAEMON=ulogd
> METHOD=reload
> COMPRESS_ALL=1

Somehow it would surprise me if hostapd logs to ulogd.

> 
> and the contents concerning log from hostapd.conf:
> 
> # less hostapd.conf | grep log
> logger_syslog=-1
> logger_syslog_level=2
> logger_stdout=-1
> logger_stdout_level=2
> #logger_syslog=-1
> #logger_syslog_level=2
> #logger_stdout=-1
> #logger_stdout_level=1
> 
> We see that loglevel is increased compared to default, but that is what 
> I want for different reason and that should not influence the found 
> issue that the logfile is not release during rotation.
> 
>> Please check the DAEMON parameter in your /etc/logrotate.d/ntp* and / 
>> etc/logrotate.d/hostapd files. Obviously we did not see any 
>> discrepancies, but who knows.
> 
> see above.
> 
>> Of course the DAEMON process is only executed if logrotate determines 
>> that a file needs to be rotated. I believe to recall that you had 2 
>> parameter files for ntp going for the same files.
> 
> Yes, that was in lighthttpd:
> 
> lighttpd:DAEMON=adm
> lighttpd:DAEMON=lighttpd
> 
>> The DAEMON process for ntpd is /etc/init.d/ntp.
>  > > Please also check the LOGS_WEEKLY and LOGS_DAILY parameters in the in
>> the respective parameter files. They should hold the names for the 
>> files to be rotated.
> 
> That seems OK for /var/log/ntps , but what about the files in /var/log/ 
> ntpstats/ ?

They are status file dor the ntpd process and are rotated by ntpd as far 
as I know.

> 
>> It all depends that the file(s) to be rotated and the DAEMON to be 
>> used correspond. If for example a file gets rotated by the syslog 
>> rotation but needs the DAEMON ntp it might well be rotated but the 
>> corresponding DAEMON is not restarted because at the second round the 
>> file might not be considered necessary for a rotation and hence the 
>> DAEMON is not restarted.
> 
> Focusing on hostapd: Do you mean I should set
> DAEMON=hostapd

Depending how hostapd is logging. As said before it can log to syslog or 
to stdout (when not running in background).

#
# Levels (minimum value for logged events):
#  0 = verbose debugging
#  1 = debugging
#  2 = informational messages
#  3 = notification
#  4 = warning
#
logger_syslog=3
logger_syslog_level=2
logger_stdout=0
logger_stdout_level=4

You set logger_syslog to -1, no idea what this is. It probably does 
nothing. Now I don't know where you got these values from. You should 
use one of the defined methods and levels for syslog to do something 
reasonable. And no, DAEMON should be rsyslog.

So it looks like some of your files were modified, possibly out of 
focus. This of course could make logrotate choke.

cheers

ET

-- 
„Wer von seinem Tag nicht zwei Drittel für sich hat, ist ein Sklave.“
―Friedrich Nietzsche



------------------------------------------------------------------------
leaf-user mailing list: [email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/