Starts in debug mode. This causes apmd to execute in the foreground instead of in daemon mode.
-f file
Specifies a different configuration file file to be used in place of the default /etc/apmd.conf.
-s
Causes apmd to simulate a POWERSTATECHANGE event when a power state change is detected (AC_POWER_STATE) but the bios of the laptop does not report it. This enables you to do things like dimming the LCD backlight when you unplug the power cord.
-v
Verbose mode.
When apmd starts, it reads the configuration file ( /etc/apmd.conf as default) and notifies the set of events to be monitored to the APM device driver. When it terminates, the APM device driver automatically cancels monitored events.
If the apmd process receives a SIGHUP, it will reread its configuration file and notify the APM device driver of any changes to its configuration.
The apmd utility uses the device /dev/apmctl to issue ioctl(2) requests for monitoring events and for controlling the APM system. This device file is opened exclusively, so only a single apmd process can be running at any time.
When apmd receives an APM event, it forks a child process to execute the commands specified in the configuration file and then continues listening for more events. The child process executes the commands specified, one at a time and in the order that they are listed.
While apmd is processing the command list for SUSPEND/STANDBY requests, the APM kernel device driver issues notifications to APM BIOS once per second so that the BIOS knows that there are still some commands pending, and that it should not complete the request just yet.
The apmd utility creates the file /var/run/apmd.pid, and stores its process id there. This can be used to kill or reconfigure apmd.