~javiljoen/monitor

Resource monitor for profiling processes and their subprocesses
simplify user installation commands in readme
accept interval as int in milliseconds
add example output to the readme

clone

read-only
https://git.sr.ht/~javiljoen/monitor
read/write
git@git.sr.ht:~javiljoen/monitor

You can also use your local clone with git send-email.

#monitor

Resource monitor for profiling processes and their subprocesses

#Usage

To monitor the resource usage of a command, provide the command and its arguments as positional arguments to monitor. For example:

monitor -i 100 bin/script output.txt

The output should look similar to this:

Time CPU Threads RSS VMS PID Command CmdLine
0.10 21.17 1 10747904 21164032 203762 python3 ["python3" "test.py"]
0.10 3.30 1 2359296 9441280 203763 sed ["sed" "s/0$/5/"]
0.10 0.00 1 1835008 2867200 203761 script ["/bin/sh" "bin/script" "output.txt"]
0.20 31.25 1 10747904 21164032 203762 python3 ["python3" "test.py"]
0.20 6.37 1 2359296 9441280 203763 sed ["sed" "s/0$/5/"]
0.20 0.00 1 1835008 2867200 203761 script ["/bin/sh" "bin/script" "output.txt"]

To see the full list of options, run:

monitor -h

#Installation

The program must be built from source, using a Go compiler.

go install git.sr.ht/~javiljoen/monitor/v3@latest

#Development

To run the linters and test the program, run:

make check test clean

#Dependencies

This program has the following dependencies when built on Unix:

  • github.com/shirou/gopsutil [BSD 3-Clause]
  • github.com/tklauser/go-sysconf [BSD 3-Clause]
  • github.com/tklauser/numcpus [Apache-2.0]
  • golang.org/x/sys [BSD 3-Clause]

#Licence

BSD 3-Clause

Do not follow this link