Commit 48041741 authored by Peter Pentchev's avatar Peter Pentchev

Add a mandoc manual page.

parent 5db5670c
Pipeline #481928 skipped
......@@ -21,6 +21,7 @@ Change log for ethstats, the network traffic statistics utility
- use a local variable for the input file stream
- use data structures instead of passing data in a herd of
global variables
- add a mandoc manual page
1.0 (unknown)
- released into the public domain by Drew Strieb
......
......@@ -2,7 +2,10 @@
SCRIPT= ethstats
SRC= ethstats.pl
MAN1= ${SCRIPT}.1
MAN1GZ= ${MAN1}.gz
GZIP?= gzip -cn
INSTALL?= install
COPY?= -c
MKDIR?= mkdir -p
......@@ -12,27 +15,30 @@ RM?= rm -f
LOCALBASE?= /usr/local
PREFIX?= ${LOCALBASE}
BINDIR?= ${PREFIX}/bin
MANDIR?= ${PREFIX}/man/man
MANDIR?= ${PREFIX}/share/man/man
BINOWN?= root
BINGRP?= root
BINMODE?= 755
MANOWN?= root
MANGRP?= root
MANMODE?= 644
SHAREOWN?= root
SHAREGRP?= root
SHAREMODE?= 644
INSTALL_DATA?= ${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE}
INSTALL_EXEC?= ${INSTALL} ${COPY} -m ${BINMODE}
INSTALL_SCRIPT?= ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
all: ${SCRIPT}
all: ${SCRIPT} ${MAN1GZ}
clean:
${RM} ${SCRIPT}
${RM} ${SCRIPT} ${MAN1GZ}
install: all
${MKDIR} ${DESTDIR}${BINDIR}
${INSTALL_SCRIPT} ${SCRIPT} ${DESTDIR}${BINDIR}/
${MKDIR} ${DESTDIR}${MANDIR}1
${INSTALL_SCRIPT} ${MAN1GZ} ${DESTDIR}${MANDIR}1/
test: all
@echo "=== Perl syntax check"
......@@ -57,4 +63,7 @@ test: all
${SCRIPT}: ${SRC}
${INSTALL_EXEC} ${SRC} ${SCRIPT}
${MAN1GZ}: ${MAN1}
${GZIP} ${MAN1} > ${MAN1GZ} || (${RM} ${MAN1GZ}; false)
.PHONY: all clean install test
.\" Copyright (c) 2015 Peter Pentchev
.\" This manual page is hereby placed into the public domain.
.\"
.Dd December 11, 2015
.Dt ETHSTATS 1
.Os
.Sh NAME
.Nm ethstats
.Nd quickly display statistics of network interfaces
.Sh SYNOPSIS
.Nm
.Op Fl t
.Op Fl C | Fl M
.Op Fl c Ar count
.Op Fl i Ar iface
.Op Fl n Ar period
.Nm
.Op Fl V | Fl h
.Sh DESCRIPTION
The
.Nm
utility is a quick way to display network interface statistics.
It periodically samples the byte and packet counters exported by the Linux
kernel into the
.Pa /proc/net/dev
pseudo-file and outputs a line for each network interface on the system
(except for the loopback) and a totals line.
The data shown is the input and output rate in megabits per second and
packets per second.
.Pp
The
.Nm
utility accepts the following command-line options:
.Bl -tag -width indent
.It Fl C
Highlight (color) the totals line in the output.
.It Fl c
Exit after the specified number of samples.
.It Fl h
Display program usage information and exit.
.It Fl i
Specify a single network interface to monitor.
.It Fl M
Do not highlight (monochrome) the totals line in the output.
.It Fl n
Specify the polling interval in seconds (default: 10).
.It Fl t
Prefix the totals line with the Unix timestamp.
.It Fl V
Display program version information and exit.
.El
.Sh ENVIRONMENT
The operation of the
.Nm
utility is not directly influenced by any environment variables.
.Sh FILES
The operation of the
.Nm
utility is not directly influenced by the contents of any files.
.Sh EXAMPLES
Continuously poll the system network interfaces on five-second
intervals:
.Pp
.Dl ethstats -n 5
.Pp
Take four samples of the transfer rate of the
.Pa wlan0
interface, ten seconds apart:
.Pp
.Dl ethstats -c 4 -n 10 -i wlan0
.Pp
.Sh DIAGNOSTICS
.Ex -std
.Sh SEE ALSO
.Xr netstat 8
.Sh STANDARDS
No standards were harmed during the production of the
.Nm
utility.
.Sh HISTORY
This application was released from an unknown source via Drew Strieb.
It is now maintained by Peter Pentchev.
.Pp
A manual page was originally written by Scott Dier for the Debian
project and then reworked by Peter Pentchev.
.Sh AUTHORS
.An Peter Pentchev
.Aq roam@ringlet.net
.An M. Drew Streib
.Aq dtype@dtype.org
.An Scott Dier
.Aq sdier@debian.org
.Sh BUGS
No, thank you :)
But if you should actually find any, please report them
to the author.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment