jbenz / opendlp

Automatically exported from code.google.com/p/opendlp
0 stars 0 forks source link

Linux\UNIX scan reports >100% completion results #86

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Create a UNIX agentless profile using all default settings.
2.Run the scan against a Linux box (Ubuntu 10.04.4 LTS in this case)
3. View results and refresh

What is the expected output? What do you see instead?
Expected output is less than 100% completed before scan has finished. Instead 
I'm seeing >100% completion percentage. As an example, with 5,122 files out of 
129,130 completed, it's reporting that it's 1,522.32% completed.

What version of the product are you using? On what operating system?
0.5.1 on the appliance image.

Please provide any additional information below.

Original issue reported on code.google.com by jeff.ste...@gmail.com on 14 Jan 2013 at 3:28

Attachments:

GoogleCodeExporter commented 8 years ago
Does the scan ever finish? Are you scanning an entire file system, or just 
sub-directories? Are there any symlinks in the directories you are scanning?

Original comment by andrew.O...@gmail.com on 27 Jan 2013 at 9:12

GoogleCodeExporter commented 8 years ago
I am experiencing similar results.

I have had some issues where scans are not completing, which I am 
troubleshooting now. I have seen this with agentless-unix scans that did 
complete.

It appears that the method that is being used to determine "Total Bytes" or  
"Bytes Done" is flawed, as in most of the cases where I encounter this issue 
"Bytes Done" is greater than "Total Bytes". 

On one of the systems I am scanning the command "find -type l" returns a 
significant number of results in /lib, /etc, /opt, /usr, and a few results in 
/bin, /home, /dev, and /boot.

Original comment by briana...@gmail.com on 24 Oct 2013 at 7:52

GoogleCodeExporter commented 8 years ago
I've encountered this issue as well.

It is definitely related to how the Bytes Done / Total Bytes calculation is 
performed.  It seems that sometimes this doesn't count the total bytes 
correctly.

For example, I scanned the /root folder of a BT5R3 VM I have and it reported 
Total Bytes as 0 - even though there are lots of files there.  This creates a 
divide-by-0 condition, breaking the results page as well.

Original comment by nroe...@paysw.com on 5 Dec 2013 at 8:27

GoogleCodeExporter commented 8 years ago
This shouldn't affect the ability of the scan to complete, but if you want a 
fix that doesn't fix the Total Bytes issue but at least makes the output 
somewhat sane, do the following within 
/var/www/OpenDLP/web/bin/viewresults.html (assuming you have the original 
viewresults.html):

Line 1281 change from:
     my $percent = 100 * $system{$tracking}{bytesdone} / $system{$tracking}{bytestotal};

to:
     my $percent = 100 * $system{$tracking}{filesdone} / $system{$tracking}{filestotal};

Line 2440 change from:
     my $percent = 100 * $bytesdone / $bytestotal;
to:
     my $percent = 100 * $filesdone / $filestotal;

This just makes the completion as a % of files scanned instead of bytes.

Original comment by nroe...@paysw.com on 5 Dec 2013 at 8:33

GoogleCodeExporter commented 8 years ago
editing /var/www/OpenDLP/web/bin/viewresults.html fixed the issue for me.  thx

Original comment by ErrorCod...@gmail.com on 10 Jul 2015 at 3:35