mactop
Retrieve real-time hardware metrics from Apple Silicon Macs using mactop's TOON format.\nProvides CPU, RAM, GPU, power, thermal, network, disk I/O, and Thunderbolt bus information.\nUse when the user wants system stats, hardware monitoring, or performance metrics on Apple
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Retrieve real-time hardware metrics from Apple Silicon Macs using mactop's TOON format.\nProvides CPU, RAM, GPU, power, thermal, network, disk I/O, and Thunderbolt bus information.\nUse when the user wants system stats, hardware monitoring, or performance metrics on Apple Silicon Macs.
How to use
Zainstaluj mactop za pomocą Homebrew, uruchamiając w terminalu polecenie
brew install mactop. Upewnij się, że ścieżka systemowa zawiera/usr/sbin, co jest wymagane do dostępu do narzędzi systemowych.Aby pobrać pełne metryki sprzętowe, wykonaj polecenie
mactop --format toon --headless --count 1. Wynik będzie zawierał wszystkie dostępne dane w formacie TOON — CPU, RAM, GPU, moc, temperaturę i inne parametry.Jeśli potrzebujesz konkretnej metryki, użyj filtrowania. Na przykład, aby sprawdzić użycie CPU, uruchom
mactop --format toon --headless --count 1 | grep "^cpu_usage:" | awk '{print $2}'. Analogicznie możesz wyodrębnić GPU (gpu_usage), temperaturę (SocTemp) czy stan termiczny (thermal_state).Do monitorowania zużycia energii użyj polecenia z filtrem na
TotalPower,CPUPowerlubGPUPower. Dla przepustowości sieci filtruj linie zawierająceInBytesPerSeciOutBytesPerSec.Jeśli chcesz wielokrotne próbkowanie, dostosuj opcję
--count N(liczba próbek) i--interval MS(interwał w milisekundach, domyślnie 1000). Na przykładmactop --format toon --headless --count 5 --interval 500pobierze 5 próbek co 500 ms.