Bug 91852

Summary: incorrect line counting for output reports
Product: [Retired] Red Hat Linux Reporter: Gilbert E. Detillieux <gedetil>
Component: xferstatsAssignee: Ngo Than <than>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-06-03 12:39:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
patch to correct multiple bugs related to output line counts none

Description Gilbert E. Detillieux 2003-05-28 22:25:38 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030113

Description of problem:
There are several logic errors in xferstats-2.16/display.c which affect the
counting of output lines for the reports.  Most affect the daily report, while
one affects multiple other reports.

In most cases, the errors are of the "off by one" variety.  In one case, the
logic is very confusing and just plain wrong.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Set "NUMBER_DAILY_STATS 90" and "DAILY_SORT_PREF 2" in /etc/xferstats.cfg
2. Run xferstats with more than 90 days worth of xferlog data.
3. View the resulting daily.html output.

Actual Results:  The output will contain one less line than it should. 
Furthermore, the number of entries per output table (30 by default) will not be
respected - all entries will be in one table.

For other reports, the line count will only be correct for the first table, then
be off by one for subsequent tables.

Expected Results:  Output line counts should be as requested, or as advertized

Additional info:

Comment 1 Gilbert E. Detillieux 2003-05-28 22:26:57 UTC
Created attachment 92043 [details]
patch to correct multiple bugs related to output line counts

Comment 2 Ngo Than 2003-06-03 12:39:15 UTC
2.16-7 has this fix. Thanks for your patch file.