MAN page from PLD acpid-1.0.4-7.i386.rpm
acpid
Section: Maintenance Commands (8)
Updated: August 2001
Index NAME
acpid - Advanced Configuration and Power Interface event daemon
SYNOPSIS
acpid [
options]
DESCRIPTION
acpid is designed to notify user-space programs of ACPI events.
acpid should be started during the system boot, and will run as a background process, by default. It will open an events file (
/proc/acpi/event by default) and attempt to read whole lines. When a line is received (an
event),
acpid will examine a list of rules, and execute the rules that match the event.
Rules are defined by simple configuration files. acpidwill look in a configuration directory (/etc/acpi/events by default), and parse all files that do not begin with a period ('.'). Each file mustdefine two things: an event and an action. Any blank lines, orlines where the first character is a pound sign ('#') are ignored. Extraneouslines are flagged as warnings, but are not fatal. Each line has three tokens:the key, a literal equal sign, and the value. The key can be up to 63characters, and is case-insensitive (but whitespace matters). The value can beup to 511 characters, and is case and whitespace sensitive.
The event value is a regular expression (see regcomp(3)), against which events are matched.
The action value is a commandline, which will be invoked via /bin/shwhenever an event matching the rule in question occurs. The commandline mayinclude shell-special characters, and they will be preserved. The only specialcharacters in an action value are "%" escaped. The string "%e" will bereplaced by the literal text of the event for which the action was invoked.This string may contain spaces, so the commandline must take care to quote the "%e" if it wants a single token. The string "%%" will be replaced by a literal "%". All other "%" escapes are reserved, and will cause a rule to not load.
This feature allows multiple rules to be defined for the same event (though noordering is guaranteed), as well as one rule to be defined for multiple events.To force acpid to reload the rule configuration, send it a SIGHUP.
In addition to rule files, acpid also accepts connections on a UNIX domain socket (/var/run/acpid.socket by default). Any application may connect to this socket. Once connected, acpid will send the text of all ACPI events to the client. The client has the responsibility of filteringfor messages about which it cares. acpid will not close the client socket except in the case of a SIGHUP or acpid exiting.
acpidwill log all of it's activities, as well as the stdout and stderr of anyactions to a log file (/var/log/acpid by default).
All the default file and directories can be changed with commandline options.
OPTIONS
- -c, --confdir directory
- This option changes the directory in which acpid looks for rule configuration files. Default is /etc/acpi/events.
- -d, --debug
- This option increases the acpid debug level by one. If the debug levelis non-zero, acpid will run in the foreground, and will log tostdout/stderr, rather than a log file.
- -e, --eventfile filename
- This option changes the event file from which acpid reads events.Default is /proc/acpi/event.
- -g, --socketgroup groupname
- This option changes the group ownership of the UNIX domain socket to which acpid publishes events.
- -l, --logfile filename
- This option changes the log file to which acpid writes. Default is/var/log/acpid.
- -m, --socketmode mode
- This option changes the permissions of the UNIX domain socket to whichacpid publishes events. Default is 0666.
- -s, --socketfile filename
- This option changes the name of the UNIX domain socket which acpid opens.Default is /var/run/acpid.socket.
- -S, --nosocket filename
- This option tells acpid not to open a UNIX domain socket. This overrides the -s option, and negates all other socket options.
- -v, --version
- Print version information and exit.
- -h, --help
- Show help and exit.
EXAMPLE
This example - placed in /etc/acpi/events/power - will shut down your systemif you press the power button.
event=button/power.*
action=/usr/local/sbin/power.sh "%e"
The script power.sh gets called and will see the complete event stringas parameter $1.
DEPENDENCIES
Please make sure you are using the latest ACPI code possible. This isavailable from
http://developer.intel.com/technology/iapc/acpi/downloads.htm.
FILES
/proc/acpi/event/etc/acpi//var/log/acpid/var/run/acpid.socket BUGS
There are no known bugs. To file bug reports, see
AUTHORS below.
SEE ALSO
regcomp(3),
sh(1),
socket(2),
connect(2)
AUTHORS
Tim Hockin <thockinAATTsun.com>
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- EXAMPLE
- DEPENDENCIES
- FILES
- BUGS
- SEE ALSO
- AUTHORS
This document was created byman2html,using the manual pages.