Jump to content

borombo

Members
  • Posts

    27
  • Joined

  • Last visited

Reputation Activity

  1. Like
    borombo got a reaction from broodwich82 in /var easily get full with log2ram   
    log2ram writes files from ramdisk to sdcard every hour (if they are updated) by cron task. Also at startup log2ram loads all content from /var/log.hdd to ramdisk.
     
    1. For improving situation with full ramdisk you can organize log rotation rules in /etc/logrotate.d to optimize logs by size. Log rotation is time dependent - daily, weekly. But, using log2ram, the best choice is to make it size-dependent.
     
    edit /etc/logrotate.d/rsyslog:
     
    /var/log/syslog
    {
        # rotate only once
        rotate 1
        # rotate only if syslog > 10 Mb
        size 10M
        missingok
        notifempty
        delaycompress
        compress
        postrotate
            invoke-rc.d rsyslog rotate > /dev/null
        endscript
    }
     
    /var/log/kern.log
    {
        # do not rotate, just purge file
        rotate 0
        # if size more than 1 Mb
        size 1M
        missingok
        notifempty
        compress
        delaycompress
        sharedscripts
        postrotate
            invoke-rc.d rsyslog rotate > /dev/null
        endscript
    }
     
    2. If your system spams a lot of messages, you can make log rotation more aggressive:
     
    move /etc/cron.daily/logrotate to /etc/cron.hourly/logrotate
     
    3. If you don't need detailed archived logging. You can protect your sdcard from hourly writes by telling log2ram to not write syslog and kern.log to disk. As a bonus at boot your ramdisk will not be filling with previous session's logs.
     
    a) activate rsync mode in /etc/default/log2ram (or in /etc/log2ram.conf):
    USE_RSYNC=true
     
    b) find your log2ram (delete duplicates, if there is) and edit
    whereis log2ram
     
    replace two lines
    rsync -aXWv --delete --links $RAM_LOG/ $HDD_LOG/ 2>&1 | $LOG_OUTPUT
    and
    rsync -aXWv --delete --links $HDD_LOG/ $RAM_LOG/ 2>&1 | $LOG_OUTPUT
     
    with
    rsync -aXWv --delete --delete-excluded --exclude-from '/etc/log2ram-exclude' --links $RAM_LOG $HDD_LOG 2>&1 | $LOG_OUTPUT
    and
    rsync -aXWv --delete --delete-excluded --exclude-from '/etc/log2ram-exclude' --links $HDD_LOG $RAM_LOG 2>&1 | $LOG_OUTPUT

    c) create new file /etc/log2ram-exclude and add lines:
    /log2ram.log
    /syslog*
    /kern.log*
     
  2. Like
    borombo got a reaction from surenz in /var easily get full with log2ram   
    log2ram writes files from ramdisk to sdcard every hour (if they are updated) by cron task. Also at startup log2ram loads all content from /var/log.hdd to ramdisk.
     
    1. For improving situation with full ramdisk you can organize log rotation rules in /etc/logrotate.d to optimize logs by size. Log rotation is time dependent - daily, weekly. But, using log2ram, the best choice is to make it size-dependent.
     
    edit /etc/logrotate.d/rsyslog:
     
    /var/log/syslog
    {
        # rotate only once
        rotate 1
        # rotate only if syslog > 10 Mb
        size 10M
        missingok
        notifempty
        delaycompress
        compress
        postrotate
            invoke-rc.d rsyslog rotate > /dev/null
        endscript
    }
     
    /var/log/kern.log
    {
        # do not rotate, just purge file
        rotate 0
        # if size more than 1 Mb
        size 1M
        missingok
        notifempty
        compress
        delaycompress
        sharedscripts
        postrotate
            invoke-rc.d rsyslog rotate > /dev/null
        endscript
    }
     
    2. If your system spams a lot of messages, you can make log rotation more aggressive:
     
    move /etc/cron.daily/logrotate to /etc/cron.hourly/logrotate
     
    3. If you don't need detailed archived logging. You can protect your sdcard from hourly writes by telling log2ram to not write syslog and kern.log to disk. As a bonus at boot your ramdisk will not be filling with previous session's logs.
     
    a) activate rsync mode in /etc/default/log2ram (or in /etc/log2ram.conf):
    USE_RSYNC=true
     
    b) find your log2ram (delete duplicates, if there is) and edit
    whereis log2ram
     
    replace two lines
    rsync -aXWv --delete --links $RAM_LOG/ $HDD_LOG/ 2>&1 | $LOG_OUTPUT
    and
    rsync -aXWv --delete --links $HDD_LOG/ $RAM_LOG/ 2>&1 | $LOG_OUTPUT
     
    with
    rsync -aXWv --delete --delete-excluded --exclude-from '/etc/log2ram-exclude' --links $RAM_LOG $HDD_LOG 2>&1 | $LOG_OUTPUT
    and
    rsync -aXWv --delete --delete-excluded --exclude-from '/etc/log2ram-exclude' --links $HDD_LOG $RAM_LOG 2>&1 | $LOG_OUTPUT

    c) create new file /etc/log2ram-exclude and add lines:
    /log2ram.log
    /syslog*
    /kern.log*
     
  3. Like
    borombo got a reaction from Orfait in SH1106 128x64 (SSD1306) I2C oled display library   
    Simple library for 128x64. Works fine with SH1106 1.3" OLED and OrangePi Zero (4.9 kernel). You just need to activate I2C interface by replacing "disabled" with "okay" in device tree file (or in the fex). Connect display and test with "sudo i2cdetect -y 0" (or 1). If your display has 3d address instead 3c, change OLED_I2C_ADDR parameter it in the oled.h. Enter "make" to compile and run demo with "sudo ./oled_demo /dev/i2c-0".
     
    This library was written by Sonal Pinto for Arduino and ported to Linux by Vladimir Komendantskiy. I just wrote functions for text drawing and add three little fonts. This library only can  draw text at X Y with specified font and draw custom pixel, but it is easy to write line, circle, rectangle drawing functions.
     
    ssd1306-i2c-opiz.zip
  4. Like
    borombo got a reaction from Susan in [SOLVED] Orange Pi PC dead (?) ethernet after a few months of continuous operation   
    Ethernet doesn't like static electricity. This may be caused by thunder and lightning outside.
     
     
  5. Like
    borombo reacted to jernej in [SOLVED] Orange PI PC H3 Winner, compiled with igorpecovnik jessie desktop   
    Yes, there are at least two - No HDMI documentation and no or GPL incompatible license for HDMI code in BSP kernel.
  6. Like
    borombo got a reaction from ionciubotaru in [NanoPI M1] mplayer   
    try
     
    mplayer ./3951.mp3 -ao alsa
     
    or
     
    mplayer ./3951.mp3 -ao sdl
  7. Like
    borombo reacted to tkaiser in Armbian customization   
    As already said: You need a large sample size and the correct test setup, then validation of the results to get sane defaults (using some safety headroom). Or a methodology to determine DRAM settings for individual boards (also possible to test for reliability individually as part of a 'burn in' process -- applies to dvfs/cpufreq stuff too)
     
    For sane defaults I would say we need at least 30 boards to test with. And in the meantime we (as Armbian devs) should again think about decreasing u-boot DRAM clockspeeds where it's known to ask for troubles (Cubieboard 2 as another example)
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines