Hello @kartik,
You could use exec to call the system ping command
var sys = require('sys')
var exec = require('child_process').exec;
function puts(error, stdout, stderr) { sys.puts(stdout) }
exec("ping -c 3 localhost", puts);
Hope it helps!!
To know more about Node.js, join Node.js course online today.
Thank You!!