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.| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |