diff options
-rw-r--r-- | hbeat.c | 2 | ||||
-rw-r--r-- | qarsh.c | 10 |
2 files changed, 5 insertions, 7 deletions
@@ -142,8 +142,6 @@ hbeat(hbeat_t hbh) hbeatp->last_rhost_btime = hbeat; retval = 1; } else if (abs(hbeat - hbeatp->last_rhost_btime) > 5) { - fprintf(stderr, "Host rebooted (%d, %d)\n", - hbeat, hbeatp->last_rhost_btime); hbeatp->rhost_state = HOST_REBOOT; retval = 0; } else { @@ -57,6 +57,7 @@ int signal_to_send = 0; int sigs_to_propogate[] = { SIGINT, SIGTERM, SIGHUP, SIGUSR1, SIGUSR2 }; sigset_t pselect_sigmask; int connection_timeout = 0; +char *host = NULL; void @@ -423,15 +424,15 @@ run_remote_cmd(char *cmdline) } } if (hbeat_getstate(qarsh_hb) == HOST_TIMEOUT) { - fprintf(stderr, "Didn't receive heartbeat for %d seconds\n", - hbeat_getmaxtimeout(qarsh_hb)); + fprintf(stderr, "Didn't receive heartbeat from %s for %d seconds\n", + host, hbeat_getmaxtimeout(qarsh_hb)); return W_EXITCODE(127, 0); } else if (hbeat_getstate(qarsh_hb) == HOST_REBOOT) { - fprintf(stderr, "Remote host rebooted\n"); + fprintf(stderr, "Remote host %s rebooted\n", host); return W_EXITCODE(127, 0); } if (!cmd_finished) { - fprintf(stderr, "Remote command exited with unknown state\n"); + fprintf(stderr, "Remote command on %s exited with unknown state\n", host); return W_EXITCODE(127, 0); } return rc; @@ -442,7 +443,6 @@ main(int argc, char *argv[]) { int c; int port = 5016; - char *host = NULL; char *remuser = NULL; char *remgroup = NULL; char *args; |