Messages in this thread Patch in this message | | | Date | Tue, 8 Oct 2002 16:31:45 +0200 | From | "J.A. Magallon" <> | Subject | Re: [ANNOUNCE] procps 2.0.10 |
| |
On 2002.10.08 Rik van Riel wrote: > Procps 2.0.10 > 8 Oct 2002 > > >Procps is the package containing various system monitoring tools, like >ps, top, vmstat, free, kill, sysctl, uptime and more. After a long >period of inactivity procps maintenance is active again and suggestions, >bugreports and patches are always welcome on the procps list. > >The plan is to release a procps 2.1.0 around the time the 2.6.0 kernel >comes out, with regular releases until then. Code cleanups and all kinds >of enhancements are welcome. > > >You can download procps 2.0.10 from: > > http://surriel.com/procps/procps-2.0.10.tar.bz2
This makes CPU percentages stay aligned in column when some of them reach 100%:
--- top.c.orig 2002-10-08 15:28:10.000000000 +0200 +++ top.c 2002-10-08 16:18:59.000000000 +0200 @@ -1700,8 +1700,8 @@ cpu_mapping [i]; printf - ("CPU%d states: %2d%s%-d%% user, %2d%s%-d%% system," - " %2d%s%-d%% nice, %2d%s%-d%% iowait, %2d%s%-d%% idle", + ("CPU%d: %3d%s%-d%% user, %3d%s%-d%% system," + " %3d%s%-d%% nice, %3d%s%-d%% iowait, %3d%s%-d%% idle", cpumap, trimzero(u_ticks - u_ticks_o [i] + n_ticks - n_ticks_o [i]) * 100 / t_ticks, decimal_point, It also kills the 'states' part, things are beginning to spread past 80 columns...is it very important ?
I am gettin also strange outputs sometimes, with a ton of digits in decimal parts. Sample before my patch:
CPU0 states: 0,0% user, 0,6% system, 0,0% nice, 4,1070653% iowait, 0,109% idle CPU1 states: 0,1% user, 0,1% system, 0,0% nice, 4,1070653% iowait, 0,113% idle
And after:
CPU0: 0,12% user, 0,5% system, 0,0% nice, 99,1357% iowait, 0,489% idle CPU1: 0,13% user, 0,15% system, 0,0% nice, 99,1357% iowait, 0,478% idle
-- J.A. Magallon <jamagallon@able.es> \ Software is like sex: werewolf.able.es \ It's better when it's free Mandrake Linux release 9.0 (dolphin) for i586 Linux 2.4.20-pre9-jam1 (gcc 3.2 (Mandrake Linux 9.0 3.2-1mdk)) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |