'capinfos "filename" -u' rounds off capture time and does not return decimal places in windows. On Linux, however, it returns time to two decimal places. Can you please clarify, how capture time upto two decimal places be retrieved using capinfos/tshark in windows environment? asked 24 Jun '13, 07:47 Rajat |
2 Answers:
Adding the Looking at the code, the output without the answered 24 Jun '13, 08:30 grahamb ♦ |
I would consider this a bug, as the result of the following command delivers a the duration time with decimals, even on Windows (in contrary to option -u).
Please file a bug/enhancement report at https://bugs.wireshark.org Regards answered 24 Jun '13, 08:38 Kurt Knochner ♦ edited 24 Jun '13, 08:41 showing 5 of 6 show 1 more comments |
Possibly a bug, but the code seems to be quite explicit in non-table mode that the duration should be shown with no decimal places.
Then it is still a bug, as it show decimals on Linux (according to the OP statement) ;-)
ALTHOUGH: I cannot reproduce that effect on Linux, so maybe it's just a problem with the (yet unknown) version the OP tested with.
Yes: capinfos.c was changed in May 2009 to not print decimals for the capture duration (-u).
BTW: What was the motivation for that?
If the decimals are there, one can still take the full value and remove the decimals or round the value. So, why relinquish that possibility by not printing the decimals?
Fair question:
Digging deeper:
I've no idea why I made that explicit change to not show any decimals for the capture duration.
The code before I made the change: ... printf("Capture duration: %f seconds\n", cf_info->duration);
Did I (mistakenly) think %f format wouldn't print any decimals ? [I really don't want to believe I would have made that mistake. :) ]
In any case the current output formatting of certain vals seems inconsistent between the "Human Readable", "Machine Readable" and "Table" output modes.
I've filed a bug report ...
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8848
maybe just a copy-paste error? ;-)