Least Squres Fitting/Linear Regression Trending Graphs

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
User avatar
drub
Cacti User
Posts: 59
Joined: Thu Jan 31, 2002 7:00 pm
Location: Las Vegas
Contact:

Least Squres Fitting/Linear Regression Trending Graphs

Post by drub »

I made an addon for Cacti-0.8.6b that will generate a tredning line using least squares fitting, and can help you to see when a circuit/interface imight reach saturation.

Super Easy to use, You don't have to make these graphs, they are based on your already existing data.

It also takes advantage of Cacti-0.8.6's zooming feature to choose the date ranges in LSFView also

LSFView-0.4 can be found at http://www.watchmefreak.com

it requires ploticus to create the images since it can easily handle Least squares fitting and other functions I may add in the future.

I added a Y Axis setting and a Start-End date picker.
Image
Last edited by drub on Thu Oct 21, 2004 11:44 am, edited 1 time in total.
User avatar
drub
Cacti User
Posts: 59
Joined: Thu Jan 31, 2002 7:00 pm
Location: Las Vegas
Contact:

Updated to 0.4

Post by drub »

Added Date Picker
Added Y Axis Max Chooser
Some Cleanup, and a better install script.
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

"This graph does not appear to contain any data that I can plot."

OK, what am I missing. This seems like a really cool utility & I want to be able to make use of it


Thanks

Eric
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

A little bit further......

I changed /bin/rrdtool to /usr/local/rrdtool/bin/rrdtool
now I am at...
Warning: fopen(read): failed to open stream: Permission denied Warning: fopen(read): failed to open stream: Permission denied

cactiuser can run rrdtool <options> just fine

line 183 is the fopen with the "a" flag set which I believe opens lsf.dat
lsf.dat does indeed get updated

touched lsf.dat, gave ownership to cactiuser, perms set to 777 for testing, will choke back when working
User avatar
drub
Cacti User
Posts: 59
Joined: Thu Jan 31, 2002 7:00 pm
Location: Las Vegas
Contact:

Post by drub »

I think I forgot to put in the README to make sure that your cacti directory is read/writeable by your web user, there are 4 files that get written and deleted( read, out, lsf.dat, lsf.png ) however since these get deleted so a fresh copy can be generated cacti dir needs to be read/write.
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

found it.
wasn't a perms issue. it was a libgd library issue.
fix:

Code: Select all

cd /usr/lib
ln -s libgd.so.1.8.4 libgd.so.2
I cheated and went with the gd 1.8.4 library instead of upping to 2 .0. for some reason, I have always had a hard time compliling gd on redhat boxes[/code]
tail /var/log/httpd/error_log
pl: error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory
I knew those logs were good for something![/code]
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

not working on .8.6c

Parse error: parse error in /usr/local/cacti/graph.php on line 217

Code: Select all

&nbsp<?php print "<a href=\"lsf.php?lsftitle=$graph_title&local_graph_id=" . $_GET["local_graph_id"] . "\"><img src=images/sctr.png border=0></a>"; ?>
skwasha
Posts: 4
Joined: Tue Mar 02, 2004 2:02 pm

Any luck in 0.8.6c?

Post by skwasha »

It's behaving really oddly for me... I got it to work a couple times. But 9 times out of 10 I just get the "This graph does not appear..." error. Logs seem to indicate something wrong with the data being passed to PL. But I haven't dug in any deeper yet.

Code: Select all

ERROR: '/var/www/html/cacti/rra/' is not an RRD file
cat: read: No such file or directory
processdata: error 17: No data have been read yet w/ proc getdata
pl proc areadef: error 105: both min and max expected (yrange)
pl proc areadef: error 10: cannot set up plotting area .. likely culprits: bad xrange or yrange, or bad area rectangle
ggarbe
Posts: 6
Joined: Fri Apr 01, 2005 8:36 am
Contact:

Error trying test this Add-On.

Post by ggarbe »

The Add-on doesn't work. See error messages on screen bellow.


--------------------------
Windows2000
Cacti last version
Attachments
telaerro.JPG
telaerro.JPG (100.04 KiB) Viewed 29774 times
ssams
Cacti User
Posts: 65
Joined: Tue Feb 01, 2005 5:54 pm
Location: Texas
Contact:

Post by ssams »

did i miss it? i don't see it for download on your site.
scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

Post by scavenger67 »

if anybody got it working on w2k and cacti 8.6.c..
please tell me how.
Thanks
:wink:
dh94
Posts: 1
Joined: Tue May 31, 2005 7:24 pm

Post by dh94 »

In case you can't find this add-on, it is located here:

http://www.watchmefreak.com/LSFView-0.4.tar.gz

I got this info from Freshmeat.net.

http://freshmeat.net/projects/lsfview/

Hope this helps.

Thanks,

DH
Ninjaboy
Posts: 3
Joined: Mon Jul 31, 2006 11:43 am

Post by Ninjaboy »

does anyone still have a link to download this
USFJoseph
Posts: 8
Joined: Wed Aug 01, 2007 9:50 am

Post by USFJoseph »

Does anyone have a copy of this or know if it works with the latest version of cacti running on Windows?
wazoqaz
Posts: 15
Joined: Wed May 24, 2006 9:40 am
Location: md, us
Contact:

Post by wazoqaz »

Bringing up a really old topic, but does anyone have a copy of this? Because it is not available at the posted location.

Thanks in advance,
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests