1997-11-11 13:07:34 +03:00
|
|
|
.\" $NetBSD: apm.8,v 1.8 1997/11/11 10:07:55 mrg Exp $
|
1996-09-25 04:53:45 +04:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
|
1996-08-26 03:38:57 +04:00
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
1996-09-25 04:53:45 +04:00
|
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
.\" by John Kohl.
|
|
|
|
.\"
|
1996-08-26 03:38:57 +04:00
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
1996-09-25 04:53:45 +04:00
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the NetBSD
|
|
|
|
.\" Foundation, Inc. and its contributors.
|
|
|
|
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
.\" contributors may be used to endorse or promote products derived
|
|
|
|
.\" from this software without specific prior written permission.
|
1996-08-26 03:38:57 +04:00
|
|
|
.\"
|
1996-09-25 04:53:45 +04:00
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
1997-07-31 02:53:50 +04:00
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
1996-09-25 04:53:45 +04:00
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
1996-08-26 03:38:57 +04:00
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.Dd June 18, 1996
|
|
|
|
.Dt APM 8
|
|
|
|
.Os NetBSD
|
|
|
|
.Sh NAME
|
1997-11-11 13:07:34 +03:00
|
|
|
.Nm apm ,
|
|
|
|
.Nm zzz
|
1996-08-26 03:38:57 +04:00
|
|
|
.Nd Advanced Power Management control program
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm zzz
|
|
|
|
.Op Fl S
|
|
|
|
.Op Fl z
|
|
|
|
.Op Fl f Ar sockname
|
|
|
|
.Br
|
1997-10-17 08:31:55 +04:00
|
|
|
.Nm ""
|
1996-08-26 03:38:57 +04:00
|
|
|
.Op Fl z
|
|
|
|
.Op Fl S
|
|
|
|
.Op Fl s
|
|
|
|
.Op Fl d
|
|
|
|
.Op Fl l
|
|
|
|
.Op Fl b
|
|
|
|
.Op Fl a
|
|
|
|
.Op Fl v
|
|
|
|
.Op Fl f Ar sockname
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
|
|
|
communicates with the Advanced Power Management daemon,
|
|
|
|
.Xr apmd 8 ,
|
|
|
|
making requests of it for current power status or to place the system
|
1997-01-23 03:31:14 +03:00
|
|
|
into a suspend or stand-by state.
|
1996-08-26 03:38:57 +04:00
|
|
|
With no flags,
|
|
|
|
.Nm
|
|
|
|
displays the current power management state in verbose form.
|
|
|
|
.Pp
|
|
|
|
Available command-line flags are:
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It Fl z
|
|
|
|
Put the system into suspend (deep sleep) mode.
|
|
|
|
.It Fl S
|
|
|
|
Put the system into stand-by (light sleep) mode.
|
|
|
|
.It Fl l
|
|
|
|
Display the estimated battery lifetime (in percent).
|
|
|
|
.It Fl b
|
|
|
|
Display the battery status. 0 means high, 1 means low, 2 means
|
|
|
|
critical, 3 means charging, 4 means absent, and 255 means unknown.
|
|
|
|
.It Fl a
|
|
|
|
Display the external charger (A/C status). 0 means disconnected, 1
|
|
|
|
means connected, 2 means backup power source, and 255 means unknown.
|
|
|
|
.It Fl v
|
|
|
|
Request more verbose description of the displayed states.
|
|
|
|
.It Fl f Ar sockname
|
|
|
|
Set the name of the socket via which to contact
|
|
|
|
.Xr apmd 8
|
|
|
|
to
|
|
|
|
.Pa sockname .
|
|
|
|
.It Fl d
|
|
|
|
Do not communicate with the APM daemon; attempt instead to manipulate
|
|
|
|
the APM control device directly.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Nm zzz
|
1997-02-18 09:34:01 +03:00
|
|
|
variant of this command is an alternative for suspending the system.
|
1996-08-26 03:38:57 +04:00
|
|
|
With no arguments,
|
1997-02-18 09:34:01 +03:00
|
|
|
.Nm zzz
|
1996-08-26 03:38:57 +04:00
|
|
|
places the system into suspend mode.
|
|
|
|
The command line flags serve the same purpose as for the
|
1997-10-17 08:31:55 +04:00
|
|
|
.Nm
|
1996-08-26 03:38:57 +04:00
|
|
|
variant of this command.
|
|
|
|
.Pp
|
|
|
|
This command does not wait for positive confirmation that the requested
|
|
|
|
mode has been entered; to do so would mean the command does not return
|
|
|
|
until the system resumes from its sleep state.
|
|
|
|
.Sh FILES
|
|
|
|
.Pa /var/run/apmdev
|
|
|
|
is the default UNIX-domain socket used for communication with
|
1997-02-18 09:34:01 +03:00
|
|
|
.Xr apmd 8 .
|
1996-08-26 03:38:57 +04:00
|
|
|
The
|
|
|
|
.Fl f
|
|
|
|
flag may be used to specify an alternate socket name.
|
|
|
|
The protection modes on this socket govern which users may access the
|
|
|
|
APM functions.
|
|
|
|
.Pp
|
|
|
|
.Pa /dev/apmctl
|
|
|
|
is the control device which is used when the
|
|
|
|
.Fl d
|
|
|
|
flag is specified; it must be writable for the
|
|
|
|
.Fl d
|
|
|
|
flag to work successfully.
|
|
|
|
.Pa /dev/apm
|
|
|
|
is the status device used when the socket is not accessible; it must be
|
|
|
|
readable to provide current APM status.
|
|
|
|
.Sh SEE ALSO
|
1997-10-03 09:37:05 +04:00
|
|
|
.Xr apm 4 ,
|
|
|
|
.Xr apmd 8 .
|
1996-08-26 03:38:57 +04:00
|
|
|
.Sh REFERENCES
|
|
|
|
Advanced Power Management (APM) BIOS Interface Specification (revision
|
|
|
|
1.1), Intel Corporation and Microsoft Corporation
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
1997-02-18 09:34:01 +03:00
|
|
|
.Nm
|
1997-10-03 09:37:05 +04:00
|
|
|
command appeared in
|
|
|
|
.Nx 1.3 .
|