Koozali.org: home of the SME Server

usr/sbin/durep/daily

Derek

usr/sbin/durep/daily
« on: November 24, 2004, 02:50:24 PM »
can anyone tell me what is causing this error and what is it refering to, and how to fix it?
i get this in my email every morning from the cronjob

Use of uninitialized value in numeric gt (>) at /usr/local/bin/durep line 502.
Use of uninitialized value in addition (+) at /usr/local/bin/durep line 506.


Derek

monkey

usr/sbin/durep/daily
« Reply #1 on: November 24, 2004, 08:35:16 PM »
durep is a disk usage reporting tool, as to why its causing that error I could not tell you.

Offline wellsi

  • *
  • 475
  • +0/-0
    • http://www.wellsi.com
usr/sbin/durep/daily
« Reply #2 on: November 25, 2004, 08:20:45 PM »
I have seen this occasionally, but not debugged it. As a quick exercise I checked the code:

Use of uninitialized value in numeric gt (>) at /usr/local/bin/durep line 502.
Use of uninitialized value in addition (+) at /usr/local/bin/durep line 506.

501    # If hard links > 1 then ensure we don't count this file more than once
502    if($s[3] > 1) {
503      next if($inodes{$s[0]}{$s[1]});
504      $inodes{$s[0]}{$s[1]} = 1;
505    }
506    %files->{SIZE} += $s[7] if(include_file($_, \@s));
507    %files->{COUNT}++;


so $s[3] (nlink) is not initialised, and probably (size) $s[7]
A wild guess is that lstat failed (477 @s = lstat $child;) although no idea why.

Maybe contact the contributor for this psc@saco-gmbh.de (see http://no.longer.valid/phpwiki/index.php/Disk%20Usage%20Report )
............

matvestenpan

usr/sbin/durep/daily
« Reply #3 on: December 02, 2004, 12:03:45 AM »
I have the same problem for the first time this night : (sme6.0.01)

Use of uninitialized value in numeric gt (>) at /usr/local/bin/durep line 502.
Use of uninitialized value in addition (+) at /usr/local/bin/durep line 506.
Use of uninitialized value in numeric gt (>) at /usr/local/bin/durep line 502.
Use of uninitialized value in addition (+) at /usr/local/bin/durep line 506.

Offline psc

  • *
  • 151
  • +0/-0
usr/sbin/durep/daily
« Reply #4 on: December 03, 2004, 03:29:55 PM »
Hi,

i release :hammer: a new version shortly.

Best Peter
First, solve the problem. Then, write the code.