Added reset command to mbout
This commit is contained in:
parent
e84d4ba7e4
commit
026882c2af
@ -4695,6 +4695,10 @@ v0.33.20 10-Feb-2002
|
|||||||
|
|
||||||
mbout:
|
mbout:
|
||||||
The status display has now 9 digits for the outbound size.
|
The status display has now 9 digits for the outbound size.
|
||||||
|
New command, mbout reset <node>, unconditionally resets the
|
||||||
|
nodes "try" counter, ie. make an undiable node try to call
|
||||||
|
again.
|
||||||
|
The status command displays the call attempts.
|
||||||
|
|
||||||
mbsebbs:
|
mbsebbs:
|
||||||
On some systems the download taglists contained garbage after
|
On some systems the download taglists contained garbage after
|
||||||
|
@ -48,6 +48,7 @@ int do_poll = FALSE; /* Poll a node */
|
|||||||
int do_req = FALSE; /* Request files from a node */
|
int do_req = FALSE; /* Request files from a node */
|
||||||
int do_stat = FALSE; /* Show outbound status */
|
int do_stat = FALSE; /* Show outbound status */
|
||||||
int do_stop = FALSE; /* Stop polling a node */
|
int do_stop = FALSE; /* Stop polling a node */
|
||||||
|
int do_reset = FALSE; /* Reset node's try counter */
|
||||||
int e_pid = 0; /* Pid of child */
|
int e_pid = 0; /* Pid of child */
|
||||||
extern int show_log; /* Show logging */
|
extern int show_log; /* Show logging */
|
||||||
time_t t_start; /* Start time */
|
time_t t_start; /* Start time */
|
||||||
@ -129,10 +130,11 @@ void Help()
|
|||||||
colour(9, 0);
|
colour(9, 0);
|
||||||
printf(" Commands are:\n\n");
|
printf(" Commands are:\n\n");
|
||||||
colour(3, 0);
|
colour(3, 0);
|
||||||
printf(" a att <node> <flavor> <file> Attach a file to a node\n");
|
printf(" a att <node> <flavor> <file> Attach a file to a node\n");
|
||||||
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(" r 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(" 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");
|
||||||
@ -207,8 +209,10 @@ int main(int argc, char *argv[])
|
|||||||
do_node = TRUE;
|
do_node = TRUE;
|
||||||
if (!strncasecmp(argv[1], "p", 1))
|
if (!strncasecmp(argv[1], "p", 1))
|
||||||
do_poll = TRUE;
|
do_poll = TRUE;
|
||||||
if (!strncasecmp(argv[1], "r", 1))
|
if (!strncasecmp(argv[1], "req", 3))
|
||||||
do_req = TRUE;
|
do_req = TRUE;
|
||||||
|
if (!strncasecmp(argv[1], "res", 3))
|
||||||
|
do_reset = TRUE;
|
||||||
if (!strncasecmp(argv[1], "sta", 3))
|
if (!strncasecmp(argv[1], "sta", 3))
|
||||||
do_stat = TRUE;
|
do_stat = TRUE;
|
||||||
if (!strncasecmp(argv[1], "sto", 3))
|
if (!strncasecmp(argv[1], "sto", 3))
|
||||||
@ -247,12 +251,12 @@ int main(int argc, char *argv[])
|
|||||||
/*
|
/*
|
||||||
* Get node number from commandline
|
* Get node number from commandline
|
||||||
*/
|
*/
|
||||||
if (do_attach || do_node || do_poll || do_stop || do_req) {
|
if (do_attach || do_node || do_poll || do_stop || do_req || do_reset) {
|
||||||
if (argc < 3)
|
if (argc < 3)
|
||||||
Fatal((char *)"Not enough parameters");
|
Fatal((char *)"Not enough parameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_attach || do_node || do_req) {
|
if (do_attach || do_node || do_req || do_reset) {
|
||||||
if ((addr = parsefaddr(argv[2])) == NULL)
|
if ((addr = parsefaddr(argv[2])) == NULL)
|
||||||
Fatal((char *)"Unrecognizable address");
|
Fatal((char *)"Unrecognizable address");
|
||||||
}
|
}
|
||||||
@ -281,6 +285,14 @@ int main(int argc, char *argv[])
|
|||||||
die(rc);
|
die(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (do_reset) {
|
||||||
|
rc = reset(addr);
|
||||||
|
tidy_faddr(addr);
|
||||||
|
if (rc)
|
||||||
|
rc += 100;
|
||||||
|
die(rc);
|
||||||
|
}
|
||||||
|
|
||||||
if (do_attach) {
|
if (do_attach) {
|
||||||
if (argc < 5)
|
if (argc < 5)
|
||||||
Fatal((char *)"Not enough parameters");
|
Fatal((char *)"Not enough parameters");
|
||||||
|
@ -71,6 +71,7 @@ int outstat()
|
|||||||
char flstr[6];
|
char flstr[6];
|
||||||
time_t age;
|
time_t age;
|
||||||
char temp[81];
|
char temp[81];
|
||||||
|
callstat *cst;
|
||||||
|
|
||||||
if ((rc = scanout(each))) {
|
if ((rc = scanout(each))) {
|
||||||
WriteError("Error scanning outbound, aborting");
|
WriteError("Error scanning outbound, aborting");
|
||||||
@ -79,11 +80,11 @@ int outstat()
|
|||||||
|
|
||||||
if (!do_quiet) {
|
if (!do_quiet) {
|
||||||
colour(10, 0);
|
colour(10, 0);
|
||||||
printf("flavor size age address\n");
|
printf("flavor try size age address\n");
|
||||||
colour(3, 0);
|
colour(3, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Syslog('+', "Flavor Size Age Address");
|
Syslog('+', "Flavor Try Size Age Address");
|
||||||
for (tmp = alist; tmp; tmp = tmp->next) {
|
for (tmp = alist; tmp; tmp = tmp->next) {
|
||||||
if ((tmp->flavors & F_FREQ) || (tmp->size) || 1) {
|
if ((tmp->flavors & F_FREQ) || (tmp->size) || 1) {
|
||||||
strcpy(flstr,"......");
|
strcpy(flstr,"......");
|
||||||
@ -94,9 +95,11 @@ int outstat()
|
|||||||
if ((tmp->flavors) & F_FREQ ) flstr[4]='R';
|
if ((tmp->flavors) & F_FREQ ) flstr[4]='R';
|
||||||
if ((tmp->flavors) & F_POLL ) flstr[5]='P';
|
if ((tmp->flavors) & F_POLL ) flstr[5]='P';
|
||||||
|
|
||||||
|
cst = getstatus(&(tmp->addr));
|
||||||
age = time(NULL);
|
age = time(NULL);
|
||||||
age -= tmp->time;
|
age -= tmp->time;
|
||||||
sprintf(temp, "%s %9lu %s %s", flstr, (long)tmp->size, str_time(age), ascfnode(&(tmp->addr), 0x1f));
|
sprintf(temp, "%s %3d %9lu %s %s", flstr, cst->tryno, (long)tmp->size,
|
||||||
|
str_time(age), ascfnode(&(tmp->addr), 0x1f));
|
||||||
|
|
||||||
if (!do_quiet)
|
if (!do_quiet)
|
||||||
printf("%s\n", temp);
|
printf("%s\n", temp);
|
||||||
@ -321,6 +324,19 @@ int poll(faddr *addr, int stop)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int reset(faddr *addr)
|
||||||
|
{
|
||||||
|
if (addr == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
putstatus(addr, 0, 0);
|
||||||
|
CreateSema((char *)"scanout");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int freq(faddr *addr, char *fname)
|
int freq(faddr *addr, char *fname)
|
||||||
{
|
{
|
||||||
char *req;
|
char *req;
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
int each(faddr *, char, int, char *);
|
int each(faddr *, char, int, char *);
|
||||||
int outstat(void);
|
int outstat(void);
|
||||||
int poll(faddr *, int);
|
int poll(faddr *, int);
|
||||||
|
int reset(faddr *);
|
||||||
int freq(faddr *, char *);
|
int freq(faddr *, char *);
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user