Charles Steinkuehler wrote: > > > With weblet, I would find a feature that showed hourly use of bandwidth > very > > useful. Maybe others would too, those on pay-per-meg deals? > > > > It could be grabbed from the ipchains accounting figures. I tried to set > up > > a shell script to do it but couldn't get it running automatically. > > > > Would it fit on weblet somewhere? > > > > Keep up the good work - Charles; look forward to v1 of Dachstein! > > The biggest problem with this is the lack of anything but the limited > numeric processing available with shell parameter expansion. My tests have > shown it to work correctly to 9 digits in ash, but I've got routers with > byte counts MUCH larger than that. While it's possible to do arbitrary > length calculations by breaking them up, I haven't generally included this > sort of processing, since it seems like overkill for current status > monitoring. Running every hour or so, however, wouldn't be too bad, and I > can see where logging this might be very handy. If I get some free time, I > may try to implement something... > > Anyone know of an extended-precision shell-script math library before I go > off and write one?
After years and years of Perl programming, I've recently returned to my roots: awk, sed and shell. I often use sed in shell scripting, because it gives me better control over regexp's than grep. O, how quickly I forgot the power of awk! ``... all numeric values are represented within awk in double-precision floating point.'' O boy, is that sucker fast -- compared to myriads of calls to sed! It may take a different way of looking at your math problems; but, especially with awk's powerful matrix handling, I suggest -- strongly -- that you consider awk for this job. I vaguely remember a ksh extended precision math library; but, that url no longer functions. And, [b]ash is *not* ksh! No matter what math routines you find or develop, I seriously doubt that you will compete with the already compiled speed of awk . . . -- Best Regards, mds mds resource 888.250.3987 Dare to fix things before they break . . . Our capacity for understanding is inversely proportional to how much we think we know. The more I know, the more I know I don't know . . . _______________________________________________ Leaf-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user
