Timeline for Show top five CPU consuming processes with `ps`
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 30, 2011 at 11:17 | history | edited | Caleb | CC BY-SA 3.0 | added 149 characters in body |
| May 29, 2011 at 12:05 | comment | added | boehj | Will do. GNU top worked as described this afternoon. Cheers. | |
| May 29, 2011 at 7:23 | comment | added | Caleb | Sounds like your top can't handle non-interactive use. Try htop or the ps based solution in Boban P.'s answer | |
| May 29, 2011 at 6:22 | comment | added | boehj | I can't figure it because if I do top -o cpu | head -n 12 | tail -n 5 the top process is started but it seems it's being run in the background as there's nothing printed in the terminal. | |
| May 29, 2011 at 5:56 | comment | added | Caleb | I mentioned the batch mode switch in my answer but it's actually unnecessary for my top because it auto-detects being part of a pipe instead of an interactive session. Did you try just piping it without that? | |
| May 29, 2011 at 5:45 | comment | added | boehj | Fair enough. I'll get on a Linux box this afternoon and take a look. My top doesn't seem to have a batch mode, which is quite limiting. There must be some way of piping top into other commands. I'll do some research. | |
| May 29, 2011 at 5:28 | comment | added | Caleb | You're the one with the different top so you would be in a position to say. My top doesn't have -o and -n sets the number of times it refreshes the display before quitting. | |
| May 29, 2011 at 4:00 | comment | added | boehj | In OS X, is top -o cpu -n 5 a way of achieving the same thing. Does anyone know? My top is different to your top. | |
| May 28, 2011 at 19:02 | vote | accept | PlanasB | ||
| May 29, 2011 at 18:42 | |||||
| May 28, 2011 at 18:25 | history | answered | Caleb | CC BY-SA 3.0 |