NX, Yet another network monitoring tool

nx: Version 5.0
This is a C based program containing the functionality of the SEtoolkit tool nx.se. It uses the kstat api.

To build nx :
NOTE: gmake DOES NOT WORK CORRECTLY WITH THIS MAKEFILE. DO NOT RUN AS ROOT!

make clean
make all

sparc_32 contains pre-built 32 bit binaries.
sparc_64 contains pre-built 64 bit binaries.
i386_32 contains pre-built 32 bit x86 binaries
386_64 contains pre-built 64 bit x64 binaries

Run nx [interval] [count] .
You do not have to be root.

nx uses the kstat api. At startup in runs through the kstats.
Every kstat of class net where the name is of the format "module""instance" (ce0 for example) is considered an interface.

If a kstat is missing, an error is printed once, and zeroes are printed thereafter. Some kstats do not have a single standard name, (nocanputs for example). In those cases nx looks for any known comparable names.

If your NIC does not work, please send me kstat -p -c net output( rick.weisner@sun.com ).

Example output:

arwen: nx 1 5

15:21:30 Iseg/s Oseg/s InKB/s OuKB/s Rst/s Atf/s Ret% Icn/s Ocn/s Drop/s
tcp 22.0 4.0 23.67 0.34 0.00 0.00 0.0 0.00 0.00 0.00
IDGS/s ODGS/s IERR/s
udp 0.0 0.0 0.00
15:21:30 Ipkt/s Opkt/s InKB/s OuKB/s IErr/s OErr/s Coll% NoCP/s Defr/s
lo0 0.0 0.0 0.00 0.00 0.000 0.000 0.0 0.00 0.00
e1000g0 33.0 17.0 25.64 1.38 0.000 0.000 0.0 0.00 0.00
wpi0 0.0 0.0 0.00 0.00 1.000 0.000 0.0 0.00 0.00

tcp
Iseg/s = input segments per second kstat= inDataInorderSegs+inDataUnorderSegs
Oseg/s = output segments per second kstat= outDataSegs
InKB/s = input kilobytes per second kstat= inDataInorderBytes+inDataUnorderBytes
OuKB/s = output kilobytes per second kstat= outDataBytes
Rst/s = resets per second kstat= outRsts + estabResets
Atf/s = attempt fails per second kstat= attemptFails
Ret% = retransmission percentage kstat= retransBytes
Icn/s = input connections per second kstat= passiveOpens
Ocn/s = output connections per second kstat= activeOpens
Drop/s = listendrops per second kstat= halfOpenDrop+listenDrop+listenDropQ0

udp
IDGS/s = input datagrams per second kstat= udp:0:udp:inDatagrams
ODGS/s = output datagrams per second kstat= udp:0:udp:outDatagrams
IERR/s = errors per second kstat= inErrors + outErrors

Ipkt/s = input packets per second kstat= ipackets
Opkt/s = output packets per second kstat= opackets
InKB/s = input kilobytes per second kstat= rbytes/1024
OuKB/s = output kilobytes per second kstat= obytes/1024
IErr/s = input errors per second kstat= ierrors
OErr/s = output errors per second kstat= oerrors
IERR/s = errors per second kstat= inErrors + outErrors

Ipkt/s = input packets per second kstat= ipackets
Opkt/s = output packets per second kstat= opackets
InKB/s = input kilobytes per second kstat= rbytes/1024
OuKB/s = output kilobytes per second kstat= obytes/1024
IErr/s = input errors per second kstat= ierrors
OErr/s = output errors per second kstat= oerrors
Coll% = collision percentage kstat= collisions + rxcongestion + ex_collisions + tx_late_collisions
NoCP/s = nocanputs per second kstat= nocanputs+norcvbuf+cannotputs+ifInDiscards

Defr/s = defers per second kstat= defer+noxmtbuf+excess_defer+tx_full+nobuffer+missing1+outoftbuf+txringfull+dot3StatsDeferredTransmissions+defer_xmts+noxmtbuf

Send bugs/comments to
rick.weisner@sun.com


Get NX here:

Thanks,
rick weisner

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

user12610965

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today