+2002-10-04 Martin Mares <mj@ucw.cz>
+
+ * When a server stops responding, keep its record for a longer
+ time, but report the server as down. DEFAULT_DOWN_TIME and
+ DEFAULT_DEAD_TIME in net.h control the parameters. Requested
+ by Pavel Troller <patrol@sinus.cz>.
+
+ * Released as version 1.11.
+
2002-07-06 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
* Makefile: Split ywho and nwho. Released as version 1.10.
-This package contains the Yet Another Network Who-like Utility, version 1.9.
+This package contains the Yet Another Network Who-like Utility, version 1.11.
-Copyright (c) 1996--2001 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+Copyright (c) 1996--2002 Martin Mares <mj@ucw.cz>
All files in this package can be freely distributed and used according
to the terms of the GNU General Public License, either version 2 or
+nwho (1.11) unstable; urgency=low
+
+ * New upstream version.
+
+ -- Martin Mares <mj@ucw.cz> Fri, 4 Oct 2002 13:53:53 +0200
+
nwho (1.10) unstable; urgency=low
* New upstream version.
/*
* The Remote User Info Distribution Protocol
*
- * (c) 1997--2001 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ * (c) 1997--2002 Martin Mares <mj@ucw.cz>
*
* This software may be freely distributed and used according to the terms
* of the GNU General Public License. See file COPYING in any of the GNU packages.
#define DEFAULT_SEND_TIME 30
#define DEFAULT_PRUNE_TIME 30
-#define DEFAULT_DEAD_TIME 120
+#define DEFAULT_DOWN_TIME 120
+#define DEFAULT_DEAD_TIME 4*86400
/*
- * The Remote User Information Lister 1.9
+ * The Remote User Information Lister
*
- * (c) 1997--2001 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ * (c) 1997--2002 Martin Mares <mj@ucw.cz>
*
* This software may be freely distributed and used according to the terms
* of the GNU General Public License. See file COPYING in any of the GNU packages.
#include <fcntl.h>
#include <unistd.h>
#include <dirent.h>
+#include <time.h>
#include <netinet/in.h>
#include <asm/types.h>
#include "net.h"
static int is_uptime;
+static time_t now;
static void
puttime(int s)
{
int i;
+ if (p->server_time - now >= DEFAULT_DOWN_TIME)
+ {
+ printf("%-16s down\n", name);
+ return;
+ }
printf("%-16s up ", name);
puttime(ntohl(p->uptime));
printf(" load");
int m = ntohl(p->num_users);
struct userinfo *i;
+ if (p->server_time - now >= DEFAULT_DOWN_TIME)
+ return;
for(u=0; u<m; u++)
{
i = &p->users[u];
}
if (!is_uptime)
puts("Name Li M Where LogT IdleT");
+ now = time(NULL);
scan();
return 0;
}
Begin3
Title: ywho
-Version: 1.10
-Entered-date: 020705
+Version: 1.11
+Entered-date: 021004
Description: A rwhod replacement with central server, allowing user
information to be gathered across routers.
Keywords: rwho
Author: Martin Mares <mj@atrey.karlin.mff.cuni.cz>
Maintained-by: Martin Mares <mj@atrey.karlin.mff.cuni.cz>
-Primary-site: atrey.karlin.mff.cuni.cz/pub/local/mj/linux/nwho-1.10.tar.gz
+Primary-site: atrey.karlin.mff.cuni.cz/pub/local/mj/linux/nwho-1.11.tar.gz
Alternate-site: metalab.unc.edu/pub/Linux/system/status
Copying-policy: GPL
End
/*
- * The Remote User Information Daemon 1.9
+ * The Remote User Information Daemon
*
- * (c) 1997--2001 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ * (c) 1997--2002 Martin Mares <mj@ucw.cz>
*
* This software may be freely distributed and used according to the terms
* of the GNU General Public License. See file COPYING in any of the GNU packages.