Documentation
¶
Overview ¶
Copyright (c) 2024-2026 Carsen Klock under MIT License mactop is a simple terminal based Apple Silicon power monitor written in Go Lang! github.com/context-labs/mactop
Copyright (c) 2024-2026 Carsen Klock under MIT License ioreport.go - Go wrappers for IOReport power/thermal metrics
Index ¶
- Constants
- Variables
- func GetCPUPercentages() ([]float64, error)
- func GetProcessTextColor(isCurrentUser bool) string
- func GetThemeColor(colorName string) ui.Color
- func GetThemeColorWithLightMode(colorName string, lightMode bool) ui.Color
- func Run()
- func StderrToLogfile(logfile *os.File)
- type AppConfig
- type CPUCoreWidget
- type CPUMetrics
- type CPUUsage
- type EventThrottler
- type GPUMetrics
- type MemoryMetrics
- type NetDiskMetrics
- type ProcessMetrics
- type ProcessTimeState
- type SocMetrics
- type SystemInfo
- type VolumeInfo
Constants ¶
View Source
const ( LayoutDefault = "default" LayoutAlternative = "alternative" LayoutAlternativeFull = "alternative_full" LayoutVertical = "vertical" LayoutCompact = "compact" LayoutDashboard = "dashboard" LayoutGaugesOnly = "gauges_only" )
Variables ¶
View Source
var ( BracketColor ui.Color = ui.ColorWhite SecondaryTextColor ui.Color = 245 IsLightMode bool = false )
View Source
var (
PowerChart, NetworkInfo *w.Paragraph
)
Functions ¶
func GetCPUPercentages ¶
func GetProcessTextColor ¶
func GetThemeColor ¶
func StderrToLogfile ¶
Types ¶
type CPUCoreWidget ¶
func NewCPUCoreWidget ¶
func NewCPUCoreWidget(modelInfo SystemInfo) *CPUCoreWidget
func (*CPUCoreWidget) Draw ¶
func (w *CPUCoreWidget) Draw(buf *ui.Buffer)
func (*CPUCoreWidget) UpdateUsage ¶
func (w *CPUCoreWidget) UpdateUsage(usage []float64)
type CPUMetrics ¶
type CPUMetrics struct {
EClusterActive, EClusterFreqMHz, PClusterActive, PClusterFreqMHz int
ECores, PCores []int
CoreMetrics map[string]int
ANEW, CPUW, GPUW, DRAMW, GPUSRAMW, PackageW, SystemW float64
CoreUsages []float64
Throttled bool
CPUTemp float64
GPUTemp float64
}
func NewCPUMetrics ¶
func NewCPUMetrics() CPUMetrics
type CPUUsage ¶
func GetCPUUsage ¶
type EventThrottler ¶
type EventThrottler struct {
C chan struct{}
// contains filtered or unexported fields
}
func NewEventThrottler ¶
func NewEventThrottler(gracePeriod time.Duration) *EventThrottler
func (*EventThrottler) Notify ¶
func (e *EventThrottler) Notify()
type GPUMetrics ¶
type MemoryMetrics ¶
type NetDiskMetrics ¶
type NetDiskMetrics struct {
OutPacketsPerSec float64 `json:"out_packets_per_sec"`
OutBytesPerSec float64 `json:"out_bytes_per_sec"`
InPacketsPerSec float64 `json:"in_packets_per_sec"`
InBytesPerSec float64 `json:"in_bytes_per_sec"`
ReadOpsPerSec float64 `json:"read_ops_per_sec"`
WriteOpsPerSec float64 `json:"write_ops_per_sec"`
ReadKBytesPerSec float64 `json:"read_kbytes_per_sec"`
WriteKBytesPerSec float64 `json:"write_kbytes_per_sec"`
}
type ProcessMetrics ¶
type ProcessTimeState ¶
type SocMetrics ¶
type SocMetrics struct {
CPUPower float64 `json:"cpu_power"`
GPUPower float64 `json:"gpu_power"`
ANEPower float64 `json:"ane_power"`
DRAMPower float64 `json:"dram_power"`
GPUSRAMPower float64 `json:"gpu_sram_power"`
SystemPower float64 `json:"system_power"`
TotalPower float64 `json:"total_power"`
GPUFreqMHz int32 `json:"gpu_freq_mhz"`
GPUActive float64 `json:"-"`
SocTemp float32 `json:"soc_temp"`
CPUTemp float32 `json:"cpu_temp"`
GPUTemp float32 `json:"gpu_temp"`
}
type SystemInfo ¶
Click to show internal directories.
Click to hide internal directories.