STATNET(1)

πŸ’… STATNET(1) β€” the General Commands Manual page, but make it cute

okay bestie, we're doing statnet and statnetd today, and honestly? iconic duo. one's the popular girl who shows you everything, the other's the quiet one doing all the actual work in the background. 🫢


✨ NAME ✨

statnet, statnetd β€” they view the statistics of Ethernet and PLIP/PPP/SLIP for TCP, IP, IPX, Appletalk, etc. basically the whole network friend group πŸ’–


🌸 SYNOPSIS 🌸

statnet [ -agipstuh ] [-k key]

statnetd [ -adgipstuh ] [-k key] [-n name] [-w interface]

πŸ¦‹ DESCRIPTION πŸ¦‹

statnetd is the privileged daemon which collects network data. she's the one in the back doing the work while everyone else takes credit, no cap.

statnet views the current usage statistics of your Ethernet and PLIP/PPP/SLIP for TCP, IP, IPX, Appletalk, and more. and the way you exit it?? you just type "q". that's it. queen behavior. πŸ’…

here's what she shows you:

  • kilobytes per second on ethernet, PPP, and other interfaces.
  • the percentage load of ethernet capacity.
  • frames per second.
  • how many frames of each type (like IP, 802.2, and some Appletalk or TCP frames) were seen.

the purpose is to give some idea of the quantity and type of network activity β€” because honestly, the flashing lights on the hub are minimally informative 😭 like girl what does blinking even MEAN. other tools such as tcpdump are needed for detailed analysis, so don't come for statnet for not doing forensics.

only certain frames/packets were shown in the first versions. now the data for many more packets encountered on your net are shown. only certain TCP/UDP ports are known (under port 1024 by default), and TCP/UDP traffic to unknown port numbers is not shown, although the presence of the frames are shown in protocol counts. so the frame still gets counted, she just doesn't know her name. πŸ™ˆ

note that statnetd uses IPC shared memory so there can be many clients such as statnet running. other clients, such as an SNMP agent, may also be using the data. and the statnetd IPC shared memory is enabled for DIPC, so the data from one copy of statnetd is available to all machines on a DIPC cluster. it's giving ✨main character with a whole entourage✨ fr fr.


πŸ’– OPTIONS πŸ’–

for statnetd, most options select the type of data to be collected. for statnet, most options select the type of data to be displayed. defaults collect and display most data β€” so if you just vibe, you get the whole menu. πŸ“

  • -a β€” Appletalk protocol
  • -d β€” Daemonize (statnetd only). Run as a background process. Probably should be entered as "/usr/local/bin/statnetd -d" in /etc/rc.d/rc.local.
  • -g β€” General statistics
  • -i β€” IP Protocols
  • -k key β€” Use key as the shared memory key. Base 16 recognized with '0x' prefix, base 8 with '0' prefix, otherwise key is in base 10.
  • -n name β€” Server or network name (statnetd only). The label other than uname(2) nodename to label the data with. Often a computer or network name is used.
  • -p β€” PLIP/PPP/SLIP statistics
  • -s β€” IEEE 802.2 SAP protocol
  • -t β€” TCP/IP protocol
  • -u β€” UDP/IP protocol
  • -w interface β€” Specify an interface to monitor other than the default "eth0" (statnetd only). See /proc/net/dev for a list of interfaces.
  • -h β€” print a short help message

🌈 DISPLAY 🌈

the statnet display client appearance will vary depending upon options and display type. it can operate under "curses" or "ncurses" libraries (compile time option). another popular trick on X-Windows is to open an xterm window which is tall and as narrow as the "General" display, so the subwindows appear below each other. it's giving aesthetic stacked layout πŸŽ€

totals may vary slightly due to the data being captured as it is being collected, as more packets may arrive while the totals are being prepared for display (fortunately packets arrive slowly compared to the speed of copying the totals). so like, don't @ her about a number being off by a lil bit, she's literally mid-copy. 😭

the percentage numbers are the percent of the total number of frames during the display period.

