-
Apr 3rd, 2024, 02:36 PM
#1
Thread Starter
Frenzied Member
How to check if a server is up/online
What is the best way to test/check if a server is online & responsive? I can't just ping it because a server can be set to not respond to ping requests.
So is there another way to do this? I have the url for the server(s) I want to check. Thanks...
-
Apr 3rd, 2024, 03:25 PM
#2
Re: How to check if a server is up/online
I would say that tbe best solution depends to some extent on what options you have. For example, if you have a service that you wrote, running on the server, then you could add some meaningless function. You could then call that function and deal with the response. Of course, if the server wasn't running, it would timeout...eventually, so you'd have to make sure you set the timeout interval to something tolerable.
If you can't do that, then is there some other throwaway method you can call for? You'd want something that wouldn't tax the server, as you likely would be simply throwing out the result, unless you choose something that you have a use for.
Ultimately, though, there's no sure-fire way to know if a computer is off. Even if you get no response, it could be caused by something else between the two endpoints. Furthermore, there's an inherent race condition in any such test. It would be mighty rare, but it would be possible to ask the server, get a response, and then have the server go down before you can make the actual request. For this reason, you pretty much have to be prepared for no response on any request.
My usual boring signature: Nothing
 
-
Apr 3rd, 2024, 03:38 PM
#3
Thread Starter
Frenzied Member
Re: How to check if a server is up/online
Thanks SH. What I have is an old'ish list of servers that I want to clean up. I would like to iterate through the list & check if I get any response. If no response then it gets removed. I understand that there is no sure-fire way due to circumstances beyond my control, but I would at least like to try something. I just know I can't rely on pinging because I know that some of the servers don't respond to a ping even though they are up...
-
Apr 4th, 2024, 06:51 AM
#4
Re: How to check if a server is up/online
Maybe a Web API hosted as a service to each server but if you go on about on every server to install it you would already know if they are running.
https://www.c-sharpcorner.com/Upload...ndows-service/
Out of the box and without doing any installation on the servers I don't think you can do much more than a ping.
Also an idea could be to let the firewall somehow do a request but that, I have never touched or know if it's a viable idea.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|