Added reset command to mbout

This commit is contained in:
Michiel Broek 2002-03-17 12:34:38 +00:00
parent 026882c2af
commit a4f753b04e
3 changed files with 26 additions and 10 deletions

View File

@ -12,7 +12,7 @@
</HEAD> </HEAD>
<BODY> <BODY>
<BLOCKQUOTE> <BLOCKQUOTE>
<h5>Last update 31-Jan-2001</h5> <h5>Last update 17-Mar-2001</h5>
<P>&nbsp;<P> <P>&nbsp;<P>
<H1>mbout - The Outbound Manager</H1> <H1>mbout - The Outbound Manager</H1>
@ -73,6 +73,11 @@ actual call. This is also practical if you want some files from your uplink,
just make the requests and the actual request is send when your normal just make the requests and the actual request is send when your normal
scheduled poll to your uplink is processed. scheduled poll to your uplink is processed.
<P> <P>
<code><strong>mbout</strong> reset [node..node]</code> resets the nodes "try"
counter to zero. So if a node is undiable, the counter is 30 or more, then by
resetting this counter that node will be called again. The outbound is rescanned
after this command so that calling will start immediatly.
<P>
<code><strong>mbout</strong> stat</code> shows the status of the mailer outbound. <code><strong>mbout</strong> stat</code> shows the status of the mailer outbound.
This status is also written to the logfile. This status is also written to the logfile.
<P> <P>

View File

@ -134,12 +134,12 @@ void Help()
printf(" n node <node> Show nodelist information\n"); printf(" n node <node> Show nodelist information\n");
printf(" p poll <node> [node..node] Poll node(s) (always crash)\n"); printf(" p poll <node> [node..node] Poll node(s) (always crash)\n");
printf(" req req <node> <file> [file..file] Request file(s) from node\n"); printf(" req req <node> <file> [file..file] Request file(s) from node\n");
printf(" res reset <node> Reset node(s) \"try\" counter\n"); printf(" res reset <node> [node..node] Reset node(s) \"try\" counter\n");
printf(" sta stat Show outbound status\n"); printf(" sta stat Show outbound status\n");
printf(" sto stop <node> [node..node] Stop polling node(s)\n"); printf(" sto stop <node> [node..node] Stop polling node(s)\n");
printf("\n"); printf("\n");
printf(" <node> Should be in domain form, e.g. f16.n2801.z2.domain\n"); printf(" <node> Should be in domain form, e.g. f16.n2801.z2.domain\n");
printf(" <flavor> Flavor's are: crash | immediate | normal | hold\n"); printf(" <flavor> Flavor's are: crash | immediate | normal | hold\n");
colour(9, 0); colour(9, 0);
printf("\n Options are:\n\n"); printf("\n Options are:\n\n");
colour(3, 0); colour(3, 0);
@ -286,11 +286,19 @@ int main(int argc, char *argv[])
} }
if (do_reset) { if (do_reset) {
rc = reset(addr); for (i = 3; i <= argc; i++) {
tidy_faddr(addr); if (strncasecmp(argv[i-1], "-q", 2)) {
if (rc) if ((addr = parsefaddr(argv[i-1])) == NULL)
rc += 100; Fatal((char *)"Unrecognizable address");
die(rc); j = reset(addr);
tidy_faddr(addr);
if (j > rc)
rc = j;
}
}
if (rc)
rc = 100;
die(rc);
} }
if (do_attach) { if (do_attach) {

View File

@ -330,6 +330,9 @@ int reset(faddr *addr)
return 0; return 0;
putstatus(addr, 0, 0); putstatus(addr, 0, 0);
Syslog('+', "Reset try-counter for %s", ascfnode(addr, 0x1f));
if (!do_quiet)
printf("Reset try-counter for %s\n", ascfnode(addr, 0x1f));
CreateSema((char *)"scanout"); CreateSema((char *)"scanout");
return 0; return 0;