Paquete para ejecutar comandos y monitorear uso de CPU y memoria
Project description
CommandTracker
CommandTracker is a Python tool designed to execute a command and monitor its resource usage in real time. It tracks CPU and memory consumption, providing valuable performance metrics like average CPU load and peak memory usage. This tool is ideal for developers and system administrators looking to optimize the performance of commands or processes.
Features
- Monitor CPU and memory usage of any command.
- Real-time resource tracking during command execution.
- Provides performance statistics, including average CPU usage and peak memory consumption.
Installation
You can install CommandTracker via pip:
pip install CommandTracker
Usage
Once installed, you can use ctracker
to monitor a command’s resource usage:
ctracker monitor <command>
For example:
ctracker monitor php artisan calc --date=2024-01-01
Example Output:
Starting process with PID 12345...
Output of your command...
Process finished.
Total execution time: 10.25 seconds.
Resource usage statistics:
Average CPU usage: 35.67%
Maximum memory usage: 120.45 MB
Requirements
- Python 3.6+
- psutil library
Contributing
Feel free to contribute by submitting issues or pull requests. More features and optimizations will be added in future versions.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Future Enhancements
Planned features for future releases include:
• Generation of graphs to visualize resource usage.
• Historical logging of command execution.
• Automatic alerts if a process exceeds certain CPU or memory thresholds.
• Stress testing to simulate intensive workloads.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file commandtracker-0.1.3.tar.gz
.
File metadata
- Download URL: commandtracker-0.1.3.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23e22d4df9b8a35b9e72bf6165f46936c180912e91ca448ea22beee0de2eff44 |
|
MD5 | e080ea0ba1e1bbb5674224d15c84c3b8 |
|
BLAKE2b-256 | c37cf07a174cd710787bf9d8eadc1d670ca41c29add92e55c5767c40489f164f |
File details
Details for the file CommandTracker-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: CommandTracker-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c4a2dcd0a1d8db53a0c2b2beccb531ed6ce47980bbdce471e590724b703c117 |
|
MD5 | 9e2274144d117ba77c20358d038862a9 |
|
BLAKE2b-256 | c5047225884a7598cca214e2645e772563dbf2260aac47b2535512b32e5b7c66 |