Is there any point in keeping logs on my laptop? This is not a server to debug problems via syslog. I occassionally want to look at dmesg | tail but that does not mean I need anything on disk. Wastes space and also the SSD has a limited number of write cycles.
5 Answers
There is no point in disabling logging because of SSD characteristics.
SSD firmwares are even able to distribute repeated writes to the same sector 'wear leveling' - and the specified maximal write cycle count (for each sector) is quite high.
For example Hitachi specifies its SSD drives for '10 full drive writes per day for five years'. As a vendor, you don't just make up such statements if you want to stay in business. And independent computer magazines publish similar calculations.
About wasting space:The space is not really wasted because the system automatically rotates the logs, i.e. delete old entries after a duration-threshold. For example on my laptop /var/log
only occupies 36 MiB. And this includes some non-default daemons, like webserver, databases etc.
Also keep in mind that dmesg
does not include log messages from daemons, like crond, CUPS, MTA or something like that.
It will not matter much on your modern laptop, but like me if you are working on a device which is extremely resource constrained then you might consider disabling any unnecessary service/executable. I am working on an ARM development board right now, and to save system resources I have even disabled sshd, and cron services. To disable syslog you may use the following command.
systemctl disable rsyslog.service
-
I'm using opensuse13.10, and this is the only command that actually disabled syslog.– 0x0Oct 10, 2016 at 13:33
I have personally never found myself looking through my laptop's logs, mainly because nothing critical has happened. Thinking back, I've never NEEDED to look at the logs for any of my personal devices (I know, this is a bold statement). Logs are a critical part of enterprise computing, but for a home user they are only useful in a handful of cases.
If you had a traditional hard drive I would say keep them, but seeing as you have a SSD and are concerned about writes I don't see a problem in removing the logging application.
I would play it safe and keep syslog on the computer, but disable it at every boot by placing the following in a startup script:
/etc/init.d/syslog stop
-
Well, ok for the answer, but the command to use could depend on the OS, and in Linux from the particular distro. For example it will not works on Debian/Ubuntu, which use
rsyslog
.– enzotibSep 5, 2011 at 17:45 -
-
I am not so sure he intended so: the log file is called
syslog
also on Debian, but the daemon producing it isrsyslogd
. And the service is often referred to generically assyslog
.– enzotibSep 5, 2011 at 18:06
I totally agree with maxschlepzig. If you really want to reduce IO on your drive you can follow this guide to log on tmpfs: http://www.iamnota.net/sw:debianembedded
In fact I use this configuration on a router, but with additional logging to a syslog server.
Try:
/etc/init.d/syslog stop
or:
service syslog stop
That will stop all logging
-
1This would only stops the running service, but do not disable it for next boot.– enzotibSep 5, 2011 at 16:42
-
5It's also not what was asked -- he asked if there's a point to logging on a desktop, not how to shut it off Sep 5, 2011 at 17:34