Thread Sorting processes
(6 answers)
Opened by Gast at 2006-11-15 19:06
Hello Guys,
i see a lot of experts here, so i hope, you will help me to lose my homework: I have to print in linux terminal 10 processes which are most wasteful for CPU at the time. The print should be refreshed every second. I found a command: ps -eo pid,comm,%cpu which gives me a list: ID TASK %CPU usage I would really please you to help me sort this list... Code: (dl
)
1 #!/usr/bin/perl How should i go on? Thanks in advance boys! |