Power Management for macOS by@sharonlin

Power Management for macOS

March 28th 2018 2,074 reads
Read on Terminal Reader
react to story with heart
react to story with light
react to story with boat
react to story with money
image
Sharon Lin HackerNoon profile picture

Sharon Lin

Lately, my boyfriend has been incredibly excited about using PowerTOP to decrease power usage for his Dell XPS running Arch. It’s a fantastic utility that displays a minimalist monitor for background activity in the terminal, but unfortunately it only exists for Linux systems.

I’ve regularly used Activity Monitor for monitoring my CPU and memory usage, but I was beginning to wonder if it might be possible to have a non-GUI assistant for Mac systems.

image

A thread on Stack Exchange recommended powermetrics, a command-line utility designed specifically for Mac usage. It offers several uses, including sampling groups (interrupt sources, CPU power, device power states, battery and backlight info, thermal pressure notifications, and more).

You can also save samples to buffers, order processes, and display wakeup costs and power use averages over specified sample periods. Feel free to visit the OS X official documentation for more on how to customize commands.

image

Another utility I found was top, which has its own set of man pages for OS X. The utility contains stats on power and processes, with a more streamlined output depending on your format of the command.

image

Under usr/bin, there’s a nice bash script called power_report.sh that essentially uses powermetrics to write a power report on timer analysis, CPU profile, IO report, and Exec report on power usage.

image

random($foo) has also written a bit on OS X power usage specifically for Mavericks, although I would imagine the tips are still applicable for later versions of macOS.

I have yet to find an easy power management tool, although it likely wouldn’t be difficult to give admin privileges to stop background processes that are drawing too much power. Anyway, I hope this was an informative primer to some of the many command-line utilities for power management for OS X!

If you liked this post and want to hear more about my thoughts on school, tech, or even life as a university student, feel free to find me elsewhere online!

@sharontlin

Facebook @sharonlinnyc

GitHub @sharon-lin

react to story with heart
react to story with light
react to story with boat
react to story with money
L O A D I N G
. . . comments & more!