Giter Site home page Giter Site logo

albertus82 / raspberrypi-cpu-logger Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 192 KB

Send Raspberry Pi CPU frequency and temperature to ThingSpeak.

License: MIT License

Java 96.48% Shell 3.52%
raspberrypi raspberry-pi thingspeak logger log cpu-monitoring cpu-temperature cpu-frequency frequency temperature

raspberrypi-cpu-logger's Introduction

Raspberry Pi CPU Logger

Build Known Vulnerabilities

Log Raspberry Pi CPU frequency and temperature to ThingSpeak.

Requirements

  • Java Runtime Environment 11 (either OpenJDK 11 included in Raspbian Buster or BellSoft Liberica JRE 11 is good)
  • ThingSpeak account (available for free)

Download

git clone https://github.com/albertus82/raspberrypi-cpu-logger.git

Configuration

Put the Write API Key associated with your ThingSpeak channel (e.g. 1234567890ABCDEF) into a text file named api.key in the conf directory.

Usage

Launch the program via the shell script start.sh and use CTRL+C to terminate, or install the program as a service.

Example

⚠️ Don't forget to replace WRITE_API_KEY with your actual ThingSpeak Write API Key!

git clone https://github.com/albertus82/raspberrypi-cpu-logger.git
cd raspberrypi-cpu-logger
 echo WRITE_API_KEY > conf/api.key
./start.sh

Install as a service

⚠️ Don't forget to replace WRITE_API_KEY with your actual ThingSpeak Write API Key!

cd /opt
sudo git clone https://github.com/albertus82/raspberrypi-cpu-logger.git
cd raspberrypi-cpu-logger
 echo WRITE_API_KEY | sudo tee conf/api.key
sudo chmod 640 conf/api.key
printf '[Unit]\nDescription=CPU Logger\nAfter=network.target\n\n[Service]\nExecStart=/opt/raspberrypi-cpu-logger/start.sh\nUser=root\nTimeoutStopSec=5min\n\n[Install]\nWantedBy=multi-user.target\n' | sudo tee /etc/systemd/system/raspberrypi-cpu-logger.service
sudo systemctl enable raspberrypi-cpu-logger
sudo service raspberrypi-cpu-logger restart

raspberrypi-cpu-logger's People

Contributors

albertus82 avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.