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 

lagging bot
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Mon Sep 19, 2005 1:40 am    Post subject: lagging bot Reply with quote

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.
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Sep 19, 2005 1:57 am    Post subject: Reply with quote

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] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Mon Sep 19, 2005 2:03 am    Post subject: Reply with quote

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


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Sep 19, 2005 2:40 am    Post subject: Reply with quote

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] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Mon Sep 19, 2005 4:15 am    Post subject: Reply with quote

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 Very Happy.
_________________
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...
Back to top
View user's profile Send private message MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Sep 19, 2005 4:35 am    Post subject: Reply with quote

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] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Mon Sep 19, 2005 5:10 am    Post subject: Reply with quote

Quote:
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.

Quote:
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
Back to top
View user's profile Send private message
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Wed Sep 21, 2005 8:34 am    Post subject: Reply with quote

Code:
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.
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Sep 21, 2005 11:58 am    Post subject: Reply with quote

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] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Wed Sep 21, 2005 12:05 pm    Post subject: Reply with quote

Quote:
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)
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Sep 21, 2005 1:39 pm    Post subject: Reply with quote

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

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] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Wed Sep 21, 2005 2:45 pm    Post subject: Reply with quote

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


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Sep 21, 2005 2:57 pm    Post subject: Reply with quote

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

Quote:

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?

Quote:

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] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Wed Sep 21, 2005 3:11 pm    Post subject: Reply with quote

a-
Quote:
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-
Quote:
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
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Sep 21, 2005 3:25 pm    Post subject: Reply with quote

so we are back to my previous post about complex lag tracking system and zillions scenarios Wink
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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