Sysinternals / ProcDump-for-Linux

A Linux version of the ProcDump Sysinternals tool
MIT License
2.95k stars 306 forks source link

Ability to specify process by name #19

Closed josalem closed 6 years ago

josalem commented 6 years ago

Proposed Usage

Using the -w (--wait) flag, you can specify a process name, and Procdump will wait for that process start. Upon finding the process started, Procdump will then start watching the process as usual.

sudo procdump -C 65 -w my-application

Proposed Implementation

Looping through /proc/ and reading /proc/[pid]/stat or /proc/[pid]/cmdline to find the provided name.

Should multiple processes match the given name, Procdump should error out (mimicking the Windows version).