On Sun, 2013-10-20 at 22:21 +0200, Ralf Mardorf wrote: > On Sun, 2013-10-20 at 13:03 -0700, Gregory Nowak wrote: > > On Sun, Oct 20, 2013 at 09:37:12PM +0200, Ralf Mardorf wrote: > > > I don't know, but if it's running as a daemon it likely does write a log > > > file. The Internet is your friend, I can't continue now, perhaps I can > > > try to help again tomorrow. > > > > Yes, smartd writes info to /var/log/daemon.log. When you installed > > smartmontools, you should have edited /etc/smartd.conf to meet your > > needs. There are comments in /etc/smartd.conf which explain things, > > and give examples. If that's not enough, then there is also the > > smartd.conf(5) man page, and the internet. > > > > I would still write the smartctl output to a log on boot as Ralf > > suggested. That way, you'll be able to find the info you need > > quickly. Also, I haven't looked at smartd enough to know if it > > produces all the details that smartctl can in the system logs. > > As init script without sudo. > > Perhaps not > > smartctl -a /dev/sda > /var/log/smartctl-a.log > > but > > smartctl -a /dev/sda >> /var/log/smartctl-a.log > > and echo the date before running smartctl. Also before running smartctl, > test the size of the log file and do something, if it's very large, e.g. > delete it. > > IOW e.g. something similar to this > > echo "$(date "+[%Y-%m-%d %H:%M]")" > find /var/log/smartctl-a.log -type f -size ADD_THE_MAX_SIZE_HERE -exec rm {} > \; > smartctl -a /dev/sda >> /var/log/smartctl-a.log
Don't delete it, first move the log file to smartctl-a.log.old and if the new smartctl-a.log file is to large too, overwrite smartctl-a.log.old with this file. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1382300815.9040.31.camel@archlinux