debian/0000755000000000000000000000000012117510443007164 5ustar debian/patches/0000755000000000000000000000000012117164625010622 5ustar debian/patches/15-too_many_arguments_for_format.patch0000644000000000000000000000071512117164625020221 0ustar Description: Fix compile time warning about too many arguments for format Author: James Troup --- a/nicstat.c +++ b/nicstat.c @@ -1544,7 +1544,7 @@ load_snmp(FILE *snmp) n = fscanf(snmp, "Udp: %lld %lld %lld %lld " "%lld %lld\n", &ll[0], &ll[1], &ll[2], &ll[3], - &ll[4], &ll[5], &ll[6]); + &ll[4], &ll[5]); if (n == 6) { g_udp_new->inDatagrams = ll[0]; g_udp_new->outDatagrams = ll[3]; debian/patches/01-manpage_fixes.patch0000644000000000000000000000556712116460443014700 0ustar Description: Fix groff warnings in nicstat manpage Author: James Troup --- a/nicstat.1 +++ b/nicstat.1 @@ -18,7 +18,7 @@ nicstat, enicstat \- print network traff .\" ======================================================================== .SH SYNOPSIS .B nicstat -[-hvnsxpztualkM] +[\-hvnsxpztualkM] .RI [-i interface] .RI [-S int:mbps[fd|hd]] .I [interval @@ -42,7 +42,7 @@ including packets, kilobytes per second, Display brief usage information (help). .TP 1i .B \-v -Display nicstat version (and additional fields when combined with '-l') +Display nicstat version (and additional fields when combined with '\-l') .TP 1i .B \-n Show statistics for non-local (i.e. non-loopback) interfaces only. @@ -65,13 +65,15 @@ included in the statistic on each platfo .B \-p Display output in parseable format. This outputs one line per interface, in the following formats (which correspond to the -default, -x, -t and -u options; respectively): +default, \-x, \-t and \-u options; respectively): .TP 1i .PP +.nf .I time:In:rKB/s:wKB/s:rPk/s:wPk/s:%Util:Sat .I time:In:rKB/s:wKB/s:rPk/s:wPk/s:%Util:Sat:IErr:OErr:Coll:NoCP:Defer .I time:\fRTCP\fI:InKB:OutKB:InSeg:OutSeg:Reset:AttF:%ReTX:InConn:OutCon:Drops .I time:\fRUDP\fI:InDG:OutDG:InErr:OutErr +.fi .TP 1i .B \ where \fItime\fR is the number of seconds since midnight, @@ -79,7 +81,7 @@ Jan 1 1970 (UST) and the other fields ar \fBOUTPUT\fR section below. NOTE - throughput statistics are always in KB/s (kilbytes per second) -for parseable formats, even if the "-M" flag has been specified. +for parseable formats, even if the "\-M" flag has been specified. .TP 1i .B \-z Skip interfaces for which there was zero traffic for the sample period. @@ -91,7 +93,7 @@ Show TCP statistics. Show UDP statistics. .TP 1i .B \-a -Equvalent to '-x -t -u'. +Equvalent to '\-x \-t \-u'. .TP 1i .B \-l Just list interfaces. @@ -187,7 +189,7 @@ are summed. Saturation. This the number of errors/second seen for the interface - an indicator the interface may be approaching saturation. This statistic is combined from a number of kernel statistics. It is -recommended to use the '-x' option to see more individual statistics +recommended to use the '\-x' option to see more individual statistics (those mentioned below) when attempting to diagnose a network issue. .TP 1i @@ -274,14 +276,14 @@ Print statistics for all interfaces, eve Print statistics every 3 seconds, only for interfaces "hme0" and "hme1": .PP .nf - $ \fBnicstat -i hme0,hme1 3 + $ \fBnicstat \-i hme0,hme1 3 .fi .PP Print statistics for non-local interfaces, setting speed of "eth0" and "eth1" to 10mbps/half-duplex and 1000mbps/full-duplex, respectively: .PP .nf - $ \fBnicstat -n -S eth0:10h,eth1:1000 5 + $ \fBnicstat \-n \-S eth0:10h,eth1:1000 5 .fi .\" ======================================================================== .SH SEE\ ALSO debian/patches/10-assignment_suppression_and_length_modifier.patch0000644000000000000000000000140512117161051022732 0ustar Description: Fix compile time warning about 'use of assignment suppression and length modifier together' Author: James Troup --- a/nicstat.c +++ b/nicstat.c @@ -1476,10 +1476,10 @@ load_netstat(FILE *netstat) "DelayedACKLost ListenOverflows ListenDrops ", p, 273) == 0) { /* We are after field 20 and 21 */ - int n = fscanf(netstat, "TcpExt: %*lld %*lld %*lld " - "%*lld %*lld %*lld %*lld %*lld %*lld %*lld " - "%*lld %*lld %*lld %*lld %*lld %*lld %*lld " - "%*lld %*lld %lld %lld ", + int n = fscanf(netstat, "TcpExt: %*d %*d %*d " + "%*d %*d %*d %*d %*d %*d %*d " + "%*d %*d %*d %*d %*d %*d %*d " + "%*d %*d %lld %lld ", &ll[0], &ll[1]); if (n == 2) g_tcp_new->listenDrop = ll[0] + ll[1]; debian/patches/series0000644000000000000000000000022712117164477012045 0ustar 01-manpage_fixes.patch 05-DUPLEX_UNKNOWN_redefinition.patch 10-assignment_suppression_and_length_modifier.patch 15-too_many_arguments_for_format.patch debian/patches/05-DUPLEX_UNKNOWN_redefinition.patch0000644000000000000000000000061712117160054017040 0ustar Description: Fix compile time warning about redefinition of DUPLEX_UNKNOWN Author: James Troup --- a/nicstat.c +++ b/nicstat.c @@ -96,7 +96,9 @@ extern int optind, opterr, optopt; #ifdef OS_LINUX typedef __u8 duplex_t; +#ifndef DUPLEX_UNKNOWN #define DUPLEX_UNKNOWN 0xFF +#endif /* DUPLEX_UNKNOWN */ #else typedef uint32_t duplex_t; #define DUPLEX_UNKNOWN 0 debian/control0000644000000000000000000000145112117174171010574 0ustar Source: nicstat Section: net Priority: optional Maintainer: James Troup Standards-Version: 3.9.4.0 Build-Depends: debhelper (>= 9) Homepage: http://blogs.sun.com/timc/entry/nicstat_the_solaris_and_linux Package: nicstat Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: print network traffic statistics nicstat is to network interfaces as iostat is to disks, or prstat is to processes. It is designed as a much better version of "netstat -i". Its differences include: . - Reports bytes in & out as well as packets. - Normalizes these values to per-second rates. - Reports on all interfaces (while iterating) - Reports Utilization (rough calculation as of now) - Reports Saturation (also rough) - Prefixes statistics with the current time debian/source/0000755000000000000000000000000012116460502010463 5ustar debian/source/format0000644000000000000000000000001412116442114011670 0ustar 3.0 (quilt) debian/nicstat.manpages0000644000000000000000000000001212116246202012335 0ustar nicstat.1 debian/rules0000755000000000000000000000044312117163740010251 0ustar #!/usr/bin/make -f CFLAGS ?= -g -O2 %: dh $@ override_dh_clean: dh_clean make -f Makefile.Linux clean override_dh_auto_build: make -f Makefile.Linux CFLAGS="$(CFLAGS)" nicstat override_dh_installdocs: cp ChangeLog.txt debian/nicstat/usr/share/doc/nicstat/changelog dh_installdocs debian/nicstat.install0000644000000000000000000000002212117163377012225 0ustar nicstat /usr/bin/ debian/nicstat.dirs0000644000000000000000000000003012116247673011520 0ustar /usr/share/doc/nicstat/ debian/changelog0000644000000000000000000000023512117167333011044 0ustar nicstat (1.92-1) unstable; urgency=low * Initial package. (Closes: #702541) -- James Troup Fri, 08 Mar 2013 01:09:44 +0000 debian/copyright0000644000000000000000000000143112116246402011116 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: nicstat Source: http://blogs.sun.com/timc/entry/nicstat_the_solaris_and_linux Files: * Copyright: 2005-2012, Brendan.Gregg@sun.com and Tim.Cook@sun.com License: Artistic Files: debian/* Copyright: Copyright 2013 James Troup License: GPL-3 License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. On Debian GNU/Linux systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic' License: GPL-3 On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". debian/compat0000644000000000000000000000000212117174121010361 0ustar 9 debian/watch0000644000000000000000000000007312116244725010223 0ustar version=3 http://sf.net/nicstat/nicstat-src-(.+)\.tar\.gz