mIRC Home    About    Download    Register    News    Help

Print Thread
#80533 25/04/04 06:19 AM
E
ECGN_Ryan
ECGN_Ryan
E
Hey folks,

I've been trying to get a script that pings specific hosts. If the host does not reply, it notifies a channel that the host has failed to respond. If it does reply, however, then it does nothing.

I would like the script to repeat itself every 30 seconds or so, to make sure downtime on the host is minimal.

Im talking about pinging an ip address / hostname.

The code I have so far is not working, and I have essentially trashed it, and thought i'd try here.

Thanks in advance!

Last edited by ECGN_Ryan; 25/04/04 06:22 AM.
#80534 25/04/04 07:16 AM
Joined: Dec 2002
Posts: 2,958
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Dec 2002
Posts: 2,958
If a host needed checking that often I'd be finding a new one somewhere.

You can repeat events with timer 0 <timer number> <command>

I don't know if what you want can be achieved in mIRC though. Surely you'd need to use DOS for pinging hosts.

#80535 25/04/04 08:41 AM
E
ECGN_Ryan
ECGN_Ryan
E
I am from a Game Server hosting company, and downtime is not an option. Granted, we have Techs in the DataCenter 8 hours a day, and an on call noc tech 24 / 7, we want to catch downtimes ASAP, and restore the downed server quickly and efficently.

Another thing I thought of is using socks to establish a connection with the FTP server on each box. Open a connection on port 23, and once established, closed. If it doesn't respond, either FTP is dead, or the box is down. I've been trying this, but simply lack the knowledge required. Again, though i'd ask here.

Thanks for your reply, though.

#80536 26/04/04 10:59 AM
I
Iori
Iori
I
What about a timer opening a socket connection?
Code:
/timerupchk -o 0 30 sockopen upchk &lt;address&gt; &lt;port&gt;
on *:sockopen:upchk:{
  if $sockerr {
    echo -a Here is where your code goes
    echo -a * Sockerr $sockname $+ : $sock($sockname).wserr - $sock($sockname).wsmsg
  }
  sockclose $sockname
}


Link Copied to Clipboard