Huge system log

Please forgive a complete noob. My system log now occupies something like 86MB. How do I get rid of old data?

The syslog file?

You may just delete that.

Thank you. That did it.

While I do not disagree with Mzanetti (whom is a lot smarter about this stuff than I am), syslog contains a lot more than just nymea logs (depending on you system installation). Further, your logs are rotated regularly and compressed (assuming you have not modified the default settings) and ultimately deleted after 4 weeks (think that is right time). The point of this is /var/log/syslog will be recreated and grow in size again, be rotated and ultimately deleted.

You’re, of course, right. However, his suggestion is perfectly adequate for my needs. The log has grown to be quite more than 80MB, and this made looking at the log with the built-in tools in nymea rather cumbersome. As I had to consult the log quite often these days, it has become something of an issue.

in that case would not journalctl -u nymead be a better way to look at nymea logs. Just a thought. (Am just thinking of the future efforts).

1 Like

Thanks for the suggestion. As I said above, I’m a complete noob and not at all comfortable with the many commands available for the CLI. I’m a firm mouse pusher and before I’m going to learn all the internals of that OS, the incentive has to grow quite a bit. What’s a journalctl, anyway?

Many have helped me along the way and I am definitely not an expert in any way shape or form but.
from it is “Journalctl is a utility for querying and displaying logs from journald, systemd’s logging service. Since journald stores log data in a binary format instead of a plaintext format, journalctl is the standard way of reading log messages processed by journald.”

PS mzanetti (from above) is the one who put me onto journalctl.

1 Like

Journalctl is systemd’s tool for reading and managing logs. In theory the newer replacement for /var/log/*, even though those are still around too… Whether you use journalctl or look up individual log files is your choice.

In any case, any log file should be safe to remove and will just be re-created automatically and also it will be rotated (see the .1, .2.gz … Files) and eventually removed. If files grow too big it’s normally a good thing to see why and fix the root cause (i.e. disable some logging categories in nymea) especially considering SD card wear in the long run. But if lots of logging categories are temporarily required to debug something, just starting clean by wiping the old logfiles is a perfectly valid thing to do.

1 Like