Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/systat add command line -n flag, which is same as "n...
details: https://anonhg.NetBSD.org/src/rev/2073644ea66d
branches: trunk
changeset: 480227:2073644ea66d
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Jan 07 04:47:23 2000 +0000
description:
add command line -n flag, which is same as "netstat numbers".
without it, we can't disable name resolution before the resolution starts.
diffstat:
usr.bin/systat/extern.h | 3 ++-
usr.bin/systat/main.c | 11 +++++++----
usr.bin/systat/netstat.c | 6 +++---
usr.bin/systat/systat.1 | 15 ++++++++++++++-
4 files changed, 26 insertions(+), 9 deletions(-)
diffs (126 lines):
diff -r 003566f58200 -r 2073644ea66d usr.bin/systat/extern.h
--- a/usr.bin/systat/extern.h Fri Jan 07 03:56:14 2000 +0000
+++ b/usr.bin/systat/extern.h Fri Jan 07 04:47:23 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.19 2000/01/05 11:59:12 itojun Exp $ */
+/* $NetBSD: extern.h,v 1.20 2000/01/07 04:47:23 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -59,6 +59,7 @@
extern int nports;
extern int protos;
extern int verbose;
+extern int nflag;
struct inpcb;
#ifdef INET6
diff -r 003566f58200 -r 2073644ea66d usr.bin/systat/main.c
--- a/usr.bin/systat/main.c Fri Jan 07 03:56:14 2000 +0000
+++ b/usr.bin/systat/main.c Fri Jan 07 04:47:23 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.22 1999/12/20 21:04:41 jwise Exp $ */
+/* $NetBSD: main.c,v 1.23 2000/01/07 04:47:24 itojun Exp $ */
/*-
* Copyright (c) 1980, 1992, 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: main.c,v 1.22 1999/12/20 21:04:41 jwise Exp $");
+__RCSID("$NetBSD: main.c,v 1.23 2000/01/07 04:47:24 itojun Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -101,7 +101,7 @@
egid = getegid();
(void)setegid(getgid());
- while ((ch = getopt(argc, argv, "M:N:w:")) != -1)
+ while ((ch = getopt(argc, argv, "M:N:nw:")) != -1)
switch(ch) {
case 'M':
memf = optarg;
@@ -109,6 +109,9 @@
case 'N':
nlistf = optarg;
break;
+ case 'n':
+ nflag = !nflag;
+ break;
case 'w':
if ((naptime = atoi(optarg)) <= 0)
errx(1, "interval <= 0.");
@@ -220,7 +223,7 @@
static void
usage()
{
- fprintf(stderr, "usage: systat [-M core] [-N system] [-w wait] "
+ fprintf(stderr, "usage: systat [-n] [-M core] [-N system] [-w wait] "
"[display] [refresh-interval]\n");
exit(1);
}
diff -r 003566f58200 -r 2073644ea66d usr.bin/systat/netstat.c
--- a/usr.bin/systat/netstat.c Fri Jan 07 03:56:14 2000 +0000
+++ b/usr.bin/systat/netstat.c Fri Jan 07 04:47:23 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netstat.c,v 1.15 2000/01/05 11:59:12 itojun Exp $ */
+/* $NetBSD: netstat.c,v 1.16 2000/01/07 04:47:24 itojun Exp $ */
/*-
* Copyright (c) 1980, 1992, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)netstat.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: netstat.c,v 1.15 2000/01/05 11:59:12 itojun Exp $");
+__RCSID("$NetBSD: netstat.c,v 1.16 2000/01/07 04:47:24 itojun Exp $");
#endif /* not lint */
/*
@@ -124,7 +124,7 @@
} netcb;
static int aflag = 0;
-static int nflag = 0;
+int nflag = 0;
static int lastrow = 1;
WINDOW *
diff -r 003566f58200 -r 2073644ea66d usr.bin/systat/systat.1
--- a/usr.bin/systat/systat.1 Fri Jan 07 03:56:14 2000 +0000
+++ b/usr.bin/systat/systat.1 Fri Jan 07 04:47:23 2000 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: systat.1,v 1.17 1999/12/22 14:46:15 kleink Exp $
+.\" $NetBSD: systat.1,v 1.18 2000/01/07 04:47:24 itojun Exp $
.\"
.\" Copyright (c) 1985, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -41,6 +41,7 @@
.Nd display system statistics on a crt
.Sh SYNOPSIS
.Nm
+.Op Fl n
.Op Fl M Ar core
.Op Fl N Ar system
.Op Fl w Ar wait
@@ -92,6 +93,18 @@
.Ar system
instead of the default
.Pa /netbsd .
+.It Fl n
+Do not resolve IP addresses into string hostnames
+.Pq FQDNs
+on
+.Ic netstat .
+It has the same effect as
+.Ic numbers
+subcommand in
+.Ic netstat .
+.It Fl w Ar wait
+See
+.Ar refresh-interval .
.It Ar display
The
.Ar display
Home |
Main Index |
Thread Index |
Old Index