This does a couple of things: 1. Honors the comment by presotto, and removes the access for ether stats in the old place. 2. Fixes the index for what's etherout and ethererr the stats contain In Link Out, but stats thinks it has In Out Err... 3. does not put dead in the machine name when it does not respond for a while hth Reference: /n/sources/patch/applied/statsfixes Date: Wed Jun 16 19:16:57 CES 2004 --- /sys/src/cmd/stats.c Wed Jun 16 19:16:58 2004 +++ /sys/src/cmd/stats.c Wed Jun 16 19:16:57 2004 @@ -45,6 +45,7 @@ InIntr, /* /net/ether0/stats */ In = 0, + Link, Out, Err0, }; @@ -627,15 +628,10 @@ snprint(buf, sizeof buf, "%s/net/ether0/stats", mpt); m->etherfd = open(buf, OREAD); - if(m->etherfd < 0){ - /* try the old place - this code will disappear on Nov 18th - presotto */ - snprint(buf, sizeof buf, "%s/net/ether0/0/stats", mpt); - m->etherfd = open(buf, OREAD); - } if(loadbuf(m, &m->etherfd) && readnums(m, nelem(m->netetherstats), a, 1)) memmove(m->netetherstats, a, sizeof m->netetherstats); - snprint(buf, sizeof buf, "%s/net/ether0/ifstats", mpt); + snprint(buf, sizeof buf, "%s/net/ifstats", mpt); m->ifstatsfd = open(buf, OREAD); if(loadbuf(m, &m->ifstatsfd)){ /* need to check that this is a wavelan interface */ @@ -709,12 +705,6 @@ char buf[32]; if(m->remote && (m->disable || setjmp(catchalarm))){ - if(m->disable == 0){ - snprint(buf, sizeof buf, "%s(dead)", m->name); - m->name = estrdup(buf); - if(display != nil) /* else we're still initializing */ - eresized(0); - } if (m->disable++ >= 5) m->disable = 0; /* give it another chance */ memmove(m->devsysstat, m->prevsysstat, sizeof m->devsysstat);