Check the status of a server script

I have a server running two python scripts that accept data from the arduino over ethernet through UDP packets.
What I want to do is have the arduino check whether they python scripts are running and therefore decide whether or not to send the data.
Any suggestions?

Two kinds of people can answer your question. Arduino/ethernet programmers or server programmers. Have you tried both.

I am not either of them so this is all I can say: do you get any response from your scripts to Arduino. Can you make them give a response. Or make a new one.

Why do you wanna do that? You're sending UDP packets, almost any check for the scripts to be running will use more network resources than just sending the packets anyway. If nobody is listening for UDP packets, why do you care?

If you really do care: Implement on both sides heartbeat packets, just delivering the information that the program is alive. That way the Arduino can send such a packet and just sends data if it gets a response from the script.

I agree with above, why bother checking?

In theory you're right. I guess he's using that on his LAN. Have you seen a UDP packet dropping accidentally on your LAN? If the LAN is crowded like that he doesn't have to send any data either (using UDP).

Basically if the arduino doesn't have an internet connection it will save any data to the SD card, but if it has internet it will send it to the server. I want to implement this as a failsafe in case of a server crash I will not lose any data.
I like the sound of the heartbeat packets but the devices will be rolled out in a large scale to multiple networks that don't necessarily have fixed IPs so how would I send packets to all the devices?

What I was hoping for was a way for the device to check on the server and then act accordingly.

The problem with TCP is that I don't want it to be blocking.

If you relay on the data being sent via UDP you should always send back a confirmation packet. How do you know your data was received on the server? Maybe you should better use TCP connections, they're easier to handle for the beginner.

The heartbeat packets would be sent by the Arduino and the server is answering. If you can send the data to the server you should also be able to send a heartbeat packet. Also, the server should be able to respond to a simple packet received from the Arduino by sending a response.

Why is TCP blocking in any way? It's just a reliable connection.

Can you recommend any tcp libraries?

For Arduino? Use the same as for UDP. Depends on your hardware.

On the arduino I am using the w5200 ethernet module, (exactly the same as the w5100)

On the arduino I am using the w5200 ethernet module, (exactly the same as the w5100)

No, it isn't. There are significant differences between the two chips.

Support for TCP is built into the W5100 and W5200 chips, though.

On the arduino I am using the w5200 ethernet module, (exactly the same as the w5100)

Check out the Web Server/Client libraries. They show you how to use TCP by implementing HTML within it.

I figured it out!
I have the scripts on the server creating their own http server instance and then the devices use act as a client, if they get a 200 when they try and access the webpage it knows its running.
If the script crashes so does that instance of the web server