This script monitors your computer's hardware (CPU, SSD, GPU, and RAM) and notifies you of any changes. It's designed to help maintain the integrity of your computer's hardware.
- Python: Python must be installed on your system. You can download it from python.org.
- Dependencies: This script uses
psutil
,GPUtil
, andplyer
. These libraries need to be installed via pip.
If you don't have Python installed, download and install it from python.org. Make sure to add Python to your PATH during installation.
Download device_monitor.py
from our shared drive and place it in a directory on your computer.
Open a terminal (Command Prompt or PowerShell on Windows, Terminal on MacOS/Linux) and execute the following command:
pip install psutil GPUtil plyer
To run the script manually, follow these steps:
- Open a terminal.
- On Windows, you can use Command Prompt or PowerShell.
- On MacOS or Linux, use the Terminal application.
- Navigate to the directory where
device_monitor.py
is located. You can use thecd
command followed by the path to the directory. For example:
cd path/to/directory
- Execute the script by running:
python device_monitor.py
This will compare your current hardware configuration against the baseline. If it's the first run, the script will create a baseline for future comparisons.
To schedule the script to run hourly:
- Open a terminal.
- Type
crontab -e
and press Enter to edit the crontab. - Add the following line:
0 * * * * /usr/bin/python /path/to/device_monitor.py
Replace /usr/bin/python
with the path to your Python executable and /path/to/device_monitor.py
with the full path to the script.
- Save and exit the editor. The script will now run automatically every hour.
To schedule the script using Task Scheduler:
- Open Task Scheduler.
- Create a new task with the following settings:
- Trigger: Choose to run the task hourly.
- Action: Set to 'Start a program'.
- Program/script: Enter the path to your Python executable.
- Add arguments: Enter the path to
device_monitor.py
. - Start in: Specify the directory where
device_monitor.py
is located.
- Save the task. The script will now execute at the specified hourly interval.
When the script detects a change in hardware, it will display a notification on your computer. Make sure your system notifications are enabled to receive these alerts.