5.2. Top-level Files within the proc File System
apmcommand. If a system with no battery is connected to an AC power source, this virtual file would look similar to the following:
1.16 1.2 0x07 0x01 0xff 0x80 -1% -1 ?
apm -vcommand on such a system results in output similar to the following:
APM BIOS 1.2 (kernel driver 1.16ac) AC on-line, no system battery
apmis able do little more than put the machine in standby mode. The
apmcommand is much more useful on laptops. For example, the following output is from the command
cat /proc/apmon a laptop while plugged into a power outlet:
1.16 1.2 0x03 0x01 0x03 0x09 100% -1 ?
apmfile changes to something like the following:
1.16 1.2 0x03 0x00 0x00 0x01 99% 1792 min
apm -vcommand now yields more useful data, such as the following:
APM BIOS 1.2 (kernel driver 1.16) AC off-line, battery status high: 99% (1 day, 5:52)