Mark,

Sound good, covers both my enhancement requests and in addition gives the 
configurable floating window timeframe (i.e. 60 minutes or 2 hours etc). 

Regards,
Vishal Gupta
Blog |  LinkedIn | Twitter

-----Original Message-----
From: Mark Seger <[email protected]>
Subject: Re: colplot - Slow index.cgi
Date: 29 October 2012 18:52:41 GMT
To: Vishal Gupta <[email protected]>
Cc: "[email protected]" 
<[email protected]>




On Sat, Oct 20, 2012 at 1:29 PM, Vishal Gupta <[email protected]> wrote:
When i comment the following lines in /usr/bin/colplot, colplot index page is 
displayed instantaneously. 

  findFiles(3, $mycfg, $pparams, "$dir$sep*", undef) || 
        error("No plottable files match your selection criteria.  Are your dir 
and/or file protections right?");

I guess i could live with index page displaying the hardcoded with 
"fdate=>20010101, tdate=>29991231", it means front page is quick. One could 
always click on "List Dir" to display the files if they wanted to know, but 
there is no benefit in slowing down the landing page of colplot. But then, 
colplot by default only displays current local servers files, and collectl is 
configured by default to store only last 7 days files unless one change 
retention policy in /etc/collectl.conf.   

I have changed the default PlotDir in /etc/colplot.conf to my NFS share which 
is holding plot'able files from lots of servers for lots of days (actually no 
deletion at all, as i want to maintain the history). So searching through all 
the files to find first and last days file name was taking 4-5 secs and slowing 
down landing page. It would have only got slower and slower, as number of files 
would increase over time. So, i have changed /usr/bin/colplot to command out 
above two files. 

On all my servers, I have also changed the default radio button selection to 
Last 60 minutes, as some of the user forget to check that and end up trying to 
generate graphs for entire history. So i would rather let them change the 
period from default of last 60 minutes to something longer instead of 
defaulting to entire history.

I wonder whether it would be worthwhile having following as the configuration 
options
Default timeframe, whether it should be fixed timeframe or floating timeframe.
Enable/Disable searching through files to find first/last day of available 
history.

I think these are both excellent ideas and am just about to add to the next 
release.  However as I think about it, unless I'm missing something, aren't 
they mutually exclusive?  I'm thinking of an option in colplot.conf called 
deftimeframe and for valid value have:
- auto, meaning to look at the dates of all the files by calling findfiles() 
and this would be the default
-none, meaning don't change the dates by not calling findfiles()
- float[=xxx], would skip calling findfiles() and set the floating timeframe to 
60 or if =xxx included set it to that.

Pretty slick, right?  ;)

-mark


------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Collectl-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/collectl-interest

Reply via email to