Article View: news.software.nntp
Article #66850Re: INN 2.5.0 with cnfs --- status on Linux?
From: Russ Allbery
Date: Sat, 18 Oct 2003 05:00
Date: Sat, 18 Oct 2003 05:00
43 lines
2798 bytes
2798 bytes
Ian G Batten <I.G.Batten@batten.eu.org> writes:
> human_readable assumes that this:
> while ( ( int($scaled) > 0 ) && ( $unit < $#name ) ) {
> $oldscaled = $scaled;
> $scaled /= $factor;
> warn "scaled = $scaled, unit = $unit";
> $unit++;
> }
> is done in floating point. But it can't be: Math::BigInt has been
> loaded and has overridden the arithmetic operators.
I'm sorry about the long delay in getting to this; I hope you're still
reading. Could you (or anyone else with problems with cnfsstat and large
buffers) try out this patch and see if it fixes the problem?
--- cnfsstat.in 2002/10/06 04:11:42 1.18
+++ cnfsstat.in 2003/10/18 04:59:14
@@ -17,6 +17,7 @@
use vars qw($opt_l $opt_h $opt_a $opt_s);
use Getopt::Long;
use Math::BigInt;
+use Math::BigFloat;
use English;
my($conffile) = "$inn::pathetc/cycbuff.conf";
@@ -324,7 +325,7 @@ sub human_readable {
my $factor = 1024;
my $unit = -1;
- my $oldscaled = $val / $base;
+ my $oldscaled = Math::BigFloat->new ($val) / $base;
my $scaled = $oldscaled;
while ( ( int($scaled) > 0 ) && ( $unit < $#name ) ) {
$oldscaled = $scaled;
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID:
<87ad7zywbs.fsf@windlord.stanford.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!text1.nnrp.aus1!firehose2!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!cyclone-sf.pbi.net!216.218.192.242!news.he.net!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!newshub.sdsu.edu!headwall.stanford.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mailReferences:
<bk94k9$3ba$1@news-out.ftel.co.uk> <bk9him$6mm$1@news-out.ftel.co.uk> <bk9q4c$k1c$2@news.cistron.nl> <bk9r8l$atn$1@news-out.ftel.co.uk> <bk9rnr$b2h$1@news-out.ftel.co.uk>Show Full Headers
Complete Article Headers
Message-ID: <87ad7zywbs.fsf@windlord.stanford.edu> Subject: Re: INN 2.5.0 with cnfs --- status on Linux? Date: Fri, 17 Oct 2003 22:00:07 -0700 From: Russ Allbery <rra@stanford.edu> References: <bk94k9$3ba$1@news-out.ftel.co.uk> <bk9him$6mm$1@news-out.ftel.co.uk> <bk9q4c$k1c$2@news.cistron.nl> <bk9r8l$atn$1@news-out.ftel.co.uk> <bk9rnr$b2h$1@news-out.ftel.co.uk> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!text1.nnrp.aus1!firehose2!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!cyclone-sf.pbi.net!216.218.192.242!news.he.net!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!newshub.sdsu.edu!headwall.stanford.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 43 NNTP-Posting-Host: windlord.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.Stanford.EDU 1066453207 8163 171.64.19.147 (18 Oct 2003 05:00:07 GMT) X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Common Lisp, linux) Cancel-Lock: sha1:nKRDMlKWKefPxYgLMK4HGNN3X1M=