I want to write a script where in i can kill the top processes and run this script for every 5 minutes.How to extract parameters from top command
kranny
17
Newbie Poster
Recommended Answers
Jump to PostWhat are the "top processes"? Highest CPU time, most memory usage, most disk IO?
Jump to PostI guess something like this will work:
sk@svn:~$ ps axu | grep -v ^USER | sort -k10 -r | head -n 5 root 4045 0.0 0.2 6428 1392 ? Ss Aug11 0:20 /usr/sbin/nmbd -D root 4293 0.0 0.0 0 0 ? S< Aug11 0:19 [smbiod] sk 18362 …
All 8 Replies
sknake
1,622
Senior Poster
Featured Poster
kranny
17
Newbie Poster
sknake
1,622
Senior Poster
Featured Poster
kranny
17
Newbie Poster
sknake
1,622
Senior Poster
Featured Poster
kranny
17
Newbie Poster
sknake
1,622
Senior Poster
Featured Poster
kranny
17
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.