https://github.com/shearichard/parse-top-line
Parse output from the top utility and produce a more usefully structured output. Deal with multiple processes of interest.
https://github.com/shearichard/parse-top-line
memory-monitoring python top
Last synced: 3 months ago
JSON representation
Parse output from the top utility and produce a more usefully structured output. Deal with multiple processes of interest.
- Host: GitHub
- URL: https://github.com/shearichard/parse-top-line
- Owner: shearichard
- License: mit
- Created: 2021-07-25T05:14:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-25T23:08:22.000Z (almost 4 years ago)
- Last Synced: 2025-03-02T10:09:18.101Z (3 months ago)
- Topics: memory-monitoring, python, top
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ptl : Parse Top Line
Parses the output of the top utility when top has been run in batch mode. The end result is easier to make sense of for a human and better suited to later processing.
As it currently exists this project is very specific to my needs which centre upon comparing the memory usage of two different modes of running an executable. In one mode the executable is asked to do all the processing necessary in one go, in the second mode things are arranged so that the executable is asked to run three times and each time part of the necessary processing is completed. It's unlikely these are your requirements but perhaps this project might help you if you have related needs.
## configconstants File
The `ptl.py` module is dependent upon a module `configconstants.py` which is not saved in the repository.
The structure of that module is as follows and you may add whatever data is relevant to your needs.
```
DIRDATA='''../data/dirwithoutputin/'''
TOPLOGBASELINE='''top-output-baseline.log'''
TOPLOGSERIAL='''top-output-serial.log'''
```## Environment
This project makes use of pipenv, see the documentation for usage directions - https://pipenv.pypa.io/en/latest/basics/ .
This project has been tested against Python 3.7 and 3.8 on Ubuntu.