CPU Info is a simple CLI tool to monitor system metrics, including the number of CPU cores, CPU percentage, and load average. The tool utilizes the psutil
library to gather system information. This uses Python's optparse
module to parse command-line arguments.
- Python 3.x
- psutil library
To use the application, you can run the script with various options as follows:
cpuinfo -n # Print the number of CPU cores
cpuinfo -c # Print the CPU percentage
cpuinfo -l # Print the load average
cpuinfo -s # Continuously stream the values
cpuinfo -h # Print the help message
To install CPU Info CLI Tool, follow these steps
- Clone the repository
git clone https://github.com/ezhil56x/cpuinfo-cli.git
- Change the working directory
cd cpuinfo-cli
- Install the psutil library
pip install psutil
- Make the script executable
chmod +x cpuinfo
- Move the script to the bin directory
sudo mv cpuinfo /usr/bin
- Run the script with the help option
cpuinfo -h