Skip to content

Generating graphics from processes

Procpath is a python CLI tool to record and generate graphics of processes.

Example for run a process and get RSS and CPU data

Bash
# Run the process and continue
my_process_binary & 

# Save the process id from last command
pid=$!

# record data from process for 60 seconds
procpath record -i 1 -r 60 -d process.sqlite '$..children[?(@.stat.pid == $pid)]'

# plots the data into a SVG graphic
procpath plot -d process.sqlite -q cpu -q rss cpu_rss.svg

# Remove data file (optional)
rm process.sqlite

Source


Last update: September 18, 2024
Created: September 18, 2024