1.\" $NetBSD: apm.8,v 1.14 2001/04/21 14:42:32 wiz Exp $ 2.\" 3.\" Copyright (c) 1996 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by John Kohl. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. All advertising materials mentioning features or use of this software 18.\" must display the following acknowledgement: 19.\" This product includes software developed by the NetBSD 20.\" Foundation, Inc. and its contributors. 21.\" 4. Neither the name of The NetBSD Foundation nor the names of its 22.\" contributors may be used to endorse or promote products derived 23.\" from this software without specific prior written permission. 24.\" 25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35.\" POSSIBILITY OF SUCH DAMAGE. 36.\" 37.Dd June 18, 1996 38.Dt APM 8 i386 39.Os 40.Sh NAME 41.Nm apm , 42.Nm zzz 43.Nd Advanced Power Management control program 44.Sh SYNOPSIS 45.Nm "" 46.Op Fl abdlsSvz 47.Bk -words 48.Op Fl f Ar sockname 49.Ek 50.Nm zzz 51.Op Fl Sz 52.Bk -words 53.Op Fl f Ar sockname 54.Ek 55.Sh DESCRIPTION 56.Nm 57communicates with the Advanced Power Management daemon, 58.Xr apmd 8 , 59making requests of it for current power status or to place the system 60into a suspend or stand-by state. 61With no flags, 62.Nm 63displays the current power management state in verbose form. 64.Pp 65Available command-line flags are: 66.Bl -tag -width indent -compact 67.It Fl z 68Put the system into suspend (deep sleep) mode. 69.It Fl S 70Put the system into stand-by (light sleep) mode. 71.It Fl l 72Display the estimated battery lifetime in percent. 73.It Fl m 74Display the estimated battery lifetime in minutes. 75.It Fl b 76Display the battery status. 0 means high, 1 means low, 2 means 77critical, 3 means charging, 4 means absent, and 255 means unknown. 78.It Fl a 79Display the external charger (A/C status). 0 means disconnected, 1 80means connected, 2 means backup power source, and 255 means unknown. 81.It Fl s 82Display if power management is enabled. 83.It Fl v 84Request more verbose description of the displayed states. 85.It Fl f Ar sockname 86Set the name of the socket via which to contact 87.Xr apmd 8 88to 89.Pa sockname . 90.It Fl d 91Do not communicate with the APM daemon; attempt instead to manipulate 92the APM control device directly. 93.El 94.Pp 95The 96.Nm zzz 97variant of this command is an alternative for suspending the system. 98With no arguments, 99.Nm zzz 100places the system into suspend mode. 101The command line flags serve the same purpose as for the 102.Nm 103variant of this command. 104.Pp 105This command does not wait for positive confirmation that the requested 106mode has been entered; to do so would mean the command does not return 107until the system resumes from its sleep state. 108.Sh FILES 109.Pa /var/run/apmdev 110is the default UNIX-domain socket used for communication with 111.Xr apmd 8 . 112The 113.Fl f 114flag may be used to specify an alternate socket name. 115The protection modes on this socket govern which users may access the 116APM functions. 117.Pp 118.Pa /dev/apmctl 119is the control device which is used when the 120.Fl d 121flag is specified; it must be writable for the 122.Fl d 123flag to work successfully. 124.Pa /dev/apm 125is the status device used when the socket is not accessible; it must be 126readable to provide current APM status. 127.Sh SEE ALSO 128.Xr apm 4 , 129.Xr apmd 8 130.Sh REFERENCES 131Advanced Power Management (APM) BIOS Interface Specification (revision 1321.1), Intel Corporation and Microsoft Corporation 133.Sh HISTORY 134The 135.Nm 136command appeared in 137.Nx 1.3 . 138