Skip to main content

topa

topa - Top Output Python Analyzer

A command line app to analyze linux top command output.

It will shows you below information for each and every pid in the log file or the pids you specified by adding -p parameter:

  • Total record count
  • Max Cpu
  • Min Cpu
  • Average Cpu
  • Max Mem
  • Min Mem
  • Average Mem

Install

pip install topa

Usage

topa -h(--help)
Usage: topa [OPTIONS] FILENAME

  TOPA - Top Output Python Analyzer

  A python cli application to analyze standard linux top output

Options:
  -p, --pid INTEGER       The pid list to be analyzed
  -o, --out [STD|MD|PDF]  The analyze report file format  [default: STD]
  -h, --help              Show this message and exit.

PDF are not supported yet.

Sample output

topa top.log -p 2476
   _               _ __
  | |_     ___    | '_ \  __ _
  |  _|   / _ \   | .__/ / _` |
  _\__|   \___/   |_|__  \__,_|
_|"""""|_|"""""|_|"""""|_|"""""|
"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'  1.0.1, by https://github.com/jwenjian/topa
# Reading
Reading top.log  [####################################]  100%

# Report
Report of `1` process(es) ready in below

## Pid = 2476
Total record count = 17261
Max CPU = 47.4%
Min CPU = 9.4%
Avg CPU = 15.69%
Max MEM = 11.1%
Min MEM = 7.4%
Avg MEM = 10.34%

Note:

  1. The progress bar when reading Reading top.log [####################################] 100% may not displayed if your output files are too small and topa process it too fast, this is the limitation of click

Metadata

Release files for topa 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for topa 1.0.1
File Size Uploaded
topa-1.0.1.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for topa 1.0.1
File Interpreter ABI Platform
topa-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.6 kB

Release files / topa-1.0.1.tar.gz

Download URL topa-1.0.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0f989c90c753955566e81bfad9ed643ecf2595f8c9c3ea85c6de80e77669e580
BLAKE2b-256 checksum
How to use checksums
75910beb34bf2bde254c48fb34474415ab829e21674aba234057a07200f29a55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0

Release files / topa-1.0.1-py3-none-any.whl

Download URL topa-1.0.1-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0a3336a4ec3258ffa8b51bfeef9a6e673ae39b8eab2e60580542ffff5c453f5
BLAKE2b-256 checksum
How to use checksums
2b777aa7aee6bccf398e2b01ae089a7fbaac6fb4a7728a81e3d343afad0e81ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page