| Cheshire Cat Computing http://www.steveshipway.org/forum/ |
|
| STRANGE FRAME PROBLEMS ..... http://www.steveshipway.org/forum/viewtopic.php?f=2&t=1592 |
Page 1 of 1 |
| Author: | twain1 [ Mon Jul 14, 2008 2:50 am ] |
| Post subject: | STRANGE FRAME PROBLEMS ..... |
HI Following Problem: Every thing works great but there is only one interesting problem.. sometimes when i want to view a graph i get a blank/grey frame .. and when i moveover i get the timestats but nothing else... so i think, the graph is there.. and when i refresh or switch to another graph and back, ...it works... very strange... I already installed SpeedyCGI but it did not help...... -.- HEEEELPPPP |
|
| Author: | stevesh [ Mon Jul 14, 2008 11:07 am ] |
| Post subject: | Re: STRANGE FRAME PROBLEMS ..... |
What exactly do you mean by 'blank grey frame'? Can you post a screenshot? This could be your broswer being unable to download the image, or maybe the graph background is grey only meaning no data available? Are there any error messages in your web server error log? What browser are you using, and what web server, and which versions of routers2 and RRDTool? |
|
| Author: | twain12 [ Mon Jul 14, 2008 8:25 pm ] |
| Post subject: | Re: STRANGE FRAME PROBLEMS ..... |
So: routers2 Version : Version 2.18 apache httpd : Version 2.2 rrdtool : Version 1.3 mrtg : Version 2.16.2 I tried it on different hosts with different browsers(inet explorer, firefox) and there arent any erros at the Webserver. Actually it runs... but sometimes there are blank screens... I made 2 screenshots and I hope it will help you understanding my straaaaaaangeeeeee problem^^ edit: And It running all on Vmware Fedora 9 twain |
|
| Author: | stevesh [ Tue Jul 15, 2008 11:00 am ] |
| Post subject: | Re: STRANGE FRAME PROBLEMS ..... |
This is very odd, particularly since the time popup is still working which would indicate that the page javascript has loaded. However there is nothing on the page... It doesn't look like you've done anything to change the CSS or font colours, and in any case the graph image should still appear. Also the popup should only appear when the cursor is over the graph! I'm a bit stumped by this one, but can you please save a copy of the HTML from the centre frame (right-click on the frame and do ThisFrame->ViewSource) and send me that? It may make things clearer. |
|
| Author: | twain12 [ Tue Jul 15, 2008 7:39 pm ] |
| Post subject: | Re: STRANGE FRAME PROBLEMS ..... |
*Also the popup should only appear when the cursor is over the graph!* I think the graph is still there.... and there is only the grey frame above the graph... because the time popup only appears on the right point , where the graph actualy should be. Code: --------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> <head> <title>Systems Monitor</title> <link rel="stylesheet" type="text/css" href="/rrdicons/routers2.css" /> <script type="text/javascript">//<![CDATA[ // these local versions are not optimised but avoid cross-site scripting // problems when running in distributed mode function setlocationa(url) { parent.setlocationa(url); // if( parent.menu.location != url) { // parent.menu.location = url; // } } function setlocationb(url) { parent.setlocationb(url); // if( parent.menub && parent.menub.location != url ) { // parent.menub.location = url; // } } function LoadMenu() { setlocationb("http://172.18.248.17/cgi-bin/routers2.cgi?rtr=Epcos.Biz%2Fsvdb1057.epcos.biz.cfg&bars=Cami&xgtype=d&page=menub&xgstyle=l2&if=svdb1057.epcos.biz_65539&xmtype=options#top"); setlocationa("http://172.18.248.17/cgi-bin/routers2.cgi?rtr=Epcos.Biz%2Fsvdb1057.epcos.biz.cfg&bars=Cami&xgtype=d&page=menu&xgstyle=l2&xmtype=routers#top"); } // Function for RRDs version 1.3 // This javascript code derived in part from Overlib by Eric Bosrup var tzoffset = 0; var ooffsetx = 10; var ooffsety = -25; // above the cursor, to the right var owidth = 100; var pop=null; var gx, gy, gw; var img=null; var interval = 0; var endtime = 0; var ns4=(document.layers)? true:false; var ns6=(document.getElementById)? true:false; var ie4=(document.all)? true:false; var ie5=false; var ie6=false; var dow=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"); var actual=new Array(5); // to hold 6/d/w/m/y arrays of 400 items var xactual=new Array(5); // to hold 6/d/w/m/y flags xactual[0]=0; xactual[1]=0; xactual[2]=0; xactual[3]=0; xactual[4]=0; xactual[5]=0; if(ie4){ if((navigator.userAgent.indexOf('MSIE 5')> 0) ||(navigator.userAgent.indexOf('MSIE 6')> 0) ||(navigator.userAgent.indexOf('MSIE 7')> 0) ){ ie5=true; } if((navigator.userAgent.indexOf('MSIE 6')> 0) ||(navigator.userAgent.indexOf('MSIE 7')> 0) ){ ie6=true; } if(ns6){ ns6=false; } } // removed due to IE race condition problem // if((ns4)||(ie4)||(ns6)){ // if(ns4)pop=self.document.dpopup; // if(ie4)pop=self.dpopup.style; // if(ns6)pop=self.document.getElementById("dpopup"); // } // else { self.status = "Error - cannot determine browser"; } function getextra(t) { var idx; var group; var rv = ""; if(interval<1)return rv; if(interval == 1800) { // weeks have only 333 not 400 dp in graph image idx = 400-Math.floor((endtime-t)/(1500*1)); // array index } else { idx = 400-Math.floor((endtime-t)/(interval*1)); // array index } group = 0; // 6 hourly if ( interval > 61 ) { group = 1; } // daily if ( interval > 301 ) { group = 2; } // weekly if ( interval > 1801 ) { group = 3; } // monthly if ( interval > 7201 ) { group = 4; } // yealy // now, see if we have stored any data for this interval if( xactual[group]>0 && (""+actual[group][idx])!="undefined" ) { rv = "<BR>"+actual[group][idx]; } return rv; } function clearpopup() { if(pop != null ) { if(ns4)pop.visibility="hide"; else if(ie4)pop.visibility="hidden"; else if(ns6)pop.style.visibility="hidden"; } else { self.status = "Error - no popup div defined."; } endtime = 0; } function settext(s) { if( pop != null ) { if(ns4){ pop.document.write(s); pop.document.close(); pop.visibility="show"; }else if(ie4){ self.document.all['dpopup'].innerHTML=s; pop.visibility="visible"; }else if(ns6){ range=self.document.createRange(); range.setStartBefore(pop); domfrag=range.createContextualFragment(s); while(pop.hasChildNodes()){ pop.removeChild(pop.lastChild); } pop.appendChild(domfrag); pop.style.visibility="visible"; } // else { self.status = "Error - cannot determine brower"; } } else { self.status = "Error - no popup div available"; } } function repositionTo(obj,xL,yL){ if((ns4)||(ie4)){ obj.left=xL; obj.top=yL; } else if(ns6){ obj.style.left=xL + "px"; obj.style.top=yL+ "px"; } } function fix(n) { var d = n; if(d<10) d="0"+d; return d; } function findPosX(obj) { var curleft = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft; if( obj.scrollLeft ) curtop -= obj.scrollLeft; obj = obj.offsetParent; } } else { if (obj.x) curleft += obj.x; if( obj.scrollLeft ) curtop -= obj.scrollLeft; } return curleft; } // Here we have a problem - IE gives offset relative to window, Netscape // gives relative to frame. So a scrolled window doesnt work in IE. function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop; if( obj.scrollTop ) curtop -= obj.scrollTop; obj = obj.offsetParent; } } else { if (obj.y) curtop += obj.y; if( obj.scrollTop ) curtop -= obj.scrollTop; } return curtop; } function mousemove(e) { var msg, ox, oy, t, extra; var placeX, placeY, winoffset, ohpos, ovpos, iwidth, iheight, scrollheight; var scrolloffset, oaboveheight, d; if( ! endtime ) return; if((ns4)||(ns6)){ox=e.pageX;oy=e.pageY; } if(ie4){ox=e.x;oy=e.y; } if(ie5){ox=e.x+self.document.body.scrollLeft;oy=e.y+self.document.body.scrollTop; } winoffset=(ie4)? self.document.body.scrollLeft : self.pageXOffset; scrolloffset=(ie4)? self.document.body.scrollTop : self.pageYOffset; // scrolloffset=(ie4)? top.graph.document.body.scrollTop : self.pageYOffset; if(ie4){ iwidth=self.document.body.clientWidth; iheight=self.document.body.clientHeight; } else if(ns4){ iwidth=self.innerWidth; iheight=self.innerHeight; } else if(ns6){ iwidth=self.outerWidth; iheight=self.outerHeight; } placeX=ox+2; if((eval(placeX)+ eval(owidth))>(winoffset + iwidth)){ placeX=iwidth + winoffset - owidth +ooffsetx; if(placeX < 0)placeX=ooffsetx; } if((oy - scrolloffset)> iheight){ ovpos=35; }else{ ovpos=36; } if(ovpos==35){ if(oaboveheight==0){ var divref=(ie4)? self.document.all['dpopup'] : pop; oaboveheight=(ns4)? divref.clip.height : divref.offsetHeight; } placeY=oy -(oaboveheight + ooffsety); if(placeY < scrolloffset)placeY=scrolloffset; }else{ placeY=oy + ooffsety; } ox -= findPosX(img); oy -= findPosY(img); if(( ox >= 67 ) && ( ox <= (gx+67)) && ( oy >= 33 ) && ( oy <= (gy+33) )) { if( interval == 1800 ) { // special for weekly t = endtime - 1500 * (67+gx-ox)*gw/gx; // may only be approximate? } else { t = endtime - interval * (67+gx-ox)*gw/gx; // may only be approximate? } } else { t = 0; } if( t ) { // the problem is we want to display this in the timezone of the TARGET. // t is the UTC time, and the Javascript Date object will give everything // relative to the workstation timezone. So, we add the tz offset of // the Target, and subtract the tz offset of the workstation. // note that the passed tzoffset and that returned by getTimezoneOffset // seem to be different signs. d = new Date(t*1000); d.setTime((t+tzoffset+(d.getTimezoneOffset()*60))*1000); if( interval > 72000 ) { // dayofweek day/month (yearly graph) msg = dow[d.getDay()]+" "+d.getDate()+"/"+(d.getMonth()+1); } else if( interval > 4000 ) { // dayofweek day hour:00 (monthly graph) msg = dow[d.getDay()]+" "+d.getDate()+" "+fix(d.getHours())+":00"; } else if( interval > 1000 ) { // dayofweek time (weekly graph) msg = dow[d.getDay()]+" "+fix(d.getHours())+":"+fix(d.getMinutes()); } else { // time (daily graph) msg = fix(d.getHours())+":"+fix(d.getMinutes()); } // for debugging the amazingly difficult timezone calculations // msg = msg + " " + d.getDay() + "<BR>" + endtime + ":" + t + "<BR>" + tzoffset + ":" + (d.getTimezoneOffset()*60); extra = getextra(t); settext("<STRONG>"+msg+"</STRONG>"+extra); repositionTo(pop, placeX, placeY); } else { if(ns4)pop.visibility="hide"; else if(ie4)pop.visibility="hidden"; else if(ns6)pop.style.visibility="hidden"; } } function timepopup(o,n,px,py,i,t,dx,tzo) { divname = n; img = o; gx = px; gy = py; interval = i; endtime = t; gw = dx; tzoffset = tzo; if(ns4) { pop=self.document.dpopup; } else if(ie4) { if(self.dpopup) { pop=self.dpopup.style;} else { endtime=0;}} else if(ns6) { pop=self.document.getElementById("dpopup"); } else { endtime = 0; } } //]]></script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body link="#2020ff" alink="#2020ff" vlink="#2020ff" bgcolor="#ffffff" text="#000000" onload="LoadMenu()" class="interface" expires="+5s"> <div id="dpopup" style="position:absolute; visibility:hidden; z-index:1000;" class=popup></div> <DIV class=pagetop></DIV><img width="149540308" alt="Traffic Analysis for lan0 -- SVDB1057" src="/graphs/Epcos.Bizsvdb1057.epcos.biz.cfg-svdb1057.epcos.biz_65539-d-l2.png" name="igraphd" height="2459159" border="0" onmouseover="timepopup(this,'igraphd',530,200,300,1216103100,400,7200)" onmouseout="clearpopup()" onmousemove="mousemove(event)" /><br /><br /><TABLE border=0><TR><TD>Last update: </TD><TD>Tue Jul 15 08:25:15 2008</TD></TR> </TABLE> <br /><DIV class=pagefoot></DIV><DIV class=extensions></DIV><DIV class=icons><hr /> <a href="javascript:location.reload(true)"><img width="100" alt="Refresh" src="/rrdicons/refresh.gif" height="20" border="0" /></a> <a target="_top" href="http://172.18.248.17/cgi-bin/routers2.cgi?rtr=Epcos.Biz%2Fsvdb1057.epcos.biz.cfg&xgtype=d&if=svdb1057.epcos.biz_65539"><img width="100" alt="Bookmark" src="/rrdicons/bookmark.gif" height="20" border="0" /></a> <a target="graph" href="http://172.18.248.17/cgi-bin/routers2.cgi?rtr=Epcos.Biz%2Fsvdb1057.epcos.biz.cfg&bars=Cami&page=graph&xgtype=w&xgstyle=l2&if=svdb1057.epcos.biz_65539&xmtype=options"><img width="100" alt="Zoom Out" src="/rrdicons/zoomout.gif" height="20" border="0" /></a> <a target="graph" href="http://172.18.248.17/cgi-bin/routers2.cgi?rtr=Epcos.Biz%2Fsvdb1057.epcos.biz.cfg&bars=Cami&xgtype=d&page=csv&xgstyle=l2&if=svdb1057.epcos.biz_65539&xmtype=options"><img width="100" alt="CSV Download" src="/rrdicons/csv.gif" height="20" border="0" /></a> <a target="graph" href="http://172.18.248.17/cgi-bin/routers2.cgi?rtr=Epcos.Biz%2Fsvdb1057.epcos.biz.cfg&bars=Cami&xgtype=d&page=archive&xgstyle=l2&if=svdb1057.epcos.biz_65539&xmtype=options"><img width="100" alt="Add to archive" src="/rrdicons/archive.gif" height="20" border="0" /></a> <a target="graph" href="http://172.18.248.17/cgi-bin/routers2.cgi?rtr=Epcos.Biz%2Fsvdb1057.epcos.biz.cfg&bars=Cami&xgtype=d&page=graph&xgstyle=l2&if=svdb1057.epcos.biz_65539&uopts=r&xmtype=options"><img width="100" alt="Rescale" src="/rrdicons/rescale.gif" height="20" border="0" /></a> <br /> </DIV><DIV class=footer><hr /> <TABLE width=100% border=0 cellpadding=0 class=footer><TR class=footer> <TD align=left valign=top class=footer id=ftleft><a target="_new" href="http://www.steveshipway.org/software/" class="footer"><img width="120" alt="Routers2.cgi web page" src="/rrdicons/routers2.gif" class="footer" height="40" border="0" /></a><br /><center><small><a target="_new" href="http://www.steveshipway.org/software/wishlist.html" style="@media print { display:none; }" class="footer">Say Thanks!</a></small></center></TD><TD valign=top align=left class=footer id=ftmiddle><small class="footer">routers.cgi Version v2.18 : © <a href="mailto:steve@steveshipway.org" class="footer">Steve Shipway</a> 2000-2006 : <a target="_top" href="http://www.steveshipway.org/software/" class="footer">http://www.steveshipway.org/software/</a></small> <br /><SMALL class=footer><I class=footer>Current system load average: 0.85 0.58 0.45</I></SMALL> <br /><SMALL class=footer>Page took 0s to generate</SMALL></TD><TD align=right valign=top class=footer id=ftright><a target="_new" href="http://www.rrdtool.org/" class="footer"><img alt="RRDTool" src="/rrdicons/rrdtool.gif" class="footer" border="0" /></a><br /><center><small><a target="_new" href="http://people.ee.ethz.ch/~oetiker/wish/" style="@media print { display:none; }" class="footer">Say Thanks!</a></small></center></TD><TR></TABLE> <!-- R:[Epcos.Biz/svdb1057.epcos.biz.cfg] I:[svdb1057.epcos.biz_65539] A:[] U:[adminuser] --> <!-- Instance: 15064 fromcache(routers) fromcache(/etc/mrtg/Epcos.Biz/svdb1057.epcos.biz.cfg) Graph: svdb1057.epcos.biz_65539 RRD: /var/www/html/mymrtg/svdb1057.epcos.biz/svdb1057.epcos.biz_65539.rrd --> <!-- Refresh: 300 --> <!-- Expires: +5s --> <!-- Language: None --> <!-- Processing took 0s --> </DIV> </body> </html> |
|
| Author: | stevesh [ Wed Jul 16, 2008 12:22 pm ] |
| Post subject: | Re: STRANGE FRAME PROBLEMS ..... |
This is the problem: <img width="149540308" alt="Traffic Analysis for lan0 -- SVDB1057" src="/graphs/Epcos.Bizsvdb1057.epcos.biz.cfg-svdb1057.epcos.biz_65539-d-l2.png" name="igraphd" height="2459159" border="0" onmouseover="timepopup(this,'igraphd',530,200,300,1216103100,400,7200)" onmouseout="clearpopup()" onmousemove="mousemove(event)" /> The width and height are completely crazy. These two values are passed from the RRD library but not checked for sanity, and they seem to have gone wild. Everything else appears OK. I think this is an RRDTool library bug of some sort. You mention you are using RRDTool 1.3, and routers2 has not yet been tested with this version of RRDTool, only with 1.2. I think v1.3 is still the 'beta/development' status as well. It may be that the RRDs graph API has changed its return values in v1.3.x as well, confusing Routers2. I can only suggest moving back to RRDTool v1.2.x which should work correctly, or trying to get a more up-to-date version of v1.3.x if you must use v1.3. Steve |
|
| Author: | twain12 [ Wed Jul 16, 2008 10:18 pm ] |
| Post subject: | Re: STRANGE FRAME PROBLEMS ..... |
mkay....bit bad... i have already done a lot of work.. i hope there won't be any problems rolling back to 1.2..... Anyway ...its interesting why rrdtool sets the height, width at once.. mostly if i click very fast through the graphs. and when i click on rescale or on any other button it works...and another question..... RRDTOOL passes heigth and width?? I thought routers2.cgi generates this on his own.... maybe i can override the values permanently???????? |
|
| Author: | stevesh [ Thu Jul 17, 2008 10:58 am ] |
| Post subject: | Re: STRANGE FRAME PROBLEMS ..... |
The size of the graph image can vary depending on the size of the legend, so routers2 relies on the returned values from RRDtool to set the image size in the IMG tag. Probably I can do some sanity checking on these and just omit the height/width options if the returned value is nonsense, but this is a workaround. I'd rather find out why its doing this, as it may be a genuine bug in RRDTool that needs to be reported to Tobi. If you endable debug mode ( debug=yes in the routers2.conf) then you will get extra comments in the generated graph frame giving the entire rrdtool command parameter list (and it can be very long). This would be of help tracking down the problem. |
|
| Author: | stevesh [ Thu Jul 17, 2008 11:18 am ] |
| Post subject: | Re: STRANGE FRAME PROBLEMS ..... |
| Author: | twain12 [ Thu Jul 17, 2008 7:13 pm ] |
| Post subject: | Re: STRANGE FRAME PROBLEMS ..... |
YEAAHAHHHHHH |
|
| Page 1 of 1 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|