SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from PLD apmd-3.2.2-7.i686.rpm

APMD

Section: (8)
Updated: January 2004
Index 

NAME

apmd - Advanced Power Management (APM) daemon 

SYNOPSIS

apmd[ -TVWciqv ][ -P program ][ -T seconds ][ -c seconds ][ -p percent ][ -v level ][ -w percent ] 

DESCRIPTION

apmdis an monitoring daemon for the Advanced Power Management (APM) subsystem.The APM subsystem consists of power-management hardware,firmware usually referred to as the APM BIOSand a driver in the operating system kernel.The daemon can execute a program (usually a shell script) whenevents are reported by the APM subsystem, and will log, viasyslogd(8),certain changes in power status.When the available battery power becomes very low it can alert the user.

When the APM subsystem notifies the daemon ofa pending suspend or standby request,apmdwill run a proxy program,log the event, sync(2)data to the diskand then tell the APM subsystem to continue its operation.

Preparations for power management events are made mainly by the proxyprogramspecified using the -P option.The proxy program is invoked with one or two arguments:

start
Invoked when the daemon starts.
stop
Invoked when the daemon stops.
standby ( system | user )
Invoked when the APM subsystem reports that standby has been initiated.The second parameter indicates whether firmware ("system") orsoftware ("user") was the originator of the event.

The "standby" mode conserves power but leaves themachine able to respond almost immediately to user activity.Most laptops can't stay in standby mode on battery power for more than a few hours or a day.Normally, nothing special needs to be done to prepare for "standing by".

suspend ( system | user )
Invoked when the APM subsystem reports that suspension has been initiated.The second parameter indicates whether firmware ("system") orsoftware ("user") was the originator of the event.

The "suspend" mode aggressively conserves power. Usually this involvesshutting off power to all devices except the CPU core and memory, which are putinto a very low power mode. Most laptops can stay suspended, using batterypower alone, for several days. ("Hibernation" is a kind of super-suspend,where all that state is written to disk and the machine uses no power.Hibernation is treated like suspension by the APM subsystem.)

Before suspending, PCMCIA devices may need to be disabled usingcardctl(8),and some modular device drivers may need to be unloaded if theyhave not been designed to support power management.

resume ( suspend | standby | critical )
Invoked when the APM subsystem reports that computer has resumed normal operation.The second parameter indicates the kind of event from which the system is resuming.(A "critical" suspend is a suspension that the APM subsystem performsin an emergency. Some kernels do not pass this event to user space. Ifapmdreceives the event, it acknowledges the event and exits immediatelywithout logging or running the proxy program.)

When resuming, PCMCIA devices may need to be re-enabled usingcardctl(8),and some modular drivers may need to be reloaded.Note that in the case of a critical suspend, the system state may not have beencompletely saved.

change power
Invoked when the APM subsystem reports a change in power status, suchas a switch from mains to battery power.
change battery
Invoked when the APM subsystem reports that the charge of one or morebatteries is low. A few minutes of battery power may remain.
change capability
Invoked when the APM subsystem reports some change in power management capabilities.It may have been caused by operation of a setup utility, or by the installationor removal of devices.

apmdemits various messages, most of which are self-explanatory.Battery status log entries contain three fields, separated by commas. The first field indicates how full the battery is as a percentage of itscapacity.The second field indicates whether the battery is charging, not charging, or discharging.When possible,apmdadds in parentheses its estimate of the rate of chargingor discharging.The third field indicates how much time the battery can or could be usedto power the computer.This information is provided by the APM subsystem.When possible,apmdadds in parentheses its own estimate of the battery life(if discharging) or of the time required to charge the battery fully (if charging). 

OPTIONS

-P program, --proxy program
Specifies the proxy program to execute when events are received.See above for information about the arguments supplied to this program.
-T [seconds] , --proxy-timeout [seconds]
Sets a time-out for the proxy.Without this option (or with this option and a negative argument)apmdwaits indefinitely for the proxy to finish.If the proxy enters an infinite loop or wait then the machinemay appear to have crashed.If this option is given a positive integer argument thenapmdwill wait only that many seconds for the proxy to finish, afterwhich it will log a warning, kill the proxy, and continue processingthe event.The default is 30 seconds.
-V, --version
Prints the version of theapmdprogram.
-W, --wall
In addition to logging low battery status (as determined either bythe -w level or by the firmware) usingsyslog(2),apmdwill, given this option, also usewall(1)to alert all users. This is most useful ifsyslogd(8)is not set up to write ALERT messages to all users. If both methodsare used, more warnings will be made during the critical time period.
-c [seconds] , --check [seconds]
Controls how many seconds to wait for an event.Without this option (or with this option and a negative argument)apmd waits indefinitely for an event.If this option is given a positive integer argument thenapmdwill wait only that many seconds before checking the battery leveland possibly sending out a warning, calling the proxy or making anentry in the log.The default is 30 seconds.
-i, --ignore-bios-battery-low
Causesapmdto ignore a LOW BATTERY signal sent by the APM subsystem.Some firmware signals a low battery at the wrong time.Note that LOW BATTERY events may still be generated byapmditselfbased on the warning level.
-p percent, --percentage percent
Controls how often the battery status is logged. A new line is printedeach time the battery content changes bypercent_changeif logging is enabled.The default is 5.Use a value greater than 100 to disable periodic logging of the battery level.
-q, --quiet-bios-battery-low
Causesapmdnot to generate a warning when a LOW BATTERY signalis received from the APM subsystem. The firmware on some machinesproduces an audible warning when power is about to be used up,so an extra warning may not be needed.
-v [level] , --verbose [level]
The daemon can generate messages of varying degrees of unimportance.Each message is assigned one of the priority levels defined for thesyslogd(8)subsystem, ranging from 0 (EMERG, least unimportant) to 7(DEBUG, most unimportant). This option sets the threshold level abovewhich messages are suppressed. Without an argument it increments thethreshold by 1, thus makingapmdmore verbose.The default is 5 (NOTICE).
-w percent, --warn percent
When the battery is not being charged and the battery content fallsbelow the specified percent of capacity,and no such event has yet occurred in the current discharge cycle,apmdwill log a warning at the ALERT log level tosyslog(2)and generate a LOW BATTERY event.If the-Wor--walloption was given, the daemon will also usewall(1)to alert all users of impending doom.The default warning level is 10.Use a negative value to disable this feature.
-h, --help
Causesapmdto print a brief command summary and exit.

 

BUGS

This daemon supports all APM events described in the APM BIOS specificationversion 1.2; however it fails to support some of the advanced featuresof APM 1.2, such as reporting the conditions of multiple batteries.(Multiple batteries are currently treated as if they were just one large one.)

Estimates of charge and discharge rates and times can be very inaccurate.

There is no interaction yet with ACPI support as found in newer PC hardware. 

FILES

/dev/apm_bios
Device through which apmd communicates with the Linux APM driver.
/proc/apm
APM driver status information
/etc/apmd_proxy
Proxy program that is run if none is specified.
/etc/apm/apmd_proxy
Proxy program that is run if none is specified. (Debian)
 

AUTHOR

This program was written by Rik Faith (faithAATTcs.unc.edu) and may be freelydistributed under the terms of the GNU General Public License. There isABSOLUTELY NO WARRANTY for this program. The current maintainer is AveryPennarun (apenwarrAATTworldvisions.ca). 

SEE ALSO

apm(1),xapm(1),cardctl(8),syslogd(8).


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
BUGS
FILES
AUTHOR
SEE ALSO

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector