From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9604271557.AA11268@nova.tat.physik.uni-tuebingen.de> Date: Sat, 27 Apr 1996 17:59:53 +0200 (MET DST) From: Harald Koenig Subject: more procps-0.99a fixes... 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 ^^^^^ ^^^^^