?? apmd.8
字號:
.\" apmd.8 -- .\" Created: Wed Jan 10 15:07:25 1996 by faith@acm.org.\" Revised: Fri Dec 26 20:34:52 1997 by faith@acm.org.\" Revised: Wed Jun 2 18:47:02 1999 by db@post.harvard.edu.\" Copyright 1996, 1997 Rickard E. Faith (faith@acm.org).\" Copyright 1999 David Brownell (db@post.harvard.edu).\" .\" Permission is granted to make and distribute verbatim copies of this.\" manual provided the copyright notice and this permission notice are.\" preserved on all copies..\" .\" Permission is granted to copy and distribute modified versions of this.\" manual under the conditions for verbatim copying, provided that the.\" entire resulting derived work is distributed under the terms of a.\" permission notice identical to this one.\" .\" Since the Linux kernel and libraries are constantly changing, this.\" manual page may be incorrect or out-of-date. The author(s) assume no.\" responsibility for errors or omissions, or for damages resulting from.\" the use of the information contained herein. The author(s) may not.\" have taken the same level of care in the production of this manual,.\" which is licensed free of charge, as they might when working.\" professionally..\" .\" Formatted or processed versions of this manual, if unaccompanied by.\" the source, must acknowledge the copyright and authors of this work..\" .TH APMD 8 "10 Jun 1999" "" "Linux Programmer's Manual".SH NAMEapmd \- Advanced Power Management (APM) daemon.SH SYNOPSIS.BI "apmd".BI "[ \-c " check_seconds " ].BI "[ \-P " proxy_cmd " ]".BI "[ \-p " percent_to_log " ]".BI "[ \-qVvW ]".BI "[ \-w " warn_percent " ].BI "[ \-? ]".I "[deprecated options]".SH DESCRIPTION.B apmdis an APM monitoring daemon, and works in conjunction with theAPM BIOS driver in the OS kernel. It can execute a command (normally a shellscript) when certain events are reported by the driver, and will log, via.BR syslogd (8),certain changes in system power status. When the available battery power becomesvery low, it can alert all users on the system using several methods..PPWhen the kernel APM driver notifies the daemon ofa pending suspend or standby request,.B apmdwill invoke the approprate command,log the event, .BR sync (2)data to the disk,sleep briefly to help ensure all the data actually gets to the disk,and then tell the APM driver to continue its operation.However, for "critical" suspends (indicating an emergency shutdown)only the last step (telling the driver to continue) is performed..PPMost uses of this daemon will use the.I proxycommand to support power conservation activities. This command iseither specified using the -P option, or.I /etc/apm/apmd_proxyby default. It is invoked with one or two arguments:.TP.B startInvoked when the daemon starts. Normally sets system-wide power policy, such asIDE hard drive standby times, to account for whether battery power is in use..TP.B stopInvoked when the daemon stops. Normally undoes any policy settings done when thedaemon started..TP.B suspend "[ system | user ]".\".B suspend "[ system | user | critical ]"Invoked when the APM driver reports that system suspension has been initiated.The second parameter indicates whether the BIOS or a user action (such as closinga laptop) initiated suspension..igA "critical" suspend is initiated by the BIOS when an emergency shutdown needsto happen. Applications and device drivers are not be notified since thereisn't enough time to safely do anything about the shutdown....spThe BIOS "suspend" mode aggressively conserves power, and normally involvesshutting off power to all devices except the CPU core and memory, which is keptin a very low power mode. Most laptops can stay suspended, using battery poweralone, for several days. ("Hibernation" is a kind of super-suspend, where allthat state is written to disk and the machine uses even less power bcause itcan turn off that CPU core, using no battery power at all. At this writing,Linux does not support hibernation.)PCMCIA devices should be manually suspended using.BR cardctl (8),and some modular drivers may need to be unloaded..TP.B standby "[ system | user ]"Invoked when the APM driver reports that system standby has been initiated.The second parameter indicates whether the BIOS or a user action (such asinvoking.IR "apm -s" )caused this..spThe BIOS "standby" mode slightly conserves power, and leaves themachine able to respond almost immediately to user activity.Most laptops can't stay in standby mode for even a day, if they mustrely on battery power. Normally, nothing needs to be done beyondwhat the BIOS itself will do..TP.B resume "[ suspend | standby | critical ]"Invoked when the APM driver reports that system has resumed normal operation.The second parameter indicates what sort of mode it was in before, eitherthe "suspend" mode (possibly a "critical" suspend) or else "standby" mode..spThe system clock must be updated to match the hardware clock; this willnormally have been handled by the kernel's APM driver.PCMCIA devices may need to be manually resumed from standby using.BR cardctl (8),and some modular drivers may need to be reloaded or otherwise reinitialized.In the case of a critical suspend, system state may not have been completelysaved due to an emergency shutdown; applications and drivers may be ina confused state..TP.B change powerThis presents a subset of the APM driver "power change" events, specificallythose where AC power was added or removed.This will often modify the system wide power policy; for example, so that IDEhard drives aggressively enter standby mode when only battery power is available..ig.TP.B change timeThe system clock must be updated to match the hardware clock; this willnormally have been handled by the kernel's APM driver....TP.B change batteryThe APM driver has reported that the BIOS thinks the strength of one (or more)batteries is "low"; at least ten minutes of power should remain..TP.B change capabilitySome change in the power management capabilities of the system was reported.It may have been caused by operation of some setup utility, or by the arrivalor removal of some devices..PPThis daemon issues a number of different log messages, most of which shouldbe self explanatory. The messages emitted for battery status need someexplanation, however. The information logged contains 4 fields after a "Battery" or "Charge" label:.HP1) Rate of discharge (percent/minute). Negative rates indicate charging..HP2) Time since total charge or total discharge (hh:mm:ss). This value isonly useful if it reflects the time since a 100% or 0% state has beenreached. Otherwise, this time is in parentheses, and reflects the timesince the last "important".B apmdstatus change such as starting the daemon, changing from AC power to batterypower, and so on..HP3) Estimate of time left until total discharge (or total charge), assuminguse similar to that since the last resume ( or since AC was connected).This time is calculated by.B apmditself..HP4) Parenthetically, the percent and length of remaining battery life, asestimated by the APM BIOS (which is often a conservative estimate from anintelligent battery itself). This particular information is provided withmost messages from this daemon..PPThis daemon supports APM BIOS 1.2 events, though it does not support someof the advanced features such as multiple batteries. Also,there is no interaction yet with ACPI support as found in newer PC hardware..SH OPTIONS.TP.BR "\-c " seconds, " \--check " secondsControls how many seconds to block on the \fI/dev/apm_bios\fR device. Normallythe daemon blocks until the APM driver reports an event; this number may bechanged to cause battery charge or discharge rates to be checked more often..TP.BR "\-P " proxy_cmd, " \-\-apmd_proxy " proxy_cmdIdentifies the command to invoke when certain APM driver events are reported.See above for information about the arguments to this script..TP.BR "\-p " percent_change, " \--percentage " percent_changeEvery time the percentage of available power changes (discharge or recharge) by.IR percent_change ,log information. The default is 5. Use values greater than 100 to disablethis feature..TP.B \-V, \-\-versionPrint the daemon's version and exit..TP.B \-v, \-\-verboseEnables verbose mode, where each event reported by the APM driver is logged..TP.B \-W, \-\-wallIn addition to logging low battery status (as determined either bythe \fB-w\fR level or by the APM BIOS) using.BR syslog (2),also use.BR wall (1)to alert all users. This is most useful if.BR syslogd (8)is not set up to write ALERT messages to all users. If both methods areused, more warnings will be made during the critical time period..TP.BR "\-w " warn_percent, " \--warn " warn_percentWhen the battery is not being charged and the percentage of available powerdrops below.IR warn_percent ,log a warning at ALERT level to.BR syslog (2).If the.B \-Wor.B \-\-wallflag was given, the daemon will also use.BR wall (1)to alert all users of impending doom. Give the warning each time thepercentage changes. The default is 10. Use negative values to disablethis feature..TP.B \-q, \-\-quietDisables the warnings identified by the .B -Wand.B -woptions. (The APM BIOS on many machines will provide an audible warningwhen power is about to be used up, so those extra warnings may not be needed.).TP.B \-?, \-\-helpPrints a usage message and exits..PPNew software should only use the.I proxyscript, rather than the following now-deprecated options (most of whichhave never appeared in a production release).If they are provided, they take precedence over any proxy commandinvocation for each event..TP.BR "\-a " ac_online_cmd, " \-\-ac_online " ac_online_cmdProvides a command to be run when AC power becomes available, though notwhen the daemon first starts..TP.BR "\-b " ac_offline_cmd, " \-\-ac_offline " ac_offline_cmdProvides a command to be run when the machine is operating onbattery power, though not when the daemon first starts..TP.BR "\-l " low_battery_cmd, " \-\-low_battery " low_battery_cmdProvides a command to be run when the APM BIOS judges thatbattery power is "low"..TP.BR "\-s " pre_suspend_cmd, " \-\-pre_suspend " pre_suspend_cmdProvides a command to be run before suspending through the driver. .TP.BR "\-r " post_resume_cmd, " \-\-post_resume " post_resume_cmdProvides a command to be run after resuming through the driver. .TP.B \-u, \-\-utc(This option is now completely ignored. Edit apmd_proxy instead.)This means the BIOS clock is set to UTC (GMT), so the daemon should pass the-u option to the.I clockor.I hwclockprogram when coming out of suspend or resume mode, or when respondingto the BIOS update time event..SH BUGSThe first status report printed after a power change may beinaccurate because the power change occured at a fractional percentage thatwas rounded to a full percentage. For example, say you are discharging themachine and have 50.9% power, which is reported as 50%. When you start tocharge the machine, it will only have 0.1% left before the percentage flipsto 51%, and the charge rate will be dramatically over-estimated..PPThere needs to be a more general hook to let other applications participatein system power management decisions and policies..PPMultiple batteries are currently treated as if they were just one large one..SH FILES.I /dev/apm_bios.br.I /proc/apm.br.I /etc/apmd/apmd_proxy.SH AUTHORThis program was written by Rik Faith (faith@cs.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 (apenwarr@worldvisions.ca)..SH "SEE ALSO".BR apm "(1), " xapm "(1), " cardctl "(8), " hdparm "(8), " syslogd "(8)"
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -