954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Server checker

hey boyz/girlz

i need to make a code for a server status checker, how would i do it?

at the moment the server is checked by using this

http://deep.phpwebhosting.com/~paradox/Chaos%20Knights/ServCheck/ServerCheck.php

how can i convert that into a simple program that can run on the desktop?

Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

The easiest solution is to shell a ping command, and redirect the output to a temporary file. Open the Temporary file, and have your VB Program read in the lines (compare using instr) and check if there is a timeout, or if there is a response from the server. If there is a response from the server, naturally, the server is up. If you get, instead, a ping timout, then the server is down. If you really want to get fancy about it, you could try to connect the server on port 80 (the web page port), rip apart the HTML, and have it figure if the image is Red or Green. The first option is clearly easier, and is just as effective. Let me know if you need any further assistance in this.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

yea, thx, couyld you pls show me how to do this, i couldnt get it to work myself.

also ineed it to run in the system tray, but only if it is easy.

Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

yea this is kinda the first time i have had to do something like this, so im kinda a bit lost. :P

Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

Why not just look for a script that does this? Try searching HotScripts.com. There are plenty there that do just that.

ayksolutions
Light Poster
43 posts since Sep 2005
Reputation Points: 10
Solved Threads: 1
 

thx ill chk that,

yea ill just put a better description of what i am trying to do.

this server is used to host the game World of Warcraft, and im trying to get a small program to run that will connect to the server, telling me if the server is up or down. but i dont know how to get it to connect to the server properly.

becasue i have never done anything like this before, i would like sum help doing it.


i can make the UI for it, or even better could someone tell me how to get it to run in the system try so that i can keep it running whilst doing other things.

or if anyone knows of somewhere that i can download a program that already does this simply.

Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

glad to be of help

ayksolutions
Light Poster
43 posts since Sep 2005
Reputation Points: 10
Solved Threads: 1
 

For Additional Fun, Add A Timer Control To Do This Every 10 Seconds

Attachments ServerPing.zip (2.75KB)
Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

tha very much mate

Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

you can use cron or the at command on IX flavored systems for "timing"
SNMPD is designed for monitoring systems. Is also installed on IXs by default and sometimes fault on Windows. Loads of good suggestions on this thread guys.

Cain
Posting Whiz in Training
298 posts since Aug 2004
Reputation Points: 18
Solved Threads: 2
 

Wow, Cain, Thanks for that. However, The Forum is "Visual Basic" and to my knowledge (even with the use of wine on a wicked system) VB will NOT Run on a *nix box. I've tried. So, Should the thread be related to merely checking a server's status, that would be awesome, but this is a windows computer programming forum.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

Mkay, And The Updated Version, Which is still not perfect and contains some minor flaws, but does exactly what you want. You may need to copy the tray.ocx to your windows\system32 folder, or just replace the one in the project with the one in the zipped folder... either way, the program works like a charm for me.

Attachments IsAlive.zip (13.3KB)
Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

thx thx thx thx thx thx thx thx thx thx thx thx thx thx thx thx thx thx thx thx thx thx thx

Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

*Nods*

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

hmm something is wrong.

when the server is down, it still shows up green and on.

umm, mby i shold chk how they restart the server, mby the server is always on, but the dedicated game console is what they shut down and restart.

ok ill talk to the owner and find out if that is what the do.
thx again though.


if u wanna see what i mean, open this page, http://deep.phpwebhosting.com/~paradox/Chaos%20Knights/ServCheck/ServerCheck.php
when it is red the game is offline, green = online.

the server ip is xaoswow.servegame.com

could u chk it out 4 me pls.

Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

I'll tell you what, you need to either A) Ask the Admin What PORT it runs on (or if you know what port it is, that's cool. You could always be connected to the game, go to a DOS prompt, and run NetStat, and give me the statistics of it.) Once I know the PORT and the Server IP, I'll build you one using Sockets, which will connect to the Game Port of the server, and not just to see if the box itself is up or down.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

servers ful Ip is

xaoswow.servegame.com:8080

this is alos a site that is run only when the server is up.

http://xaoswow.servegame.com:8080/

Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

The page is 8080, but I don't think the port for the game is.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

my bad :p


the server runs of prt 3247
i think thats what he said.

Slavrix
Junior Poster in Training
70 posts since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

It doesn't look like that's correct. I ran a port scan on the server: xaoswow.servegame.com, and that port doesn't show up as being open. At the same time, the web page shows a green box, meaning the server is up. Either you have the port wrong, or the server wrong.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You