Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmielech/cut
cpu usage tracker
https://github.com/pmielech/cut
Last synced: about 2 months ago
JSON representation
cpu usage tracker
- Host: GitHub
- URL: https://github.com/pmielech/cut
- Owner: pmielech
- Created: 2023-09-13T17:15:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-11T18:17:42.000Z (10 months ago)
- Last Synced: 2024-03-11T19:34:43.844Z (10 months ago)
- Language: C
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cpu Usage Tracker
The application allows the user to read the current CPU usage. The program utilizes the POSIX libraries available in the C programming language. The program reads data stored under the proc/stat path and calculates current usage based on this method. This application only applies to UNIX-based systems which use this path to inform about the system information fields.| macOS with debbug setting |Debian based linux distro |
|-----------------------------------------------------------------------------------------------------|-------------------------------|
| ![image](https://github.com/pmielech/cut/assets/95683261/fa9a6b5d-4c6f-49ee-88ca-46d6db22e0e0) |![image](https://github.com/pmielech/cut/assets/95683261/869d506a-301a-49aa-a061-e5a45f8046fe)|### **WARNING**
`Under the macOS, there is no such path as proc/stat. In the current situation, there is a DEBUG directive implemented to allow program debugging under that specific operational system. When run with DEBUG setting program uses the snapshot of that file located in the test_path directory.`### Threads
The project utilizes the PThreads library to run subsequently the next steps in the workflow. In addition, added a LOGGER thread to log additional info under the logs/ directory.PRINTER thread uses the ncurses library to display the collected data in a formatted manner. It refreshes only when the analyzer function completes Its job.
Currently implemented threads:
* LOGGER
* READER
* ANALYZER
* PRINTER
TODO:
* WATCHDOG