smcFanControl
smcFanControl copied to clipboard
Syntax for Terminal Command to Read CPU Temps
I'm attempting to write a script to use the ./smc to read CPU temperatures so I can monitor them with PRTG remotely. Currently if I try ./smc -r TC1C I get a message back saying "Error: specify a key to read. So apparently I have the syntax wrong as there are no examples in the ReadMe for this command. Can I get a little help please. Also can you include examples of each command in the ReadMe file so we can help ourselves. Thanks!
Go figure....I figured it out on my own. To read the CPU temperature value the syntax is as follows:
./smc -k TC1C -r
So now hopefully I can finish writing my script to read those values. I have a Mac Mini server 6,2 that might be overheating for some reason but now that I have a monitor running to control the fan speed it may never overheat again. Sad because the only thing this server does is run a simple licensing app to serve AutoDesk licenses to a lab of 20 WIndows machines.
You can also use powermetrics(8):
Text output (click to show output)
sudo powermetrics --samplers smc -i1 -n1
|
Machine-readable output (click to show output)
sudo powermetrics --samplers smc -i1 -n1 -fplist
|
Of course, this requires superuser privileges, so it isn't a complete replacement for smcFanControl. But it's helpful to know.