top delay value

Stephen Montgomery-Smith stephen at math.missouri.edu
Tue Jan 30 15:59:35 UTC 2007


Dan Nelson wrote:
> In the last episode (Jan 30), waldeck at gmx.de said:
> 
>>An unprivileged user could waste all CPU time by setting a low delay
>>value in top (interactive or via -s).
> 
> 
> Are you sure?  In 6.2 at least, "s0" in interactive mode results in a
> 1-second delay, and "top -s0" prints
> 
>  top: warning: seconds delay should be positive -- using default
>  ....

You can run "top -s0" as root (not that this negates your point in any way).

Incidently, this is an excellent way to generate those "calcru going 
backwards" errors, at least in some recent versions of FreeBSD.  Just 
run a highly threaded, CPU intensive job at the same time.  I did this 
on SMP systems, so I don't know if it also does this on non-SMP systems. 
  On versions of FreeBSD 5.x I was able to induce kernel panics, the 
likes of which produced useless core dumps, but this seems to have been 
fixed with more recent versions.

Stephen


More information about the freebsd-hackers mailing list