• Stars
    star
    100
  • Rank 330,186 (Top 7 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created over 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Apple SMC CLI tool that can decode and display temperature, fans, battery, power, voltage and current information

iSMC

GitHub license GitHub release Go Report Card

About

iSMC is an Apple System Management Controller (SMC) CLI tool that attempts to query SMC for a number of well known keys and determine their type and value, classifying them into temperature, power, current, voltage, fan and battery readouts. It will also attempt to give a human-readable description of each found SMC key.

Apart from regular support for regular (PPC and Intel hardware), it also supports M1 ARM-based SoC hardware which has temperature/voltage/current/power sensors connected to a HID sensor hub.

asciicast

Installation

There are two ways of installing iSMC (tool works only on macOS computers):

Manual

Download your preferred flavor from the releases page and install manually.

Using go install

CGO_ENABLED=1 go install github.com/dkorunic/iSMC@latest

Usage

Usage:

$ iSMC help
Apple SMC CLI tool that can decode and display temperature, fans, battery, power, voltage and current
information for various hardware in your Apple Mac hardware.

Usage:
  iSMC [flags]
  iSMC [command]

Available Commands:
  batt        Display battery status
  completion  Generate the autocompletion script for the specified shell
  curr        Display current sensors
  fans        Display fans status
  help        Help about any command
  power       Display power sensors
  temp        Display temperature sensors
  volt        Display voltage sensors

Flags:
  -h, --help             help for iSMC
  -o, --output string    Output format (ascii, table, json) (default "table")

Use "iSMC [command] --help" for more information about a command.

Usage of all commands is self explanatory and all commands have short and long aliases (bat vs. batt vs. battery, cur vs. curr vs. current etc.). There are no flags and/or switches.

Related work

I have taken a look at many Apple SMC related projects and took inspiration from them:

Todo

Planned features:

  • fetch and decode SMC key descriptions from SMC,
  • generate random SMC keys and fetch/decode if available/usable,
  • store those extra (random) SMC keys in permanent configuration file,
  • add support for missing types (si*, hex_, pwm, etc.),
  • various code cleanups (some parts are downright horrible).

Bugs, feature requests, etc.

Please open a PR or report an issue. Thanks!

More Repositories

1

betteralign

Make your Go programs use less memory (maybe)
Go
469
star
2

findlargedir

quickly find all "blackhole" directories with a huge amount of filesystem entries in a flat structure
Rust
51
star
3

e-dnevnik-bot

e-Dnevnik grade/exam alerting system (https://ocjene.skole.hr)
Go
46
star
4

dnstrace

Yet another DNS query tracing/analysis tool written in Go
Go
41
star
5

uptime_hack

Linux kernel uptime hack module
C
37
star
6

hybserv2

Hybrid2 IRC Services
C
18
star
7

findlargedir-go

find all "blackhole" directories with a huge amount of filesystem entries in a flat structure
Go
17
star
8

pktstat-bpf

TC and XDP eBPF based simple Ethernet interface traffic monitor and reporting tool
Go
12
star
9

axfr2hosts

Fetches one or more DNS zones via AXFR and dumps in Unix hosts format for local use
Go
11
star
10

mediascore

Media scoring CLI tool that queries OMDb, IMDB, Rotten Tomatoes and Mediacritic for media ranking
Go
7
star
11

rpi-home-sensors

Raspberry Pi temperature, humidity and pressure graphing and storing
Python
6
star
12

pktstat

Simple ethernet interface traffic monitor and reporting tool
Go
6
star
13

simple-dns-ids

Yet Another Simple DNS IDS System
Python
5
star
14

semgrep-go

Go rules for semgrep
3
star
15

IM-billing-v2

simple Google Calendar billing/tracking project in Golang
Go
3
star
16

HZnet

HZnet is Croatian Railways schedule Android app
Java
2
star
17

pam_skey

PAM S/Key module
C
2
star
18

postfix_dovecot_virtual_mgmt

trivial Postfix-Dovecot virtual user database management (Croatian-only)
Shell
2
star
19

IM-billing

simple Google Calendar billing/tracking project
Python
1
star
20

cloudbench-https

poor-man AWS-based multi-AZ site benchmark
Python
1
star
21

ibm-ds-rrdgraph

IBM Disk Storage Systems RRD Grapher Project
Shell
1
star