Open acmay opened 7 years ago
That sounds useful. It might also be useful for debugging
Here is a cut at a patch. 0001-Added-l-dir-option-to-use-a-local-directory-rather-t.txt
looks good. I might adjust the exception handling a bit as a blanket except: is generally wrong. Anyway I'll apply soon in your name. thanks!
Hopefully I got the cmdline name ordering correct in terms of picking the right thing from cmdline/status/exe.
The change to not need exe shifts the detection of some of the kernel threads, but they still seem to get tossed out ok.
As for the blanket except that is ok, I just don't know python well enough to qualify the ones it can hit. I really did hit the IndexError one when it calculates the Rss value.
I would like to use this with some embedded targets where python isn't an option. I was able to hack something up to get the proc PID files onto a machine with python. Then I was able to change the proc.path/proc.open functions to be something that runs from the current directory to generate results based off the local files rather than local running machine.
I had to just skip the exe check to get it to work as well.
Would other people find this useful as a pull request?