Hardware monitoring
August 21, 2024 ยท View on GitHub
Hardware monitoring
labml.ai app can be used to monitor hardware.
You can use it to monitor hardware usage even if you are not training models.
Installation
You need to install our python package and some dependencies to start monitoring.
pip install labml psutil py3nvml
psutilis the package we use to track hardware (labmldoesn't install it as a dependency).- To monitor GPUs (nvidia) you need to install
py3nvmlpackage as well.
If you have problems with your Python environment you can use our guide to setting up Python with conda locally, or on a remote computer.
Configs
You can set the url of the server in ~/.labml/configs.yaml.
app_url: https://hosted-labml-app.com/api/v1/computer
Note that the & at the end is important.
Start monitoring
Once it's installed you can just run the following command to start monitoring. You will get a url to view the hardware usage.
labml monitor
You can also run it with nohup if you want it to run in the background on a remote computer.
nohup labml monitor &
Setting up a service to monitor
You can setup a systemd service to monitor your computer.
This will make sure your computer gets monitored in the background and the service should start upon computer restarts.
labml service
Above command will setup the service and show you how to start/stop the service.