1acpid(8)                    System Manager's Manual                   acpid(8)
2
3
4

NAME

6       acpid - Advanced Configuration and Power Interface event daemon
7

SYNOPSIS

9       acpid options]
10
11

DESCRIPTION

13       acpid  is designed to notify user-space programs of ACPI events.  acpid
14       should be started during the system boot, and will run as a  background
15       process,  by default.  It will open an events file (/proc/acpi/event by
16       default) and attempt to read whole lines.  When a line is received  (an
17       event),  acpid will examine a list of rules, and execute the rules that
18       match the event.
19
20       Rules are defined by simple configuration files.  acpid will look in  a
21       configuration  directory  (/etc/acpi/events  by default), and parse all
22       files that do not begin with a period ('.').  Each file must define two
23       things:  an  event  and an action.  Any blank lines, or lines where the
24       first character is a pound sign ('#') are  ignored.   Extraneous  lines
25       are  flagged  as  warnings,  but  are  not  fatal.  Each line has three
26       tokens: the key, a literal equal sign, and the value.  The key  can  be
27       up  to 63 characters, and is case-insensitive (but whitespace matters).
28       The value can be up to 511 characters, and is case and whitespace  sen‐
29       sitive.
30
31       The event value is a regular expression (see regcomp(3)), against which
32       events are matched.
33
34       The action value is a commandline, which will be  invoked  via  /bin/sh
35       whenever  an  event matching the rule in question occurs.  The command‐
36       line may include shell-special characters, and they will be  preserved.
37       The  only  special  characters in an action value are "%" escaped.  The
38       string "%e" will be replaced by the literal text of the event for which
39       the action was invoked.  This string may contain spaces, so the comman‐
40       dline must take care to quote the "%e" if it wants a single token.  The
41       string  "%%"  will be replaced by a literal "%".  All other "%" escapes
42       are reserved, and will cause a rule to not load.
43
44       This feature allows multiple rules to be defined  for  the  same  event
45       (though  no  ordering is guaranteed), as well as one rule to be defined
46       for multiple events.  To force acpid to reload the rule  configuration,
47       send it a SIGHUP.
48
49       In  addition  to  rule  files, acpid also accepts connections on a UNIX
50       domain socket (/var/run/acpid.socket by default).  Any application  may
51       connect  to  this  socket.  Once connected, acpid will send the text of
52       all ACPI events to the client.  The client has  the  responsibility  of
53       filtering  for messages about which it cares.  acpid will not close the
54       client socket except in the case of a SIGHUP or acpid exiting.
55
56       acpid will log all of it's activities, as well as the stdout and stderr
57       of any actions to a log file (/var/log/acpid by default).
58
59       All  the  default  file and directories can be changed with commandline
60       options.
61

OPTIONS

63       -c, --confdir directory
64                   This option changes the directory in which acpid looks  for
65                   rule configuration files.  Default is /etc/acpi/events.
66
67       -d, --debug This option increases the acpid debug level by one.  If the
68                   debug level is non-zero, acpid will run in the  foreground,
69                   and will log to stdout/stderr, rather than a log file.
70
71       -e, --eventfile filename
72                   This  option  changes the event file from which acpid reads
73                   events.  Default is /proc/acpi/event.
74
75       -g, --socketgroup groupname
76                   This option changes the group ownership of the UNIX  domain
77                   socket to which acpid publishes events.
78
79       -l, --logfile filename
80                   This  option  changes  the  log file to which acpid writes.
81                   Default is /var/log/acpid.
82
83       -m, --socketmode mode
84                   This option changes the  permissions  of  the  UNIX  domain
85                   socket to which acpid publishes events.  Default is 0666.
86
87       -s, --socketfile filename
88                   This  option  changes  the  name  of the UNIX domain socket
89                   which acpid opens.  Default is /var/run/acpid.socket.
90
91       -S, --nosocket filename
92                   This option tells acpid not to open a UNIX  domain  socket.
93                   This  overrides the -s option, and negates all other socket
94                   options.
95
96       -v, --version
97                   Print version information and exit.
98
99       -h, --help  Show help and exit.
100

EXAMPLE

102       This example - placed in /etc/acpi/events/power - will shut  down  your
103       system if you press the power button.
104
105       event=button/power.*
106       action=/usr/local/sbin/power.sh "%e"
107
108       The  script power.sh gets called and will see the complete event string
109       as parameter $1.
110

DEPENDENCIES

112       Please make sure you are using the latest ACPI code possible.  This  is
113       available from
114           http://developer.intel.com/technology/iapc/acpi/downloads.htm.
115

FILES

117       /proc/acpi/event
118       /etc/acpi/
119       /var/log/acpid
120       /var/run/acpid.socket
121

BUGS

123       There are no known bugs.  To file bug reports, see AUTHORS below.
124

SEE ALSO

126       regcomp(3), sh(1), socket(2), connect(2)
127

AUTHORS

129       Tim Hockin <thockin@sun.com>
130
131
132
133
134                                  August 2001                         acpid(8)
Impressum