1819791 Members
3282 Online
109607 Solutions
New Discussion юеВ

reboot server

 
Jairo Campana
Trusted Contributor

reboot server

as I can know if my server were reboot from the button of power and not with shell + command shutdow -r n y 0

or reboot

1.- tail /var/adm/shutdownlog

other options??

thanks
legionx
5 REPLIES 5
Cheryl Griffin
Honored Contributor

Re: reboot server

If root executed shutdown, it would have been recorded to the /etc/shutdownlog.

If the system panic'd you would see an entry in the shutdownlog, stating panic, and crash files in /var/adm/crash/.

If the system rebooted by itself, you may have a hardware or firmware problem. Contact Hardware Support for further assistance.
"Downtime is a Crime."
RAC_1
Honored Contributor

Re: reboot server

If you have used reboot, shutdown command, it will be logged in /etc/shutdownlog.

You should be using shutdown instead of reboot. Reboot is a quick, but not a gracefull shutdown of machine.

If you abruptly switch off power, or pull out the power cable, it will not be logged in /etc/shutdownlog.

The following document exlpains why shutdown is better then reboot.

Why shutdown but not reboot.
----------------------------------------------------------

This document from HP explains more about shutdown vs reboot:
When bringing an HP-UX system down, Hewlett Packard recommends using
the shutdown(1M) command instead of the reboot command.

The shutdown(1M) command does additional preprocessing to prepare
the system for the reboot(1M) command. Primarily, shutdown(1M)
executes /sbin/rc to shutdown subsystems, unmount filesystems, and
other tasks to bring the system to run level 0. This process
ensures that the system is as quiet as possible before running the
reboot(1M) command.

The reboot(1M) command will then kill all remaining non-system
processes, sync the buffer cache, and then calls the reboot(2)
system call.

Note that issuing a reboot instead of a shutdown does not attempt
to stop any of the subsystems or unmount the file systems. While
reboot does attempt to kill non-system processes, other system
deamons may be active on the system. For example, the vxfsd
daemon may be attempting to flush the inode cache.

Any remaining activity on the system - when the reboot(2) system
call is made - can cause the system to hang during the reboot if
the activity locks any resource that the reboot(2) system call
needs to complete its processing, especially when reboot is trying
to flush the buffer cache.

Therefore, shutdown(1M) should be used instead of reboot(1M) to
provide a more comprehensive shutdown and limit the possibility of
system hangs during a reboot.

Anil
There is no substitute to HARDWORK
Rick Garland
Honored Contributor

Re: reboot server

Depending on the server, pressing the power button will do a graceful shutdown. D class and J class servers do this.

This does not apply of you pull the power source (unplug).

e. james
New Member

Re: reboot server

I think you are asking whether you can tell if your box was gracefully shutdown or just powered off. Presuming that this is what you want:

tail /etc/shutdownlog.
who -b

Are the times close? If they are not, then likely you lost power to your box (whether someone hit the switch, UPS failed, not on a UPS and you had a power outage, etc).

Anytime reboot is run (whether as part of shutdown or just reboot itself) it will log in /etc/shutdownlog. So no entry, no panic message, but the box booted, then it lost power.

Olivier Decorse
Respected Contributor

Re: reboot server

If server restart with shutdown -r -y 0, you will find 2 files with correct informations :

1) /var/adm/syslog/OLDsyslog.log will contain, for examples :
- "HP CIFS Server: Samba successfully shut down"
- "/usr/sbin/envd[1013]: Interruption par signal 15"
- "inetd[751]: Going down on signal 15"
- and finally "syslogd: going down on signal 15"

2) /etc/rc.log.old will also contain a lot of "stop XXX service, Output from XXX stop : ..."
In my server :
Stop environment monitoring daemon
Output from "/sbin/rc1.d/K250envd stop":
----------------------------
envd stopped


BUT, for a reboot from the power button, OLDsyslog.log and rc.log.old will not contains any log from the shutdown, only from previous starting phase.

Olivier.

PS : Please don't forget to ASSIGN POINTS : it is very important for us to know if response helps you (or not !!) and you will have more chance to receive responses !
They say "install windows 2k, xp or better", so i install unix !