After the great Gateway workshop yesterday, I was thinking about other possibilities to protect the SD-card in the Raspberry Pi. I already disabled all logging and than it comes to my mind that the packet-forwarder on a RasPi 3 will not need a swap file. Therefore I disabled and deinstalled it with following commands:
sudo systemctl disable dphys-swapfile
und deinstallieren:
sudo apt-get purge dphys-swapfile
Ciao,
Christian
2 „Gefällt mir“
super info, sehr fein!
könntest du bitte noch skizzieren, wie/wo du das loggen reduzierst?
/roman
Grundsätzlich ist im image, welche wir beim Workshop kopiert haben schon viel im config file
/etc/rsyslog.conf
auskommentiert.
Ich habe nun auch den Rest auskommentiert und dafür ein remote syslog auf papertrailapp.com eingerichtet. Somit wird alles dort hin geschickt.
Ciao,
Christian
mir ist das rsyslog.conf leider nicht zugängig. kannst du den inhalt bitte hier posten und allfällige user/password beim schicken zum papertrail anonymisieren?
danke!
roman
Du musst das file mit sudo nano rsyslog.conf editieren, dann gibt es keine böse Überaschung beim speichern. 
Hier der relevante Inhalt, alles oberhalb blieb unverändert:
###############
#### RULES ####
###############
#
# First some standard log files. Log by facility.
#
auth,authpriv.* /var/log/auth.log
#*.*;auth,authpriv.none -/var/log/syslog
#cron.* /var/log/cron.log
#daemon.* -/var/log/daemon.log
#kern.* -/var/log/kern.log
#lpr.* -/var/log/lpr.log
#mail.* -/var/log/mail.log
user.* -/var/log/user.log
#
# Logging for the mail system. Split it up so that
# it is easy to write scripts to parse these files.
#
#mail.info -/var/log/mail.info
#mail.warn -/var/log/mail.warn
#mail.err /var/log/mail.err
#
# Some "catch-all" log files.
#
#*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug
#*.=info;*.=notice;*.=warn;\
auth,authpriv.none;\
cron,daemon.none;\
mail,news.none -/var/log/messages
#
# Emergencies are sent to everybody logged in.
#
*.emerg :omusrmsg:*
# papertrail.log
*.*@logs3.papertrailapp.com:11111
In der letzten Zeile muss die von papertrailapp.com zugewiesene Adresse eingetragen werden.
Nach der Änderung muss der rsyslog mit
sudo service rsyslog restart
neu gestartet werden.
Ciao,
Christian