[sf-lug] ps -A | grep timidity
Rick Moen
rick at linuxmafia.com
Thu Sep 27 01:25:07 PDT 2007
Quoting Kristian Erik Hermansen (kristian.hermansen at gmail.com):
> On 9/26/07, Rick Moen <rick at linuxmafia.com> wrote:
> > There's a standard gotcha about the "top" utility: It puts a machine
> > under significant load while running. Picture a shared *ix host having
> > apparent performance problems: A dozen logged-in users simultaneously
> > launch "top" and bring it to its knees.
> >
> > It happens.
>
> Is true of shared hosts that utilize grsecurity patches? In such a
> scenario, you will not be pulling info on any other processes than
> your own...
Let's look: www.svlug.org has a grsecurity-patched kernel. It's
certainly true that it does show you only your own processes:
rick at svlug:~$ top b n 1
01:19:36 up 4 days, 18:10, 1 user, load average: 0.34, 0.21, 0.19
3 processes: 2 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 0.9% user, 0.4% system, 0.0% nice, 98.7% idle
Mem: 513336K total, 508564K used, 4772K free, 9228K buffers
Swap: 530136K total, 310800K used, 219336K free, 17204K cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
16587 rick 9 0 3012 2976 2820 S 0.0 0.5 0:00 sshd
16588 rick 11 0 2864 2864 2400 S 0.0 0.5 0:00 bash
16676 rick 11 0 1928 1928 1744 R 0.0 0.3 0:00 top
rick at svlug:~$
The top process itself still puts the system under nontrivial load, but
I'm guesstimating that grsecurity makes the effect be somewhat lesser.
As one point of comparison, FWIW, my Xubuntu-running iBook G3 has:
$ top b n 1 > /tmp/topoutput
$ less /tmp/topoutput
top - 01:22:43 up 1 day, 23:37, 3 users, load average: 0.01, 0.05, 0.07
Tasks: 77 total, 3 running, 74 sleeping, 0 stopped, 0 zombie
Cpu(s): 6.5%us, 0.8%sy, 1.0%ni, 90.9%id, 0.5%wa, 0.3%hi, 0.0%si, 0.0%st
Mem: 385240k total, 381176k used, 4064k free, 56004k buffers
Swap: 1128632k total, 480k used, 1128152k free, 66552k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17154 rick 15 0 2956 1184 924 R 3.9 0.3 0:00.03 top
1 root 16 0 2404 804 700 S 0.0 0.2 0:01.75 init
2 root 34 19 0 0 0 S 0.0 0.0 0:01.27 ksoftirqd/0
3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
4 root 10 -5 0 0 0 S 0.0 0.0 0:05.21 events/0
5 root 10 -5 0 0 0 S 0.0 0.0 0:00.02 khelper
6 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
25 root 10 -5 0 0 0 S 0.0 0.0 0:00.17 kblockd/0
[...]
More information about the sf-lug
mailing list