-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.js
67 lines (65 loc) · 1.61 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
var smc = require('./build/Release/smc');
var metrics = {
TA0P: 'Ambient temperature',
TA0p: 'Ambient temperature',
TA1P: 'Ambient temperature',
TA1p: 'Ambient temperature',
TA0S: 'PCI Slot 1 Pos 1',
TA1S: 'PCI Slot 1 Pos 2',
TA2S: 'PCI Slot 2 Pos 1',
TA3S: 'PCI Slot 2 Pos 2',
Tb0P: 'BLC Proximity',
TB0T: 'Battery TS_MAX',
TB1T: 'Battery 1',
TB2T: 'Battery 2',
TB3T: 'Battery 3',
TC0C: 'CPU 0 Core',
TC0D: 'CPU 0 Die',
TCXC: 'PECI CPU',
TCXc: 'PECI CPU',
TC0E: 'CPU 0 ??',
TC0F: 'CPU 0 ??',
TC0G: 'CPU 0 ??',
TC0H: 'CPU 0 Heatsink',
TC0J: 'CPU 0 ??',
TC0P: 'CPU 0 Proximity',
TC1C: 'Core 1',
TC2C: 'Core 2',
TC3C: 'Core 3',
TC4C: 'Core 4',
TC5C: 'Core 5',
TC6C: 'Core 6',
TC7C: 'Core 7',
TC8C: 'Core 8',
TCGC: 'PECI GPU',
TCGc: 'PECI GPU',
TCSC: 'PECI SA',
TCSc: 'PECI SA',
TCSA: 'PECI SA',
TG0H: 'GPU 0 Heatsink',
TG0P: 'GPU 0 Proximity',
TG0D: 'GPU 0 Die',
TG1D: 'GPU 1 Die',
TG1H: 'GPU 1 Heatsink',
TH0P: 'Harddisk 0 Proximity',
Th1H: 'NB/CPU/GPU HeatPipe 1 Proximity',
TL0P: 'LCD Proximity',
TM0P: 'Memory Slot Proximity',
TM0S: 'Memory Slot 1',
Tm0p: 'Misc (clock chip) Proximity',
TO0P: 'Optical Drive Proximity',
Tp0P: 'PowerSupply Proximity',
TPCD: 'Platform Controller Hub Die',
TS0C: 'Expansion slots',
Ts0P: 'Palm rest L',
Ts0S: 'Memory Bank Proximity',
Ts1p: 'Palm rest R',
TW0P: 'AirPort Proximity'
};
module.exports = {
cpuTemperature: function (i) { return smc.get('TC'+i+'C'); },
fanRpm: function (i) { return smc.get('F'+i+'Ac'); },
fans: function() { return smc.get('FNum'); },
get: smc.get,
metrics,
};