From: Harald Koenig <koenig@tat.physik.uni-tuebingen.de>
Subject: more procps-0.99a fixes...
Date: Sat, 27 Apr 1996 17:59:53 +0200 (MET DST) [thread overview]
Message-ID: <9604271557.AA11268@nova.tat.physik.uni-tuebingen.de> (raw)
and one more patch for for top; the cpu percentages are wrong because
HZ isn't 100, so there are more than 100 ticks/sec (1000 for alpha)...
--- ../procps-0.99a/top.c~ Sat Apr 27 12:07:02 1996
+++ ../procps-0.99a/top.c Sat Apr 27 17:54:11 1996
@@ -660,7 +660,7 @@
/* Calculate percent cpu time for this task. */
- New_save_hist[index].pcpu = (total_time * 10) / elapsed_time;
+ New_save_hist[index].pcpu = (total_time * 10 * 100/HZ) / elapsed_time;
if (New_save_hist[index].pcpu > 999)
New_save_hist[index].pcpu = 999;
@@ -678,8 +678,8 @@
if (idle_ticks < 0)
idle_ticks = 0;
- system_ticks = (system_ticks * 10) / elapsed_time;
- user_ticks = (user_ticks * 10) / elapsed_time;
+ system_ticks = (system_ticks * 10 * 100/HZ) / elapsed_time;
+ user_ticks = (user_ticks * 10 * 100/HZ) / elapsed_time;
/* Display stats. */
--
All SCSI disks will from now on ___ _____
be required to send an email notice 0--,| /OOOOOOO\
24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig, \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik // / \\ \
koenig@tat.physik.uni-tuebingen.de ^^^^^ ^^^^^
next reply other threads:[~1996-04-27 15:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-04-27 15:59 Harald Koenig [this message]
-- strict thread matches above, loose matches on Subject: below --
1996-04-27 10:17 more procps-0.99a fixes Harald Koenig
1996-04-27 10:17 Harald Koenig
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox