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.

lagging bot

Old posts that have not been replied to for several years.
User avatar
SaPrOuZy
Halfop
Posts: 75
Joined: Wed Mar 24, 2004 7:38 am
Location: Lebanon

lagging bot

Post by SaPrOuZy »

hello there,
is there a way for the bot to know if its lagging, i have a script for botnet
floods running perfectly, but sometimes if the bot is lagging it it messes up.
so i want to check if it is or not.
thanks.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

wrong forum dude

it's normal for eggdrop to be lagging during mass flood; the important thing is to not flood itself out of irc thereby losing ops, which could still happen even on modern ircds that have msg pace limits
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
SaPrOuZy
Halfop
Posts: 75
Joined: Wed Mar 24, 2004 7:38 am
Location: Lebanon

Post by SaPrOuZy »

what i meant is the bot thinks there's a flood because it's lagging
i was checking the logs of a chan from 2 different bots,
the one lagging had like 3 minutes packed in 1 minute

so what i have in mind is to if the bots catches a flood, it will perform the
protection, and then checks if it's lagging , if it is it removes the lock/bans

still didn't think deep into it, but a script to know if the bot is lagging will be usefull
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

hmm that's actually nice idea, I'll think about incorporating something similar in xchannel.tcl
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

I wonder how to get the lag value from output in .status?

but what will you do if you notice the bot has lagged 60s and somone triggers a 10s flood? do you want to ignore the flood? it might have been really a flood, it might have not been. How will you determine?

PS: thats why I still believe in '/mode #chan +f 5:2' on networks that support it, the irc server knows usually better than the bot when 5 lines are beiing send within 2s :D.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

you get the lag not by parsing .status but by pinging the server and measuring its response time

and I will probably have periodic lag checks; on mass flood, I won't issue any server commands if the average lag from previous minute or so has been unacceptable
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
SaPrOuZy
Halfop
Posts: 75
Joined: Wed Mar 24, 2004 7:38 am
Location: Lebanon

Post by SaPrOuZy »

but what will you do if you notice the bot has lagged 60s and somone triggers a 10s flood? do you want to ignore the flood? it might have been really a flood, it might have not been. How will you determine?
i have more than 1 bot protecting the channel, so if one bot is lagging
i will rely on the others.
and I will probably have periodic lag checks; on mass flood, I won't issue any server commands if the average lag from previous minute or so has been unacceptable

that seems to be a good idea, to rely on an average lag time
User avatar
SaPrOuZy
Halfop
Posts: 75
Joined: Wed Mar 24, 2004 7:38 am
Location: Lebanon

Post by SaPrOuZy »

Code: Select all

proc lag_check {} {
	global lagging
	set lag0 [ping server1]
	if {$lag0 > 3 } { 
		set lagging 1 
		return
	}
# server1 != server2 != server3
	set lag1 [ping server2]
	set lag2 [ping server3]
	if {$lag1 > 3 && lag2 > 3 } {
		set lagging 1
		return
	}
}
explanation of pseudo code: (EDIT*: it's not really pseudo code, it's more like code hehe)
server1 = the server to which the bot is connected.
if the ping reply is greater than 3 seconds then the bot is lagging due to it's connection or load on box or whatever.
in case it's not, we should also check if the IRC server is lagging (is about to split or something)
so we ping 2 other servers , server2 and server3
if the reply of both is greater than 3 seconds then server1 is lagging
and thus the bot is considered lagging and shouldn't issue commands

what do you guys think about this?

what's needed is:
  • a function that pings the server and returns the reply
    to get the 2 other server names to ping.
i know it's should be in the scripting forum but it's about the pervious.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

pinging other servers is pointless since if you are lagged to your own server, you'll be lagged to all others anyway - you have only one connection to IRC in any given moment, and that connection is through the server you are on
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
SaPrOuZy
Halfop
Posts: 75
Joined: Wed Mar 24, 2004 7:38 am
Location: Lebanon

Post by SaPrOuZy »

if the ping reply is greater than 3 seconds then the bot is lagging due to it's connection or load on box or whatever.
in case it's not, we should also check if the IRC server is lagging (is about to split or something)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

hmm so you are proposing a complex lag tracking system but you are not elaborating on details ;)

obviously, you'll need to know the structure of the network, i.e. which servers your server connects to (that can be obtained by analyzing LINKS output); and you will have to come up with some algorithm for taking the ultimate decision whether to take action or not; however, that won't be easy since there can be all kind of scenarios; consider for example:

you are on server A, which connects to B, C and D; you have pinged B, C and D and detected no lag; however, D connects to E, and D is lagging to E, and most of your users are either on E or on servers behind E; so E splits, rejoins, and you take action because your averaged lag measurement for the neighbouring servers didn't go above the trhreshold
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
SaPrOuZy
Halfop
Posts: 75
Joined: Wed Mar 24, 2004 7:38 am
Location: Lebanon

Post by SaPrOuZy »

i thought about parsing LINKS(to get the list of servers) and WHOIS (to know where the bot is connected)

what am actually checking if the server that the bot IS connected to is lagging or not. not other servers
because if it is then it could cause probs.

and also is not about splits/rejoins
it's about to know forexample : if the bot noticed 6 joins happened in 3 seconds it could be due to 3 possible reasons:
1- the is actually a flood
2- the bot it self is lagging
3- the server on which the bot is connected is lagging and suddenly received the packets and displayed them.

1 and 2 are taken care of, 3 remain to be completed.

hopefuly this clears up my thought more
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

SaPrOuZy wrote:i thought about parsing LINKS(to get the list of servers) and WHOIS (to know where the bot is connected)
there is global variable server, don't go with whois'ing self
what am actually checking if the server that the bot IS connected to is lagging or not. not other servers
because if it is then it could cause probs.
lagging to what? to the bot? then what does [ping server2] means in your pseudo-code?
and also is not about splits/rejoins
it's about to know forexample : if the bot noticed 6 joins happened in 3 seconds it could be due to 3 possible reasons:
1- the is actually a flood
2- the bot it self is lagging
3- the server on which the bot is connected is lagging and suddenly received the packets and displayed them.

1 and 2 are taken care of, 3 remain to be completed.

hopefuly this clears up my thought more
3 means pinging other servers
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
SaPrOuZy
Halfop
Posts: 75
Joined: Wed Mar 24, 2004 7:38 am
Location: Lebanon

Post by SaPrOuZy »

a-
lagging to what? to the bot? then what does [ping server2] means in your pseudo-code?
i want to check if the bot is lagging to server2 (in case it's not lagging to server1, it's own server)
if the bot is not lagging to it's server
and the bot is lagging to server2 and server3
then this most porbably means that server1 is lagging to other servers.

b-
3 means pinging other servers
yes i want to ping other servers to accomplish a

anyways for now i'll settle for what's done and test it. the case of the lagging server can wait lol
Last edited by SaPrOuZy on Wed Sep 21, 2005 3:26 pm, edited 1 time in total.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

so we are back to my previous post about complex lag tracking system and zillions scenarios ;)
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
Locked