peekprof

command module
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 12 Imported by: 0

README

Peekprof

Peekprof is a profiling tool used to profile process.

Chart page

Usage

The profiling is designed to run until the running process terminates. If you wish to terminate the profiler sooner, just interrupt the process and it will safely terminate the program and write the results.

Usage: peekprof {-pid <pid>|-cmd <command>} [-html <filename>] [-csv <filename>] [-printoutput]
  [-refresh <integer>{ns|ms|s|m}] [-printoutput] [-parent] [-force]

  -pid Track a running process

  -cmd Execute a command and track its memory usage

  -html Extract a chart into an HTML file

  -csv Extract timestamped memory data into a csv

  -refresh The interval at which it checks the memory usage of the process
       [default is 1 second]

  -printoutput Print the corresponding output of the process to stdout & stderr
  
  -parent Track the parent of the provided PID. If no parent exists, an error is returned
      unless -force is provided. If -cmd is provided this is ignored.
      
  -force Ignore errors of parent process not existing
Extract CSV and Chart
peekprof -pid 47123 -html out.html -csv out.csv
Get memory usage by PID
peekprof -pid 47123
Get memory usage from a running command
peekprof -cmd="go test -bench=. -benchtime 300x"
Change refresh rate
peekprof -pid 53432 -refresh 50ms # Refresh every 50 milliseconds
Profile the parent of a process by child pid
peekprof -pid 53432 -parent

Support

Current support is for Linux and OSX.

OSX differences
  • Swap is not currenty supported, thus it is not shown either in the extracted files.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL