Created
July 10, 2024 22:11
-
-
Save AdeshAtole/f038442c3a2d44d5b04868e2d3d4d3dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// All SMC temperature, voltage, current, and power keys | |
// Set up keys and human-readable names for keys | |
smcTempKeys = [[NSArray alloc] initWithObjects: @"TCXC", @"TCXc", @"TC0P", @"TC0H", @"TC0D", @"TC0E", @"TC0F", @"TC1C", @"TC2C", @"TC3C", @"TC4C", @"TC5C", @"TC6C", @"TC7C", @"TC8C", @"TCAH", @"TCAD", @"TC1P", @"TC1H", @"TC1D", @"TC1E", @"TC1F", @"TCBH", @"TCBD", @"TCSC", @"TCSc", @"TCSA", @"TCGC", @"TCGc", @"TG0P", @"TG0D", @"TG1D", @"TG0H", @"TG1H", @"Ts0S", @"TM0P", @"TM1P", @"TM8P", @"TM9P", @"TM0S", @"TM1S", @"TM8S", @"TM9S", @"TN0D", @"TN0P", @"TN1P", @"TN0C", @"TN0H", @"TP0D", @"TPCD", @"TP0P", @"TA0P", @"TA1P", @"Th0H", @"Th1H", @"Th2H", @"Tm0P", @"Tp0P", @"Ts0P", @"Tb0P", @"TL0P", @"TW0P", @"TH0P", @"TH1P", @"TH2P", @"TH3P", @"TO0P", @"Tp0P", @"Tp0C", @"TB0T", @"TB1T", @"TB2T", @"TB3T", @"Tp1P", @"Tp1C", @"Tp2P", @"Tp3P", @"Tp4P", @"Tp5P", @"TS0C", @"TA0S", @"TA1S", @"TA2S", @"TA3S", nil]; | |
smcVoltageKeys = [[NSArray alloc] initWithObjects:@"VC0C", @"VC1C", @"VC2C", @"VC3C", @"VC4C", @"VC5C", @"VC6C", @"VC7C", @"VV1R", @"VG0C", @"VM0R", @"VN1R", @"VN0C", @"VD0R", @"VD5R", @"VP0R", @"Vp0C", @"VV2S", @"VR3R", @"VV1S", @"VH05", @"VV9S", @"VD2R", @"VV7S", @"VV3S", @"VV8S", @"VeES", @"VBAT", @"Vb0R", nil]; | |
smcCurrentKeys = [[NSArray alloc] initWithObjects:@"IC0C", @"IC1C", @"IC2C", @"IC0R", @"IC5R", @"IC8R", @"IC0G", @"IC0M", @"IG0C", @"IM0C", @"IM0R", @"IN0C", @"ID0R", @"ID5R", @"IO0R", @"IB0R", @"IPBR", nil]; | |
smcPowerKeys = [[NSArray alloc] initWithObjects:@"PC0C", @"PC1C", @"PC2C", @"PC3C", @"PC4C", @"PC5C", @"PC6C", @"PC7C", @"PCPC", @"PCPG", @"PCPD", @"PCTR", @"PCPL", @"PC1R", @"PC5R", @"PGTR", @"PG0R", @"PM0R", @"PN0C", @"PN1R", @"PC0R", @"PD0R", @"PD5R", @"PH02", @"PH05", @"Pp0R", @"PD2R", @"PO0R", @"PBLC", @"PB0R", @"PDTR", @"PSTR", nil]; | |
NSMutableDictionary *smcKeyHumanReadableNames = [[NSMutableDictionary alloc] init]; | |
[smcKeyHumanReadableNames setValue:@"PECI CPU" forKey:@"TCXC"]; | |
[smcKeyHumanReadableNames setValue:@"PECI CPU" forKey:@"TCXc"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 1 Proximity" forKey:@"TC0P"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 1 Heatsink" forKey:@"TC0H"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 1 Package" forKey:@"TC0D"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 1" forKey:@"TC0E"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 1" forKey:@"TC0F"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 1" forKey:@"TC1C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 2" forKey:@"TC2C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 3" forKey:@"TC3C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 4" forKey:@"TC4C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 5" forKey:@"TC5C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 6" forKey:@"TC6C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 7" forKey:@"TC7C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 8" forKey:@"TC8C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 1 Heatsink Alt." forKey:@"TCAH"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 1 Package Alt." forKey:@"TCAD"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 2 Proximity" forKey:@"TC1P"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 2 Heatsink" forKey:@"TC1H"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 2 Package" forKey:@"TC1D"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 2" forKey:@"TC1E"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 2" forKey:@"TC1F"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 2 Heatsink Alt." forKey:@"TCBH"]; | |
[smcKeyHumanReadableNames setValue:@"CPU 2 Package Alt." forKey:@"TCBD"]; | |
[smcKeyHumanReadableNames setValue:@"PECI SA" forKey:@"TCSC"]; | |
[smcKeyHumanReadableNames setValue:@"PECI SA" forKey:@"TCSc"]; | |
[smcKeyHumanReadableNames setValue:@"PECI SA" forKey:@"TCSA"]; | |
[smcKeyHumanReadableNames setValue:@"PECI GPU" forKey:@"TCGC"]; | |
[smcKeyHumanReadableNames setValue:@"PECI GPU" forKey:@"TCGc"]; | |
[smcKeyHumanReadableNames setValue:@"GPU Proximity" forKey:@"TG0P"]; | |
[smcKeyHumanReadableNames setValue:@"GPU Die" forKey:@"TG0D"]; | |
[smcKeyHumanReadableNames setValue:@"GPU Die" forKey:@"TG1D"]; | |
[smcKeyHumanReadableNames setValue:@"GPU Heatsink" forKey:@"TG0H"]; | |
[smcKeyHumanReadableNames setValue:@"GPU Heatsink" forKey:@"TG1H"]; | |
[smcKeyHumanReadableNames setValue:@"Memory Proximity" forKey:@"Ts0S"]; | |
[smcKeyHumanReadableNames setValue:@"Mem Bank A1" forKey:@"TM0P"]; | |
[smcKeyHumanReadableNames setValue:@"Mem Bank A2" forKey:@"TM1P"]; | |
[smcKeyHumanReadableNames setValue:@"Mem Bank B1" forKey:@"TM8P"]; | |
[smcKeyHumanReadableNames setValue:@"Mem Bank B2" forKey:@"TM9P"]; | |
[smcKeyHumanReadableNames setValue:@"Mem Module A1" forKey:@"TM0S"]; | |
[smcKeyHumanReadableNames setValue:@"Mem Module A2" forKey:@"TM1S"]; | |
[smcKeyHumanReadableNames setValue:@"Mem Module B1" forKey:@"TM8S"]; | |
[smcKeyHumanReadableNames setValue:@"Mem Module B2" forKey:@"TM9S"]; | |
[smcKeyHumanReadableNames setValue:@"Northbridge Die" forKey:@"TN0D"]; | |
[smcKeyHumanReadableNames setValue:@"Northbridge Proximity 1" forKey:@"TN0P"]; | |
[smcKeyHumanReadableNames setValue:@"Northbridge Proximity 2" forKey:@"TN1P"]; | |
[smcKeyHumanReadableNames setValue:@"MCH Die" forKey:@"TN0C"]; | |
[smcKeyHumanReadableNames setValue:@"MCH Heatsink" forKey:@"TN0H"]; | |
[smcKeyHumanReadableNames setValue:@"PCH Die" forKey:@"TP0D"]; | |
[smcKeyHumanReadableNames setValue:@"PCH Die" forKey:@"TPCD"]; | |
[smcKeyHumanReadableNames setValue:@"PCH Proximity" forKey:@"TP0P"]; | |
[smcKeyHumanReadableNames setValue:@"Airflow 1" forKey:@"TA0P"]; | |
[smcKeyHumanReadableNames setValue:@"Airflow 2" forKey:@"TA1P"]; | |
[smcKeyHumanReadableNames setValue:@"Heatpipe 1" forKey:@"Th0H"]; | |
[smcKeyHumanReadableNames setValue:@"Heatpipe 2" forKey:@"Th1H"]; | |
[smcKeyHumanReadableNames setValue:@"Heatpipe 3" forKey:@"Th2H"]; | |
[smcKeyHumanReadableNames setValue:@"Mainboard Proximity" forKey:@"Tm0P"]; | |
[smcKeyHumanReadableNames setValue:@"Powerboard Proximity" forKey:@"Tp0P"]; | |
[smcKeyHumanReadableNames setValue:@"Palm Rest" forKey:@"Ts0P"]; | |
[smcKeyHumanReadableNames setValue:@"BLC Proximity" forKey:@"Tb0P"]; | |
[smcKeyHumanReadableNames setValue:@"LCD Proximity" forKey:@"TL0P"]; | |
[smcKeyHumanReadableNames setValue:@"Airport Proximity" forKey:@"TW0P"]; | |
[smcKeyHumanReadableNames setValue:@"HDD Bay 1" forKey:@"TH0P"]; | |
[smcKeyHumanReadableNames setValue:@"HDD Bay 2" forKey:@"TH1P"]; | |
[smcKeyHumanReadableNames setValue:@"HDD Bay 3" forKey:@"TH2P"]; | |
[smcKeyHumanReadableNames setValue:@"HDD Bay 4" forKey:@"TH3P"]; | |
[smcKeyHumanReadableNames setValue:@"Optical Drive" forKey:@"TO0P"]; | |
[smcKeyHumanReadableNames setValue:@"Battery TS_MAX" forKey:@"TB0T"]; | |
[smcKeyHumanReadableNames setValue:@"Battery 1" forKey:@"TB1T"]; | |
[smcKeyHumanReadableNames setValue:@"Battery 2" forKey:@"TB2T"]; | |
[smcKeyHumanReadableNames setValue:@"Battery" forKey:@"TB3T"]; | |
[smcKeyHumanReadableNames setValue:@"Power Supply 1" forKey:@"Tp0P"]; | |
[smcKeyHumanReadableNames setValue:@"Power Supply 1 Alt." forKey:@"Tp0C"]; | |
[smcKeyHumanReadableNames setValue:@"Power Supply 2" forKey:@"Tp1P"]; | |
[smcKeyHumanReadableNames setValue:@"Power Supply 2 Alt." forKey:@"Tp1C"]; | |
[smcKeyHumanReadableNames setValue:@"Power Supply 3" forKey:@"Tp2P"]; | |
[smcKeyHumanReadableNames setValue:@"Power Supply 4" forKey:@"Tp3P"]; | |
[smcKeyHumanReadableNames setValue:@"Power Supply 5" forKey:@"Tp4P"]; | |
[smcKeyHumanReadableNames setValue:@"Power Supply 6" forKey:@"Tp5P"]; | |
[smcKeyHumanReadableNames setValue:@"Expansion Slots" forKey:@"TS0C"]; | |
[smcKeyHumanReadableNames setValue:@"PCI Slot 1 Pos 1" forKey:@"TA0S"]; | |
[smcKeyHumanReadableNames setValue:@"PCI Slot 1 Pos 2" forKey:@"TA1S"]; | |
[smcKeyHumanReadableNames setValue:@"PCI Slot 2 Pos 1" forKey:@"TA2S"]; | |
[smcKeyHumanReadableNames setValue:@"PCI Slot 2 Pos 2" forKey:@"TA3S"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 1" forKey:@"VC0C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 2" forKey:@"VC1C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 3" forKey:@"VC2C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 4" forKey:@"VC3C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 5" forKey:@"VC4C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 6" forKey:@"VC5C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 7" forKey:@"VC6C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 8" forKey:@"VC7C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU VTT" forKey:@"VV1R"]; | |
[smcKeyHumanReadableNames setValue:@"GPU Core" forKey:@"VG0C"]; | |
[smcKeyHumanReadableNames setValue:@"Memory" forKey:@"VM0R"]; | |
[smcKeyHumanReadableNames setValue:@"PCH" forKey:@"VN1R"]; | |
[smcKeyHumanReadableNames setValue:@"MCH" forKey:@"VN0C"]; | |
[smcKeyHumanReadableNames setValue:@"Mainboard S0 Rail" forKey:@"VD0R"]; | |
[smcKeyHumanReadableNames setValue:@"Mainboard S5 Rail" forKey:@"VD5R"]; | |
[smcKeyHumanReadableNames setValue:@"12V Rail" forKey:@"VP0R"]; | |
[smcKeyHumanReadableNames setValue:@"12V Vcc" forKey:@"Vp0C"]; | |
[smcKeyHumanReadableNames setValue:@"Main 3V" forKey:@"VV2S"]; | |
[smcKeyHumanReadableNames setValue:@"Main 3.3V" forKey:@"VR3R"]; | |
[smcKeyHumanReadableNames setValue:@"Main 5V" forKey:@"VV1S"]; | |
[smcKeyHumanReadableNames setValue:@"Main 5V" forKey:@"VH05"]; | |
[smcKeyHumanReadableNames setValue:@"Main 12V" forKey:@"VV9S"]; | |
[smcKeyHumanReadableNames setValue:@"Main 12V" forKey:@"VD2R"]; | |
[smcKeyHumanReadableNames setValue:@"Auxiliary 3V" forKey:@"VV7S"]; | |
[smcKeyHumanReadableNames setValue:@"Standby 3V" forKey:@"VV3S"]; | |
[smcKeyHumanReadableNames setValue:@"Standby 5V" forKey:@"VV8S"]; | |
[smcKeyHumanReadableNames setValue:@"PCIe 12V" forKey:@"VeES"]; | |
[smcKeyHumanReadableNames setValue:@"Battery" forKey:@"VBAT"]; | |
[smcKeyHumanReadableNames setValue:@"CMOS Battery" forKey:@"Vb0R"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core" forKey:@"IC0C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU VccIO" forKey:@"IC1C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU VccSA" forKey:@"IC2C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Rail" forKey:@"IC0R"]; | |
[smcKeyHumanReadableNames setValue:@"CPU DRAM" forKey:@"IC5R"]; | |
[smcKeyHumanReadableNames setValue:@"CPU PLL" forKey:@"IC8R"]; | |
[smcKeyHumanReadableNames setValue:@"CPU GFX" forKey:@"IC0G"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Memory" forKey:@"IC0M"]; | |
[smcKeyHumanReadableNames setValue:@"GPU Rail" forKey:@"IG0C"]; | |
[smcKeyHumanReadableNames setValue:@"Memory Controller" forKey:@"IM0C"]; | |
[smcKeyHumanReadableNames setValue:@"Memory Rail" forKey:@"IM0R"]; | |
[smcKeyHumanReadableNames setValue:@"MCH" forKey:@"IN0C"]; | |
[smcKeyHumanReadableNames setValue:@"Mainboard S0 Rail" forKey:@"ID0R"]; | |
[smcKeyHumanReadableNames setValue:@"Mainboard S5 Rail" forKey:@"ID5R"]; | |
[smcKeyHumanReadableNames setValue:@"Misc. Rail" forKey:@"IO0R"]; | |
[smcKeyHumanReadableNames setValue:@"Battery Rail" forKey:@"IB0R"]; | |
[smcKeyHumanReadableNames setValue:@"Charger BMON" forKey:@"IPBR"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 1" forKey:@"PC0C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 2" forKey:@"PC1C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 3" forKey:@"PC2C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 4" forKey:@"PC3C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 5" forKey:@"PC4C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 6" forKey:@"PC5C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 7" forKey:@"PC6C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Core 8" forKey:@"PC7C"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Cores" forKey:@"PCPC"]; | |
[smcKeyHumanReadableNames setValue:@"CPU GFX" forKey:@"PCPG"]; | |
[smcKeyHumanReadableNames setValue:@"CPU DRAM" forKey:@"PCPD"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Total" forKey:@"PCTR"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Total" forKey:@"PCPL"]; | |
[smcKeyHumanReadableNames setValue:@"CPU Rail" forKey:@"PC1R"]; | |
[smcKeyHumanReadableNames setValue:@"CPU S0 Rail" forKey:@"PC5R"]; | |
[smcKeyHumanReadableNames setValue:@"GPU Total" forKey:@"PGTR"]; | |
[smcKeyHumanReadableNames setValue:@"GPU Rail" forKey:@"PG0R"]; | |
[smcKeyHumanReadableNames setValue:@"Memory Rail" forKey:@"PM0R"]; | |
[smcKeyHumanReadableNames setValue:@"MCH" forKey:@"PN0C"]; | |
[smcKeyHumanReadableNames setValue:@"PCH Rail" forKey:@"PN1R"]; | |
[smcKeyHumanReadableNames setValue:@"Mainboard S0 Rail" forKey:@"PC0R"]; | |
[smcKeyHumanReadableNames setValue:@"Mainboard S0 Rail" forKey:@"PD0R"]; | |
[smcKeyHumanReadableNames setValue:@"Mainboard S5 Rail" forKey:@"PD5R"]; | |
[smcKeyHumanReadableNames setValue:@"Main 3.3V Rail" forKey:@"PH02"]; | |
[smcKeyHumanReadableNames setValue:@"Main 5V Rail" forKey:@"PH05"]; | |
[smcKeyHumanReadableNames setValue:@"12V Rail" forKey:@"Pp0R"]; | |
[smcKeyHumanReadableNames setValue:@"Main 12V Rail" forKey:@"PD2R"]; | |
[smcKeyHumanReadableNames setValue:@"Misc. Rail" forKey:@"PO0R"]; | |
[smcKeyHumanReadableNames setValue:@"Battery Rail" forKey:@"PBLC"]; | |
[smcKeyHumanReadableNames setValue:@"Battery Rail" forKey:@"PB0R"]; | |
[smcKeyHumanReadableNames setValue:@"DC In Total" forKey:@"PDTR"]; | |
[smcKeyHumanReadableNames setValue:@"System Total" forKey:@"PSTR"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment