Re: shutdown time
- From: "steven_nospam at Yahoo! Canada" <steven_nospam@xxxxxxxx>
- Date: 12 Sep 2006 07:05:13 -0700
Alex van Denzel wrote:
steven_nospam at Yahoo! Canada wrote:
The file "/lastboot.msg" will have its date and time updated every time
the system reboots. You won't know how long the system has been down,
but you will know when it has been restarted.
So will uptime(1) when you compare it to the current time
--
Alex.
Yep. But I was assuming that he wanted to have something he could
reference without having to calculate the uptime back X days and Y
hours.
I also should have explained that the command you put into the inittab
could be a shell script that sends an email to a pager or person, so
you can be immediately alerted of any reboots that occur. You can
either have it do an uptime calculation or just show the date and time
from the lastboot file.
Many ways of doing it...can check if an rc.powerfail exists, look at
the date/time on certain directories that get created during reboot,
etc.
Our site for example, we create special "trouble" files during the
bootup process to indicate various processes activated. During a normal
shutdown, the "trouble" files are deleted so that during each NORMAL
reboot they do not exist. If the power goes out, system crashes, or a
shutdown is done without using our special rc.down script, the trouble
file is left behind and we have routines to prevent restart and create
an /etc/nologin.
Steve
.
- Follow-Ups:
- Re: shutdown time
- From: aix
- Re: shutdown time
- References:
- shutdown time
- From: pinoy2ser
- Re: shutdown time
- From: steven_nospam at Yahoo! Canada
- Re: shutdown time
- From: Alex van Denzel
- shutdown time
- Prev by Date: Re: Cygwin Connection from XP to AIX
- Next by Date: Re: Jr Unix Administrator
- Previous by thread: Re: shutdown time
- Next by thread: Re: shutdown time
- Index(es):
Relevant Pages
|