Skip to content

A script that monitors the CPU temperature of a Raspberry Pi and logs system information. If the temperature exceeds a specified threshold, the script logs the information about open processes, CPU usage, temperature, uptime, and then shuts down the Raspberry Pi to prevent overheating.

License

Notifications You must be signed in to change notification settings

scoxfield/rpi-temp-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rpi-temp-monitor

A script that monitors the CPU temperature of a Raspberry Pi and logs system information. If the temperature exceeds a specified threshold, the script logs information about open processes, CPU usage, current temperature, and system uptime, and then shuts down the Raspberry Pi to prevent overheating.

Background

This mini project was started because I don't have a fan or a heatsink for my Raspberry Pi processor, and I don't want it to overheat.

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/scoxfield/rpi-temp-monitor
    cd rpi-temp-monitor
  2. Run the setup script:

    sudo ./setup.sh

    During the setup, you will be prompted to enter the interval (in seconds) at which the script checks the temperature. If not specified, the default is 60 seconds.

  3. Run the temperature monitor script directly (optional):

    If you prefer not to use the setup script, you can run the temp_monitor.sh script directly with a specified interval:

    ./temp_monitor.sh <interval_in_seconds>

    Replace <interval_in_seconds> with the wanted interval.

Usage

The temperature monitor service will automatically start on boot and check the temperature at the specified interval. If you need to change the interval, you can modify the service file or rerun the setup script with a new interval.

Uninstall Instructions

Run the uninstall script to remove the temperature monitor service:

sudo ./uninstall.sh

About

A script that monitors the CPU temperature of a Raspberry Pi and logs system information. If the temperature exceeds a specified threshold, the script logs the information about open processes, CPU usage, temperature, uptime, and then shuts down the Raspberry Pi to prevent overheating.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages