Submitted by Mike on Mon, 12/04/2006 - 7:18pm
PMMon monitors your system for Win32 power management events that are sent to all application windows, under the WM_POWERBROADCAST window message. These messages are then decoded and displayed in a log window. Where possible, the delta between previous and current values are shown. The current battery power level (if available) is shown in a colored bar at the top of the window.
This is useful for developers as well as notebook or other mobile computer users, or the terminally curious. I whipped this up because I couldn't find anything like it out on the internet, or any built-in methods of monitoring power management events. If you know of any other ways to do this, please feel free to let us know about it.
For background information, see:
Current Version: 1.0.2.3
What's new in this version?
- Improved screen layout
- Minor bug fixes (log window contents truncated at ~32,000 characters in previous version.)
- Color-coded battery meter - green when fully charged, red when battery is discharged.
- "Stay awake" option to block suspend or standby requests (temporarily prevent entering suspend or standby.) This is useful in situations where you want to simulate an application refusing to allow a standby or suspend request (in other words, when PMMon sees the PBT_APMQUERYSUSPEND message, it will return the BROADCAST_QUERY_DENY result, which should block the request.)
- Copy log window contents to clipboard.
- Clear log window.
- Log window contents are now echoed to the system debug output device, which can be viewed using Sysinternals' DebugView.
Example Output
Exodus Development, Inc. PMMon Version 1.0.2.3 Monitoring power management events... Line power connected. Status indicates battery fully charged. 2/5/2006 10:04:24 AM: WM_POWERBROADCAST (PBT_APMPOWERSTATUSCHANGE) (0x0000000A) ACLineStatus : Online (1) to Offline (0) >> Sleep deprivation ENABLED. (Will attempt to block suspend or standby requests.) 2/5/2006 10:05:25 AM: WM_POWERBROADCAST (PBT_APMQUERYSUSPEND) (0x00000000) >> Blocking PBT_APMQUERYSUSPEND via BROADCAST_QUERY_DENY 2/5/2006 10:05:25 AM: WM_POWERBROADCAST (PBT_APMQUERYSUSPENDFAILED) (0x00000002) 2/5/2006 10:06:42 AM: WM_POWERBROADCAST (PBT_APMPOWERSTATUSCHANGE) (0x0000000A) BatteryLifePercent : 100 to 98 Percent (-2) BatteryLifeTime : Unknown to 11822 Seconds (+11822) 2/5/2006 10:08:42 AM: WM_POWERBROADCAST (PBT_APMPOWERSTATUSCHANGE) (0x0000000A) BatteryLifePercent : 98 to 97 Percent (-1) BatteryLifeTime : 11822 to 12511 Seconds (+689) 2/5/2006 10:10:43 AM: WM_POWERBROADCAST (PBT_APMPOWERSTATUSCHANGE) (0x0000000A) BatteryLifePercent : 97 to 96 Percent (-1) BatteryLifeTime : 12511 to 11407 Seconds (-1104) 2/5/2006 10:12:43 AM: WM_POWERBROADCAST (PBT_APMPOWERSTATUSCHANGE) (0x0000000A) BatteryLifePercent : 96 to 95 Percent (-1) BatteryLifeTime : 11407 to 9739 Seconds (-1668)
Requirements
Windows 98, ME, NT4, 2000, or XP.
Attachment | Size |
---|---|
PMMon1.0.2.3.zip | 60.54 KB |