Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is there a way to retrieve process stats using Perl or Python?

Perl process Python stats
0
Posted

Is there a way to retrieve process stats using Perl or Python?

0

Is there a way to generically retrieve process stats using Perl or Python? We could keep it Linux specific. There are a few problems: I won’t know the PID ahead of time, but I can run the process in question from the script itself. For example, I’d have no problem doing: ./myscript.pl some/process/I/want/to/get/stats/for Basically, I’d like to, at the very least, get the memory consumption of the process, but the more information I can get the better (like run time of the process, average CPU usage of the process, etc.) Thanks.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123