Shutdown
From Sysadmin
The following information pertains principally to multi-user hosts but many workstations accomodate multiple users so everyone rebooting a system should keep these recommendations in mind.
In general all reboots or halts should part of a scheduled outage.
Regardless of whether a reboot or halt is scheduled or not at least one minute warning should be given when issuing the shutdown command unless the reboot or halt is an emergency. The most common cause of an emergency halt is due to an over-heat. The most common cause of an emergency reboot is a serious problem with the kernel. Both of these situations are very very rare.
A one minute warning for a reboot can be issued on Linux with the following command:
/sbin/shutdown -r +1
Unfortunately a culture has appeared within system administration of rebooting to fix a problem. In reality reboots are rarely needed, cause problems, and there is almost always a better way to deal with the situation.
A reboot can be thought of as a reinitialisation of the kernel and then a reinitialisation of each service running on the system. Unless there is a reasonable belief that the kernel has a problem then a reboot is probably not the best option.
Problems caused by reboots include:
Loss of Control
The sysadmin loses control of the server for the period of the reboot. If there is a misconguration in the boot scripts the system might not come up again.
Loss of Information
Important system information can be obscured. Any information in dmesg is cleared on a reboot. In addition the special circumstances which are causing the problem may be erased. This makes proper diagnosis more difficult and means the problem may occur again.
Change of State
The system has changed state which can introduce new problems, such as a service not starting on boot.
