https://github.com/ezhil56x/cpuinfo-cli
CLI tool for real-time CPU monitoring and load average display.
https://github.com/ezhil56x/cpuinfo-cli
cli cli-tools command-line-tool cpuinfo
Last synced: about 2 months ago
JSON representation
CLI tool for real-time CPU monitoring and load average display.
- Host: GitHub
- URL: https://github.com/ezhil56x/cpuinfo-cli
- Owner: ezhil56x
- License: mit
- Created: 2023-08-02T13:18:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-02T13:18:53.000Z (almost 3 years ago)
- Last Synced: 2025-02-23T03:48:59.829Z (over 1 year ago)
- Topics: cli, cli-tools, command-line-tool, cpuinfo
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CPU Info CLI Tool
## Introduction
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.
## Requirements
- Python 3.x
- psutil library
## Usage
To use the application, you can run the script with various options as follows:
```bash
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
```
## Installation
To install CPU Info CLI Tool, follow these steps
1. Clone the repository
```bash
git clone https://github.com/ezhil56x/cpuinfo-cli.git
```
2. Change the working directory
```bash
cd cpuinfo-cli
```
3. Install the psutil library
```bash
pip install psutil
```
4. Make the script executable
```bash
chmod +x cpuinfo
```
5. Move the script to the bin directory
```bash
sudo mv cpuinfo /usr/bin
```
6. Run the script with the help option
```bash
cpuinfo -h
```