*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> macppc/apmd (8)              
Title
Content
Arch
Section
 

APMD(8)

Contents


NAME    [Toc]    [Back]

     apmd - Advanced Power Management monitor daemon

SYNOPSIS    [Toc]    [Back]

     apmd [-adempqs] [-f devname] [-S sockname] [-t seconds]

DESCRIPTION    [Toc]    [Back]

     apmd monitors the advanced power management (APM) pseudo-device, acting
     on  signaled  events  and  upon user requests as sent by the
apm(8) program.
     For suspend and standby  request  events  delivered  by  the
BIOS, or via
     apm(8),  apmd runs the appropriate configuration program (if
one exists),
     syncs the buffer cache to disk and initiates  the  requested
mode.  When
     resuming after suspend or standby, apmd runs the appropriate
configuration
 program (if  one  exists).   For  power  status  change
events, apmd
     fetches the current status and reports it via syslog(3) with
logging facility
 LOG_DAEMON.

     apmd announces the transition to standby mode with a  single
high tone on
     the  speaker  (using the /dev/speaker device).  Suspends are
announced with
     two high tones.

     apmd periodically polls the APM driver for the current power
state.  If
     the battery charge level changes substantially or the external power status
 changes, the new status is logged.  The polling rate defaults to once
     per  10  minutes, but may be specified using the -t commandline flag.

     If the -s flag is specified, the current battery  statistics
are reported
     via syslog(3) and apmd exits without monitoring the APM status.

     If the -a flag is specified, any BIOS-initiated  suspend  or
standby requests
  are  ignored if the system is connected to line current and not
     running from batteries (user requests are still honored).

     If the -d flag is specified, apmd enters debug mode, logging
to facility
     LOG_LOCAL1  and staying in the foreground on the controlling
terminal.

     If the -q flag is specified, apmd does not announce  suspend
and standby
     requests on the speaker.

     If  the  -m  flag  is specified, apmd does not disable power
status messages
     issued by the APM driver.  In normal operation these  status
messages are
     disabled  as  they are the same as the information collected
by this daemon
     and reported via syslog.

     The -e and -p flags are used to re-enable APM  driver  power
status messages.
   In  both cases apmd exits immediately after setting
the desired
     option.  The -e flag unconditionally  enables  power  status
messages.  The
     -p  flag  causes  power status messages to be displayed only
when the battery
 life expectancy changes.  This minimizes message output
for those
     devices  that are constantly updating the estimated time remaining based
     upon current processor load.  However, in no case will power
status messages
  be  displayed  until  the battery life goes below the
percentage in
     the  sysctl(8)  state  variable  machdep.apmwarn.    Setting
machdep.apmwarn to
     zero disables all warnings.

     When a client requests a suspend or stand-by mode, apmd does
not wait for
     positive confirmation that the requested mode has  been  entered before replying
  to  the  client; to do so would mean the client does
not get a reply
     until the system resumes from its sleep state.  Rather, apmd
replies with
     the  intended state to the client and then places the system
in the requested
 mode after  running  the  configuration  script  and
flushing the
     buffer cache.

     Actions  can  be  configured  for the following five transitions: suspend,
     standby, resume, powerup and  powerdown.   The  suspend  and
standby actions
     are  run prior to apmd performing any other actions (such as
disk syncs)
     and entering the new mode.  The resume program is run  after
resuming from
     a  stand-by  or  suspended state.  The powerup and powerdown
programs are
     run after the power status (AC connected or not) changes, as
well as after
 a resume (if the power status changed in the mean time).

FILES    [Toc]    [Back]

     /etc/apm/suspend,     /etc/apm/standby,     /etc/apm/resume,
/etc/apm/powerup and
     /etc/apm/powerdown  are  the  files  that contain the host's
customized actions.
  Each file must be  an  executable  binary  or  shell
script suitable
     for  execution  by  the  execve(2) function.  If you wish to
have the same
     program or script control all transitions, it may  determine
which transition
 is in progress by examining its argv[0] which is set to
one of
     suspend, standby, resume, powerup and powerdown.

     /var/run/apmdev is the default UNIX-domain socket  used  for
communication
     with  apm(8).   The -S flag may be used to specify an alternate socket
     name.  The socket is protected to mode 0660, UID 0,  GID  0;
this protects
     access to suspend requests to authorized users only.

     /dev/apmctl  is  the  default device used to control the APM
kernel driver.
     The -f flag may be used to specify an alternate device  file
name.

SEE ALSO    [Toc]    [Back]

      
      
     execve(2), syslog(3), apm(4), speaker(4), apm(8), syslogd(8)

REFERENCES    [Toc]    [Back]

     Advanced Power Management (APM) BIOS Interface Specification
(revision
     1.2), Intel Corporation and Microsoft Corporation.

HISTORY    [Toc]    [Back]

     The  apmd  command  appeared in NetBSD 1.3.  OpenBSD support
was added in
     OpenBSD 1.2.

OpenBSD     3.6                          March      24,      1996
[ Back ]
 Similar pages
Name OS Title
apm OpenBSD advanced power management device interface
zzz OpenBSD Advanced Power Management control program
acpi FreeBSD Advanced Configuration and Power Management support
apm OpenBSD Advanced Power Management control program
apm OpenBSD advanced power management device interface
zzz OpenBSD Advanced Power Management control program
apm OpenBSD Advanced Power Management control program
ups_mond HP-UX HP PowerTrust Uninterruptible Power System monitor daemon
ups_conf HP-UX HP PowerTrust Uninterruptible Power System (UPS) monitor configuration file
amdpm OpenBSD AMD768 Power Management
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service