Re: shutdown time




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

.



Relevant Pages

  • Shutdown & Restart
    ... causing his shutdown problems and error conditions. ... reboots on shutdown if APM is enabled, ... USB Connections As can be seen from remarks in the Misc. ... XP will restart instead of shut down. ...
    (microsoft.public.windowsxp.general)
  • Re: IIS6 server take long time to reboot
    ... It sounds like you are running web pages that use 3rd party COM components ... that are having trouble on shutdown (IIS has no code that runs in ... minutes to get rebooted, if no testing activities it reboots as normal, ...
    (microsoft.public.inetserver.iis)
  • Re: IIS6 server take long time to reboot
    ... > that are having trouble on shutdown (IIS has no code that runs in ... > IIS ... > minutes to get rebooted, if no testing activities it reboots as normal, ...
    (microsoft.public.inetserver.iis)
  • Re: hang during boot
    ... to mention that mine doesn't shutdown. ... select 'shutdown' or 'restart' and both of them yield ... >I have a laptop that hangs on reboots. ...
    (microsoft.public.win2000.general)
  • Re: Best way to determine cause of reboot
    ... I believe I have two separate unrelated issues: Freezes and reboots. ... I have picked through Power Management settings also, ... I found settings in the BIOS ... I know it is not the power supply, as the BIOS will not allow a restart on ...
    (microsoft.public.windowsxp.general)