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

OPTIONS

64       -c, --confdir directory
65                   This  option changes the directory in which acpid looks for
66                   rule configuration files.  Default is /etc/acpi/events.
67
68       -C, --clientmax number
69                   This option changes the maximum number of  non-root  socket
70                   connections which can be made to the acpid socket.  Default
71                   is 256.
72
73       -d, --debug This option increases the acpid debug level by one.  If the
74                   debug  level is non-zero, acpid will run in the foreground,
75                   and will log to stderr, in addition to the regular syslog.
76
77       -e, --eventfile filename
78                   This option changes the event file from which  acpid  reads
79                   events.  Default is /proc/acpi/event.
80
81       -f, --foreground
82                   This option keeps acpid in the foreground by not forking at
83                   startup.
84
85       -l, --logevents
86                   This option tells acpid to log information about all events
87                   and actions.
88
89       -L, --lockfile filename
90                   This  option  changes the lock file used to stop event pro‐
91                   cessing.  Default is /var/lock/acpid.
92
93       -g, --socketgroup groupname
94                   This option changes the group ownership of the UNIX  domain
95                   socket to which acpid publishes events.
96
97       -m, --socketmode mode
98                   This  option  changes  the  permissions  of the UNIX domain
99                   socket to which acpid publishes events.  Default is 0666.
100
101       -s, --socketfile filename
102                   This option changes the name  of  the  UNIX  domain  socket
103                   which acpid opens.  Default is /var/run/acpid.socket.
104
105       -S, --nosocket filename
106                   This  option  tells acpid not to open a UNIX domain socket.
107                   This overrides the -s option, and negates all other  socket
108                   options.
109
110       -p, --pidfile filename
111                   This  option  tells  acpid to use the specified file as its
112                   pidfile.  If the file exists, it will be removed and  over-
113                   written.  Default is /var/run/acpid.pid.
114
115       -v, --version
116                   Print version information and exit.
117
118       -h, --help  Show help and exit.
119

EXAMPLE

121       This  example  - placed in /etc/acpi/events/power - will shut down your
122       system if you press the power button.
123
124       event=button/power.*
125       action=/usr/local/sbin/power.sh "%e"
126
127       The script power.sh gets called and will see the complete event  string
128       as parameter $1.
129

DEPENDENCIES

131       acpid should work on any linux kernel released since 2003.
132

FILES

134       /proc/acpi/event
135       /etc/acpi/
136       /var/run/acpid.socket
137       /var/run/acpid.pid
138       /var/lock/acpid
139

BUGS

141       There are no known bugs.  To file bug reports, see AUTHORS below.
142

SEE ALSO

144       regcomp(3), sh(1), socket(2), connect(2)
145

AUTHORS

147       Tim Hockin <thockin@hockin.org>
148
149
150
151
152                                                                      acpid(8)
Impressum