os-silicon-top

command
v0.6.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

os-silicon-top

No-sudo, zero-CGo Apple Silicon telemetry cockpit built with x/powersample, x/thermal, x/mempressure, x/workgroup, and x/mach.

What It Demonstrates

  • P-core / E-core QoS Pinning (x/workgroup): Pins a Go goroutine onto performance cores (UserInteractive) inside a parallel os_workgroup and another onto efficiency cores (Background) via workgroup.RunPinned.
  • Mach Real-Time Thread Promotion (x/mach): Locks a goroutine to an OS thread, promotes it via SetTimeConstraint (10ms period / 1ms computation / 4ms constraint), measures wakeup jitter, and demotes cleanly via SetStandard on exit.
  • Unprivileged SoC Power (x/powersample): Streams live CPU, GPU, and ANE wattage via libIOReport.dylib with no sudo.
  • Thermal & Jetsam Footprint (x/thermal, x/mempressure): Reads NSProcessInfo.thermalState, IOPowerSources, task_info(TASK_VM_INFO).phys_footprint, and live Darwin memory-pressure level.

Usage

# Quick CLI run (default 5 samples at 250ms)
CGO_ENABLED=0 go run ./examples/os/os-silicon-top -samples 3

# Continuous live TUI mode
CGO_ENABLED=0 go run ./examples/os/os-silicon-top -watch -interval 250ms

Measured Output

os-silicon-top (zero-CGo, zero-sudo Apple Silicon cockpit)
  workgroup="os-silicon-top" max_parallel=16 | P=UserInteractive(0) E=Background(0) | Mach RT=TimeConstraint(10ms/1ms)
--------------------------------------------------------------------------------------------------------------
[01] CPU 16.78W  GPU  0.39W  ANE 0.00W  Tot 17.17W | th=fair    pwr=ac (100%)  | mem= 12.0MiB(normal) | P= 344 E= 271 RT=81(jit 80500µs)
[02] CPU 14.57W  GPU  0.43W  ANE 0.00W  Tot 15.00W | th=fair    pwr=ac (100%)  | mem= 12.6MiB(normal) | P= 339 E= 313 RT=72(jit 59944µs)
[03] CPU 13.70W  GPU  0.31W  ANE 0.00W  Tot 14.01W | th=fair    pwr=ac (100%)  | mem= 13.7MiB(normal) | P= 519 E= 483 RT=95(jit 70445µs)

Average over 3 samples: CPU 15.02W, GPU 0.38W, ANE 0.00W, Combined 15.39W

Documentation

Rendered for darwin/amd64

Overview

Command os-silicon-top streams live no-sudo Apple Silicon telemetry while pinning Go goroutines across P-cores, E-cores, and a Mach real-time thread.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL