Solaris Reference Manual for SMCC-Specific Software
  Suchtext Nur in diesem Buch
Dieses Buch im PDF-Format herunterladen

NAME

cpr - Suspend and resume module

SYNOPSIS

/kernel/misc/cpr

AVAILABILITY

SUNWcpr

DESCRIPTION

cpr is a loadable module which is used to suspend and resume the whole system. You may wish to suspend a system to save power, or to temporarily power off for transport. It should not be used in place of a normal shutdown when performing any hardware reconfiguration or replacement. In order for resume to succeed, it is important that the hardware configuration remain the same. When the system is suspended, the entire system state is preserved in nonvolatile storage until a resume operation is conducted.
The principle way to suspend the system using this module is through the syssuspend(1M) command. There are other utilities which may be installed on your system which will also access this module (such as uadmin(1M), uadmin(2), or the Power key and the Shift+Power key on a type 5 keyboard).
The module performs the following actions when suspending the system. The signal SIGFREEZE is first sent to all user threads and then the threads are stopped. The system is brought down to a uni-processor mode for multi-processor systems. Next dirty user pages are swapped out to their backing storage device and all file systems are synchronized. All devices are made quiescent and system interrupts are disabled. To complete the system suspend, the kernel memory pages and remaining user pages are written to the root file system in a compressed form.
When the system is powered on again, essentially the reverse of the suspend procedure occurs. The kernel image is restored from the root file system by the bootstrapper /cprboot, interrupts and devices are restored to their previous state. Finally the user threads are rescheduled and SIGTHAW is broadcast to notify any interested processes of system resumption. Additional processors, if available, are restored and brought online. The system is now back to exactly the state prior to suspension.
In some cases the cpr module may be unable to perform the suspend operation. If a system contains additional devices outside the standard shipped configuration, it is possible that these additional devices may not support cpr. In this case, the suspend will fail and an error message will be displayed to that effect. These devices must be removed or its device drivers unloaded for suspend to work. Contact the device manufacturer to obtain a new version of device driver that supports cpr. A suspend may also fail when devices or processes are performing critical or time sensitive operations (e. g. real time operations). In this case the system will remain in its current running state. Messages reporting the failure will be displayed on the console and status returned to the caller. Once the system is successfully suspended the resume operation will always succeed barring external influences such as hardware reconfiguration or the like.
Some network based applications may fail across a suspend and resume cycle. This largely depends on the underlying network protocol and the applications involved. In general, applications that retry and automatically reestablish connections will continue to
operate transparently on resume, those applications that do not, will likely fail.
The speed of suspend and resume can range from 15 seconds to a few minutes depending on the system speed, memory size and load. The typical time is around a minute.

FILES

/cprboot
special bootstrapper for cpr
/.CPR
system state file
/.cpr_generic_info
sys-suspend control file
/.cpr_defaultboot_info
sys-suspend control file

BUGS

The signals SIGFREEZE and SIGTHAW are not properly implemented for the Solaris 2.4 release, it will be available in a later release. This should only be a concern for specially customized applications that need to perform additional tasks at suspend or resume time, which none exists at the present time.
In extremely rare occasions the system may fail during the early stages of a resume. In this small window it is theoretically possible to be stuck in a loop that the system does not resume and it does not boot normally. If you are in such a loop, get to the prom ok prompt via L1+A and enter the following command.
<ok> set-default boot-file
This resets the system and on the next power on the system will boot normally.

NOTES

For suspend/resume to work on multi-processor platforms, it must be able to control all CPUs. It is recommended that no MP tests (such as sundiag CPU tests) are running when suspend is initiated because the suspend may be rejected, if it cannot shut off all CPUs.
Certain device operations such as tape, floppy disk activities are not resumable due to the nature removable media. These activities are detected at suspend time, and must be stopped before suspend will complete successfully.

SEE ALSO

sys-suspend(1M), uadmin(1M), uadmin(2)