Skip to content
Snippets Groups Projects
Commit d3949f4f authored by Jakub Pelka's avatar Jakub Pelka :cat2:
Browse files

Update readme, fix formatting

parent 78f552ad
No related branches found
No related tags found
No related merge requests found
......@@ -23,16 +23,22 @@ sudo make install # installs to /usr/local/bin
osx-cpu-temp
```
### Using clib
### Usage in Telegraf
```bash
clib install lavoiesl/osx-cpu-temp
```conf
[[inputs.exec]]
commands = [
"/opt/osx-cpu-temp"
]
timeout = "60s"
data_format = "influx"
```
### Output example
```
macsensor,host=MacBook-Pro.local cputemp=54.250000,gputemp=50.750000,ssdtemp=41.960938,ramtemp=55.062500,pchtemp=53.000000,wiftemp=56.187500,igptemp=55.000000,cc0temp=51.000000,cc1temp=53.000000,cc2temp=52.000000,cc3temp=52.000000,cc4temp=54.000000,cc5temp=52.000000,
macsensor,host=MacBook-Pro.local b=1,cputemp=54.250000,gputemp=50.750000,ssdtemp=41.960938,ramtemp=55.062500,pchtemp=53.000000,wiftemp=56.187500,igptemp=55.000000,cc0temp=51.000000,cc1temp=53.000000,cc2temp=52.000000,cc3temp=52.000000,cc4temp=54.000000,cc5temp=52.000000
```
## Maintainer
......
......@@ -197,10 +197,10 @@ int main()
SMCOpen();
printf("macsensor,host=%s ", hostname);
printf("macsensor,host=%s b=1", hostname);
for (size_t i = 0; i < sizeof(keys) / sizeof(keys[0]); i++) {
double temperature = SMCGetTemperature(keys[i]);
printf("%s=%f,", names[i], temperature);
printf(",%s=%f", names[i], temperature);
}
printf("\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment