OPNsense Forum

International Forums => German - Deutsch => Topic started by: docb on May 03, 2018, 07:55:18 AM

Title: Festplatte voll [gelöst]
Post by: docb on May 03, 2018, 07:55:18 AM
Hallo zusammen,
nachdem meine Festplatte langsam volläuft (86% / [ufs] (5,4G/6,8G)) und ich irgendwie nicht finde, wie ich das in den Griff bekomme, hätte ich zwei Fragen:
Viele Grüße
doc
Title: Re: Festplatte voll
Post by: NicholasRush on May 03, 2018, 11:17:29 PM
Unter System=> Einstellungen=> Protokollierung, findest du deine Option wo du die Lokale Aufzeichnung der Protokolle abschalten kannst. Und unter System=> Einstellungen=> Verschiedenes, kannst du /var und /tmp zu einer RAM-Disk machen. Brauchst du aber normalerweise nicht.
Title: Re: Festplatte voll
Post by: franco on May 04, 2018, 12:18:53 AM
Erstmal prüfen wo der Speicher versickert:

# du -hd 1 /

Und dann in die Unterverzeichnisse. Ich nehme an /var/log wird grösser sein als erwartet.


Grüsse
Franco
Title: Re: Festplatte voll
Post by: docb on May 04, 2018, 05:16:06 PM
Moin,
erstmal Danke für Eure Antworten - das #du -hd 1 / hat mich wie von euch prognostiziert ins var/log gebracht:

4.0K    /var/log/lighttpd
1.6G    /var/log/suricata
4.0K    /var/log/ntp
28K    /var/log/bsdinstaller
4.0K    /var/log/squid
3.7G    /var/log

Was würdet ihr mir denn raten? Grundsätzlich fände ich es schon toll, wenn ich möglichst viele Protokolle habe, um auch mal recherchieren zu können, wenn etwas scheps geht. 
Also das Abschalten über System -> Einstellungen -> Protokollierung ist keine Option für mich.  Und was das mit RAM-Disk bedeutet übersteigt leider meine Linux-BSD-Kenntnisse ;-)
Viele Grüße
doc
Title: Re: Festplatte voll
Post by: franco on May 04, 2018, 05:19:19 PM
Gut, schauen wir genauer was in den Verzeichnissen so angesammelt wurde :)

# ls -lah /var/log
# ls -lah /var/log/suricata


Grüsse
Franco
Title: Re: Festplatte voll
Post by: docb on May 04, 2018, 05:28:30 PM
Ein ganzer Haufen ;-)

