Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Xferstats patches



	We have noticed a problem with xferstats - it displays incorrect
	values when more than 99 hours of faxes has been sent. The other
	columns also misalign with large values, but that is less
	important than wrong numbers!

	The following patch fixes the above problems

	(For reference here is our xferstats output for feburary with
	the patch applied)

Fax usage statistics for 1997-02

Sender                 Pages      Time Pg/min  Errs TypRate TypData
amber@southern.com         1      0:27    2.2     0    9600  1-D MR
ben3@southern.com          2      0:58    2.1     0    9600  2-D MR
danielle@southern.com      5      2:21    2.1     0    9600  1-D MR
david@southern.com        33     25:52    1.3     5    9600  2-D MR
dominica@southern.com     62     43:05    1.4     8    9600  2-D MR
jam@southern.com          26     26:48    1.0    15    9600  2-D MR
jamie@southern.com         1      0:22    2.7     0    9600  1-D MR
jeff@southern.com          1      0:22    2.7     0    9600  2-D MR
john@southern.com         55     56:40    1.0     3    9600  2-D MR
root@southern.com          8      2:54    2.8     0    9600  2-D MR
russell@southern.com   26969 582:36:20    0.8  6250    9600  2-D MR
toni@southern.com          5      2:19    2.2     0    9600  1-D MR
-------------------------------------------------------------------
Total                  27168 585:18:28    0.8  6281

--- /usr/local/sbin/xferstats	Tue Dec 31 12:56:44 1996
+++ xferstats	Tue Feb 25 18:50:51 1997
@@ -210,8 +210,6 @@
     result = "";
     if (v > 0) {
-	if (v >= 10)
-	    result = digits[int(v/10)];
-	result = result digits[int(v%10)] ":";
 	t -= v*3600;
+	result = v ":"
     }
     v = int(t/60);
@@ -486,5 +484,5 @@
 		  qsort(sorted, 0, nsorted-1);
 		  fmt = "%-" maxlen "." maxlen "s";	# e.g. %-24.24s
-		  printf fmt " %5s %8s %6s %4s %7s %7s\n",
+		  printf fmt " %6s %9s %6s %5s %7s %7s\n",
 		      KeyTitle, "Pages", "Time", "Pg/min",
 		      "Errs", "TypRate", "TypData";
@@ -497,5 +495,5 @@
 		      n = sendpages[i]; if (n == 0) n = 1;
 		      brate = best
-		      printf fmt " %5d %8s %6.1f %4d %7d %7.7s\n",
+		      printf fmt " %6d %9s %6.1f %5d %7d %7.7s\n",
 			  i, sendpages[i], fmtTime(sendtime[i]),
 			  sendpages[i] / t, senderrs[i],
@@ -506,7 +504,7 @@
 			terrs += senderrs[i];
 		  }
-		  printRule(maxlen+1+5+1+8+6+1+4+1+7+1+7, "-");
+		  printRule(maxlen+1+6+1+9+6+1+5+1+7+1+7, "-");
 		  t = ttime/60; if (t == 0) t = 1;
-		  printf fmt " %5d %8s %6.1f %4d\n",
+		  printf fmt " %6d %9s %6.1f %5d\n",
 		      "Total", tpages, fmtTime(ttime), tpages/t, terrs;
 		}



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services