if the network interface reports errors, a summary is reported near the bottom of the "General" display. error behavior depends upon your interface and device driver. (Error reporting not working in 3.2) πŸ’€

πŸ“Š SAMPLE TEXT DISPLAY πŸ“Š

                              STATISTICS OF NETWORKS
   GENERAL  Frame:  341/6  sec  ===== 802.2 SAP =====  ==== TCP/IP PORTS ===
            KB/s Frame/s AvLen                         fragment    18   5.3%
   all      5.98      56   107   NetBIOS:  216  63.3%       www:    0   0.0%
   eth      5.98      56   107      0xB4:   11   3.2%      echo:    0   0.0%
                                    SNAP:    9   2.6%   NetBIOS:    0   0.0%
                                     RPL:    1   0.3%       ftp:    0   0.0%
                                     SNA:    4   1.2%
                                 NetWare:    2   0.6%
                                SpanTree:    3   0.9%
   802.2 pkt/sec:     41
    Ethernet Load   0.49%
    490 err/Hr( 0%) 490 drop/Hr ===== PROTOCOLS =====  ==== UDP/IP PORTS ===
                                                        NetB Dg:   56  16.4%
   ==== IP PROTOCOLS ====       IEEE802.3  246  72.1%      snmp:    0   0.0%
                                 Ethernet   77  22.6%  fragment     0   0.0%
       UDP:    58  17.0%              ARP   13   3.8%   NetB NS:    0   0.0%
       TCP:    18   5.3%         HP Probe    3   0.9%    domain:    2   0.6%
      ICMP:     1   0.3%          DEC LAT    2   0.6%       ntp:    0   0.0%
                                   Novell    0   0.0%   loc-srv:    0   0.0%
                                                          timed:    0   0.0%
                                                         syslog:    0   0.0%
                                Other:       0   0.0%

look at her. immaculate. πŸ’…


πŸ“ FILES πŸ“

the files /etc/services, /etc/opt/statnet/services, and services in the current directory are read in that order for port number definitions. later definitions override previous ones (so the last one wins, periodt). a few names are replaced with shorter or more recognizable names (ie, nameserver is replaced with DNS). glow-up fr. ✨

file format:

telnet           23/tcp    # Telnet

the above line specifies that TCP port 23 is used for the telnet service.

the file /etc/protocols is also read with the getprotoent(3) routine for IP protocol definitions.


😭 PROBLEMS 😭

by default the eth0 ethernet device is monitored. monitoring SLIP or PPP devices may not work. data from devices other than the one specified may be shown, depending upon operating system characteristics of a promiscuous socket. she's nosy, it's not her fault. πŸ™ˆ

many networking numbers are compiled within the program and cannot be updated without altering a source file. so like, hardcoded bestie, we don't love that. but this is still more informative than a flashing light on the hub. πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

Jeroen Baekelandt is the original author. 🫢

jeroenb@igwe.vub.ac.be
we47143@vub.ac.be

Scot E. Wilcoxon is present maintainer of Statnet. Made numerous alterations to the original. Generalized to tally arbitrary packet types rather than specific ones, changed to use daemon and shared memory instead of coroutines. Modified for glibc2(libc6) under 2.1.1* kernels. iconic work honestly.

sewilco@fieldday.mn.org

Philip Hands maintains Debian netdiag packaging, and added glibc2(libc6) alterations.

phil@hands.com

Christoph Lameter wrote the first version of this man page, and did Debian netdiag packaging. the OG of this very page, we stan. πŸ“

chris@waterf.org

Copyright 21DEC2002 Scot E. Wilcoxon All Rights Reserved


and that's the whole page bestie, you ate that πŸ’… the manual you're holding is STATNET(1) from the General Commands Manual β€” the source/version vibe is that Copyright 21DEC2002 Scot E. Wilcoxon All Rights Reserved energy, dated 21DEC2002, so go forth and monitor those frames, slay βœ¨πŸ¦‹πŸ’–

πŸ“¦ where this page comes from