Description:
Machine come and go... Little patch removes lists down for over 4 days from the list. (If you haven't noticed they are down in that period, you should turn them off!) Closes: PR#bin/1361 Submitted by: xaa@stack.urc.tue.nl
This commit is contained in:
parent
4bd2ba9f37
commit
5d53f683d3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19117
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* $Id: ruptime.c,v 1.5 1995/08/07 19:17:40 wollman Exp $ */
|
||||
/* $Id: ruptime.c,v 1.6 1995/09/08 20:33:21 jkh Exp $ */
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
@ -62,7 +62,7 @@ struct hs {
|
||||
int hs_nusers;
|
||||
} *hs;
|
||||
struct whod awhod;
|
||||
|
||||
#define LEFTEARTH(h) (now - (h)->hs_wd->wd_recvtime > 4*24*60*60)
|
||||
#define ISDOWN(h) (now - (h)->hs_wd->wd_recvtime > 11 * 60)
|
||||
#define WHDRSIZE (sizeof (awhod) - sizeof (awhod.wd_we))
|
||||
|
||||
@ -167,6 +167,8 @@ main(argc, argv)
|
||||
qsort(hs, nhosts, sizeof(hs[0]), cmp);
|
||||
for (i = 0; i < nhosts; i++) {
|
||||
hsp = &hs[i];
|
||||
if (LEFTEARTH(hsp))
|
||||
continue;
|
||||
if (ISDOWN(hsp)) {
|
||||
(void)printf("%-12.12s%s\n", hsp->hs_wd->wd_hostname,
|
||||
interval(now - hsp->hs_wd->wd_recvtime, "down"));
|
||||
|
Loading…
Reference in New Issue
Block a user