TABLE OF CONTENTS
::pwtk::host_is_up
SYNOPSIS
proc ::pwtk::host_is_up {user_at_host} {
PURPOSE
Check if the remote host is up.
ARGUMENT
- user_at_host -- name of the remote host (can be in the form of user@host)
BEWARE
This command requires the 'ping' program.
RETURN VALUE
- 1 ... if the host is up
- 0 ... if the host is down or if the 'ping' executable is missing
SOURCE
set host [resolve_ssh_alias $user_at_host] if { [catch {exec ping -c 2 $host}] } { return 0 } else { return 1 } }