Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
There is no shutdownlog like there is on some UNIX variants.
You should be able to figure out stop/start times by:
1) Running "uptime" which will show you how long it has been up. You can figure out last boot from that.
2) who -b (doesn't work in some distros) will give you actual date/time of last boot.
3) last -x will show you what /var/log/wtmp recorded for shutdowns. (Note you may have to specify last -x -f /var/log/wtmp.1 or something similar to see older logs.)
Jan 1 22:23:41 test portmap: portmap shutdown succeeded
Jan 1 22:23:41 test kernel: Kernel logging (proc) stopped.
Jan 1 22:23:41 test kernel: Kernel log daemon terminating.
Jan 1 22:23:44 test syslog: klogd shutdown succeeded
Jan 1 22:23:44 test exiting on signal 15
Jan 1 21:48:04 test syslogd 1.4.1: restart.
Right. I guess I should have mentioned you can do it by inference based on seeing all the messages that occur during shut downs and boots in /var/log/messages (or messages.1 etc...)
Also for the most recent boot assuming you haven't had a lot of events typing "dmesg" will give you some quick information.
Your later question makes it sound as if you're looking for something like HP-UX's /etc/rc.log which is great but unfortunately only exists on HP-UX.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.