How to show ping output dynamically in a web page?
问题 As part of a diagnostics page I would like to have the user be able to run a "ping", ie an ordinary shell command to send ICMP_ECHO_REQUSTs to a certain IP and display the resuls dynamically in a div in the browser. The backend is Ruby/Rails. I'm past running the command on the server side and reading the output from the ping command. And I've been building web pages that periodically calls back to the server to update som parts of the page dynamically. But in this case there are three