Yes, I seem to remember requesting the -N option in the first place.
(Peter implemented it in a couple of days).

Extending its functionality (which is just cosmetic output) seems like a
good idea to me.

Not using nfdump right now, since changed employment, but will likely
implement it again and this would be useful in my current environment.

Best regards
 
Giles Coochey
Technical Department
Sapphire Networks
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Maurizio Molina
Sent: 19 July 2007 19:07
To: nfsen-discuss ML
Subject: [Nfsen-discuss] extending the -N option

Hi,
I would find it very useful if  the -N option of nfdump:

"-N Print the numbers in the summary line as plain numbers. Better
parsing"

could be extended to whatever statistic is generated by the -s option,
not just the summary line. This would greatly simplify the writing of
plugins parsing multiple lines.

If I correctly understood, a simple modification to the format_number
function in nf-common.c would do the job: currently I brutally
circumvented the problem by the following immediate return

inline void format_number(uint64_t num, char *s, int fixed_width) {
double f = num;
snprintf(s, 31, "%.0f",f);
return;
        if ( f >= _1TB ) {
                if ( fixed_width )

the correct solution would be to pass the -N flag into that function and
condition the immediate return to it.

Anybody else seconding my proposal?
regards,
Maurizio


------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nfsen-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfsen-discuss

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nfsen-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfsen-discuss

Reply via email to