Lines Matching +full:master +full:- +full:stats
1 /*-
2 * SPDX-License-Identifier: BSD-4-Clause
18 * 4. Neither the name of the author nor the names of any co-contributors
63 static char *yppush_master = NULL; /* Master NIS server for said domain. */
64 static int skip_master = 0; /* Do not attempt to push map to master. */
117 if (job->tid == tid) in yppush_show_status()
119 job = job->next; in yppush_show_status()
128 if (job->polled) { in yppush_show_status()
136 job->tid); in yppush_show_status()
141 job->map, job->server, status == YPXFR_SUCC ? in yppush_show_status()
148 job->polled = 1; in yppush_show_status()
150 svc_unregister(job->prognum, 1); in yppush_show_status()
152 yppush_running_jobs--; in yppush_show_status()
168 if (jptr->polled == 0) { in yppush_exit()
172 jptr->server); in yppush_exit()
176 jptr->server); in yppush_exit()
178 jptr = jptr->next; in yppush_exit()
197 /* All stats collected and reported -- kill all the stragglers. */ in yppush_exit()
200 if (!jptr->polled) in yppush_exit()
202 to %s (transid = %lu) still pending", jptr->server, jptr->tid); in yppush_exit()
203 svc_unregister(jptr->prognum, 1); in yppush_exit()
204 jptr = jptr->next; in yppush_exit()
223 * -1 error
241 case -1: in yppush_svc_run()
263 /* Do nothing -- RPC conventions call for all a null proc. */ in yppushproc_null_1_svc()
271 yppush_show_status(argp->status, argp->transid); in yppushproc_xfrresp_1_svc()
299 key.size = sizeof ("YP_LAST_MODIFIED") - 1; in yppush_send_xfr()
313 req.map_parms.map = job->map; in yppush_send_xfr()
314 req.transid = job->tid; in yppush_send_xfr()
315 req.prog = job->prognum; in yppush_send_xfr()
316 req.port = job->port; in yppush_send_xfr()
319 if ((clnt = clnt_create(job->server, YPPROG, YPVERS, "udp")) == NULL) { in yppush_send_xfr()
320 yp_error("%s: %s",job->server,clnt_spcreateerror("couldn't \ in yppush_send_xfr()
324 job->stat = YPPUSH_NOHOST; in yppush_send_xfr()
327 job->stat = YPPUSH_PMAP; in yppush_send_xfr()
330 job->stat = YPPUSH_RPC; in yppush_send_xfr()
348 yp_error("%s: %s", job->server, clnt_sperror(clnt, in yppush_send_xfr()
350 job->stat = YPPUSH_YPSERV; in yppush_send_xfr()
398 job->stat = 0; in yp_push()
399 job->tid = tid; in yp_push()
400 job->port = xprt->xp_port; in yp_push()
401 job->server = strdup(server); in yp_push()
402 job->map = strdup(map); in yp_push()
403 job->prognum = prognum; in yp_push()
404 job->polled = 0; in yp_push()
405 job->next = yppush_joblist; in yp_push()
409 yp_error("initiating transfer: %s -> %s (transid = %lu)", in yp_push()
420 yppush_show_status(job->stat ? job->stat : in yp_push()
421 YPPUSH_YPSERV,job->tid); in yp_push()
483 "usage: yppush [-d domain] [-t timeout] [-j #parallel jobs] [-h host]", in usage()
484 " [-p path] mapname"); in usage()
504 while ((ch = getopt(argc, argv, "d:j:p:h:t:v")) != -1) { in main()
522 tmp->name = strdup(optarg); in main()
523 tmp->next = yppush_hostlist; in main()
538 argc -= optind; in main()
562 /* Check to see that we are the master for this map. */ in main()
571 key.size = sizeof("YP_MASTER_NAME") - 1; in main()
581 /* I am master server, and no explicit host list was in main()
582 specified: do not push map to myself -- this will in main()
587 yp_error("warning: this host is not the master for %s", in main()
612 yppush_foreach(YP_TRUE, NULL, 0, tmp->name, in main()
613 strlen(tmp->name), NULL); in main()
614 tmp = tmp->next; in main()
628 /* All done -- normal exit. */ in main()