> Am 17.11.2016 um 10:25 schrieb Stefan Ulm <s....@divus.biz>: > > I checked: > > * /etc/rc is ok, the if for persistlog is in init() function > > * ll /var/log gives result: > drwxr-xr-x 3 root root 140 Nov 17 10:04 asterisk > drwxr-xr-x 2 root root 40 Nov 17 10:04 lighttpd > -rw-r--r-- 1 root root 35088 Nov 17 10:11 messages > -rw-r--r-- 1 root root 768 Nov 17 10:04 wtmp > > * /mnt/kd/log is not existing > > * show-union gave result: > /oldroot/mnt/asturw > /oldroot/mnt/asturw/lost+found > /oldroot/mnt/asturw/mnt > /oldroot/mnt/asturw/etc > /oldroot/mnt/asturw/etc/udev > /oldroot/mnt/asturw/etc/udev/rules.d > /oldroot/mnt/asturw/etc/udev/rules.d/70-persistent-net.rules > /oldroot/mnt/asturw/etc/rc
"/oldroot/mnt/asturw/etc/rc" is modified, otherwise you won't see it here. Make a backup (just in case) and try to delete it. > /oldroot/mnt/asturw/etc/shadow > /oldroot/mnt/asturw/etc/shadow- > /oldroot/mnt/asturw/etc/passwd > /oldroot/mnt/asturw/etc/passwd- > /oldroot/mnt/asturw/etc/logrotate.d > /oldroot/mnt/asturw/etc/logrotate.d/asterisk > /oldroot/mnt/asturw/stat > /oldroot/mnt/asturw/stat/var > /oldroot/mnt/asturw/stat/var/lib > /oldroot/mnt/asturw/stat/var/lib/asterisk > /oldroot/mnt/asturw/stat/var/www > /oldroot/mnt/asturw/stat/var/www/admin > /oldroot/mnt/asturw/stat/var/www/admin/.htpasswd > /oldroot/mnt/asturw/stat/var/www/admin/divus_log.php > /oldroot/mnt/asturw/stat/var/www/common > /oldroot/mnt/asturw/stat/var/www/common/status.inc > /oldroot/mnt/asturw/stat/var/www/common/header.php > > > There must be something wrong with the parameter PERSISTLOG. If I remove the > if in /etc/rc.conf and so force to use persistent storage without checking > the parameter it works. > > The parameter in rc.conf is like this: > ## Persistent Logs > ## If this variable is defined, logs are saved to the keydisk instead of RAM > PERSISTLOG=yes > > The if in /etc/rc is like this: > 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 > > else > mkdir /var/log > touch /var/log/wtmp > fi > > I also tried using quotes for the value in rc.conf, but the situation does > not change: > ## Persistent Logs > ## If this variable is defined, logs are saved to the keydisk instead of RAM > PERSISTLOG="yes" > > It seems the value is not parsed rightly. > > Best regards > > Stefan Ulm > Technical Department | Research & Development > stefan....@divus.eu > > > > > > 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:li...@mksolutions.info] > Gesendet: Donnerstag, 17. November 2016 09:58 > An: AstLinux Users Mailing List <astlinux-users@lists.sourceforge.net> > Betreff: Re: [Astlinux-users] permanent save log files > > >> Am 17.11.2016 um 08:41 schrieb Stefan Ulm <s....@divus.biz>: >> >> 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 stefan....@divus.eu > > 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:li...@mksolutions.info] >> Gesendet: Donnerstag, 28. Juli 2016 15:33 >> An: AstLinux Users Mailing List <astlinux-users@lists.sourceforge.net> >> Betreff: Re: [Astlinux-users] permanent save log files >> >> >> Am 28.07.2016 um 15:18 schrieb Stefan Ulm <s....@divus.biz>: >> >>> 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 stefan....@divus.eu >> >>> 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 Michael http://www.mksolutions.info ------------------------------------------------------------------------------ _______________________________________________ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.