How to check connectivity between raspberry pi (which act as a client) and server using web-socket
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question does not appear to be about Information security within the scope defined in the help center." – AviD
Use nmap with the -p option to have it "ping" the specific port you'd like to test. You can cron this, or script it in any number of ways.
The nice thing about this is you can test the TCP connectivity without creating logs on the server or take it a step further and get the version information from the server which will confirm that the server itself is responding to requests.
You can do this with lots of other tools like curl or wget and each have different advantages and disadvantages. Alternatively there are lots of small-footprint network monitoring tools which would also do the job.
If you are also looking to log this data setting up something like MRTG or RRD may also be useful to spot patterns in downtime.