Probably the easiest way would be to do simple HTTP access to the root URL of the Jenkins server. You get a successful status (200) if Jenkins is completely ready. If this is not the case, you will receive 503 - Service Temporarily Unavailable
(or possibly other errors depending on the specific situation).
At the command line, you can use a tool like wget to execute this request.
source share