drwxr-xr-x   7 root   wheel   1.5K May  4 03:01 .
drwxr-xr-x  31 root   wheel   512B Apr  4 03:59 ..
-rw-r-----   1 root   wheel   153K Apr 13 17:43 acme.sh.log
drwxr-xr-x   2 root   wheel   512B Mar  5 15:09 bsdinstaller
-rw-------   1 root   wheel   500K May  4 17:17 configd.log
-rw-------   1 root   wheel   500K May  4 17:24 dhcpd.log
-rw-------   1 root   wheel    65K May  4 03:01 dmesg.today
-rw-------   1 root   wheel    65K Apr 23 03:01 dmesg.yesterday
-rw-------   1 root   wheel   500K Mar  8 22:35 dnsmasq.log
-rw-------   1 root   wheel   500K May  4 17:25 filter.log
-rw-------   1 root   wheel   1.9G May  4 17:25 flowd.log
-rw-------   1 root   wheel    11M Apr  3 18:53 flowd.log.000001
-rw-------   1 root   wheel    11M Apr  3 16:18 flowd.log.000002
-rw-------   1 root   wheel    11M Apr  3 13:05 flowd.log.000003
-rw-------   1 root   wheel    11M Apr  3 10:28 flowd.log.000004
-rw-------   1 root   wheel    11M Apr  3 02:30 flowd.log.000005
-rw-------   1 root   wheel    11M Apr  2 21:03 flowd.log.000006
-rw-------   1 root   wheel    11M Apr  2 18:30 flowd.log.000007
-rw-------   1 root   wheel    11M Apr  2 16:12 flowd.log.000008
-rw-------   1 root   wheel    11M Apr  2 13:00 flowd.log.000009
-rw-------   1 root   wheel    11M Apr  2 09:38 flowd.log.000010
-rw-------   1 root   wheel   500K Apr 22 19:17 gateways.log
-rw-------   1 root   wheel   500K May  4 17:25 haproxy.log
-rw-------   1 root   wheel   500K Apr 22 19:17 ipsec.log
-rw-r--r--   1 root   wheel     0B May  4 17:09 lastlog
drwx------   2 www    www     512B Jan 22 02:25 lighttpd
-rw-------   1 root   wheel   500K May  3 17:24 lighttpd.log
-rw-------   1 root   wheel   130B Mar  7 03:01 mount.today
drwxr-xr-x   2 root   wheel   512B Mar  5 15:06 ntp
-rw-------   1 root   wheel   500K Apr 22 19:17 ntpd.log
-rw-------   1 root   wheel   500K May  4 17:25 openvpn.log
-rw-------   1 root   wheel   500K Mar  5 15:06 portalauth.log
-rw-------   1 root   wheel   500K Mar  5 15:06 ppps.log
-rw-------   1 root   wheel   500K May  4 17:17 resolver.log
-rw-------   1 root   wheel   500K May  4 17:17 routing.log
-rw-------   1 root   wheel   2.7K May  4 03:01 setuid.today
-rw-------   1 root   wheel   2.7K Apr 12 03:01 setuid.yesterday
drwxr-x---   2 squid  squid   512B Jan 22 02:36 squid
-rw-------   1 root   wheel   500K Mar  5 15:06 squid.syslog.log
drwx------   2 root   wheel   512B May  4 00:00 suricata
-rw-------   1 root   wheel   277B Mar 11 11:10 suricata.log
-rw-r-----   1 root   wheel   935B Mar 11 00:00 suricata.log.0
-rw-r-----   1 root   wheel   465B Mar 10 00:00 suricata.log.1
-rw-r-----   1 root   wheel   928B Mar  9 00:00 suricata.log.2
-rw-r-----   1 root   wheel   4.6K Mar  8 00:00 suricata.log.3
-rw-------   1 root   wheel   500K Mar  5 15:06 suricata.syslog.log
-rw-------   1 root   wheel   500K May  4 17:17 system.log
-rw-------   1 root   wheel   113K May  4 17:16 userlog
-rw-r--r--   1 root   wheel   394B May  4 17:09 utx.lastlogin
-rw-r--r--   1 root   wheel   1.3K May  4 17:09 utx.log
-rw-r--r--   1 root   wheel   185K Apr 22 19:17 vmware-vmsvc.log
-rw-------   1 root   wheel   500K Mar  5 15:06 vpn.log
-rw-------   1 root   wheel   500K Mar  5 15:06 wireless.log


und

-rw-r-----  1 root  wheel   564K May  4 17:27 eve.json
-rw-r-----  1 root  wheel   1.1G May  3 02:00 eve.json.0
-rw-r-----  1 root  wheel   2.1M Apr 29 23:00 eve.json.1
-rw-r-----  1 root  wheel   4.2M Apr 22 23:00 eve.json.2
-rw-r-----  1 root  wheel    72M Apr 15 23:00 eve.json.3
-rw-r-----  1 root  wheel    40M May  4 17:27 stats.log
-rw-r-----  1 root  wheel    55M May  4 00:00 stats.log.0
-rw-r-----  1 root  wheel    54M May  3 00:00 stats.log.1
-rw-r-----  1 root  wheel    54M May  2 00:00 stats.log.2
-rw-r-----  1 root  wheel    54M May  1 00:00 stats.log.3
-rw-r-----  1 root  wheel    54M Apr 30 00:00 stats.log.4
-rw-r-----  1 root  wheel    54M Apr 29 00:00 stats.log.5
-rw-r-----  1 root  wheel    54M Apr 28 00:00 stats.log.6


Viele Grüße
doc
Title: Re: Festplatte voll
Post by: franco on May 04, 2018, 05:36:02 PM
Wenn es nicht mehr gebraucht wird die Archive löschen von Suricata:

# rm /var/log/suricata/eve.json.*
# rm /var/log/suricata/stats.log.*

Und hier ging auch was schief, aber sind nur temporäre Daten:

# rm /var/log/flowd.log*


Grüsse
Franco
Title: Re: Festplatte voll
Post by: docb on May 04, 2018, 05:47:43 PM
Perfekt, danke, jetzt schaut es schon besser aus ;-)