egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
wiak
Voice


Joined: 23 Dec 2006
Posts: 5

PostPosted: Sat Dec 23, 2006 2:24 am    Post subject: MRTG Eggdrop Channel Count v1.0 TEST by wiak & Rats Reply with quote

ps: sorry i triple posted earlier
Code:
------------------------------------------------------------------------------------------------
# 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:
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


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

PS: i need someone to test this
_________________
woot


Last edited by wiak on Sat Dec 23, 2006 9:47 am; edited 3 times in total
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sat Dec 23, 2006 2:43 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sat Dec 23, 2006 4:06 am    Post subject: Reply with quote

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..)
Back to top
View user's profile Send private message
wiak
Voice


Joined: 23 Dec 2006
Posts: 5

PostPosted: Sat Dec 23, 2006 4:28 am    Post subject: Reply with quote

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 Wink

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 Rolling Eyes
_________________
woot
Back to top
View user's profile Send private message
smash
Halfop


Joined: 31 Jul 2006
Posts: 45

PostPosted: Sat Dec 23, 2006 6:31 am    Post subject: Reply with quote

I take it this wont work with windrop ..?
Back to top
View user's profile Send private message
wiak
Voice


Joined: 23 Dec 2006
Posts: 5

PostPosted: Sat Dec 23, 2006 9:16 am    Post subject: Reply with quote

smash wrote:
I take it this wont work with windrop ..?

it might as you can use .bat file (win) insted of .sh file (unix) Smile
but i havent tested it Rolling Eyes

this might work
download http://unxutils.sourceforge.net/ and get cat.exe put that in system32 folder and then use this bat
Code:
cat C:\path\to\mrtg.log

ps: you wont get uptime + domain but atleast it works Smile
=)

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 Exclamation
_________________
woot
Back to top
View user's profile Send private message
__henke
Voice


Joined: 10 Nov 2006
Posts: 8

PostPosted: Tue Mar 06, 2007 8:41 am    Post subject: Reply with quote

Hey!

Nice script. Is there any way to use this thing with multiple channels?
_________________
//henke
Back to top
View user's profile Send private message
TMM
Voice


Joined: 07 Apr 2007
Posts: 1

PostPosted: Sat Apr 07, 2007 7:47 am    Post subject: Reply with quote

__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:
# Seconds to loop before next update (instead of the regular timer)
set mrtglooptimer 60



In the end of proc LogUsers:

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


Added this
Code:
# 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:
timer 1 LogUsers


... with ...

Code:
## Initialize Logger
utimer $mrtglooptimer LogUsers

_________________
---
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber