projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
include aculib in cleanup
[unix-history]
/
usr
/
src
/
usr.bin
/
ruptime
/
ruptime.c
diff --git
a/usr/src/usr.bin/ruptime/ruptime.c
b/usr/src/usr.bin/ruptime/ruptime.c
index
ba6e196
..
a465932
100644
(file)
--- a/
usr/src/usr.bin/ruptime/ruptime.c
+++ b/
usr/src/usr.bin/ruptime/ruptime.c
@@
-1,12
+1,11
@@
#ifndef lint
#ifndef lint
-static char sccsid[] = "@(#)ruptime.c 4.
8 83/04/21
";
+static char sccsid[] = "@(#)ruptime.c 4.
12 (Berkeley) 83/05/25
";
#endif
#include <sys/param.h>
#include <stdio.h>
#include <dir.h>
#endif
#include <sys/param.h>
#include <stdio.h>
#include <dir.h>
-#include <utmp.h>
-#include "rwhod.h"
+#include <rwhod.h>
DIR *etc;
DIR *etc;
@@
-20,6
+19,7
@@
struct whod awhod;
int hscmp(), ucmp(), lcmp(), tcmp();
#define WHDRSIZE (sizeof (awhod) - sizeof (awhod.wd_we))
int hscmp(), ucmp(), lcmp(), tcmp();
#define WHDRSIZE (sizeof (awhod) - sizeof (awhod.wd_we))
+#define RWHODIR "/usr/spool/rwho"
char *interval();
int now;
char *interval();
int now;
@@
-111,11
+111,11
@@
again:
for (i = 0; i < nhosts; i++) {
hsp = &hs[i];
if (down(hsp)) {
for (i = 0; i < nhosts; i++) {
hsp = &hs[i];
if (down(hsp)) {
- printf("%-
8.8
s%s\n", hsp->hs_wd->wd_hostname,
+ printf("%-
12.12
s%s\n", hsp->hs_wd->wd_hostname,
interval(now - hsp->hs_wd->wd_recvtime, "down"));
continue;
}
interval(now - hsp->hs_wd->wd_recvtime, "down"));
continue;
}
- printf("%-
8.8
s%s, %4d user%s load %*.2f, %*.2f, %*.2f\n",
+ printf("%-
12.12
s%s, %4d user%s load %*.2f, %*.2f, %*.2f\n",
hsp->hs_wd->wd_hostname,
interval(hsp->hs_wd->wd_sendtime -
hsp->hs_wd->wd_boottime, " up"),
hsp->hs_wd->wd_hostname,
interval(hsp->hs_wd->wd_sendtime -
hsp->hs_wd->wd_boottime, " up"),