Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Apr 30, 2017 9:58 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Updated 05/2012: Graph Sockets Pipes and FIles
PostPosted: Thu Oct 28, 2010 9:50 am 
Offline

Joined: Tue Nov 28, 2006 6:44 am
Posts: 24
Location: Akron
Since everything in Linux/Unix is a file, Linux has some interesting ways to monitor for problems. Often systems administrators monitor CPU, Ram, Disk Space, and Network Usage. These are all valid data points and are especially useful for capacity planning. For real time detection of problems, especially with web/application/databases, these are not always the best indicators. In my experience, checking and trending the number of open sockets, pipes, files, tcp/udp sockets, and unix sockets has been the single best indicator of a problem. These have been much better than CPU, Load, or I/O Wait. In fact, under optimal usage of server hardware, one would expect spikes in CPU, RAM, and I/O.

Instructions: http://crunchtools.com/software/cruncht ... pes-files/
Versioned Code: http://code.google.com/p/crunchtools/so ... ipes_files


Attachments:
sockets_pipes_files.tgz [112.34 KiB]
Downloaded 209 times

_________________
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com


Last edited by scottevil on Fri Apr 12, 2013 9:50 pm, edited 7 times in total.
Top
 Profile  
 
 Post subject: Re: Graph Sockets Pipes and FIles
PostPosted: Thu Oct 28, 2010 12:58 pm 
Offline
Developer
User avatar

Joined: Thu Feb 20, 2003 10:16 am
Posts: 1635
Location: Canada
If you get a chance, please post this to the scripts and templates area:

http://docs.cacti.net/scripts
http://docs.cacti.net/scripts.guidelines

http://docs.cacti.net/templates
http://docs.cacti.net/templates.guidelines

_________________
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca


Top
 Profile  
 
 Post subject: Re: Graph Sockets Pipes and FIles
PostPosted: Wed Jan 05, 2011 2:39 pm 
Offline

Joined: Wed Jan 05, 2011 2:32 pm
Posts: 1
The sh/exec functionality appears to have been removed from the ubuntu distributions in favor of keyword extend. Extend also isn't a drop in replacement, the OID's get fairly screwy and the trick of executing the netstat calls in the background no longer works which can hang cacti.

These two threads go into greater detail.
http://www.mail-archive.com/net-snmp-users@lists.sourceforge.net/msg14895.html
http://www.mail-archive.com/net-snmp-users@lists.sourceforge.net/msg14731.html


Top
 Profile  
 
 Post subject: Re: Graph Sockets Pipes and FIles
PostPosted: Wed Jan 05, 2011 3:06 pm 
Offline
Developer
User avatar

Joined: Thu Feb 20, 2003 10:16 am
Posts: 1635
Location: Canada
spackler wrote:
The sh/exec functionality appears to have been removed from the ubuntu distributions in favor of keyword extend.


Nothing to do with Ubuntu. net-snmp deprecated exec some time ago.

_________________
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca


Top
 Profile  
 
 Post subject: Re: Graph Sockets Pipes and FIles
PostPosted: Wed Jan 05, 2011 4:52 pm 
Offline

Joined: Tue Nov 28, 2006 6:44 am
Posts: 24
Location: Akron
spackler wrote:
The sh/exec functionality appears to have been removed from the ubuntu distributions in favor of keyword extend. Extend also isn't a drop in replacement, the OID's get fairly screwy and the trick of executing the netstat calls in the background no longer works which can hang cacti.

These two threads go into greater detail.
http://www.mail-archive.com/net-snmp-us ... 14895.html
http://www.mail-archive.com/net-snmp-us ... 14731.html


Yeah, I knew this was coming because I had tested in fedora with newer versions of net-snmpd and it was complaining. I looked at the fix a while back and you are correct, it is a bit screwy to say the least. I will mess with it and update it.

Scott M

_________________
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com


Top
 Profile  
 
 Post subject: Re: Updated 05/2012: Graph Sockets Pipes and FIles
PostPosted: Wed May 23, 2012 8:25 pm 
Offline

Joined: Tue Nov 28, 2006 6:44 am
Posts: 24
Location: Akron
Alright, I finally updated this to work despite the deprecated sh/exec directive. It was actually quite hilarious that one can code around this problem by using a C or Perl AgentX module. I used an embedded version of the perl module so the configuration is almost exactly as easy as before. It is one directive, one server side file, and one client side file.

_________________
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com


Top
 Profile  
 
 Post subject: Re: Updated 05/2012: Graph Sockets Pipes and FIles
PostPosted: Tue Nov 04, 2014 3:01 pm 
Offline

Joined: Thu Jul 24, 2014 3:55 pm
Posts: 7
This project looks very interesting. I notice there are client and server scripts, since I only need to monitor a local server I will try to make it work. Does anyone test this on localhost?


Top
 Profile  
 
 Post subject: Re: Updated 05/2012: Graph Sockets Pipes and FIles
PostPosted: Tue Nov 04, 2014 5:50 pm 
Offline

Joined: Tue Nov 28, 2006 6:44 am
Posts: 24
Location: Akron
I have used it on localhost through snmp, but you could probably tweak it to work with the scripts only.

_________________
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com


Top
 Profile  
 
 Post subject: Re: Updated 05/2012: Graph Sockets Pipes and FIles
PostPosted: Tue Feb 10, 2015 8:25 am 
Offline

Joined: Tue Feb 10, 2015 8:18 am
Posts: 1
$tmp is not yet used while reading the files, it still uses /var/lib/net-snmp.


Top
 Profile  
 
 Post subject: Re: Updated 05/2012: Graph Sockets Pipes and FIles
PostPosted: Wed Nov 11, 2015 5:50 am 
Offline

Joined: Wed Sep 23, 2015 8:58 am
Posts: 17
I get the following error when trying to run this script.

Can't call method "register" on an undefined value at /etc/snmp/spf.pl line 97.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group