> Am 17.11.2016 um 08:41 schrieb Stefan Ulm <[email protected]>:
>
> Hi Michael,
>
> we did some tests on apu2 with astlinux 1.2.7 (asterisk 13).
> We set the parameter "Persistlog" to yes and changed logrotate.d
> configuration to rotate the file only if bigger than 10MB for max. 3 times.
> Unfortunately there seems to be a problem:
> * The logging stops logging at file size of 9860kB
> * When I trigger logrotate I get the error "No disk space left on tmpfs"
> * When I reboot the device the log file is deleted and starts from scratch in
> var/log/asterisk, but when persistlog is set yes the file should be saved
> persistent, so it should be there also after reboot. "mnt/kd"log" is not
> existing on the machine, also not after some reboots.
>
> We have standard tmpfs size (we didn't change TMP_SIZE" parameter in rc.conf.
> Could this be a bug or do I miss something?
>
> Best regards
>
> Stefan Ulm
> Technical Department | Research & Development
> [email protected]
Hmm, on all my boxes that works fine and "/mnt/kd/log/" is created after I set
"persistlog=yes" and rebooted:
ll /var/log
lrwxrwxrwx 1 root root 11 Nov 16 22:32 /var/log -> /mnt/kd/log
ll /mnt/kd/log/
total 1396
drwxr-xr-x 6 root root 4096 Nov 17 04:00 .
drwxr-xr-x 44 root root 4096 Nov 17 09:45 ..
drwxr-xr-x 3 root root 4096 Nov 16 22:32 asterisk
drwxr-xr-x 2 root root 4096 Nov 17 04:00 lighttpd
-rw-r--r-- 1 root root 153291 Nov 17 09:46 messages
-rw-r--r-- 1 root root 563583 Nov 17 04:00 messages.1
-rw-r--r-- 1 root root 569552 Nov 16 04:00 messages.2
This is done in "/etc/rc":
---------
if [ "$PERSISTLOG" = "yes" ]; then
if [ ! -d /mnt/kd/log ]; then
mkdir /mnt/kd/log
touch /var/log/wtmp
fi
ln -s /mnt/kd/log /var/log
---------
Check "show-union" if you have modified system files.
> DIVUS Headquarters Pillhof 51 . I-39057 Eppan (Südtirol) . Tel. +39 0471 633
> 662 . Fax. +39 0471 631 829
> www.divus.eu . Privacy: http://www.divus.eu/media/DivusPrivacy.pdf
>
> -----Ursprüngliche Nachricht-----
> Von: Michael Keuter [mailto:[email protected]]
> Gesendet: Donnerstag, 28. Juli 2016 15:33
> An: AstLinux Users Mailing List <[email protected]>
> Betreff: Re: [Astlinux-users] permanent save log files
>
>
> Am 28.07.2016 um 15:18 schrieb Stefan Ulm <[email protected]>:
>
>> Hello,
>>
>> where should I store log files (asterisk full logging with verbose 99), so
>> that they are stored permanently?
>> Will asterisk mamange them itself and delete automatically older logs or
>> will I have to manage this by my own to prevent memory overload?
>>
>>
>> Best regards
>>
>> Stefan Ulm
>> Technical Department | Research & Development [email protected]
>
>> From rc.conf:
>
> ## Persistent Logs
> ## If this variable is defined, logs are saved to the keydisk instead of RAM
> PERSISTLOG=yes
>
> The files then live in "/mnt/kd/log/"
> Logrotate (if used in your crontab) still applies.
>
> Michael
Michael
http://www.mksolutions.info
------------------------------------------------------------------------------
_______________________________________________
Astlinux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/astlinux-users
Donations to support AstLinux are graciously accepted via PayPal to
[email protected].