Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ envctl(1M) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

envdiag(1M)

envmon(1M)

envmon(7)

envctl(1M)  —  ADMINISTRATOR COMMANDS

NAME

envctl − Environment Monitor Board Control

SYNOPSIS

envctl [−a EMBXTUOFF|EMBPWRDOWN|EMBSYSRESET|EMBDISARM]
envctl [−g seconds]
envctl [−m y|n]
envctl [−p EMB_PWROFF_NONE|EMB_PWROFF_KERNEL|EMB_PWROFF_TIMER_ONLY]

DESCRIPTION

envctl allows programmatic control of the Environment Monitor Board (ENVMON) configuration.  Each option provides control of a particular feature.  Multiple options may be given on the command line.  All options silently perform their task unless an error occurs.  Once a particular request fails, no others are attempted. 

Use of this command is restricted to the superuser. 

If the same option is given multiple times on the command line, the final one governs.  All previous requests are ignored. 

The envmon(7) man page provides additional information on master.d file parameters and descriptions of the options that can be set using envctl. 

OPTIONS

−a EMBXTUOFF

−a EMBPWRDOWN

−a EMBSYSRESET

−a EMBDISARM
This option exploits a hook in the uadmin(2) interface in the kernel, causing it to call the ENVMON driver with the EMBXTUOFF, EMBPWRDOWN, or EMBSYSRESET request just prior to entering its infinite loop.  This loop is normally entered when a system halt is requested with an invocation of the command:

uadmin  x  0
(or the equivalent system call uadmin(x, AD_HALT)).

If x is A_SHUTDOWN [2], all processes are killed, and the root filesystem unmounted before the ENVMON request is executed.  This indirect method of executing the EMBXTUOFF, EMBPWRDOWN, or EMBSYSRESET commands should be used to ensure that root is unmounted prior to system power-down or reset.  It is primarily designed to be used after an automatic shutdown due to an over-temperature condition, or an AC power failure (when attached to a UPS).  The EMBXTUOFF option arms the halt/powerdown sequence to issue an external power off command via the ENVMON driver.  All external devices (including UPSs) should power off.  The EMBPWRDOWN option arms the halt/powerdown sequence to power off the main VME chassis, as well as all external chassis.  The EMBSYSRESET option arms the halt/powerdown sequence to issue a VME SYSRESET.  If uadmin issues the EMBXTUOFF command when a UPS is attached on a Series 8000 chassis (as indicated in emb_ups_mask), it waits 10 seconds and then issues an EMBSYSRESET.  This is done in the event that an attached UPS ignores the power-off signal if AC power has returned.  The EMBXTUOFF command is ignored on all other chassis.  By default, uadmin is not armed to execute any ENVMON command after an AD_HALT request, unless the emb_halt_pwrdown master.d file parameter has been set.  The EMBDISARM option causes the system to revert to the default given in the master.d file. 

−g <seconds>
This option causes the ENVMON driver to change the timeout value (grace period) for the shutdown timer.  The integer argument is the timeout value in seconds. The shutdown timer is started whenever the user turns off the power switch.  If the system has not shut down within that period of time, the shutdown timer removes power regardless of the current state of the system.  A shutdown timer value should be chosen to allow for a full system shutdown to complete. The default value, controlled by the emb_pwr_off_timeout master.d file parameter, is 600 seconds (10 minutes).  The maximum value of the timer is 2147 seconds (35 minutes).  Negative values are not allowed. 

−m y

−m n This option enables (y) or disables (n) the display of messages on the console when high temperature conditions occur. 

−p EMB_PWROFF_NONE

−p EMB_PWROFF_KERNEL

−p EMB_PWROFF_TIMER_ONLY
This option causes the ENVMON driver to enable or disable the power switch off functionality. The power switch off functionality is not available on 12 slot Delta chassis. The default setting, controlled by the emb_orderly_pwroff master.d file parameter, is EMB_PWROFF_NONE. 

EMB_PWROFF_NONE
This request causes the power switch off option to be disabled. Turning the power switch off in this configuration leads to the abrupt removal of power.

EMB_PWROFF_KERNEL
This request causes the kernel to initiate an orderly shutdown when the power switch is turned off.  The kernel maintains control of the shutdown during its entire process and ensures that the system is powered off.  All processes are signalled with SIGPWR. A timer is started that removes power at some future time regardless of the state of the system.  The timer length is controlled by the emb_pwr_off_timeout master.d file parameter.  See the −g option above. 

EMB_PWROFF_TIMER_ONLY
This request causes the kernel to start the same shutdown timer that is started when EMB_PWROFF_KERNEL is configured.  The kernel does not initiate any system shutdown.  It merely starts the timer.  The system shutdown is entirely the responsibility of a user process.  Since all processes are signalled with SIGPWR, the process can catch the SIGPWR signal and examine the ENVMON status to determine that the power switch really has been turned off before initiating the system shutdown. 

Once an orderly shutdown has commenced, turning the power switch on, and then off again, causes an immediate removal of power.  No messages are issued.  This is intended to be used in extreme emergencies. 

FILES

/dev/envmon_c0
/etc/master.d/envmon
/usr/include/sys/envmon.h

SEE ALSO

envdiag(1M), envmon(1M), envmon(7)

Delta chassis: Environment Monitor Board Set User Guide (ENVMON/D1)
Series 900 chassis: Series 900 Reference Guide (S900RF/D2)

DIAGNOSTICS

The envctl command exits with one of the following values. 

0 The command was executed successfully. 

1 The ENVMON board is not healthy. 

2 The ENVMON board is nonexistent. 

3 An unexpected error occurred.  The failure is described by the printed message. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026