|
|
BSD 4.3reno
[ READ-ME-FIRST - Thu Mar 8 00:09:46 1990 - notes on SNMP+gawk - /mtr ]
0. You should already have installed the 4BSD/ISODE SNMP software.
1. Get a copy of GNU Awk 2.11 Beta. Extract the gawk-2.11/ hierarchy
into this directory.
2. Apply the patches to the sources by
% patch -p < GAWK-PATCHES
3. Follow the instructions in the README file to configure gawk.
4. If your $(INCDIR) is not /usr/include, then add
-I$(INCDIR)
to the "FLAGS=" definition in the Makefile.
5. Type
% make
to generate gawk.
6. As the super-user copy gawk to $(BINDIR) and create the directory
/usr/local/lib/awk.
7. At this point you should be able to do a trivial test:
% gawk -f s-netstat/mib.system
which will contact your local SNMP agent using the default
community and ask for information from the system group. The
output looks something like this:
agent cheetah.nyser.net
running: 4BSD/ISODE SNMP
(1.3.6.1.4.1.4.1.2.1)
services: applications, end-to-end
location: upstairs machine room
contact: Marshall Rose <[email protected]>
uptime: 5 days, 17 hours, 24 minutes, 37.69 seconds
8. Now you can install the one application supplied, s-netstat. You
might want to call it some other name. To install it:
# cp s-netstat/s-netstat.sh $(BINDIR)s-netstat
# cp s-netstat/mib.* /usr/local/lib/awk
The s-netstat application is like the netstat program, but uses the
SNMP rather than kmem to get information. The following switches
are implemented:
-a show all connections
-s show statistical information
-m show mbuf information
-i show interface information
-r show routing information
Here are new switches:
-z show address translation (ARP) information
-Z show system information
-e show EGP information
-o show OSI information in addition to Internet information
(this modifies the -i, -s, -r, and -z switches)
As you might imagine, the syntax is:
s-netstat [switches] [agent [community]]
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.