From zothar at freenetproject.org Wed Jun 20 21:57:15 2007 From: zothar at freenetproject.org (zothar at freenetproject.org) Date: Wed, 20 Jun 2007 21:57:15 +0000 (UTC) Subject: [Pyfreenet] r13670 - trunk/apps/pyFreenet Message-ID: <20070620215715.1F8D647A07F@emu.freenetproject.org> Author: zothar Date: 2007-06-20 21:57:14 +0000 (Wed, 20 Jun 2007) New Revision: 13670 Modified: trunk/apps/pyFreenet/refbot.py Log: refbot: baby steps toward cooperative announce Modified: trunk/apps/pyFreenet/refbot.py =================================================================== --- trunk/apps/pyFreenet/refbot.py 2007-06-20 21:22:16 UTC (rev 13669) +++ trunk/apps/pyFreenet/refbot.py 2007-06-20 21:57:14 UTC (rev 13670) @@ -70,6 +70,7 @@ """ self.bots = {} + self.botAnnouncePool = [] self.botIdentities = {} log("Starting refbot with the following file versions: refbot.py: r%s minibot.py: r%s fcp/node.py: r%s" % (FreenetNodeRefBot.svnRevision, MiniBot.svnRevision, fcp.FCPNode.svnRevision)) @@ -740,6 +741,9 @@ bot_data = self.bots[ sender ] del self.bots[ sender ] self.bots[ target ] = bot_data + if( sender in self.botAnnouncePool ): + k = self.botAnnouncePool.index( sender ); + self.botAnnouncePool[ k ] = target; log("** bots: %s" % ( self.bots.keys() )) #@-node:post_on_nick @@ -749,8 +753,10 @@ When another user (or us) have left a channel (post processing by inheriting class) """ if(self.bots.has_key( sender )): - del self.bots[ sender ] - log("** bots: %s" % ( self.bots.keys() )) + if( sender in self.botAnnouncePool ): + self.botAnnouncePool.remove( sender ); + del self.bots[ sender ] + log("** bots: %s" % ( self.bots.keys() )) #@-node:post_on_part #@+node:post_on_quit @@ -763,6 +769,8 @@ identity = self.bots[ sender ][ "identity" ] if( self.botIdentities.has_key( identity )): del self.botIdentities[ identity ] + if( sender in self.botAnnouncePool ): + self.botAnnouncePool.remove( sender ); del self.bots[ sender ] log("** bots: %s" % ( self.bots.keys() )) @@ -944,6 +952,9 @@ except: return self.bots[ botNick ][ "options" ] = options; + if( self.check_bot_peer_has_option( botNick, "bot2bot_announces" )): + if( botNick not in self.botAnnouncePool ): + self.botAnnouncePool.append( botNick ); #@-node:setPeerBotOptions #@+node:spamChannel From zothar at freenetproject.org Wed Jun 20 22:27:51 2007 From: zothar at freenetproject.org (zothar at freenetproject.org) Date: Wed, 20 Jun 2007 22:27:51 +0000 (UTC) Subject: [Pyfreenet] r13672 - trunk/apps/pyFreenet Message-ID: <20070620222751.C06AD47A333@emu.freenetproject.org> Author: zothar Date: 2007-06-20 22:27:51 +0000 (Wed, 20 Jun 2007) New Revision: 13672 Modified: trunk/apps/pyFreenet/refbot.py Log: refbot: more baby steps toward cooperative announcing: bots generate a pool of potential announcers Modified: trunk/apps/pyFreenet/refbot.py =================================================================== --- trunk/apps/pyFreenet/refbot.py 2007-06-20 22:23:38 UTC (rev 13671) +++ trunk/apps/pyFreenet/refbot.py 2007-06-20 22:27:51 UTC (rev 13672) @@ -156,6 +156,7 @@ # get local attribs self.nodenick = opts['usernick'] + self.botircnick = self.nodenick + "_bot" self.refs = opts['refs'] if(self.config_version < 1 and (not opts.has_key('bot2bot') or (opts.has_key('bot2bot') and opts['bot2bot'] == 'y'))): self.setup_bot2bot( opts ) @@ -289,13 +290,22 @@ self.irc_port = kw[ 'port' ] self.bot2bot_enabled = self.bot2bot_configured; + #self.bot2bot_announces_enabled = self.bot2bot_announces_configured; # **FIXME** hardcoded ATM + self.bot2bot_announces_enabled = True; # **FIXME** hardcoded ATM self.bot2bot_trades_enabled = self.bot2bot_trades_configured; self.bot2bot_trades_only_enabled = self.bot2bot_trades_only_configured; self.privmsg_only_enabled = self.privmsg_only_configured; + if( not self.bot2bot_enabled and self.bot2bot_announces_enabled ): + self.bot2bot_announces_enabled = False; if( not self.bot2bot_enabled and self.bot2bot_trades_enabled ): - self.bot2bot_trades_enabled = False; + self.bot2bot_trades_enabled = False; if( not self.bot2bot_trades_enabled and self.bot2bot_trades_only_enabled ): - self.bot2bot_trades_only_enabled = False; + self.bot2bot_trades_only_enabled = False; + if( self.bot2bot_announces_enabled and self.bot2bot_trades_only_enabled ): + self.bot2bot_announces_enabled = False; + + if( self.bot2bot_announces_enabled ): + self.botAnnouncePool.append( self.botircnick ); # finally construct the parent MiniBot.__init__(self, **kw) @@ -443,9 +453,8 @@ self.sendRefDirectLock = threading.Lock() if(self.bot2bot_enabled): self.api_options.append( "bot2bot" ); - # Not implemented yet - **FIXME** - #if(self.bot2bot_announces_enabled): - # self.api_options.append( "bot2bot_announces" ); + if(self.bot2bot_announces_enabled): + self.api_options.append( "bot2bot_announces" ); if(self.bot2bot_trades_enabled): self.api_options.append( "bot2bot_trades" ); if(self.bot2bot_trades_only_enabled): @@ -955,6 +964,7 @@ if( self.check_bot_peer_has_option( botNick, "bot2bot_announces" )): if( botNick not in self.botAnnouncePool ): self.botAnnouncePool.append( botNick ); + self.botAnnouncePool.sort(); #@-node:setPeerBotOptions #@+node:spamChannel @@ -1490,6 +1500,29 @@ pass #@-node:cmd_error + #@+node:cmd_getannouncers + def cmd_getannouncers(self, replyfunc, is_from_privmsg, args): + + if( not self.bot.bot2bot_announces_enabled ): + replyfunc("Sorry, I'm not configured to do bot2bot-based cooperative announcing.") + return + replyfunc("The announcers I know: %s" % self.bot.botAnnouncePool) + + #@-node:cmd_getannouncers + #@+node:cmd_getbots + def cmd_getbots(self, replyfunc, is_from_privmsg, args): + + if( not self.bot.bot2bot_enabled ): + replyfunc("Sorry, I'm not configured to do bot2bot communications, thus I don't know who the bots are.") + return + localBotList = []; + localBotList.append( self.bot.botircnick ); + for bot in self.bot.bots: + localBotList.append( bot ); + localBotList.sort(); + replyfunc("The bots I know: %s" % localBotList) + + #@-node:cmd_getbots #@+node:cmd_getidentity def cmd_getidentity(self, replyfunc, is_from_privmsg, args): From zothar at freenetproject.org Wed Jun 20 23:00:58 2007 From: zothar at freenetproject.org (zothar at freenetproject.org) Date: Wed, 20 Jun 2007 23:00:58 +0000 (UTC) Subject: [Pyfreenet] r13675 - trunk/apps/pyFreenet Message-ID: <20070620230058.AA30247A06F@emu.freenetproject.org> Author: zothar Date: 2007-06-20 23:00:58 +0000 (Wed, 20 Jun 2007) New Revision: 13675 Modified: trunk/apps/pyFreenet/refbot.py Log: refbot: if the running release is older than two weeks, refer to updater.py and halt. Expand user feedback a little. Make some error messages visually jump out more and thus easier to read. Modified: trunk/apps/pyFreenet/refbot.py =================================================================== --- trunk/apps/pyFreenet/refbot.py 2007-06-20 22:49:18 UTC (rev 13674) +++ trunk/apps/pyFreenet/refbot.py 2007-06-20 23:00:58 UTC (rev 13675) @@ -11,6 +11,7 @@ import base64 import math import os +import os.path import random import select import socket @@ -75,11 +76,34 @@ log("Starting refbot with the following file versions: refbot.py: r%s minibot.py: r%s fcp/node.py: r%s" % (FreenetNodeRefBot.svnRevision, MiniBot.svnRevision, fcp.FCPNode.svnRevision)) + # check refbot release age + log("Checking refbot release age....") + versions_filename = "updater_versions.dat"; + if( not os.path.exists( versions_filename )): + versions_file = file( versions_filename, "w+" ); + versions_file.write( "\n" ); + versions_file.close(); + else: + last_version_file_mod_time = os.path.getmtime( versions_filename ); + now = time.time(); + last_version_file_age = now - last_version_file_mod_time; + minute_seconds = 60; + hour_seconds = 60 * minute_seconds; + day_seconds = 24 * hour_seconds; + week_seconds = 7 * day_seconds; + if( last_version_file_age > ( 2 * week_seconds )): + log("***"); + log("*** This release of the refbot is more than two weeks old. Please run updater.py and try again."); + log("***"); + my_exit( 1 ); + # check that we've got an updated fcp/node.py try: fcpnodepy_revision = fcp.FCPNode.svnRevision; except: - print "This version of the refbot requires a newer version of fcp/node.py. Please from https://emu.freenetproject.org/svn/trunk/apps/pyFreenet/fcp/node.py and try again."; + log("***"); + log("*** This version of the refbot requires a newer version of fcp/node.py. Please run updater.py and try again."); + log("***"); my_exit( 1 ); # determine a config file path @@ -92,8 +116,10 @@ try: opts = self.load() except Exception, msg: - print "ERROR loading configuration file: %s" % ( msg ); - print "ERROR: Failed to load configuration file. Perhaps it is corrupted?"; + log("***"); + log("*** ERROR loading configuration file: %s" % ( msg )); + log("*** ERROR: Failed to load configuration file. Perhaps it is corrupted?"); + log("***"); my_exit( 1 ); needToSave = False if( len( opts['usernick'] ) > 12 ): @@ -317,12 +343,16 @@ self.save() self.nodeRef = {}; - log("Verifying node build version....") + log("Verifying connectivity with node.... (If this hangs, there are problems talking to the node's FCP service)") try: f = fcp.FCPNode( host = self.fcp_host, port = self.fcp_port ) + log("Successfully connected to the node's FCP service....") + log("Verifying node build version....") if( f.nodeBuild < self.minimumNodeBuild ): - log("ERROR: This version of the refbot requires your node be running build %d or higher. Please upgrade your Freenet node and try again." % ( self.minimumNodeBuild )) f.shutdown() + log("***"); + log("*** ERROR: This version of the refbot requires your node be running build %d or higher. Please upgrade your Freenet node and try again." % ( self.minimumNodeBuild )) + log("***"); my_exit( 1 ) try: noderef = f.refstats(); @@ -330,18 +360,22 @@ noderef = noderef[ 0 ]; self.nodeIdentity = noderef[ "identity" ]; except Exception, msg: - log("ERROR: Failed to get the node's identity via FCP. This is an odd error this refbot developer is not sure of a reason for."); f.shutdown() + log("***"); + log("*** ERROR: Failed to get the node's identity via FCP. This is an odd error this refbot developer is not sure of a reason for."); + log("***"); my_exit( 1 ) except Exception, msg: - log("ERROR: Failed to connect to node via FCP (%s:%d). Check your fcp host and port settings on both the node and the bot config." % ( self.fcp_host, self.fcp_port )); f.shutdown() + log("***"); + log("*** ERROR: Failed to connect to node via FCP (%s:%d). Check your fcp host and port settings on both the node and the bot config." % ( self.fcp_host, self.fcp_port )); + log("***"); my_exit( 1 ) del noderef[ "header" ]; self.nodeRef = noderef; while( 'y' != opts['bot2bot_trades_only'] ): - log("Getting advertised ref from URL..."); + log("Getting the bot advertised ref from URL..."); try: openurl = urllib2.urlopen(opts['refurl']) refbuf = openurl.read(20*1024) # read up to 20 KiB @@ -350,7 +384,9 @@ reflines = refmemfile.readlines() refmemfile.close(); except Exception, msg: - log("ERROR: Failed to get advertised ref from URL."); + log("***"); + log("*** ERROR: Failed to get the bot advertised ref from URL."); + log("***"); self.setup_refurl( opts ); continue; log("Checking syntax of advertised ref..."); @@ -370,18 +406,24 @@ ref_fieldset[ reflinefields[ 0 ]] = reflinefields[ 1 ] ref_has_syntax_problem = False; if(not end_found): - log("ERROR: Advertised ref does not contain an \"End\" line."); + log("***"); + log("*** ERROR: Advertised ref does not contain an \"End\" line."); + log("***"); ref_has_syntax_problem = True; required_ref_fields = [ "dsaGroup.g", "dsaGroup.p", "dsaGroup.q", "dsaPubKey.y", "identity", "location", "myName", "sig" ]; for require_ref_field in required_ref_fields: if(not ref_fieldset.has_key(require_ref_field)): - log("ERROR: No %s field in ref" % ( require_ref_field )); + log("***"); + log("*** ERROR: No %s field in ref" % ( require_ref_field )); + log("***"); ref_has_syntax_problem = True; if(ref_has_syntax_problem): self.setup_refurl( opts ); continue; if( ref_fieldset[ "identity" ] != self.nodeIdentity ): - log("ERROR: The advertised ref's identity does not match the node's identity; perhaps your FCP host/port setting is wrong?"); + log("***"); + log("*** ERROR: The bot advertised ref's identity does not match the node's identity; perhaps your FCP host/port setting is wrong?"); + log("***"); self.setup_refurl( opts ); continue; log("Test adding advertised ref..."); @@ -389,25 +431,35 @@ addpeer_result = f.addpeer( kwdict = ref_fieldset ) except fcp.node.FCPException, msg: if( 21 == msg.info[ 'Code' ] ): - log("ERROR: The node had trouble parsing the advertised ref"); + log("***"); + log("*** ERROR: The node had trouble parsing the bot advertised ref"); + log("***"); self.setup_refurl( opts ); continue; elif( 27 == msg.info[ 'Code' ] ): - log("ERROR: The node could not verify the signature of the advertised ref"); + log("***"); + log("*** ERROR: The node could not verify the signature of the bot advertised ref"); + log("***"); self.setup_refurl( opts ); continue; elif( 28 == msg.info[ 'Code' ] ): - log("The advertised ref appears to be good"); + log("The bot advertised ref appears to be good"); break; elif( 29 == msg.info[ 'Code' ] ): - log("ERROR: The node has a peer with the advertised ref; perhaps your FCP host/port setting is wrong?"); + log("***"); + log("*** ERROR: The node has a peer with the bot advertised ref; perhaps your FCP host/port setting is wrong?"); + log("***"); f.shutdown() my_exit( 1 ) - log("ERROR: The node had trouble test-adding the advertised ref and gave us an unexpected error; perhaps you need to run updater.py"); + log("***"); + log("*** ERROR: The node had trouble test-adding the bot advertised ref and gave us an unexpected error; perhaps you need to run updater.py"); + log("***"); f.shutdown() my_exit( 1 ) except Exception, msg: - log("ERROR: caught generic exception adding peer: %s" % ( msg )); + log("***"); + log("*** ERROR: caught generic exception adding peer: %s" % ( msg )); + log("***"); f.shutdown() my_exit( 1 ) try: @@ -433,7 +485,9 @@ while(self.number_of_refs_to_collect > 0 and (self.number_of_refs_to_collect - self.nrefs) > 0 and ((temp_tpeers + (self.number_of_refs_to_collect - self.nrefs)) > self.max_tpeers)): self.number_of_refs_to_collect -= 1; if(self.number_of_refs_to_collect <= 0): - log("Don't need any more refs, now terminating!") + log("***"); + log("*** Don't need any more refs, now terminating!") + log("***"); my_exit( 1 ) self.cpeers = temp_cpeers self.tpeers = temp_tpeers From zothar at freenetproject.org Wed Jun 20 23:09:21 2007 From: zothar at freenetproject.org (zothar at freenetproject.org) Date: Wed, 20 Jun 2007 23:09:21 +0000 (UTC) Subject: [Pyfreenet] r13676 - trunk/apps/pyFreenet Message-ID: <20070620230921.D889E47891C@emu.freenetproject.org> Author: zothar Date: 2007-06-20 23:09:21 +0000 (Wed, 20 Jun 2007) New Revision: 13676 Modified: trunk/apps/pyFreenet/updater.py Log: refbot: The updater now always writes the local versions data file, to de-age the release even when no changes have been committed in the last two weeks Modified: trunk/apps/pyFreenet/updater.py =================================================================== --- trunk/apps/pyFreenet/updater.py 2007-06-20 23:00:58 UTC (rev 13675) +++ trunk/apps/pyFreenet/updater.py 2007-06-20 23:09:21 UTC (rev 13676) @@ -278,7 +278,7 @@ write_file( file_to_update, downloaded_file_lines ); updated_a_file_flag = True; local_versions[ file_to_update ] = remote_versions[ file_to_update ]; -if( updated_a_file_flag ): - print "Writing updated local versions data file..."; - write_local_versions_file( local_versions, versions_filename ); +# Always write the local versions data file so that running the updater will de-age the release, even when no changes have been committed in the last two weeks +print "Writing local versions data file..."; +write_local_versions_file( local_versions, versions_filename ); my_exit( 0 ); From zothar at freenetproject.org Sat Jun 23 00:47:46 2007 From: zothar at freenetproject.org (zothar at freenetproject.org) Date: Sat, 23 Jun 2007 00:47:46 +0000 (UTC) Subject: [Pyfreenet] r13723 - trunk/apps/pyFreenet Message-ID: <20070623004746.11FF84798AF@emu.freenetproject.org> Author: zothar Date: 2007-06-23 00:47:45 +0000 (Sat, 23 Jun 2007) New Revision: 13723 Added: trunk/apps/pyFreenet/bogon-bn-agg.txt Modified: trunk/apps/pyFreenet/refbot.py Log: refbot: add and read a file list of RFC1918/bogon IP address networks, to be used later for advertised noderef URL sanity checking. Added: trunk/apps/pyFreenet/bogon-bn-agg.txt =================================================================== --- trunk/apps/pyFreenet/bogon-bn-agg.txt (rev 0) +++ trunk/apps/pyFreenet/bogon-bn-agg.txt 2007-06-23 00:47:45 UTC (rev 13723) @@ -0,0 +1,30 @@ +0.0.0.0/7 +2.0.0.0/8 +5.0.0.0/8 +10.0.0.0/8 +23.0.0.0/8 +27.0.0.0/8 +31.0.0.0/8 +36.0.0.0/7 +39.0.0.0/8 +42.0.0.0/8 +46.0.0.0/8 +49.0.0.0/8 +50.0.0.0/8 +94.0.0.0/7 +100.0.0.0/6 +104.0.0.0/5 +112.0.0.0/6 +127.0.0.0/8 +169.254.0.0/16 +172.16.0.0/12 +173.0.0.0/8 +174.0.0.0/7 +176.0.0.0/5 +184.0.0.0/6 +192.0.2.0/24 +192.168.0.0/16 +197.0.0.0/8 +198.18.0.0/15 +223.0.0.0/8 +224.0.0.0/3 Modified: trunk/apps/pyFreenet/refbot.py =================================================================== --- trunk/apps/pyFreenet/refbot.py 2007-06-22 22:22:21 UTC (rev 13722) +++ trunk/apps/pyFreenet/refbot.py 2007-06-23 00:47:45 UTC (rev 13723) @@ -16,6 +16,7 @@ import select import socket import string +import struct import sys import threading import time @@ -59,9 +60,12 @@ A simple IRC bot """ + bogon_filename = "bogon-bn-agg.txt"; # Get updates from http://www.cymru.com/Documents/bogon-bn-agg.txt + bogons = {}; + minimumNodeBuild = 998; svnLongRevision = "$Revision$" svnRevision = svnLongRevision[ 11 : -2 ] - minimumNodeBuild = 998; + versions_filename = "updater_versions.dat"; #@ @+others #@+node:__init__ @@ -78,13 +82,12 @@ # check refbot release age log("Checking refbot release age....") - versions_filename = "updater_versions.dat"; - if( not os.path.exists( versions_filename )): - versions_file = file( versions_filename, "w+" ); - versions_file.write( "\n" ); - versions_file.close(); + if( not os.path.exists( FreenetNodeRefBot.versions_filename )): + FreenetNodeRefBot.versions_file = file( FreenetNodeRefBot.versions_filename, "w+" ); + FreenetNodeRefBot.versions_file.write( "\n" ); + FreenetNodeRefBot.versions_file.close(); else: - last_version_file_mod_time = os.path.getmtime( versions_filename ); + last_version_file_mod_time = os.path.getmtime( FreenetNodeRefBot.versions_filename ); now = time.time(); last_version_file_age = now - last_version_file_mod_time; minute_seconds = 60; @@ -373,7 +376,11 @@ my_exit( 1 ) del noderef[ "header" ]; self.nodeRef = noderef; - + + if( 0 >= len( FreenetNodeRefBot.bogons.keys())): + readBogonFile( FreenetNodeRefBot.bogon_filename, self.addBogonCIDRNet ); + #log("DEBUG: bogons: %s" % ( FreenetNodeRefBot.bogons )); + while( 'y' != opts['bot2bot_trades_only'] ): log("Getting the bot advertised ref from URL..."); try: @@ -1418,6 +1425,42 @@ self.greetChannel() #@-node:thrd + #@+node:addBogonCIDRNet + def addBogonCIDRNet( self, networkstr ): + if( FreenetNodeRefBot.bogons.has_key( networkstr )): + log("DEBUG: already has net: %s" % ( networkstr )); + return 0; + nums_result = cidrNetToNumbers( networkstr ); + if( None == nums_result ): + return None; + ( network, bits ) = nums_result; + fields = string.split( network, '.' ); + one = fields[ 0 ]; + two = string.join(( fields[ 0 ], fields[ 1 ] ), '.' ); + three = string.join(( fields[ 0 ], fields[ 1 ], fields[ 2 ] ), '.' ); + if( bits >= 24 ): + self.addBogonCIDRNetHelper( three, networkstr ); + elif( bits >= 16 ): + self.addBogonCIDRNetHelper( two, networkstr ); + elif( bits >= 8 ): + self.addBogonCIDRNetHelper( one, networkstr ); + else: + self.addBogonCIDRNetHelper( "0", networkstr ); + networknum = refbot_inet_aton( network ); + network = getNetworkAddressFromCIDRNet( networkstr ); + FreenetNodeRefBot.bogons[ networkstr ] = [ network, networknum, bits ]; + + #@-node:addBogonCIDRNet + #@-node:addBogonCIDRNetHelper + def addBogonCIDRNetHelper( self, key, networkstr ): + if( not FreenetNodeRefBot.bogons.has_key( key )): + FreenetNodeRefBot.bogons[ key ] = networkstr; + else: + tmpstr = FreenetNodeRefBot.bogons[ key ]; + tmpstr = tmpstr + ' ' + networkstr; + FreenetNodeRefBot.bogons[ key ] = tmpstr; + + #@-node:addBogonCIDRNetHelper #@-others #@-node:low level @@ -1955,6 +1998,59 @@ self.tpeers = peerUpdateCallResult[ "tpeers" ]; #@-node:class GetPeerUpdateHelper +def cidrNetToNumbers( networkstr ): + if( networkstr == None ): + return None; + if( networkstr == '' ): + return None; + fields = string.split( networkstr, '/' ); + if( len( fields ) != 2 ): + return None; + return(( fields[ 0 ], int( fields[ 1 ] ))); + +#@+node:getGetHostmaskFromBits +def getHostmaskFromBits( bits ): + hostmask = 0; + for i in range( 32 - bits ): + hostmask = hostmask << 1; + hostmask = hostmask + 1; + return refbot_inet_ntoa( hostmask ); + +#@-node:getGetHostmaskFromBits +#@+node:getGetNetmaskFromBits +def getNetmaskFromBits( bits ): + hostmask = refbot_inet_aton( getHostmaskFromBits( bits )); + fullmask = refbot_inet_aton( "255.255.255.255" ); + netmask = fullmask ^ hostmask; + return refbot_inet_ntoa( netmask ); + +#@-node:getGetNetmaskFromBits +#@+node:getNetworkAddress +def getNetworkAddress( ip, netmask ): + ipdottest = string.split( ip, '.' ); + if( 4 != len( ipdottest )): + return None; + netmaskdottest = string.split( netmask, '.' ); + if( 4 != len( netmaskdottest )): + return None; + ip = refbot_inet_aton( ip ); + netmask = refbot_inet_aton( netmask ); + networkaddr = ip & netmask; + return refbot_inet_ntoa( networkaddr ); + +#@-node:getNetworkAddress +#@+node:getNetworkAddressFromCIDRNet +def getNetworkAddressFromCIDRNet( networkstr ): + nums_result = cidrNetToNumbers( networkstr ); + if( None == nums_result ): + return None; + ( network, bits ) = nums_result; + netmask = getNetmaskFromBits( bits ); + if( None == netmask ): + return None; + return getNetworkAddress( network, netmask ); + +#@+node:getNetworkAddressFromCIDRNet #@+node:getPeerUpdateHelper def getPeerUpdateHelper( fcp_host, fcp_port ): cpeers = 0 @@ -1984,6 +2080,28 @@ return { "status" : 0, "status_msg" : "getPeerUpdateHelper completed normally", "cpeers" : cpeers, "tpeers" : tpeers } #@-node:getPeerUpdateHelper +#@+node:isProperCIDRNetwork +def isProperCIDRNetwork( networkstr ): + dottest = string.split( networkstr, '.' ); + if( 4 != len( dottest )): + return False; + slashtest = string.split( networkstr, '/' ); + if( 2 < len( slashtest )): + return False; + nums_result = cidrNetToNumbers( networkstr ); + if( None == nums_result ): + return False; + ( network, bits ) = nums_result; + fields = string.split( network, '.' ); + if( len( fields ) != 4 ): + return False; + netmask = getNetmaskFromBits( bits ); + networkaddr = getNetworkAddress( network, netmask ); + if( networkaddr == network ): + return True; + return False; + +#@-node:isProperCIDRNetwork #@+node:main def main(): @@ -1995,6 +2113,63 @@ bot.run() #@-node:main +#@+node:readBogonFile +def readBogonFile( bogon_filename, bogon_list_adder_callback ): + bogon_file = open( bogon_filename ); + bogon_file_entries = bogon_file.readlines(); + bogon_file.close(); + for entry in bogon_file_entries: + #log("DEBUG: readBogonFile(): %s\n" % ( entry )); + i = string.find( entry, '#' ); + if( i != -1 ): + entry = entry[ :i ]; + i = string.find( entry, ';' ); + if( i != -1 ): + entry = entry[ :i ]; + if( len( entry ) == 0 ): + continue; + entry = string.strip( entry ); + fields = string.split( entry ); + if( 1 < len( fields )): + log("Error: Invalid bogon entry: %s" % ( entry )); + continue; + net = string.lower( fields[ 0 ] ); + netslashtest = string.split( net, '/' ); + if( 1 == len( netslashtest )): + net = net + "/32"; + if( not isProperCIDRNetwork( net )): + log("Warning: %s is not a proper CIDR network" % ( net )); + log("DEBUG: %s should possibly be %s" % ( net, get_networkaddr_from_cidr_net( net ))); + continue; + bogon_list_adder_callback( net ); + +#@-node:readBogonFile +#@+node:refbot_inet_aton +def refbot_inet_aton( str_in ): + '''A Python implementation of socket.inet_aton(), which might be needed for backwards compatibilitywith older versions of Python''' + + fields = string.split( str_in, "." ); + if( len( fields ) != 4 ): + return None; + #log("DEBUG: fields: %s" % ( fields )); + fields2 = []; + for item in fields: + fields2.append( int( item )); + #log("DEBUG: fields2: %s" % ( fields2 )); + str = struct.pack( ">BBBB", fields2[ 0 ], fields2[ 1 ], fields2[ 2 ], fields2[ 3 ] ); + str2 = struct.unpack( ">L", str ); + return str2[ 0 ]; + +#@+node:refbot_inet_aton +#@+node:refbot_inet_ntoa +def refbot_inet_ntoa( num_in ): + '''A Python implementation of socket.inet_ntoa(), which might be needed for backwards compatibilitywith older versions of Python''' + + str = struct.pack( ">L", num_in ); + str2 = struct.unpack( ">BBBB", str ); + return "%d.%d.%d.%d" % ( str2[ 0 ], str2[ 1 ], str2[ 2 ], str2[ 3 ] ); + +#@+node:refbot_inet_ntoa #@+node:mainline if __name__ == '__main__': main() From zothar at freenetproject.org Sat Jun 23 00:49:39 2007 From: zothar at freenetproject.org (zothar at freenetproject.org) Date: Sat, 23 Jun 2007 00:49:39 +0000 (UTC) Subject: [Pyfreenet] r13724 - trunk/apps/pyFreenet Message-ID: <20070623004939.CD2B44798C3@emu.freenetproject.org> Author: zothar Date: 2007-06-23 00:49:39 +0000 (Sat, 23 Jun 2007) New Revision: 13724 Modified: trunk/apps/pyFreenet/updater.py Log: refbot: add bogon-bn-agg.txt to updater.py file list Modified: trunk/apps/pyFreenet/updater.py =================================================================== --- trunk/apps/pyFreenet/updater.py 2007-06-23 00:47:45 UTC (rev 13723) +++ trunk/apps/pyFreenet/updater.py 2007-06-23 00:49:39 UTC (rev 13724) @@ -34,6 +34,7 @@ # updater.py should be left out of files_to_update files_to_update = [ "fcp/node.py", + "bogon-bn-agg.txt", "refbot.py", "minibot.py", ]; From zothar at freenetproject.org Sat Jun 23 01:26:22 2007 From: zothar at freenetproject.org (zothar at freenetproject.org) Date: Sat, 23 Jun 2007 01:26:22 +0000 (UTC) Subject: [Pyfreenet] r13725 - trunk/apps/pyFreenet Message-ID: <20070623012622.0D3D34797E3@emu.freenetproject.org> Author: zothar Date: 2007-06-23 01:26:21 +0000 (Sat, 23 Jun 2007) New Revision: 13725 Modified: trunk/apps/pyFreenet/refbot.py Log: refbot: refuse to use bot announced ref URLs that are hosted on RFC1918 or unassigned IP addresses Modified: trunk/apps/pyFreenet/refbot.py =================================================================== --- trunk/apps/pyFreenet/refbot.py 2007-06-23 00:49:39 UTC (rev 13724) +++ trunk/apps/pyFreenet/refbot.py 2007-06-23 01:26:21 UTC (rev 13725) @@ -22,6 +22,7 @@ import time import traceback import urllib2 +import urlparse import fcp from minibot import log, MiniBot, PrivateChat, my_exit @@ -382,6 +383,19 @@ #log("DEBUG: bogons: %s" % ( FreenetNodeRefBot.bogons )); while( 'y' != opts['bot2bot_trades_only'] ): + ( url_scheme, url_netloc, url_path, url_parms, url_query, url_fragid ) = urlparse.urlparse( opts['refurl'] ); + url_host = url_netloc; + if( -1 != url_host.find( ":" )): + url_host_fields = url_host.split( ":" ); + url_host = url_host_fields[ 0 ]; + url_ip = socket.gethostbyname( url_host ); + #log("DEBUG: url_ip: %s" % ( url_ip )); + if( self.findBogonCIDRNet( url_ip )): + log("***"); + log("*** ERROR: The bot advertised ref URL points to an RFC1918 private IP address or an unassigned bogon IP address and cannot be used on the Internet."); + log("***"); + self.setup_refurl( opts ); + continue; log("Getting the bot advertised ref from URL..."); try: openurl = urllib2.urlopen(opts['refurl']) @@ -1429,7 +1443,7 @@ def addBogonCIDRNet( self, networkstr ): if( FreenetNodeRefBot.bogons.has_key( networkstr )): log("DEBUG: already has net: %s" % ( networkstr )); - return 0; + return False; nums_result = cidrNetToNumbers( networkstr ); if( None == nums_result ): return None; @@ -1461,6 +1475,46 @@ FreenetNodeRefBot.bogons[ key ] = tmpstr; #@-node:addBogonCIDRNetHelper + #@+node:findBogonCIDRNet + def findBogonCIDRNet( self, ipstr ): + fields = string.split( ipstr, '.' ); + if( len( fields ) != 4 ): + return None; + one = fields[ 0 ]; + two = string.join(( fields[ 0 ], fields[ 1 ] ), '.' ); + three = string.join(( fields[ 0 ], fields[ 1 ], fields[ 2 ] ), '.' ); + if( FreenetNodeRefBot.bogons.has_key( three )): + result = self.findBogonCIDRNetHelper( three, ipstr ); + if( result != 0 ): + return result; + if( FreenetNodeRefBot.bogons.has_key( two )): + result = self.findBogonCIDRNetHelper( two, ipstr ); + if( result != 0 ): + return result; + if( FreenetNodeRefBot.bogons.has_key( one )): + result = self.findBogonCIDRNetHelper( one, ipstr ); + if( result != 0 ): + return result; + if( FreenetNodeRefBot.bogons.has_key( "0" )): + result = self.findBogonCIDRNetHelper( "0", ipstr ); + if( result != 0 ): + return result; + return False; + + #@-node:findBogonCIDRNet + #@+node:findBogonCIDRNetHelper + def findBogonCIDRNetHelper( self, key, ipstr ): + cidr_net_list_str = FreenetNodeRefBot.bogons[ key ]; + cidr_net_list = string.split( cidr_net_list_str, ' ' ); + cidr_net_list.sort( sortByHostmaskCompareFunction ); + cidr_net_list.reverse(); + for cidr_net in cidr_net_list: + result = isIPInCIDRNet( ipstr, cidr_net ); + if( result ): + return cidr_net; + return False; + + #@-node:findBogonCIDRNetHelper #@-others #@-node:low level @@ -2080,6 +2134,18 @@ return { "status" : 0, "status_msg" : "getPeerUpdateHelper completed normally", "cpeers" : cpeers, "tpeers" : tpeers } #@-node:getPeerUpdateHelper +def isIPInCIDRNet( ipstr, networkstr ): + nums_result = cidrNetToNumbers( networkstr ); + if( None == nums_result ): + return None; + ( network, bits ) = nums_result; + netmask = getNetmaskFromBits( bits ); + networkaddr = getNetworkAddress( network, netmask ); + ipnetworkaddr = getNetworkAddress( ipstr, netmask ); + if( ipnetworkaddr == networkaddr ): + return 1; + return 0; + #@+node:isProperCIDRNetwork def isProperCIDRNetwork( networkstr ): dottest = string.split( networkstr, '.' ); @@ -2160,7 +2226,7 @@ str2 = struct.unpack( ">L", str ); return str2[ 0 ]; -#@+node:refbot_inet_aton +#@-node:refbot_inet_aton #@+node:refbot_inet_ntoa def refbot_inet_ntoa( num_in ): '''A Python implementation of socket.inet_ntoa(), which might be needed for backwards compatibilitywith older versions of Python''' @@ -2169,7 +2235,23 @@ str2 = struct.unpack( ">BBBB", str ); return "%d.%d.%d.%d" % ( str2[ 0 ], str2[ 1 ], str2[ 2 ], str2[ 3 ] ); -#@+node:refbot_inet_ntoa +#@-node:refbot_inet_ntoa +#@+node:sortByHostmaskCompareFunction +def sortByHostmaskCompareFunction( a, b ): + #print "DEBUG: sbhcf:", a, b; + ( a_network, a_bits ) = cidr_net_to_nums( a ); + ( b_network, b_bits ) = cidr_net_to_nums( b ); + if( a_bits < b_bits ): + return -1; + if( a_bits > b_bits ): + return 1; + if( a_network < b_network ): + return -1; + if( a_network > b_network ): + return 1; + return 0; + +#@-node:sortByHostmaskCompareFunction #@+node:mainline if __name__ == '__main__': main() From zothar at freenetproject.org Mon Jun 25 12:40:04 2007 From: zothar at freenetproject.org (zothar at freenetproject.org) Date: Mon, 25 Jun 2007 12:40:04 +0000 (UTC) Subject: [Pyfreenet] r13751 - trunk/apps/pyFreenet Message-ID: <20070625124004.48005479700@emu.freenetproject.org> Author: zothar Date: 2007-06-25 12:40:03 +0000 (Mon, 25 Jun 2007) New Revision: 13751 Modified: trunk/apps/pyFreenet/refbot.py Log: refbot: fix a couple of missed function renames Modified: trunk/apps/pyFreenet/refbot.py =================================================================== --- trunk/apps/pyFreenet/refbot.py 2007-06-24 15:38:34 UTC (rev 13750) +++ trunk/apps/pyFreenet/refbot.py 2007-06-25 12:40:03 UTC (rev 13751) @@ -2052,6 +2052,7 @@ self.tpeers = peerUpdateCallResult[ "tpeers" ]; #@-node:class GetPeerUpdateHelper +#@+node:cidrNetToNumbers def cidrNetToNumbers( networkstr ): if( networkstr == None ): return None; @@ -2062,6 +2063,7 @@ return None; return(( fields[ 0 ], int( fields[ 1 ] ))); +#@-node:cidrNetToNumbers #@+node:getGetHostmaskFromBits def getHostmaskFromBits( bits ): hostmask = 0; @@ -2239,8 +2241,8 @@ #@+node:sortByHostmaskCompareFunction def sortByHostmaskCompareFunction( a, b ): #print "DEBUG: sbhcf:", a, b; - ( a_network, a_bits ) = cidr_net_to_nums( a ); - ( b_network, b_bits ) = cidr_net_to_nums( b ); + ( a_network, a_bits ) = cidrNetToNumbers( a ); + ( b_network, b_bits ) = cidrNetToNumbers( b ); if( a_bits < b_bits ): return -1; if( a_bits > b_bits ): From zothar at freenetproject.org Fri Jun 29 23:14:12 2007 From: zothar at freenetproject.org (zothar at freenetproject.org) Date: Fri, 29 Jun 2007 23:14:12 +0000 (UTC) Subject: [Pyfreenet] r13836 - trunk/apps/pyFreenet Message-ID: <20070629231412.7554147981D@emu.freenetproject.org> Author: zothar Date: 2007-06-29 23:14:12 +0000 (Fri, 29 Jun 2007) New Revision: 13836 Modified: trunk/apps/pyFreenet/ Log: pyFreenet: Add updater_versions.dat to svn:ignore Property changes on: trunk/apps/pyFreenet ___________________________________________________________________ Name: svn:ignore - *.pyc + *.pyc updater_versions.dat From zothar at freenetproject.org Sat Jun 30 00:35:41 2007 From: zothar at freenetproject.org (zothar at freenetproject.org) Date: Sat, 30 Jun 2007 00:35:41 +0000 (UTC) Subject: [Pyfreenet] r13838 - trunk/apps/pyFreenet/fcp Message-ID: <20070630003541.7777F3882BF@emu.freenetproject.org> Author: zothar Date: 2007-06-30 00:35:41 +0000 (Sat, 30 Jun 2007) New Revision: 13838 Modified: trunk/apps/pyFreenet/fcp/sitemgr.py Log: pyFreenet: implement CHK Pre-computing matadata file saving on every tenth rather than every (Bug #505) Modified: trunk/apps/pyFreenet/fcp/sitemgr.py =================================================================== --- trunk/apps/pyFreenet/fcp/sitemgr.py 2007-06-29 23:35:54 UTC (rev 13837) +++ trunk/apps/pyFreenet/fcp/sitemgr.py 2007-06-30 00:35:41 UTC (rev 13838) @@ -62,8 +62,8 @@ self.chkCalcNode = kw.get('chkCalcNode', None) - self.index = kw.get('index', 'index.html') - self.mtype = kw.get('mtype', 'text/html') + self.index = kw.get('index', 'index.html') + self.mtype = kw.get('mtype', 'text/html') self.load() @@ -202,8 +202,8 @@ verbosity=self.verbosity, Verbosity=self.Verbosity, priority=self.priority, - index=self.index, - mtype=self.mtype, + index=self.index, + mtype=self.mtype, **kw) self.sites.append(site) @@ -417,8 +417,8 @@ self.Verbosity = kw.get('Verbosity', 0) self.chkCalcNode = kw.get('chkCalcNode', self.node) - self.index = kw.get('index', 'index.html') - self.mtype = kw.get('mtype', 'text/html') + self.index = kw.get('index', 'index.html') + self.mtype = kw.get('mtype', 'text/html') #print "Verbosity=%s" % self.Verbosity @@ -434,7 +434,7 @@ self.name, self.dir)) # if not (os.path.isdir(self.dir) \ # and os.path.isfile(os.path.join(self.dir, self.index)) \ -# and not self.insertingIndex): +# and not self.insertingIndex): # raise Exception("Site %s, directory %s, no %s present" % ( # self.name, self.dir, self.index)) @@ -654,6 +654,8 @@ we can, saving along the way so we can later resume """ log = self.log + + chkSaveInterval = 10; self.log(INFO, "Processing freesite '%s'..." % self.name) if self.updateInProgress: @@ -704,6 +706,7 @@ # compute CHKs for all these files, synchronously, and at the same time, # submit the inserts, asynchronously + chkCounter = 0; for rec in filesToInsert: if rec['state'] == 'waiting': continue @@ -734,7 +737,11 @@ ) rec['state'] = 'inserting' - self.save() + chkCounter += 1; + if( 0 == ( chkCounter % chkSaveInterval )): + self.save() + + self.save() log(INFO, "insert:%s: All CHK calculations for new/changed files complete" \ @@ -920,7 +927,7 @@ self.uriPriv = updateEdition(self.uriPriv, edition) self.save() - elif name == self.index: + elif name == self.index: if isinstance(result, Exception): self.needToUpdate = True else: From zothar at freenetproject.org Fri Jun 29 22:57:12 2007 From: zothar at freenetproject.org (zothar at freenetproject.org) Date: Fri, 29 Jun 2007 22:57:12 +0000 (UTC) Subject: [Pyfreenet] r13835 - trunk/apps/pyFreenet Message-ID: <20070629225712.01269388002@emu.freenetproject.org> Author: zothar Date: 2007-06-29 22:57:11 +0000 (Fri, 29 Jun 2007) New Revision: 13835 Added: trunk/apps/pyFreenet/rrdtool_freenet.sh.example Log: Added example of using fcp_to_rrdtool_bridge.py: rrdtool_freenet.sh.example Added: trunk/apps/pyFreenet/rrdtool_freenet.sh.example =================================================================== --- trunk/apps/pyFreenet/rrdtool_freenet.sh.example (rev 0) +++ trunk/apps/pyFreenet/rrdtool_freenet.sh.example 2007-06-29 22:57:11 UTC (rev 13835) @@ -0,0 +1,815 @@ +#!/bin/sh + +# Graph Freenet node stats using rrdtool, getting data via FCP +# +# Run this script in a cron job every 5 minutes +# +# This code was written by Zothar, April 2007, released under the +# GNU General Public License. +# +# No warranty, yada yada +# +# Example usage: ./freenet_rrdtool.sh ToadDark 127.0.0.1:9841 +# + +function usage() { + echo "Usage: $0 :" + echo + echo "where is:" + echo " update - to update the RRD" + echo " graph - to graph the latest data from the RRD" + echo " print - to print the latest data from the RRD to a text file" + echo " update_n_graph - to update the RRD and then graph the latest data from it" + echo + echo "where is a short name for the node such as "ToadDark". The nodename should not contain anything but letters and numbers as it's used in a filename." + echo "where is the hostname of the node" + echo "where is the node's FCP port number" +} + +if( [ "" == "$3" ] ) +then + usage + exit 1 +fi + +cmd=$1 +node_name=$2 +node_host_port=$3 + +FCP_RRDTOOL_BRIDGE="/usr/local/pyFreenet/fcp_to_rrdtool_bridge.py" + +log_filename="freenet_${node_name}.log" +png_filename="freenet_${node_name}.png" +png2_filename="freenet2_${node_name}.png" +png3_filename="freenet3_${node_name}.png" +png4_filename="freenet4_${node_name}.png" +png5_filename="freenet5_${node_name}.png" +png6_filename="freenet6_${node_name}.png" +png7_filename="freenet7_${node_name}.png" +png8_filename="freenet8_${node_name}.png" +png9_filename="freenet9_${node_name}.png" +rrd_filename="freenet_${node_name}.rrd" +txt_filename="freenet_${node_name}.txt" +do_graph=n +do_print=n +do_update=n +if( [ "" != "${cmd}" ] ) +then + case "${cmd}" in + graph) + do_graph=y + ;; + print) + do_print=y + ;; + update_n_graph) + do_update=y + do_graph=y + ;; + update) + do_update=y + ;; + *) + echo "Unknown command: ${cmd}" + exit 1 + ;; + esac +fi + +if( [ ! -e ${rrd_filename} ] ) +then + echo "`date \"+%Y%m%d-%H%M%S\"`: Creating ${rrd_filename}" >> ${log_filename} + rrdtool create ${rrd_filename} \ + --start `date "+%s"` \ + --step 300 \ + DS:allocatedJavaMemory:GAUGE:600:0:U \ + DS:availableCPUs:GAUGE:600:0:U \ + DS:averagePingTime:GAUGE:600:0:U \ + DS:avgConnPeersPerNode:GAUGE:600:0:U \ + DS:avgStoreAccessRate:GAUGE:600:0:U \ + DS:backedOffPercent:GAUGE:600:0:U \ + DS:bwlimitDelayTime:GAUGE:600:0:U \ + DS:cacheAccesses:GAUGE:600:0:U \ + DS:cachedKeys:GAUGE:600:0:U \ + DS:cachedSize:GAUGE:600:0:U \ + DS:cachedStoreHits:GAUGE:600:0:U \ + DS:cachedStoreMisses:GAUGE:600:0:U \ + DS:freeJavaMemory:GAUGE:600:0:U \ + DS:isUsingWrapper:GAUGE:600:0:U \ + DS:locChangePerMinute:GAUGE:600:0:U \ + DS:locChangePerSession:GAUGE:600:0:U \ + DS:locChangePerSwap:GAUGE:600:0:U \ + DS:maxOverallKeys:GAUGE:600:0:U \ + DS:maxOverallSize:GAUGE:600:0:U \ + DS:maximumJavaMemory:GAUGE:600:0:U \ + DS:netSzEst24hourRecnt:GAUGE:600:0:U \ + DS:netSzEst48hourRecnt:GAUGE:600:0:U \ + DS:netSzEstSession:GAUGE:600:0:U \ + DS:noSwaps:GAUGE:600:0:U \ + DS:noSwapsPerMinute:GAUGE:600:0:U \ + DS:numARKFetchers:GAUGE:600:0:U \ + DS:numBursting:GAUGE:600:0:U \ + DS:numConnected:GAUGE:600:0:U \ + DS:numDisabled:GAUGE:600:0:U \ + DS:numDisconnected:GAUGE:600:0:U \ + DS:numInsertSenders:GAUGE:600:0:U \ + DS:numListenOnly:GAUGE:600:0:U \ + DS:numListening:GAUGE:600:0:U \ + DS:numNeverConnected:GAUGE:600:0:U \ + DS:numNotConnected:GAUGE:600:0:U \ + DS:numRemPrLocsInSwaps:GAUGE:600:0:U \ + DS:numRequestSenders:GAUGE:600:0:U \ + DS:numRoutingBackedOff:GAUGE:600:0:U \ + DS:numSimpleConnected:GAUGE:600:0:U \ + DS:numTooNew:GAUGE:600:0:U \ + DS:numTooOld:GAUGE:600:0:U \ + DS:numTransReqSenders:GAUGE:600:0:U \ + DS:numForRejOverload:GAUGE:600:0:U \ + DS:numForRejOverload2:GAUGE:600:0:U \ + DS:numForRejOverload3:GAUGE:600:0:U \ + DS:numForRejOverload4:GAUGE:600:0:U \ + DS:numForRejOverload5:GAUGE:600:0:U \ + DS:numForRejOverload6:GAUGE:600:0:U \ + DS:numBOAcceptedTO:GAUGE:600:0:U \ + DS:numBOAftInsAccTO:GAUGE:600:0:U \ + DS:numBOAftInsAccTO2:GAUGE:600:0:U \ + DS:numBOTimeout:GAUGE:600:0:U \ + DS:numBOTimeout2:GAUGE:600:0:U \ + DS:numBOTimeout3:GAUGE:600:0:U \ + DS:overallAccesses:GAUGE:600:0:U \ + DS:overallKeys:GAUGE:600:0:U \ + DS:overallSize:GAUGE:600:0:U \ + DS:pInstantReject:GAUGE:600:0:U \ + DS:pCchdStrHitOAcceses:GAUGE:600:0:U \ + DS:pOverallKeysOfMax:GAUGE:600:0:U \ + DS:pStoreHitsOAccesses:GAUGE:600:0:U \ + DS:recentInputRate:GAUGE:600:0:U \ + DS:recentOutputRate:GAUGE:600:0:U \ + DS:routingMissDistance:GAUGE:600:0:U \ + DS:runningThreadCount:GAUGE:600:0:U \ + DS:startedSwaps:GAUGE:600:0:U \ + DS:startupTime:GAUGE:600:0:U \ + DS:storeAccesses:GAUGE:600:0:U \ + DS:storeHits:GAUGE:600:0:U \ + DS:storeKeys:GAUGE:600:0:U \ + DS:storeMisses:GAUGE:600:0:U \ + DS:storeSize:GAUGE:600:0:U \ + DS:swaps:GAUGE:600:0:U \ + DS:swapsPerMinute:GAUGE:600:0:U \ + DS:swapsPerNoSwaps:GAUGE:600:0:U \ + DS:swapsRejAlreadyLckd:GAUGE:600:0:U \ + DS:swapsRejLoop:GAUGE:600:0:U \ + DS:swapsRejNowhereToGo:GAUGE:600:0:U \ + DS:swapsRejRateLimit:GAUGE:600:0:U \ + DS:swapsRejRecID:GAUGE:600:0:U \ + DS:totalInputBytes:GAUGE:600:0:U \ + DS:totalInputRate:GAUGE:600:0:U \ + DS:totalOutputBytes:GAUGE:600:0:U \ + DS:totalOutputRate:GAUGE:600:0:U \ + DS:totalPloadOutBytes:GAUGE:600:0:U \ + DS:totalPloadOutPcnt:GAUGE:600:0:U \ + DS:totalPloadOutRate:GAUGE:600:0:U \ + DS:unclaimedFIFOSize:GAUGE:600:0:U \ + DS:uptimeSeconds:GAUGE:600:0:U \ + DS:usedJavaMemory:GAUGE:600:0:U \ + DS:location:GAUGE:600:0:U \ + RRA:AVERAGE:0.5:1:600 \ + RRA:AVERAGE:0.5:6:700 \ + RRA:AVERAGE:0.5:12:1550 \ + RRA:AVERAGE:0.5:24:775 \ + RRA:AVERAGE:0.5:288:797 +fi + +if( [ "y" == "$do_update" ] ) +then + echo "`date \"+%Y%m%d-%H%M%S\"`: Updating ${rrd_filename}" >> ${log_filename} + rrdtool update ${rrd_filename} `${FCP_RRDTOOL_BRIDGE} ${node_host_port} allocatedJavaMemory,availableCPUs,averagePingTime,avgConnectedPeersPerNode,avgStoreAccessRate,backedOffPercent,bwlimitDelayTime,cacheAccesses,cachedKeys,cachedSize,cachedStoreHits,cachedStoreMisses,freeJavaMemory,isUsingWrapper,locationChangePerMinute,locationChangePerSession,locationChangePerSwap,maxOverallKeys,maxOverallSize,maximumJavaMemory,networkSizeEstimate24hourRecent,networkSizeEstimate48hourRecent,networkSizeEstimateSession,noSwaps,noSwapsPerMinute,numberOfARKFetchers,numberOfBursting,numberOfConnected,numberOfDisabled,numberOfDisconnected,numberOfInsertSenders,numberOfListenOnly,numberOfListening,numberOfNeverConnected,numberOfNotConnected,numberOfRemotePeerLocationsSeenInSwaps,numberOfRequestSenders,numberOfRoutingBackedOff,numberOfSimpleConnected,numberOfTooNew,numberOfTooOld,numberOfTransferringRequestSenders,numberWithRoutingBackoffReasons.ForwardRejectedOverload,numberWithRoutingBackoffReasons.ForwardRejectedOverload2,numberWithRoutingBackoffReasons.ForwardRejectedOverload3,numberWithRoutingBackoffReasons.ForwardRejectedOverload4,numberWithRoutingBackoffReasons.ForwardRejectedOverload5,numberWithRoutingBackoffReasons.ForwardRejectedOverload6,numberWithRoutingBackoffReasons.AcceptedTimeout,numberWithRoutingBackoffReasons.AfterInsertAcceptedTimeout,numberWithRoutingBackoffReasons.AfterInsertAcceptedTimeout2,numberWithRoutingBackoffReasons.Timeout,numberWithRoutingBackoffReasons.Timeout2,numberWithRoutingBackoffReasons.Timeout,overallAccesses,overallKeys,overallSize,pInstantReject,percentCachedStoreHitsOfAccesses,percentOverallKeysOfMax,percentStoreHitsOfAccesses,recentInputRate,recentOutputRate,routingMissDistance,runningThreadCount,startedSwaps,startupTime,storeAccesses,storeHits,storeKeys,storeMisses,storeSize,swaps,swapsPerMinute,swapsPerNoSwaps,swapsRejectedAlreadyLocked,swapsRejectedLoop,swapsRejectedNowhereToGo,swapsRejectedRateLimit,swapsRejectedRecognizedID,totalInputBytes,totalInputRate,totalOutputBytes,totalOutputRate,totalPayloadOutputBytes,totalPayloadOutputPercent,totalPayloadOutputRate,unclaimedFIFOSize,uptimeSeconds,usedJavaMemory,location` +fi +if( [ "y" == "${do_graph}" ] ) +then + echo -n "`date \"+%Y%m%d-%H%M%S\"`: Creating ${png_filename}: " >> ${log_filename} + rrdtool graph ${png_filename} \ + -t "${node_name} stats (`date "+%Y%m%d-%H%M%S"`)" \ + --start end-48hours \ + --font LEGEND:7 \ + --width 576 \ + --height 150 \ + --interlaced \ + DEF:pInstantReject=${rrd_filename}:pInstantReject:AVERAGE \ + DEF:p2CachedStoreHitsOfAccesses=${rrd_filename}:pCchdStrHitOAcceses:AVERAGE \ + CDEF:pCachedStoreHitsOfAccesses=p2CachedStoreHitsOfAccesses,100,/ \ + DEF:p2OverallKeysOfMax=${rrd_filename}:pOverallKeysOfMax:AVERAGE \ + CDEF:pOverallKeysOfMax=p2OverallKeysOfMax,100,/ \ + DEF:p2StoreHitsOfAccesses=${rrd_filename}:pStoreHitsOAccesses:AVERAGE \ + CDEF:pStoreHitsOfAccesses=p2StoreHitsOfAccesses,100,/ \ + DEF:backedOffPercent=${rrd_filename}:backedOffPercent:AVERAGE \ + DEF:t2otalPayloadOutputPercent=${rrd_filename}:totalPloadOutPcnt:AVERAGE \ + CDEF:totalPayloadOutputPercent=t2otalPayloadOutputPercent,100,/ \ + DEF:location=${rrd_filename}:location:AVERAGE \ + DEF:locationChangePerMinute=${rrd_filename}:locChangePerMinute:AVERAGE \ + DEF:locationChangePerSession=${rrd_filename}:locChangePerSession:AVERAGE \ + DEF:locationChangePerSwap=${rrd_filename}:locChangePerSwap:AVERAGE \ + LINE1:location#0000FF:"location" \ + COMMENT:" " \ + GPRINT:location:MAX:"Max\: %9.6lf" \ + GPRINT:location:AVERAGE:"Avg\: %9.6lf" \ + GPRINT:location:MIN:"Min\: %9.6lf" \ + GPRINT:location:LAST:"Cur\: %9.6lf\l" \ + LINE2:locationChangePerMinute#FF0000:"locationChangePerMinute" \ + COMMENT:" " \ + GPRINT:locationChangePerMinute:MAX:"Max\: %9.6lf" \ + GPRINT:locationChangePerMinute:AVERAGE:"Avg\: %9.6lf" \ + GPRINT:locationChangePerMinute:MIN:"Min\: %9.6lf" \ + GPRINT:locationChangePerMinute:LAST:"Cur\: %9.6lf\l" \ + LINE2:locationChangePerSession#FFCC00:"locationChangePerSession" \ + COMMENT:" " \ + GPRINT:locationChangePerSession:MAX:"Max\: %9.6lf" \ + GPRINT:locationChangePerSession:AVERAGE:"Avg\: %9.6lf" \ + GPRINT:locationChangePerSession:MIN:"Min\: %9.6lf" \ + GPRINT:locationChangePerSession:LAST:"Cur\: %9.6lf\l" \ + LINE2:locationChangePerSwap#FF7F00:"locationChangePerSwap" \ + COMMENT:" " \ + GPRINT:locationChangePerSwap:MAX:"Max\: %9.6lf" \ + GPRINT:locationChangePerSwap:AVERAGE:"Avg\: %9.6lf" \ + GPRINT:locationChangePerSwap:MIN:"Min\: %9.6lf" \ + GPRINT:locationChangePerSwap:LAST:"Cur\: %9.6lf\l" \ + LINE1:pInstantReject#00CCFF:"pInstantReject" \ + COMMENT:" " \ + GPRINT:pInstantReject:MAX:"Max\: %9.6lf" \ + GPRINT:pInstantReject:AVERAGE:"Avg\: %9.6lf" \ + GPRINT:pInstantReject:MIN:"Min\: %9.6lf" \ + GPRINT:pInstantReject:LAST:"Cur\: %9.6lf\l" \ + LINE1:backedOffPercent#FF00FF:"backedOffPercent" \ + COMMENT:" " \ + GPRINT:backedOffPercent:MAX:"Max\: %9.6lf" \ + GPRINT:backedOffPercent:AVERAGE:"Avg\: %9.6lf" \ + GPRINT:backedOffPercent:MIN:"Min\: %9.6lf" \ + GPRINT:backedOffPercent:LAST:"Cur\: %9.6lf\l" \ + LINE1:pCachedStoreHitsOfAccesses#000000:"pCachedStoreHitsOfAccesses" \ + COMMENT:" " \ + GPRINT:pCachedStoreHitsOfAccesses:MAX:"Max\: %9.6lf" \ + GPRINT:pCachedStoreHitsOfAccesses:AVERAGE:"Avg\: %9.6lf" \ + GPRINT:pCachedStoreHitsOfAccesses:MIN:"Min\: %9.6lf" \ + GPRINT:pCachedStoreHitsOfAccesses:LAST:"Cur\: %9.6lf\l" \ + LINE2:pStoreHitsOfAccesses#666666:"pStoreHitsOfAccesses" \ + COMMENT:" " \ + GPRINT:pStoreHitsOfAccesses:MAX:"Max\: %9.6lf" \ + GPRINT:pStoreHitsOfAccesses:AVERAGE:"Avg\: %9.6lf" \ + GPRINT:pStoreHitsOfAccesses:MIN:"Min\: %9.6lf" \ + GPRINT:pStoreHitsOfAccesses:LAST:"Cur\: %9.6lf\l" \ + LINE2:pOverallKeysOfMax#CCCCCC:"pOverallKeysOfMax" \ + COMMENT:" " \ + GPRINT:pOverallKeysOfMax:MAX:"Max\: %9.6lf" \ + GPRINT:pOverallKeysOfMax:AVERAGE:"Avg\: %9.6lf" \ + GPRINT:pOverallKeysOfMax:MIN:"Min\: %9.6lf" \ + GPRINT:pOverallKeysOfMax:LAST:"Cur\: %9.6lf\l" \ + LINE1:totalPayloadOutputPercent#7F7FFF:"totalPayloadOutputPercent" \ + COMMENT:" " \ + GPRINT:totalPayloadOutputPercent:MAX:"Max\: %9.6lf" \ + GPRINT:totalPayloadOutputPercent:AVERAGE:"Avg\: %9.6lf" \ + GPRINT:totalPayloadOutputPercent:MIN:"Min\: %9.6lf" \ + GPRINT:totalPayloadOutputPercent:LAST:"Cur\: %9.6lf\l" \ + >> ${log_filename} + chmod a+r ${png_filename} + echo -n "`date \"+%Y%m%d-%H%M%S\"`: Creating ${png2_filename}: " >> ${log_filename} + rrdtool graph ${png2_filename} \ + -t "${node_name} stats 2 (`date "+%Y%m%d-%H%M%S"`)" \ + --start end-48hours \ + --font LEGEND:7 \ + --width 576 \ + --height 150 \ + --interlaced \ + DEF:averagePingTime=${rrd_filename}:averagePingTime:AVERAGE \ + DEF:bwlimitDelayTime=${rrd_filename}:bwlimitDelayTime:AVERAGE \ + LINE1:bwlimitDelayTime#FF00FF:"bwlimitDelayTime" \ + COMMENT:" " \ + GPRINT:bwlimitDelayTime:MAX:"Max\: %13.6lf" \ + GPRINT:bwlimitDelayTime:AVERAGE:"Avg\: %13.6lf" \ + GPRINT:bwlimitDelayTime:MIN:"Min\: %13.6lf" \ + GPRINT:bwlimitDelayTime:LAST:"Cur\: %13.6lf\l" \ + LINE1:averagePingTime#000000:"averagePingTime" \ + COMMENT:" " \ + GPRINT:averagePingTime:MAX:"Max\: %13.6lf" \ + GPRINT:averagePingTime:AVERAGE:"Avg\: %13.6lf" \ + GPRINT:averagePingTime:MIN:"Min\: %13.6lf" \ + GPRINT:averagePingTime:LAST:"Cur\: %13.6lf\l" \ + >> ${log_filename} + chmod a+r ${png2_filename} + echo -n "`date \"+%Y%m%d-%H%M%S\"`: Creating ${png3_filename}: " >> ${log_filename} + rrdtool graph ${png3_filename} \ + -t "${node_name} stats 3 (`date "+%Y%m%d-%H%M%S"`)" \ + --start end-48hours \ + --font LEGEND:7 \ + --width 576 \ + --height 150 \ + --interlaced \ + DEF:allocatedJava2Memory=${rrd_filename}:allocatedJavaMemory:AVERAGE \ + CDEF:allocatedJavaMemory=allocatedJava2Memory,1048576,/ \ + DEF:freeJava2Memory=${rrd_filename}:freeJavaMemory:AVERAGE \ + CDEF:freeJavaMemory=freeJava2Memory,1048576,/ \ + DEF:maximumJava2Memory=${rrd_filename}:maximumJavaMemory:AVERAGE \ + CDEF:maximumJavaMemory=maximumJava2Memory,1048576,/ \ + LINE2:freeJavaMemory#FF0000:"freeJavaMemory" \ + COMMENT:" " \ + GPRINT:freeJavaMemory:MAX:"Max\: %12.6lf" \ + GPRINT:freeJavaMemory:AVERAGE:"Avg\: %12.6lf" \ + GPRINT:freeJavaMemory:MIN:"Min\: %12.6lf" \ + GPRINT:freeJavaMemory:LAST:"Cur\: %12.6lf\l" \ + LINE2:maximumJavaMemory#FFCC00:"maximumJavaMemory" \ + COMMENT:" " \ + GPRINT:maximumJavaMemory:MAX:"Max\: %12.6lf" \ + GPRINT:maximumJavaMemory:AVERAGE:"Avg\: %12.6lf" \ + GPRINT:maximumJavaMemory:MIN:"Min\: %12.6lf" \ + GPRINT:maximumJavaMemory:LAST:"Cur\: %12.6lf\l" \ + LINE2:allocatedJavaMemory#00CCFF:"allocatedJavaMemory" \ + COMMENT:" " \ + GPRINT:allocatedJavaMemory:MAX:"Max\: %12.6lf" \ + GPRINT:allocatedJavaMemory:AVERAGE:"Avg\: %12.6lf" \ + GPRINT:allocatedJavaMemory:MIN:"Min\: %12.6lf" \ + GPRINT:allocatedJavaMemory:LAST:"Cur\: %12.6lf\l" \ + >> ${log_filename} + chmod a+r ${png3_filename} + echo -n "`date \"+%Y%m%d-%H%M%S\"`: Creating ${png4_filename}: " >> ${log_filename} + rrdtool graph ${png4_filename} \ + -t "${node_name} stats 4 (`date "+%Y%m%d-%H%M%S"`)" \ + --start end-48hours \ + --font LEGEND:7 \ + --width 576 \ + --height 150 \ + --logarithmic \ + --units=si \ + --interlaced \ + DEF:noSwaps=${rrd_filename}:noSwaps:AVERAGE \ + LINE1:noSwaps#0000FF:"noSwaps" \ + COMMENT:" " \ + GPRINT:noSwaps:MAX:"Max\: %9.6lf" \ + GPRINT:noSwaps:AVERAGE:"Avg\: %9.6lf" \ + GPRINT:noSwaps:MIN:"Min\: %9.6lf" \ + GPRINT:noSwaps:LAST:"Cur\: %9.6lf\l" \ + >> ${log_filename} + chmod a+r ${png4_filename} + echo -n "`date \"+%Y%m%d-%H%M%S\"`: Creating ${png5_filename}: " >> ${log_filename} + rrdtool graph ${png5_filename} \ + -t "${node_name} stats 5 (`date "+%Y%m%d-%H%M%S"`)" \ + --start end-48hours \ + --font LEGEND:7 \ + --width 576 \ + --height 150 \ + --interlaced \ + DEF:netSzEst24hourRecnt=${rrd_filename}:netSzEst24hourRecnt:AVERAGE \ + DEF:netSzEst48hourRecnt=${rrd_filename}:netSzEst48hourRecnt:AVERAGE \ + DEF:netSzEstSession=${rrd_filename}:netSzEstSession:AVERAGE \ + LINE2:netSzEst24hourRecnt#FF0000:"netSzEst24hourRecnt" \ + COMMENT:" " \ + GPRINT:netSzEst24hourRecnt:MAX:"Max\: %5.0lf" \ + GPRINT:netSzEst24hourRecnt:AVERAGE:"Avg\: %5.0lf" \ + GPRINT:netSzEst24hourRecnt:MIN:"Min\: %5.0lf" \ + GPRINT:netSzEst24hourRecnt:LAST:"Cur\: %5.0lf\l" \ + LINE2:netSzEst48hourRecnt#FF7F00:"netSzEst48hourRecnt" \ + COMMENT:" " \ + GPRINT:netSzEst48hourRecnt:MAX:"Max\: %5.0lf" \ + GPRINT:netSzEst48hourRecnt:AVERAGE:"Avg\: %5.0lf" \ + GPRINT:netSzEst48hourRecnt:MIN:"Min\: %5.0lf" \ + GPRINT:netSzEst48hourRecnt:LAST:"Cur\: %5.0lf\l" \ + LINE2:netSzEstSession#FFCC00:"netSzEstSession" \ + COMMENT:" " \ + GPRINT:netSzEstSession:MAX:"Max\: %5.0lf" \ + GPRINT:netSzEstSession:AVERAGE:"Avg\: %5.0lf" \ + GPRINT:netSzEstSession:MIN:"Min\: %5.0lf" \ + GPRINT:netSzEstSession:LAST:"Cur\: %5.0lf\l" \ + >> ${log_filename} + chmod a+r ${png5_filename} + echo -n "`date \"+%Y%m%d-%H%M%S\"`: Creating ${png6_filename}: " >> ${log_filename} + rrdtool graph ${png6_filename} \ + -t "${node_name} stats 6 (`date "+%Y%m%d-%H%M%S"`)" \ + --start end-48hours \ + --font LEGEND:7 \ + --width 576 \ + --height 150 \ + --interlaced \ + DEF:numBursting=${rrd_filename}:numBursting:AVERAGE \ + DEF:numConnected=${rrd_filename}:numConnected:AVERAGE \ + DEF:numDisabled=${rrd_filename}:numDisabled:AVERAGE \ + DEF:numDisconnected=${rrd_filename}:numDisconnected:AVERAGE \ + DEF:numListenOnly=${rrd_filename}:numListenOnly:AVERAGE \ + DEF:numListening=${rrd_filename}:numListening:AVERAGE \ + CDEF:numBurstOnly=numBursting,numListening,+ \ + DEF:numNeverConnected=${rrd_filename}:numNeverConnected:AVERAGE \ + DEF:numNotConnected=${rrd_filename}:numNotConnected:AVERAGE \ + DEF:numRoutingBackedOff=${rrd_filename}:numRoutingBackedOff:AVERAGE \ + DEF:numSimpleConnected=${rrd_filename}:numSimpleConnected:AVERAGE \ + DEF:numTooNew=${rrd_filename}:numTooNew:AVERAGE \ + DEF:numTooOld=${rrd_filename}:numTooOld:AVERAGE \ + DEF:numForRejOverload=${rrd_filename}:numForRejOverload:AVERAGE \ + DEF:numForRejOverload2=${rrd_filename}:numForRejOverload2:AVERAGE \ + DEF:numForRejOverload3=${rrd_filename}:numForRejOverload3:AVERAGE \ + DEF:numForRejOverload4=${rrd_filename}:numForRejOverload4:AVERAGE \ + DEF:numForRejOverload5=${rrd_filename}:numForRejOverload5:AVERAGE \ + DEF:numForRejOverload6=${rrd_filename}:numForRejOverload6:AVERAGE \ + DEF:numBOAcceptedTO=${rrd_filename}:numBOAcceptedTO:AVERAGE \ + DEF:numBOAftInsAccTO=${rrd_filename}:numBOAftInsAccTO:AVERAGE \ + DEF:numBOAftInsAccTO2=${rrd_filename}:numBOAftInsAccTO2:AVERAGE \ + DEF:numBOTimeout=${rrd_filename}:numBOTimeout:AVERAGE \ + DEF:numBOTimeout2=${rrd_filename}:numBOTimeout2:AVERAGE \ + DEF:numBOTimeout3=${rrd_filename}:numBOTimeout3:AVERAGE \ + LINE1:numBurstOnly#7F7FFF:"numBurstOnly" \ + COMMENT:" " \ + GPRINT:numBurstOnly:MAX:"Max\: %5.1lf" \ + GPRINT:numBurstOnly:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numBurstOnly:MIN:"Min\: %5.1lf" \ + GPRINT:numBurstOnly:LAST:"Cur\: %5.1lf\l" \ + LINE1:numDisabled#FFCC00:"numDisabled" \ + COMMENT:" " \ + GPRINT:numDisabled:MAX:"Max\: %5.1lf" \ + GPRINT:numDisabled:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numDisabled:MIN:"Min\: %5.1lf" \ + GPRINT:numDisabled:LAST:"Cur\: %5.1lf\l" \ + LINE1:numDisconnected#FF7F00:"numDisconnected" \ + COMMENT:" " \ + GPRINT:numDisconnected:MAX:"Max\: %5.1lf" \ + GPRINT:numDisconnected:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numDisconnected:MIN:"Min\: %5.1lf" \ + GPRINT:numDisconnected:LAST:"Cur\: %5.1lf\l" \ + LINE1:numListenOnly#00CCFF:"numListenOnly" \ + COMMENT:" " \ + GPRINT:numListenOnly:MAX:"Max\: %5.1lf" \ + GPRINT:numListenOnly:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numListenOnly:MIN:"Min\: %5.1lf" \ + GPRINT:numListenOnly:LAST:"Cur\: %5.1lf\l" \ + LINE1:numNeverConnected#000000:"numNeverConnected" \ + COMMENT:" " \ + GPRINT:numNeverConnected:MAX:"Max\: %5.1lf" \ + GPRINT:numNeverConnected:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numNeverConnected:MIN:"Min\: %5.1lf" \ + GPRINT:numNeverConnected:LAST:"Cur\: %5.1lf\l" \ + LINE1:numTooNew#007FFF:"numTooNew" \ + COMMENT:" " \ + GPRINT:numTooNew:MAX:"Max\: %5.1lf" \ + GPRINT:numTooNew:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numTooNew:MIN:"Min\: %5.1lf" \ + GPRINT:numTooNew:LAST:"Cur\: %5.1lf\l" \ + LINE1:numTooOld#FF007F:"numTooOld" \ + COMMENT:" " \ + GPRINT:numTooOld:MAX:"Max\: %5.1lf" \ + GPRINT:numTooOld:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numTooOld:MIN:"Min\: %5.1lf" \ + GPRINT:numTooOld:LAST:"Cur\: %5.1lf\l" \ + LINE1:numSimpleConnected#00FF00:"numSimpleConnected" \ + COMMENT:" " \ + GPRINT:numSimpleConnected:MAX:"Max\: %5.1lf" \ + GPRINT:numSimpleConnected:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numSimpleConnected:MIN:"Min\: %5.1lf" \ + GPRINT:numSimpleConnected:LAST:"Cur\: %5.1lf\l" \ + LINE1:numNotConnected#7FFF7F:"numNotConnected" \ + COMMENT:" " \ + GPRINT:numNotConnected:MAX:"Max\: %5.1lf" \ + GPRINT:numNotConnected:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numNotConnected:MIN:"Min\: %5.1lf" \ + GPRINT:numNotConnected:LAST:"Cur\: %5.1lf\l" \ + >> ${log_filename} + chmod a+r ${png6_filename} + echo -n "`date \"+%Y%m%d-%H%M%S\"`: Creating ${png7_filename}: " >> ${log_filename} + rrdtool graph ${png7_filename} \ + -t "${node_name} stats 7 (`date "+%Y%m%d-%H%M%S"`)" \ + --start end-48hours \ + --font LEGEND:7 \ + --width 576 \ + --height 150 \ + --interlaced \ + DEF:numBursting=${rrd_filename}:numBursting:AVERAGE \ + DEF:numConnected=${rrd_filename}:numConnected:AVERAGE \ + DEF:numDisabled=${rrd_filename}:numDisabled:AVERAGE \ + DEF:numDisconnected=${rrd_filename}:numDisconnected:AVERAGE \ + DEF:numListenOnly=${rrd_filename}:numListenOnly:AVERAGE \ + DEF:numListening=${rrd_filename}:numListening:AVERAGE \ + CDEF:numBurstOnly=numBursting,numListening,+ \ + DEF:numNeverConnected=${rrd_filename}:numNeverConnected:AVERAGE \ + DEF:numNotConnected=${rrd_filename}:numNotConnected:AVERAGE \ + DEF:numRoutingBackedOff=${rrd_filename}:numRoutingBackedOff:AVERAGE \ + DEF:numSimpleConnected=${rrd_filename}:numSimpleConnected:AVERAGE \ + DEF:numTooNew=${rrd_filename}:numTooNew:AVERAGE \ + DEF:numTooOld=${rrd_filename}:numTooOld:AVERAGE \ + DEF:numForRejOverload=${rrd_filename}:numForRejOverload:AVERAGE \ + DEF:numForRejOverload2=${rrd_filename}:numForRejOverload2:AVERAGE \ + DEF:numForRejOverload3=${rrd_filename}:numForRejOverload3:AVERAGE \ + DEF:numForRejOverload4=${rrd_filename}:numForRejOverload4:AVERAGE \ + DEF:numForRejOverload5=${rrd_filename}:numForRejOverload5:AVERAGE \ + DEF:numForRejOverload6=${rrd_filename}:numForRejOverload6:AVERAGE \ + DEF:numBOAcceptedTO=${rrd_filename}:numBOAcceptedTO:AVERAGE \ + DEF:numBOAftInsAccTO=${rrd_filename}:numBOAftInsAccTO:AVERAGE \ + DEF:numBOAftInsAccTO2=${rrd_filename}:numBOAftInsAccTO2:AVERAGE \ + DEF:numBOTimeout=${rrd_filename}:numBOTimeout:AVERAGE \ + DEF:numBOTimeout2=${rrd_filename}:numBOTimeout2:AVERAGE \ + DEF:numBOTimeout3=${rrd_filename}:numBOTimeout3:AVERAGE \ + LINE1:numRoutingBackedOff#FFFF00:"numRoutingBackedOff" \ + COMMENT:" " \ + GPRINT:numRoutingBackedOff:MAX:"Max\: %5.1lf" \ + GPRINT:numRoutingBackedOff:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numRoutingBackedOff:MIN:"Min\: %5.1lf" \ + GPRINT:numRoutingBackedOff:LAST:"Cur\: %5.1lf\l" \ + LINE1:numConnected#FF0000:"numConnected" \ + COMMENT:" " \ + GPRINT:numConnected:MAX:"Max\: %5.1lf" \ + GPRINT:numConnected:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numConnected:MIN:"Min\: %5.1lf" \ + GPRINT:numConnected:LAST:"Cur\: %5.1lf\l" \ + LINE1:numBursting#0000FF:"numBursting" \ + COMMENT:" " \ + GPRINT:numBursting:MAX:"Max\: %5.1lf" \ + GPRINT:numBursting:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numBursting:MIN:"Min\: %5.1lf" \ + GPRINT:numBursting:LAST:"Cur\: %5.1lf\l" \ + LINE1:numListening#FF00FF:"numListening" \ + COMMENT:" " \ + GPRINT:numListening:MAX:"Max\: %5.1lf" \ + GPRINT:numListening:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numListening:MIN:"Min\: %5.1lf" \ + GPRINT:numListening:LAST:"Cur\: %5.1lf\l" \ + LINE1:numForRejOverload#FF3C3C:"numForRejOverload" \ + COMMENT:" " \ + GPRINT:numForRejOverload:MAX:"Max\: %5.1lf" \ + GPRINT:numForRejOverload:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numForRejOverload:MIN:"Min\: %5.1lf" \ + GPRINT:numForRejOverload:LAST:"Cur\: %5.1lf\l" \ + LINE1:numForRejOverload2#FF7F7F:"numForRejOverload2" \ + COMMENT:" " \ + GPRINT:numForRejOverload2:MAX:"Max\: %5.1lf" \ + GPRINT:numForRejOverload2:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numForRejOverload2:MIN:"Min\: %5.1lf" \ + GPRINT:numForRejOverload2:LAST:"Cur\: %5.1lf\l" \ + LINE1:numForRejOverload3#FFAFAF:"numForRejOverload3" \ + COMMENT:" " \ + GPRINT:numForRejOverload3:MAX:"Max\: %5.1lf" \ + GPRINT:numForRejOverload3:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numForRejOverload3:MIN:"Min\: %5.1lf" \ + GPRINT:numForRejOverload3:LAST:"Cur\: %5.1lf\l" \ + LINE1:numForRejOverload4#FF3C7F:"numForRejOverload4" \ + COMMENT:" " \ + GPRINT:numForRejOverload4:MAX:"Max\: %5.1lf" \ + GPRINT:numForRejOverload4:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numForRejOverload4:MIN:"Min\: %5.1lf" \ + GPRINT:numForRejOverload4:LAST:"Cur\: %5.1lf\l" \ + LINE1:numForRejOverload5#FF3CAF:"numForRejOverload5" \ + COMMENT:" " \ + GPRINT:numForRejOverload5:MAX:"Max\: %5.1lf" \ + GPRINT:numForRejOverload5:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numForRejOverload5:MIN:"Min\: %5.1lf" \ + GPRINT:numForRejOverload5:LAST:"Cur\: %5.1lf\l" \ + LINE1:numForRejOverload6#FF3CFF:"numForRejOverload6" \ + COMMENT:" " \ + GPRINT:numForRejOverload6:MAX:"Max\: %5.1lf" \ + GPRINT:numForRejOverload6:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numForRejOverload6:MIN:"Min\: %5.1lf" \ + GPRINT:numForRejOverload6:LAST:"Cur\: %5.1lf\l" \ + LINE1:numBOAcceptedTO#FF7F3C:"numBOAcceptedTO" \ + COMMENT:" " \ + GPRINT:numBOAcceptedTO:MAX:"Max\: %5.1lf" \ + GPRINT:numBOAcceptedTO:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numBOAcceptedTO:MIN:"Min\: %5.1lf" \ + GPRINT:numBOAcceptedTO:LAST:"Cur\: %5.1lf\l" \ + LINE1:numBOAftInsAccTO#FF7FAF:"numBOAftInsAccTO" \ + COMMENT:" " \ + GPRINT:numBOAftInsAccTO:MAX:"Max\: %5.1lf" \ + GPRINT:numBOAftInsAccTO:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numBOAftInsAccTO:MIN:"Min\: %5.1lf" \ + GPRINT:numBOAftInsAccTO:LAST:"Cur\: %5.1lf\l" \ + LINE1:numBOAftInsAccTO2#FF7FFF:"numBOAftInsAccTO2" \ + COMMENT:" " \ + GPRINT:numBOAftInsAccTO2:MAX:"Max\: %5.1lf" \ + GPRINT:numBOAftInsAccTO2:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numBOAftInsAccTO2:MIN:"Min\: %5.1lf" \ + GPRINT:numBOAftInsAccTO2:LAST:"Cur\: %5.1lf\l" \ + LINE1:numBOTimeout#FFAF3C:"numBOTimeout" \ + COMMENT:" " \ + GPRINT:numBOTimeout:MAX:"Max\: %5.1lf" \ + GPRINT:numBOTimeout:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numBOTimeout:MIN:"Min\: %5.1lf" \ + GPRINT:numBOTimeout:LAST:"Cur\: %5.1lf\l" \ + LINE1:numBOTimeout2#FFAF7F:"numBOTimeout2" \ + COMMENT:" " \ + GPRINT:numBOTimeout2:MAX:"Max\: %5.1lf" \ + GPRINT:numBOTimeout2:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numBOTimeout2:MIN:"Min\: %5.1lf" \ + GPRINT:numBOTimeout2:LAST:"Cur\: %5.1lf\l" \ + LINE1:numBOTimeout3#FFAFFF:"numBOTimeout3" \ + COMMENT:" " \ + GPRINT:numBOTimeout3:MAX:"Max\: %5.1lf" \ + GPRINT:numBOTimeout3:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:numBOTimeout3:MIN:"Min\: %5.1lf" \ + GPRINT:numBOTimeout3:LAST:"Cur\: %5.1lf\l" \ + >> ${log_filename} + chmod a+r ${png7_filename} + echo -n "`date \"+%Y%m%d-%H%M%S\"`: Creating ${png8_filename}: " >> ${log_filename} + rrdtool graph ${png8_filename} \ + -t "${node_name} stats 8 (`date "+%Y%m%d-%H%M%S"`)" \ + --start end-48hours \ + --font LEGEND:7 \ + --width 576 \ + --height 150 \ + --interlaced \ + DEF:recentInputRate=${rrd_filename}:recentInputRate:AVERAGE \ + DEF:recentOutputRate=${rrd_filename}:recentOutputRate:AVERAGE \ + LINE1:recentInputRate#0000FF:"recentInputRate" \ + COMMENT:" " \ + GPRINT:recentInputRate:MAX:"Max\: %5.1lf" \ + GPRINT:recentInputRate:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:recentInputRate:MIN:"Min\: %5.1lf" \ + GPRINT:recentInputRate:LAST:"Cur\: %5.1lf\l" \ + LINE1:recentOutputRate#00FF00:"recentOutputRate" \ + COMMENT:" " \ + GPRINT:recentOutputRate:MAX:"Max\: %5.1lf" \ + GPRINT:recentOutputRate:AVERAGE:"Avg\: %5.1lf" \ + GPRINT:recentOutputRate:MIN:"Min\: %5.1lf" \ + GPRINT:recentOutputRate:LAST:"Cur\: %5.1lf\l" \ + >> ${log_filename} + chmod a+r ${png8_filename} +fi +if( [ "y" == "$do_print" ] ) +then + echo "`date \"+%Y%m%d-%H%M%S\"`: Creating ${txt_filename}" >> ${log_filename} + rrdtool graph ${rrd_filename} \ + DEF:allocatedJavaMemory=${rrd_filename}:allocatedJavaMemory:AVERAGE \ + DEF:availableCPUs=${rrd_filename}:availableCPUs:AVERAGE \ + DEF:averagePingTime=${rrd_filename}:averagePingTime:AVERAGE \ + DEF:avgConnPeersPerNode=${rrd_filename}:avgConnPeersPerNode:AVERAGE \ + DEF:avgStoreAccessRate=${rrd_filename}:avgStoreAccessRate:AVERAGE \ + DEF:backedOffPercent=${rrd_filename}:backedOffPercent:AVERAGE \ + DEF:bwlimitDelayTime=${rrd_filename}:bwlimitDelayTime:AVERAGE \ + DEF:cacheAccesses=${rrd_filename}:cacheAccesses:AVERAGE \ + DEF:cachedKeys=${rrd_filename}:cachedKeys:AVERAGE \ + DEF:cachedSize=${rrd_filename}:cachedSize:AVERAGE \ + DEF:cachedStoreHits=${rrd_filename}:cachedStoreHits:AVERAGE \ + DEF:cachedStoreMisses=${rrd_filename}:cachedStoreMisses:AVERAGE \ + DEF:freeJavaMemory=${rrd_filename}:freeJavaMemory:AVERAGE \ + DEF:isUsingWrapper=${rrd_filename}:isUsingWrapper:AVERAGE \ + DEF:location=${rrd_filename}:location:AVERAGE \ + DEF:locChangePerMinute=${rrd_filename}:locChangePerMinute:AVERAGE \ + DEF:locChangePerSession=${rrd_filename}:locChangePerSession:AVERAGE \ + DEF:locChangePerSwap=${rrd_filename}:locChangePerSwap:AVERAGE \ + DEF:maxOverallKeys=${rrd_filename}:maxOverallKeys:AVERAGE \ + DEF:maxOverallSize=${rrd_filename}:maxOverallSize:AVERAGE \ + DEF:maximumJavaMemory=${rrd_filename}:maximumJavaMemory:AVERAGE \ + DEF:netSzEst24hourRecnt=${rrd_filename}:netSzEst24hourRecnt:AVERAGE \ + DEF:netSzEst48hourRecnt=${rrd_filename}:netSzEst48hourRecnt:AVERAGE \ + DEF:netSzEstSession=${rrd_filename}:netSzEstSession:AVERAGE \ + DEF:noSwaps=${rrd_filename}:noSwaps:AVERAGE \ + DEF:noSwapsPerMinute=${rrd_filename}:noSwapsPerMinute:AVERAGE \ + DEF:numARKFetchers=${rrd_filename}:numARKFetchers:AVERAGE \ + DEF:numBursting=${rrd_filename}:numBursting:AVERAGE \ + DEF:numConnected=${rrd_filename}:numConnected:AVERAGE \ + DEF:numDisabled=${rrd_filename}:numDisabled:AVERAGE \ + DEF:numDisconnected=${rrd_filename}:numDisconnected:AVERAGE \ + DEF:numInsertSenders=${rrd_filename}:numInsertSenders:AVERAGE \ + DEF:numListenOnly=${rrd_filename}:numListenOnly:AVERAGE \ + DEF:numListening=${rrd_filename}:numListening:AVERAGE \ + DEF:numNeverConnected=${rrd_filename}:numNeverConnected:AVERAGE \ + DEF:numNotConnected=${rrd_filename}:numNotConnected:AVERAGE \ + DEF:numRemPrLocsInSwaps=${rrd_filename}:numRemPrLocsInSwaps:AVERAGE \ + DEF:numRequestSenders=${rrd_filename}:numRequestSenders:AVERAGE \ + DEF:numRoutingBackedOff=${rrd_filename}:numRoutingBackedOff:AVERAGE \ + DEF:numSimpleConnected=${rrd_filename}:numSimpleConnected:AVERAGE \ + DEF:numTooNew=${rrd_filename}:numTooNew:AVERAGE \ + DEF:numTooOld=${rrd_filename}:numTooOld:AVERAGE \ + DEF:numTransReqSenders=${rrd_filename}:numTransReqSenders:AVERAGE \ + DEF:numForRejOverload=${rrd_filename}:numForRejOverload:AVERAGE \ + DEF:numForRejOverload2=${rrd_filename}:numForRejOverload2:AVERAGE \ + DEF:numForRejOverload3=${rrd_filename}:numForRejOverload3:AVERAGE \ + DEF:numForRejOverload4=${rrd_filename}:numForRejOverload4:AVERAGE \ + DEF:numForRejOverload5=${rrd_filename}:numForRejOverload5:AVERAGE \ + DEF:numForRejOverload6=${rrd_filename}:numForRejOverload6:AVERAGE \ + DEF:numBOAcceptedTO=${rrd_filename}:numBOAcceptedTO:AVERAGE \ + DEF:numBOAftInsAccTO=${rrd_filename}:numBOAftInsAccTO:AVERAGE \ + DEF:numBOAftInsAccTO2=${rrd_filename}:numBOAftInsAccTO2:AVERAGE \ + DEF:numBOTimeout=${rrd_filename}:numBOTimeout:AVERAGE \ + DEF:numBOTimeout2=${rrd_filename}:numBOTimeout2:AVERAGE \ + DEF:numBOTimeout3=${rrd_filename}:numBOTimeout3:AVERAGE \ + DEF:overallAccesses=${rrd_filename}:overallAccesses:AVERAGE \ + DEF:overallKeys=${rrd_filename}:overallKeys:AVERAGE \ + DEF:overallSize=${rrd_filename}:overallSize:AVERAGE \ + DEF:pInstantReject=${rrd_filename}:pInstantReject:AVERAGE \ + DEF:pCchdStrHitOAcceses=${rrd_filename}:pCchdStrHitOAcceses:AVERAGE \ + DEF:pOverallKeysOfMax=${rrd_filename}:pOverallKeysOfMax:AVERAGE \ + DEF:pStoreHitsOAccesses=${rrd_filename}:pStoreHitsOAccesses:AVERAGE \ + DEF:recentInputRate=${rrd_filename}:recentInputRate:AVERAGE \ + DEF:recentOutputRate=${rrd_filename}:recentOutputRate:AVERAGE \ + DEF:routingMissDistance=${rrd_filename}:routingMissDistance:AVERAGE \ + DEF:runningThreadCount=${rrd_filename}:runningThreadCount:AVERAGE \ + DEF:startedSwaps=${rrd_filename}:startedSwaps:AVERAGE \ + DEF:startupTime=${rrd_filename}:startupTime:AVERAGE \ + DEF:storeAccesses=${rrd_filename}:storeAccesses:AVERAGE \ + DEF:storeHits=${rrd_filename}:storeHits:AVERAGE \ + DEF:storeKeys=${rrd_filename}:storeKeys:AVERAGE \ + DEF:storeMisses=${rrd_filename}:storeMisses:AVERAGE \ + DEF:storeSize=${rrd_filename}:storeSize:AVERAGE \ + DEF:swaps=${rrd_filename}:swaps:AVERAGE \ + DEF:swapsPerMinute=${rrd_filename}:swapsPerMinute:AVERAGE \ + DEF:swapsPerNoSwaps=${rrd_filename}:swapsPerNoSwaps:AVERAGE \ + DEF:swapsRejAlreadyLckd=${rrd_filename}:swapsRejAlreadyLckd:AVERAGE \ + DEF:swapsRejLoop=${rrd_filename}:swapsRejLoop:AVERAGE \ + DEF:swapsRejNowhereToGo=${rrd_filename}:swapsRejNowhereToGo:AVERAGE \ + DEF:swapsRejRateLimit=${rrd_filename}:swapsRejRateLimit:AVERAGE \ + DEF:swapsRejRecID=${rrd_filename}:swapsRejRecID:AVERAGE \ + DEF:totalInputBytes=${rrd_filename}:totalInputBytes:AVERAGE \ + DEF:totalInputRate=${rrd_filename}:totalInputRate:AVERAGE \ + DEF:totalOutputBytes=${rrd_filename}:totalOutputBytes:AVERAGE \ + DEF:totalOutputRate=${rrd_filename}:totalOutputRate:AVERAGE \ + DEF:totalPloadOutBytes=${rrd_filename}:totalPloadOutBytes:AVERAGE \ + DEF:totalPloadOutPcnt=${rrd_filename}:totalPloadOutPcnt:AVERAGE \ + DEF:totalPloadOutRate=${rrd_filename}:totalPloadOutRate:AVERAGE \ + DEF:unclaimedFIFOSize=${rrd_filename}:unclaimedFIFOSize:AVERAGE \ + DEF:uptimeSeconds=${rrd_filename}:uptimeSeconds:AVERAGE \ + DEF:usedJavaMemory=${rrd_filename}:usedJavaMemory:AVERAGE \ + PRINT:allocatedJavaMemory:LAST:"allocatedJavaMemory %lf" \ + PRINT:availableCPUs:LAST:"availableCPUs %lf" \ + PRINT:averagePingTime:LAST:"averagePingTime %lf" \ + PRINT:avgConnPeersPerNode:LAST:"avgConnPeersPerNode %lf" \ + PRINT:avgStoreAccessRate:LAST:"avgStoreAccessRate %lf" \ + PRINT:backedOffPercent:LAST:"backedOffPercent %lf" \ + PRINT:bwlimitDelayTime:LAST:"bwlimitDelayTime %lf" \ + PRINT:cacheAccesses:LAST:"cacheAccesses %lf" \ + PRINT:cachedKeys:LAST:"cachedKeys %lf" \ + PRINT:cachedSize:LAST:"cachedSize %lf" \ + PRINT:cachedStoreHits:LAST:"cachedStoreHits %lf" \ + PRINT:cachedStoreMisses:LAST:"cachedStoreMisses %lf" \ + PRINT:freeJavaMemory:LAST:"freeJavaMemory %lf" \ + PRINT:isUsingWrapper:LAST:"isUsingWrapper %lf" \ + PRINT:location:LAST:"location %lf" \ + PRINT:locChangePerMinute:LAST:"locChangePerMinute %lf" \ + PRINT:locChangePerSession:LAST:"locChangePerSession %lf" \ + PRINT:locChangePerSwap:LAST:"locChangePerSwap %lf" \ + PRINT:maxOverallKeys:LAST:"maxOverallKeys %lf" \ + PRINT:maxOverallSize:LAST:"maxOverallSize %lf" \ + PRINT:maximumJavaMemory:LAST:"maximumJavaMemory %lf" \ + PRINT:netSzEst24hourRecnt:LAST:"netSzEst24hourRecnt %lf" \ + PRINT:netSzEst48hourRecnt:LAST:"netSzEst48hourRecnt %lf" \ + PRINT:netSzEstSession:LAST:"netSzEstSession %lf" \ + PRINT:noSwaps:LAST:"noSwaps %lf" \ + PRINT:noSwapsPerMinute:LAST:"noSwapsPerMinute %lf" \ + PRINT:numARKFetchers:LAST:"numARKFetchers %lf" \ + PRINT:numBursting:LAST:"numBursting %lf" \ + PRINT:numConnected:LAST:"numConnected %lf" \ + PRINT:numDisabled:LAST:"numDisabled %lf" \ + PRINT:numDisconnected:LAST:"numDisconnected %lf" \ + PRINT:numInsertSenders:LAST:"numInsertSenders %lf" \ + PRINT:numListenOnly:LAST:"numListenOnly %lf" \ + PRINT:numListening:LAST:"numListening %lf" \ + PRINT:numNeverConnected:LAST:"numNeverConnected %lf" \ + PRINT:numNotConnected:LAST:"numNotConnected %lf" \ + PRINT:numRemPrLocsInSwaps:LAST:"numRemPrLocsInSwaps %lf" \ + PRINT:numRequestSenders:LAST:"numRequestSenders %lf" \ + PRINT:numRoutingBackedOff:LAST:"numRoutingBackedOff %lf" \ + PRINT:numSimpleConnected:LAST:"numSimpleConnected %lf" \ + PRINT:numTooNew:LAST:"numTooNew %lf" \ + PRINT:numTooOld:LAST:"numTooOld %lf" \ + PRINT:numTransReqSenders:LAST:"numTransReqSenders %lf" \ + PRINT:numForRejOverload:LAST:"numForRejOverload %lf" \ + PRINT:numForRejOverload2:LAST:"numForRejOverload2 %lf" \ + PRINT:numForRejOverload3:LAST:"numForRejOverload3 %lf" \ + PRINT:numForRejOverload4:LAST:"numForRejOverload4 %lf" \ + PRINT:numForRejOverload5:LAST:"numForRejOverload5 %lf" \ + PRINT:numForRejOverload6:LAST:"numForRejOverload6 %lf" \ + PRINT:numBOAcceptedTO:LAST:"numBOAcceptedTO %lf" \ + PRINT:numBOAftInsAccTO:LAST:"numBOAftInsAccTO %lf" \ + PRINT:numBOAftInsAccTO2:LAST:"numBOAftInsAccTO2 %lf" \ + PRINT:numBOTimeout:LAST:"numBOTimeout %lf" \ + PRINT:numBOTimeout2:LAST:"numBOTimeout2 %lf" \ + PRINT:numBOTimeout3:LAST:"numBOTimeout3 %lf" \ + PRINT:overallAccesses:LAST:"overallAccesses %lf" \ + PRINT:overallKeys:LAST:"overallKeys %lf" \ + PRINT:overallSize:LAST:"overallSize %lf" \ + PRINT:pInstantReject:LAST:"pInstantReject %lf" \ + PRINT:pCchdStrHitOAcceses:LAST:"pCchdStrHitOAcceses %lf" \ + PRINT:pOverallKeysOfMax:LAST:"pOverallKeysOfMax %lf" \ + PRINT:pStoreHitsOAccesses:LAST:"pStoreHitsOAccesses %lf" \ + PRINT:recentInputRate:LAST:"recentInputRate %lf" \ + PRINT:recentOutputRate:LAST:"recentOutputRate %lf" \ + PRINT:routingMissDistance:LAST:"routingMissDistance %lf" \ + PRINT:runningThreadCount:LAST:"runningThreadCount %lf" \ + PRINT:startedSwaps:LAST:"startedSwaps %lf" \ + PRINT:startupTime:LAST:"startupTime %lf" \ + PRINT:storeAccesses:LAST:"storeAccesses %lf" \ + PRINT:storeHits:LAST:"storeHits %lf" \ + PRINT:storeKeys:LAST:"storeKeys %lf" \ + PRINT:storeMisses:LAST:"storeMisses %lf" \ + PRINT:storeSize:LAST:"storeSize %lf" \ + PRINT:swaps:LAST:"swaps %lf" \ + PRINT:swapsPerMinute:LAST:"swapsPerMinute %lf" \ + PRINT:swapsPerNoSwaps:LAST:"swapsPerNoSwaps %lf" \ + PRINT:swapsRejAlreadyLckd:LAST:"swapsRejAlreadyLckd %lf" \ + PRINT:swapsRejLoop:LAST:"swapsRejLoop %lf" \ + PRINT:swapsRejNowhereToGo:LAST:"swapsRejNowhereToGo %lf" \ + PRINT:swapsRejRateLimit:LAST:"swapsRejRateLimit %lf" \ + PRINT:swapsRejRecID:LAST:"swapsRejRecID %lf" \ + PRINT:totalInputBytes:LAST:"totalInputBytes %lf" \ + PRINT:totalInputRate:LAST:"totalInputRate %lf" \ + PRINT:totalOutputBytes:LAST:"totalOutputBytes %lf" \ + PRINT:totalOutputRate:LAST:"totalOutputRate %lf" \ + PRINT:totalPloadOutBytes:LAST:"totalPloadOutBytes %lf" \ + PRINT:totalPloadOutPcnt:LAST:"totalPloadOutPcnt %lf" \ + PRINT:totalPloadOutRate:LAST:"totalPloadOutRate %lf" \ + PRINT:unclaimedFIFOSize:LAST:"unclaimedFIFOSize %lf" \ + PRINT:uptimeSeconds:LAST:"uptimeSeconds %lf" \ + PRINT:usedJavaMemory:LAST:"usedJavaMemory %lf" |egrep -v "^0x0$" \ + > ${txt_filename} + chmod a+r ${txt_filename} +fi Property changes on: trunk/apps/pyFreenet/rrdtool_freenet.sh.example ___________________________________________________________________ Name: svn:executable + * From MaeLamberta at creativemaryland.com Thu Jun 21 07:53:10 2007 From: MaeLamberta at creativemaryland.com (Mae Lamberta) Date: Thu, 21 Jun 2007 01:53:10 -0600 Subject: [Pyfreenet] Fusion Message-ID: <1735A5558349D9D5107F43C81B00CA71@LisaOffice> http://img521.imageshack.us/img521/4913/55072283ta4.gif -------------- next part -------------- An HTML attachment was scrubbed... URL: http://emu.freenetproject.org/pipermail/pyfreenet/attachments/20070621/67be6c0c/attachment.htm