Ticket #4 (reopened defect)

Opened 3 years ago

Last modified 2 years ago

du2rrd, I don't see directories

Reported by: human Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:

Description

I'm pretty sure I set this all up correctly. Created my cron job ( ran it manually first to be sure it worked ) RRD files is in /var/lib/du2rrd ( world readable )

The web page shows up, I see everyting except the list of directories.. or in this case directory.

I also received a pop-up error that said: "Local error 1: Local time-out expired"

I don't see anything in the apache log files

thanks!!

Change History

comment:1 Changed 3 years ago by oetiker

  • Status changed from new to closed
  • Resolution set to worksforme

look at the apache log file to figure if the cgi does get run. also try running it from the commandline ... have a look at the apache error log to see where the problem is ...

hope this helps tobi

comment:2 Changed 3 years ago by human

  • Status changed from closed to reopened
  • Resolution worksforme deleted

I dont see anything either, and i get the same javascript error message.

My apache log says: "192.168.119.48 - - [17/Feb/2009:14:32:19 +0100] "GET /du2rrd-0.0.6/htdocs/du2rrd.cgi?_ScriptTransport_id=1&nocache=1234877539485&_ScriptTransport_data=%7B%22service%22%3A%22du2rrd%22%2C%22method%22%3A%22get_tree%22%2C%22id%22%3A1%2C%22params%22%3A%5B%5D%7D HTTP/1.1" 200 1611 " http://dkdiskusage/du2rrd-0.0.6/htdocs/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit?/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1""

I tried looking at what actually happens to the files in /var/lib/du2rrd, and it seems like the ONLY file that gets a new date after the initial run is: status.storable

I tried using strace to run the du -k | strace du2rrd and it does open all those .rrd files.

running strace -p -o -ff on apache gives me something that might be interresting when i load the cgi

read(12, 0x820e8e0, 8000) = -1 EAGAIN (Resource temporarily unavailable)

comment:3 Changed 3 years ago by human

i forgot to add that i am using version 0.0.6, but it can be seen if one looks after it.

comment:4 Changed 2 years ago by human

I have the same problem, with the same error message and version 0.0.6 - the webpage comes up but the list of directories is missing.

I'm running the command by hand, to test the installation before fully configuring - and my .RRD files *are* being updated (unlike human #1)

--- CGI file:

# Point this to the location of your du2rrd data store. It seems
# perl wan't this to come only after the use-lib 
do {
 no warnings;
 $Qooxdoo::Services::du2rrd::DU2RRD_ROOT = '/srv/du2rrd/rrd/test/';
};

--- Command:

du /home | /srv/du2rrd/bin/du2rrd --rrd_root=/srv/du2rrd/rrd/test "Main=/home/*"

--- RRD files: (apache runs as www-data)

root@mybox:/srv/du2rrd/rrd/test# ls -al
total 52
drwxr-xr-x 3 www-data www-data  4096 2009-10-02 11:59 .
drwxr-xr-x 6 www-data www-data  4096 2009-10-02 11:30 ..
drwxr-xr-x 2 www-data www-data  4096 2009-10-02 11:53 Main
-rw-r--r-- 1 www-data www-data 34568 2009-10-02 12:07 Main.rrd
-rw-r--r-- 1 www-data www-data    79 2009-10-02 12:07 status.storable
root@mybox:/srv/du2rrd/rrd/test# ls Main -al
total 44
drwxr-xr-x 2 www-data www-data  4096 2009-10-02 11:53 .
drwxr-xr-x 3 www-data www-data  4096 2009-10-02 11:59 ..
-rw-r--r-- 1 www-data www-data 34568 2009-10-02 12:07 1.rrd

--- apache log file:

xx.xx.212.253 - - [02/Oct/2009:12:09:35 +0100] "GET /du2rrd.cgi?_ScriptTransport_id=1&nocache=1254481775601&_ScriptTransport_data=%7B%22service%22%3A%22du2rrd%22%2C%22method%22%3A%22get_tree%22%2C%22id%22%3A1%2C%22params%22%3A%5B%5D%7D HTTP/1.1" 200 1638 " http://du2rrd.exa.net.uk/" "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.14) Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14"

comment:5 Changed 2 years ago by human

I have noticed in version 0.0.6 that if du -k <some directoy> returns a blank line with it's stream of data, that the webpage no longer properly generates a graph for the directories being monitored. I discovered this when I captured the results of a du -k operation on some directories. the du2rrd script would generate an error as outlined inmy example below:

Use of uninitialized value in multiplication (*) at /opt/du2rrd/bin/du2rrd line 157, <> line 8959.

Use of uninitialized value in pattern match (m) at /opt/du2rrd/bin/du2rrd line 161, <> line 8959.

In the stream at line 8959 was a blank line. In the source for du2rrd there was no safe checking at lines 157 and 161, specifically:

my ($size,$path) = split /\s+/,$_,2; $size *= 1024; # sitze is in kb!

Should a blank line be inserted into the stream, $size and $path would not be initialized leading to problems. I have not had the time to fully explore the impact if this but I felt it was necessary to report.

Note: See TracTickets for help on using tickets.