Thinking about it, I’m not sure that’ll work, as when the machine shuts down it’ll empty the log (or at least, fill it up with junk when it reboots).
You could create your own persistant log by running:
touch ~/userlogfile && sudo tail -f /var/log/syslog > ~/userlogfile &
(might need someone to check the syntax here! Also, I was a bit unsure how to pipe through grep into a file, so left it out ::))
melissa@melissa-HP-Compaq-nx6325-RH628ES-ABU ~ $ ls /var/log
alternatives.log dmesg.0 kern.log.3.gz syslog.4.gz
alternatives.log.1 dmesg.1.gz kern.log.4.gz syslog.5.gz
apt dmesg.2.gz lastlog syslog.6.gz
auth.log dmesg.3.gz lightdm syslog.7.gz
auth.log.1 dmesg.4.gz mail.err udev
auth.log.2.gz dpkg.log mail.log ufw.log
auth.log.3.gz dpkg.log.1 mintsystem.log unattended-upgrades
auth.log.4.gz faillog news upstart
boot fontconfig.log ntpstats wtmp
boot.log fsck pm-powersave.log wtmp.1
bootstrap.log installer pm-powersave.log.1 wvdialconf.log
btmp jockey.log pm-suspend.log Xorg.0.log
btmp.1 jockey.log.1 syslog Xorg.0.log.old
ConsoleKit kern.log syslog.1
cups kern.log.1 syslog.2.gz
dmesg kern.log.2.gz syslog.3.gz
melissa@melissa-HP-Compaq-nx6325-RH628ES-ABU ~ $ touch ~/userlogfile && sudo tail -f /var/log/syslog > ~/userlogfile &
[1] 2423
melissa@melissa-HP-Compaq-nx6325-RH628ES-ABU ~ $
SeZo
20 September 2013 23:12
43
As it seems it is a controlled powering off so you could look in /var/log/syslog for any clues for shutting down.
First skim through and see if there is an entry around the time when last powered off by itself:
cat /var/log/syslog | grep shutdown
If that gives unusual results then it might varrant a deeper look.
Further to SeZo’s suggestion … next time it shuts itself down, fire it back up and run:
cat /var/log/syslog ~/syslog.txt
then
cat /var/log/syslog.1 ~/syslog.1.txt
You’ll then find 2 files called “syslog.txt” and “syslog.1.txt” in your home directory.
Attach those to your next posting.
As it seems it is a controlled powering off so you could look in /var/log/syslog for any clues for shutting down.
First skim through and see if there is an entry around the time when last powered off by itself:
cat /var/log/syslog | grep shutdown
If that gives unusual results then it might varrant a deeper look.
melissa@melissa-HP-Compaq-nx6325-RH628ES-ABU ~ $ cat /var/log/syslog | grep shutdown
melissa@melissa-HP-Compaq-nx6325-RH628ES-ABU ~ $
It stalled a few mins ago when running a you tube vid- and this time didn’t power itself off so I had to do control- alt-delete.