How to Use the pmset Command in macOS to Audit Battery Health and Configure Sleep Schedules

While the macOS System Settings interface offers basic toggles for low power mode and display timeouts, it conceals the vast majority of Apple’s underlying power management architecture. MacBooks and desktop Macs rely on the pmset (Power Management Settings) command-line utility to control hardware sleep states, system assertions, wake-on-LAN behaviors, and thermal throttling thresholds. Using pmset in Terminal provides power users and IT administrators with granular diagnostic control over battery discharge rates and automated system schedules.

Inspecting Current Power Settings and Active Profiles

macOS maintains distinct power configuration profiles depending on whether the computer is connected to AC wall power or running on internal DC battery reserves. To view your active power settings across all domains, open Terminal and execute:

pmset -g

This command outputs the current state of key power parameters, including:

  • sleep: Minutes of system inactivity before transitioning to system sleep.
  • displaysleep: Minutes before the display panel turns off.
  • disksleep: Idle timeout before spinning down mechanical hard drives or putting SSD controllers into deep low-power states.
  • hibernatemode: The active hibernation mode (0 for standard RAM sleep, 3 for hybrid sleep, 25 for full disk hibernate).
  • tcpkeepalive: Determines whether network connections are periodically polled while asleep (Power Nap).

Diagnosing Sleep Prevention and System Assertions

If your Mac laptop refuses to enter sleep mode when closing the lid, or if you notice substantial battery drain overnight, a background process is almost certainly holding a power assertion. To pinpoint exactly which application or daemon is keeping the system awake, run:

pmset -g assertions

Look specifically for the PreventUserIdleSystemSleep and PreventSystemSleep headings. Under these sections, macOS details the exact Process ID (PID) and application name (such as an active audio stream in Chrome, a Time Machine backup, or a hung print queue) preventing the hardware from sleeping.

Auditing Battery Health and Real-Time Charging Telemetry

To inspect real-time battery status without launching third-party menu bar utilities, query the battery domain directly:

pmset -g batt

The output reports the exact charge percentage, whether the power source is AC or Battery, current charging state, and an estimated time remaining to full charge or battery depletion.

Customizing Power Configurations via Terminal

Modifying power management parameters requires superuser privileges using sudo. You can target settings specifically to battery power (-b), wall charger power (-c), UPS devices (-u), or universally (-a):

1. Disabling Wake on Network Access on Battery

sudo pmset -b womp 0

Disabling Wake-on-LAN (womp) while on battery prevents intermittent network pings from waking your sleeping MacBook inside a backpack.

2. Adjusting Display and System Sleep Intervals

sudo pmset -b displaysleep 5 sleep 10
sudo pmset -c displaysleep 15 sleep 30

This sets aggressive sleep limits when running on battery (display turns off after 5 minutes, system sleeps after 10) while providing relaxed thresholds when connected to wall power.

Automating Power Schedules: Wake, Sleep, and Restart

System administrators managing fleet Macs or media servers can schedule daily or weekly automated power cycles using the schedule and repeat verbs:

sudo pmset repeat wake MTWRF 07:30:00
sudo pmset repeat shutdown MTWRF 22:00:00

The day string uses single-letter abbreviations (M=Monday, T=Tuesday, W=Wednesday, R=Thursday, F=Friday, S=Saturday, U=Sunday). To review all currently active scheduled power events, run:

pmset -g sched

To clear all automated power schedules, execute sudo pmset repeat cancel.

Restoring Default Factory Power Management Settings

If experimental power tweaks result in unexpected behavior or unstable sleep cycles, you can instantly purge all custom configurations and revert to Apple factory defaults by executing:

sudo pmset -a restoredefaults

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.