Resource Monitoring

TermiPy provides a powerful resource monitoring feature that allows you to track system resource usage in real-time. This guide will explain how to use the resource monitoring commands and interpret the output.

Using the Resource Monitoring Command

To start monitoring system resources, use the following command:

@termipy >> resource

or

@termipy >> stats

Understanding the Output

The resource monitoring feature provides information on three key areas:

  1. System and Hardware Information
  2. Temperature and Battery
  3. Process and GPU Usage

System and Hardware Information

This section displays various system metrics, including:

  • OS information
  • CPU details
  • Total RAM
  • System uptime
  • CPU Usage (color-coded)
  • Memory Usage (color-coded)
  • Available Memory
  • Disk Usage (color-coded)
  • Free Disk Space
  • Network data sent and received

Example output:

┌────────────────────────────────────────────────────────────────────────────────┐
 System and Hardware Information                                                │
├────────────────────────────────────────────────────────────────────────────────┤
 OS: Windows                                                                    │
 CPU: 4 cores (8 threads)                                                       
 Total RAM: 16.00 GB                                                            │
 Uptime: 2d 3h 45m 30s                                                          │
 CPU Usage: 5.0%                                                                │
 Memory Usage: 60.0%                                                            │
 Available Memory: 6.40 GB                                                      │
 Disk Usage: 75.0%                                                              │
 Free Disk Space: 250.00 GB                                                     │
 Network Sent: 100.50 MB                                                        │
 Network Recv: 1024.75 MB                                                       │
└────────────────────────────────────────────────────────────────────────────────┘

Temperature and Battery

This section shows temperature information (if available) and battery status:

  • CPU Temperature (if available)
  • Battery percentage (if applicable)
  • Power status
  • Estimated battery time left (if applicable)

Example output:

┌────────────────────────────────────────────────────────────────────────────────┐
 Temperature and Battery                                                        │
├────────────────────────────────────────────────────────────────────────────────┤
 CPU Temp (coretemp): 45°C                                                      │
 Battery: 80.0%                                                                 │
 Power Plugged: No                                                              │
 Time Left: 3h 30m                                                              │
└────────────────────────────────────────────────────────────────────────────────┘

Process and GPU Usage

This section lists the top 5 CPU-consuming processes and GPU information (if available):

  • Process ID (PID)
  • Process Name
  • CPU Usage Percentage
  • GPU Name, Usage, Memory, and Temperature (if applicable)

Example output:

┌────────────────────────────────────────────────────────────────────────────────┐
 Process and GPU Usage                                                          │
├────────────────────────────────────────────────────────────────────────────────┤
 Process 1: PID: 1234   Name: chrome.exe       CPU: 10.5%                       │
 Process 2: PID: 5678   Name: python.exe       CPU: 5.2%                        │
 Process 3: PID: 9101   Name: explorer.exe     CPU: 2.1%                        │
 Process 4: PID: 1122   Name: vscode.exe       CPU: 1.8%                        │
 Process 5: PID: 3344   Name: spotify.exe      CPU: 1.5%                        │
 GPU 0: NVIDIA GeForce RTX 3080                                                 │
 GPU 0 Usage: 30.0%                                                             │
 GPU 0 Memory: 40.0%                                                            │
 GPU 0 Temperature: 65°C                                                        │
└────────────────────────────────────────────────────────────────────────────────┘

Continuous Monitoring

The resource monitoring feature updates every 2 seconds, providing a near real-time view of your system’s resource usage. The display is refreshed automatically, clearing the screen and showing the latest information.

To stop the monitoring, press Ctrl+C. You’ll see a message confirming that the monitoring has stopped:

Stopped monitoring resource usage.

Color Coding

The output uses color coding to help quickly identify resource usage levels:

  • Green: Low usage (0-49%)
  • Yellow: Moderate usage (50-79%)
  • Red: High usage (80-100%)

For temperatures: - Green: Cool (< 60°C) - Yellow: Warm (60-79°C) - Red: Hot (≥ 80°C)

Use Cases and Tips

[The existing Use Cases and Tips sections can remain as they are, as they are still applicable to the updated functionality.]