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.

Performance probs

Old posts that have not been replied to for several years.
Locked
T
TigerKatziTatzi

Performance probs

Post by TigerKatziTatzi »

Hi folks,

i looking to solve a performance probleme. i'm ircop on a network and setting up some eggdrops for secure stuff. so we do using an open proxy monitoring mirc script for checking on mostly floodbots. this addon is using a reference ip-list. so i setup an eggdrop which performing a whois on a new joined user in a channel. no big stuff. the prob i've running into, is the work down of the server msg queue. its to slow. cause each whois will give the bot 7 lines of info back, i'm looking only for one special raw event where the ip is included. even with a /stats L nickname, which gives back 3 lines only, won't be fast enough, to set the glines. the respond of the eggdrop is to slow. i did some couple test with only 10 fixed ip's we are using for testing our scripts and used some floodbots with these ip's to join a our testchannel. the result was a mess. after 6 rejoin the eggdrop got the first gline done and the script is really quit simple.

some tech. infos:
- eggdrop is running togther with the ircd on a dedi
- the conf is kept with minimum on settings
- only one tcl is running
- no extra file writings/readings activities. only botlog

sorry for my bad english, but i hope i cleared out the prob i do have and someone may have an answer, how i can increase the performance of an eggdrop.





greetz TKT
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Well if you don't what to get their IP by whois. If you have another raw as you say bind a tcl procedure it to that raw number which only shows 3 lines. Split and get the users hosts from the argument go ahead and then do yourstuff.

If the output of '/stats L nickname' has a raw binded check your IRCd preferences then the bot will definately respond to that corresponding raw number.

As we know everything going from the bot and being received by the bot is queued. To prevent this you either have to bypass the queues by using some options in tcl scripplets or either by changing the servers msg define rate in one of the source code (c files).
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

Where do you guys get 7 lines from ?
I did a quick test and I only get one :roll:

Code: Select all

bind dcc -|- rawwhois dcc:rawwhois
bind raw - "311" reply:whois          

proc dcc:rawwhois {hand idx text} {
 set nick [lindex [split $text] 0]
 putserv "WHOIS $nick"
}

proc reply:whois {from key text} {    
 putlog "$text"
}
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

When the bot /whois's a user then in your whois you get 4-5 lines. I think he meant to try and say that.

One showing your ident@ip and realname.
The other showing the channels you are on.
Another showing which client server (network) you are using.
If you are away then it will show you as parked away.
If you are an IRCOP then one will show that.
If you are using an identified nick or not.
Then one showing 'end of /whois list'

So these are quite a few lines and if the bot /whois's a user it will have to receive all 4-5 lines considering you just want to bind the raw 311. :mrgreen:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

And my point was that you only need to setup a bind for those you actually need. ie 1 line.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

And my point was that you only need to setup a bind for those you actually need. ie 1 line.
If there is a LONG way to do anything gb you can bet someone will find it. The KISS (Keep It Simple Stupid) principle is apparently too complicated to understand. :-?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
T
TigerKatziTatzi

Post by TigerKatziTatzi »

if a normal irc user will do a whois, he'll receive only 5 lines of info. as ircop u'll get two lines more. but it looks like i have do work on the queue bypass.

a quick test is not showing the prob. check it with 10 floodbots and do a whois on each join, let the bots rejoin 10 times. then do on telnet .status and see how full ur server msg queue is.

here a sample of the tcl i bind. not a big deal.

proc getip { from key arg} {

global victim_host victim_ip
putlog "RAW: $from | $key | $arg"


if {$key == "378"} {

set victim_host [lindex [lrange [split $arg "@" ] 1 end] 0]
#putserv "PRIVMSG #Securebot-Logs :$victim_host"

set victim_ip [lindex [lrange [split $victim_host " "] 1 end] 0]
#putserv "PRIVMSG #Securebot-Logs :$victim_ip"
set x [string trimright [string trimleft [lindex $victim_ip 0] "\["] "\]"]
#putserv "PRIVMSG #Securebot-Logs :$x"


}

in the tcl your are only triggering the on important raw line. thats correct. but if u do a whois to the server u'll get all infos of whois back from server. i did couple tries now with /stats L , but it takes too long to set glines. so i'll have a look on the code. should be working then with a version where now server msg queue is used. i'll try.

thx for answering

TKT
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Instead of:

if {$key == "378"} {

Use:
bind raw - 378 getip

*** Remember to 'return 1' in the end of each raw command so the bot does not process anything more of that raw. See tcl-commands.doc for more info. (you hadn't returned 1 in your proc pasted above)
#Return 1 on a raw would be like halting the proc and no more processing of anything related to that raw number.

The bot has no way to bypass all of these lines. If it is an IRCop and whois it will get the same results for /whois as a normal IRCop does. So it will be the same for the bot as it is on your mIRC client. This is the server side and cannot be changed without changing the IRCd code.

Try using 'putdccraw' or 'putquick -next' instead of putserv with WHOIS $nick binded on join. Alot of raw replies can saturate the bot's memory and make it slow, so then you have to be careful yeah.

You can also change the define msg rate in the server.c file currently its 512/2. So that would get the bot to be more faster. You might want to ask the eggdrop support team on eggheads about this as well.

I know how to make the bot *send* data quickly, by using tcls with putquick -next, putdccraw or changing the define msg rate here, but making it *receive* data quickly. Then they might be able to help/assist you with that. As excess flood if you know happens on both sides if either you send alot of data or receive alot of data in a less amount of time than defined. :roll:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked