DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

pwrsend(ADM)


pwrsend -- send a Power Management event message

Syntax

/etc/pwr/bin/pwrsend [ -ha ] [ -f pmspecial ] [ -e eventsfile ] ... addr=dest ... class/type [ other ] ...

Description

Power Management (PM) messages are sent using pwrsend. An event (class/type), defined by a pwrevents(F) eventsfile, is addressed from the process running pwrsend and addressed to each of the specified destinations. The options include:

-a
This message should be serviced by all addressed destinations, not just the first which receives it.

-e eventsfile
A file defining some PM events. As many -e options as necessary can be specified to define all relevant PM events. If no -e options are specified, then the default eventsfile(s) are those in the comma (,) separated list defined by EVENTS in /etc/default/pwr, or /etc/pwr/sys/events when no list is defined. The eventsfile format is described in pwrevents(F).

-f pmspecial
The pwr(HW) special file to which pwrsend sends PM events. The default is /dev/pwr/pm. At most one -f option can be specified.

-h
This message is high-priority.
Each destination address has one of the forms:

apm=device

apm=class , unit
The firmware identified by a BIOS-APM number: either by a single direct identifier (device), or via an implied identity (class plus unit).

The device is a complete peripheral identifier:


all

system
The entire system.

bios
The BIOS-APM firmware itself.
A class is a BIOS-APM firmware-defined category of peripheral:

display
Video screen and keyboard ( screen(HW)).

parallel
Parallel I/O devices ( lp(HW)).

serial
Serial I/O devices ( sio(HW)).

storage
Hard and floppy discs ( hd(HW) and fd(HW)).

system
Miscellaneous parts, including the CPU itself and the BIOS-APM firmware ( uapm(HW)).

value
A number, which identifies a firmware-dependent peripheral category.
The unit is one or more peripherals defined by the BIOS-APM firmware within that class:

all
Every peripheral of that class.

value
A number, value, which is mapped by the firmware to one or more peripherals in class.

bdev=special

bdev=major,minor

cdev=special

cdev=major,minor
The specified block (bdev) or character (cdev) device with the same device number as file special; or with the specified major and minor device numbers. A major or minor of any means all devices with a matching minor or major device number (respectively). major may be the internal name defined in the first field, xnamex, of mdevice(F)) of an installed driver, meaning the major device number of that driver should be substituted.

name= string
The pwrd(ADM) tasks running pwraction(F) action string, or the device driver or STREAMS module with internal name string.

pid=any

pid= procid
``Any'' process (typically meaning the pwrd daemon) or just the process with PID procid.

stream=any

stream=modid
All STREAMS modules (any), or just the STREAMS module identified by modid.
There must be at least one destination. The maximum number of destinations depends on the total size of the destination addresses.

The event sent is defined in one of eventsfile(s) as class/type.

Each optional other argument is a longword appended to the event. The values depend on the event and destinations.

Numeric values prefixed with 0 are assumed octal; 0x means hexadecimal; otherwise the number is assumed to be decimal. A suffix of m multiplies by 1MB (1024 × 1024); k by 1024; l by 4; and w by 2.

Examples

pwrsend is typically run by pwrd as a pwraction command (cmd). This example sends event foo/bar with additional hexadecimal data ``0x65666966'' back the STREAMS pipe connected to pwrd for the daemon itself to service:
   pwrsend -f "$3" pid=$PWRD_PID foo/bar 0x65666966

Limitations

BIOS-APM firmware from different manufacturers varies considerably in both operation and efficacy. What may be a safe or useful sequence of commands on one machine may be ineffectual or worse on another.

It should be possible to specify the source address. Typically, this is not the pwrsend process itself but its parent process (usually the script running pwrsend).

See also

fd(HW), hd(HW), mdevice(F), pwraction(F), pwrd(ADM), pwrdump(ADM), pwrevents(F), screen(HW), sio(HW), uapm(HW)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003