This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

MRTG Eggdrop Channel Count v1.0 TEST by wiak & Rats

Support & discussion of released scripts, and announcements of new releases.
Post Reply
w
wiak
Voice
Posts: 5
Joined: Sat Dec 23, 2006 2:11 am

MRTG Eggdrop Channel Count v1.0 TEST by wiak & Rats

Post by wiak »

ps: sorry i triple posted earlier

Code: Select all

------------------------------------------------------------------------------------------------
# MRTG Eggdrop Channel Count v1.0
# by wiak <tommarnk@gmail.com> & Rats
# Only Tested on FreeBSD 6.0-RELEASE
------------------------------------------------------------------------------------------------
this tcl script outputs a readable format for mrtg so it can make a graph of total users in a channel using eggdrop,tcl,shell script & mrtg

Code: Select all

channel user count > eggdrop > tcl script > count.log > shell script that reads count.log > mrtg > ircusers.html with stats!
this is how it looks like
Image

Download:
http://nwgat.net/mrtg-irccount/

PS: i need someone to test this
Last edited by wiak on Sat Dec 23, 2006 9:47 am, edited 3 times in total.
woot
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

This looks very interesting and no doubt will be useful to many.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Neat.. Just a couple of questions for ya. Why use open r+ instead of a(ppend) for logging in the tcl script, and is it really supposed to log 2 lines of the same data? There's 2 puts' in the tcl file (I'm not familiar with mrtg, so maybe it does need 2 lines for comparing..)
w
wiak
Voice
Posts: 5
Joined: Sat Dec 23, 2006 2:11 am

Post by wiak »

170
170
25 days, 3 mins
nwgat.net

gives the shell script ^^

so it needs only 2 lines
but the other are good to have

the uptime & domain will give this output from mrtg on a webpage ;-)

IRC Users @ HDBits
The statistics were last updated Saturday, 23 December 2006 at 9:26,
at which time 'nwgat.net' had been up for 25 days, 5 mins.
`Daily' Graph (5 Minute Average)

ps: rats did tcl i did the rest :roll:
woot
s
smash
Halfop
Posts: 45
Joined: Mon Jul 31, 2006 12:33 pm

Post by smash »

I take it this wont work with windrop ..?
w
wiak
Voice
Posts: 5
Joined: Sat Dec 23, 2006 2:11 am

Post by wiak »

smash wrote:I take it this wont work with windrop ..?
it might as you can use .bat file (win) insted of .sh file (unix) :)
but i havent tested it :roll:

this might work
download http://unxutils.sourceforge.net/ and get cat.exe put that in system32 folder and then use this bat

Code: Select all

cat C:\path\to\mrtg.log
ps: you wont get uptime + domain but atleast it works :)
=)

the code isnt 100% working, as it wont update at the same time as mrtg, do anyone know howto get it to update using a trigger? from shell script ?
mrtg > .sh script sends cmd to get count> tcl > eggdrop > <returns's count back< #channel count
or something like that :!:
woot
_
__henke
Voice
Posts: 8
Joined: Fri Nov 10, 2006 10:31 am

Post by __henke »

Hey!

Nice script. Is there any way to use this thing with multiple channels?
//henke
T
TMM
Voice
Posts: 1
Joined: Sat Apr 07, 2007 7:15 am

Post by TMM »

__henke wrote:Hey!

Nice script. Is there any way to use this thing with multiple channels?
By using arrays instead of the current method, that would be possible, yes. But there's another problems with this tcl since it only loads the function one time, and then stops update the log, and I presume that it's real purpose is to log the channel all the time, to the logfile?

This is what I changed, to make it work:

At the top of the tcl:

Code: Select all

# Seconds to loop before next update (instead of the regular timer)
set mrtglooptimer 60

In the end of proc LogUsers:

Code: Select all

# Clean up duplicates
foreach tmr [utimers] {if {[lindex $tmr 1]=="LogUsers"} {killutimer [lindex $tmr 2]}}
# Reload timer
utimer 1 reloadLogUsers
Added this

Code: Select all

# Fixing some visual bugs for utimer, like this (when a timer expires during the cleanup):
# [13:41] <BotNick> [13:41] Tcl error in script for 'timer2985':
proc reloadLogUsers { } {
global mrtglooptimer
utimer $mrtglooptimer LogUsers
}
And finally

Replace ...

Code: Select all

timer 1 LogUsers
... with ...

Code: Select all

## Initialize Logger
utimer $mrtglooptimer LogUsers
---
Post Reply