edujs7 has asked for the wisdom of the Perl Monks concerning the following question:
Trying to build up an small Perl application that uses running system processes just like the top command does, in this case I need only specific fields like PID, Memory Size, CPU Time and Program Name. The idea of my program is to pull these processes and their info to then save them somewhere as a file to then use it to filter information by perhaps using egrep > file.txt The main idea is for the program to be able to display the PID's info in different ways when running it - myprogram,pl (option) file.txt
My program must allow me to use options; different options will have to do different things, such as adding only CPU time for all running system tasks, adding memory size for all running system tasks, adding the CPU time for all current system processes, etc. I'm just not sure where to start at the moment - hope you can guys show me the light :) I'll keep this thread up to date with my progress (failed attempts I should say). Thanks so much in advance guys.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use running system processes and filter them on different ways
by Your Mother (Archbishop) on May 17, 2019 at 15:23 UTC | |
by edujs7 (Novice) on May 20, 2019 at 01:36 UTC | |
by hippo (Archbishop) on May 20, 2019 at 08:16 UTC | |
|
Re: Use running system processes and filter them on different ways
by daxim (Curate) on May 17, 2019 at 06:48 UTC | |
by edujs7 (Novice) on May 20, 2019 at 01:34 UTC | |
by daxim (Curate) on May 20, 2019 at 12:03 UTC | |
by afoken (Chancellor) on May 20, 2019 at 21:13 UTC | |
|
Re: Use running system processes and filter them on different ways
by haukex (Archbishop) on May 17, 2019 at 20:22 UTC |