Re: Help understanding /proc/apm
Damian Gerow <[email protected]>
| Newsgroups | gmane.user-groups.linux.ottawa.general |
|---|---|
| Message-ID | <[email protected]> |
Mr. Shawn H. Corey wrote:
: I am trying to understand /proc/apm but I can't seem to find sufficient
: documentation on it. Specially, I looking for the meaning of the four
: hex values in the middle of it.
:
: $ cat /proc/apm
: 1.13 1.2 0x02 0x01 0x00 0x01 99% -1 min
:
: The first item is the driver version number, the second is the bios
: version. The last three are, respectively, the percentage left of
: battery power, the time left, and the units the time is measured in.
: But I can't find the meaning of the four intermediate values. Can
: anyone point me to the documentation? Thanks.
Well, a quick Google search shows this:
<http://www.neilvandyke.org/linux-proc-apm-scm/>
And this:
<http://planet.plt-scheme.org/package-source/neil/linux-proc-apm.plt/1/0/linux-proc-apm.ss>
I'll quote the pertinent section:
-----
(define (linux-proc-apm-data:driver-version d) (vector-ref d 0))
(define (linux-proc-apm-data:bios-version d) (vector-ref d 1))
(define (linux-proc-apm-data:apm-flags d) (vector-ref d 2))
(define (linux-proc-apm-data:ac-line-status d) (vector-ref d 3))
(define (linux-proc-apm-data:battery-status d) (vector-ref d 4))
(define (linux-proc-apm-data:battery-flags d) (vector-ref d 5))
(define (linux-proc-apm-data:battery-percent d) (vector-ref d 6))
(define (linux-proc-apm-data:battery-time d) (vector-ref d 7))
(define (linux-proc-apm-data:battery-time-units d) (vector-ref d 8))
-----
So, it's APM flags, AC line status, battery status, and battery flags. As
to what those actually mean, you're probably best off referring to the man
page for apm/apmd (or the source, as noted in the first link above).
And I just have to ask... Given that ACPI has been around for quite some
time now, and even /proc/acpi is going out of style, why are you looking at
/proc/apm?
(That's genuine curiousity -- I recognize there are very valid reasons for
looking at /proc/apm, just wondering what your are.)
- Damian
--
OCLUG general discussion list
[email protected]
http://oclug.on.ca/mailman/listinfo/oclug