Import net/bwm-ng
DESCR: Bandwidth Monitor NG is a small and simple console-based live bandwidth monitor for Linux, BSD, Solaris, Mac OS X and others. Short list of features: * supports /proc/net/dev, netstat, getifaddr, sysctl, kstat and libstatgrab * unlimited number of interfaces supported * interfaces are added or removed dynamically from list * white-/blacklist of interfaces * output of KB/s, Kb/s, packets, errors, average, max and total sum * output in curses, plain console, CSV or HTML * configfile From: Genadijus Paleckis <rwx@openbsd.lt> ok alek@
This commit is contained in:
parent
2d0a5b6956
commit
719dcd66f7
23
net/bwm-ng/Makefile
Normal file
23
net/bwm-ng/Makefile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# $OpenBSD: Makefile,v 1.1.1.1 2005/06/21 21:52:46 niallo Exp $
|
||||||
|
|
||||||
|
COMMENT= "realtime bandwidth monitoring of interfaces"
|
||||||
|
|
||||||
|
DISTNAME= bwm-ng-0.5
|
||||||
|
CATEGORIES= net
|
||||||
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bwmng/}
|
||||||
|
HOMEPAGE= http://www.gropp.org/
|
||||||
|
|
||||||
|
MAINTAINER= Genadijus Paleckis <rwx@openbsd.lt>
|
||||||
|
|
||||||
|
# GPL
|
||||||
|
PERMIT_PACKAGE_CDROM= Yes
|
||||||
|
PERMIT_PACKAGE_FTP= Yes
|
||||||
|
PERMIT_DISTFILES_CDROM= Yes
|
||||||
|
PERMIT_DISTFILES_FTP= Yes
|
||||||
|
|
||||||
|
WANTLIB= c curses
|
||||||
|
|
||||||
|
CONFIGURE_STYLE= gnu
|
||||||
|
CONFIGURE_ARGS+= --without-libstatgrab
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
4
net/bwm-ng/distinfo
Normal file
4
net/bwm-ng/distinfo
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
MD5 (bwm-ng-0.5.tar.gz) = 4c5197527c985dc8b45973dfd00deca0
|
||||||
|
RMD160 (bwm-ng-0.5.tar.gz) = 5fcb6d49fbd83a10bba5792c9e3d4966c8d2b0ff
|
||||||
|
SHA1 (bwm-ng-0.5.tar.gz) = 32f2a8424a1941fe2a7857a17b7cc071f6da8f40
|
||||||
|
SIZE (bwm-ng-0.5.tar.gz) = 68498
|
27
net/bwm-ng/patches/patch-Makefile_in
Normal file
27
net/bwm-ng/patches/patch-Makefile_in
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
$OpenBSD: patch-Makefile_in,v 1.1.1.1 2005/06/21 21:52:46 niallo Exp $
|
||||||
|
--- /tmp/Makefile.in Tue Jun 21 14:33:35 2005
|
||||||
|
+++ Makefile.in Tue Jun 21 14:33:51 2005
|
||||||
|
@@ -8,19 +8,17 @@
|
||||||
|
mandir = @mandir@
|
||||||
|
BINARY = bwm-ng
|
||||||
|
TARGET = src/$(BINARY)
|
||||||
|
-STRIP = @STRIP@
|
||||||
|
|
||||||
|
all: bwm-ng
|
||||||
|
|
||||||
|
bwm-ng:
|
||||||
|
@( cd src ; $(MAKE) bwm-ng )
|
||||||
|
- ${STRIP}
|
||||||
|
|
||||||
|
install: all
|
||||||
|
- @(if [ ! -d $(bindir) ]; then mkdir -p $(bindir); fi )
|
||||||
|
- cp -p ${TARGET} $(bindir)/$(BINARY)
|
||||||
|
- @(if [ ! -d $(mandir)/man1 ]; then mkdir -p $(mandir)/man1; fi)
|
||||||
|
- cp -p bwm-ng.1 $(mandir)/man1/bwm-ng.1
|
||||||
|
+ install -o root -g wheel -m 555 src/bwm-ng ${DESTDIR}/${bindir}
|
||||||
|
+ install -o root -g wheel -m 444 bwm-ng.1 ${DESTDIR}/$(mandir)/man1
|
||||||
|
+ install -o root -g wheel -m 755 -d ${DESTDIR}/${LOCALBASE}/share/examples/bwm-ng
|
||||||
|
+ install -o root -g wheel -m 444 bwm-ng.conf-example ${DESTDIR}/${LOCALBASE}/share/examples/bwm-ng
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@( cd src ; $(MAKE) clean )
|
15
net/bwm-ng/patches/patch-src_output_c
Normal file
15
net/bwm-ng/patches/patch-src_output_c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
$OpenBSD: patch-src_output_c,v 1.1.1.1 2005/06/21 21:52:46 niallo Exp $
|
||||||
|
--- src/output.c.orig Mon Jun 20 19:16:52 2005
|
||||||
|
+++ src/output.c Mon Jun 20 19:17:00 2005
|
||||||
|
@@ -209,9 +209,9 @@ char *values2str(char mode,t_iface_speed
|
||||||
|
|| output_type==MAX_OUT || output_type==AVG_OUT
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
- strcpy(speed,"/s");
|
||||||
|
+ strlcpy(speed,"/s",2);
|
||||||
|
else
|
||||||
|
- strcpy(speed," ");
|
||||||
|
+ strlcpy(speed," ",2);
|
||||||
|
if (
|
||||||
|
#if !NETSTAT_BSD_BYTES && !NETSTAT_NETBSD && NETSTAT
|
||||||
|
input_method==NETSTAT_IN ||
|
12
net/bwm-ng/patches/patch-src_retrieve_c
Normal file
12
net/bwm-ng/patches/patch-src_retrieve_c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
$OpenBSD: patch-src_retrieve_c,v 1.1.1.1 2005/06/21 21:52:46 niallo Exp $
|
||||||
|
--- src/retrieve.c.orig Mon Jun 20 19:12:06 2005
|
||||||
|
+++ src/retrieve.c Mon Jun 20 19:13:47 2005
|
||||||
|
@@ -306,7 +306,7 @@ void get_iface_stats_netstat (char verbo
|
||||||
|
#if NETSTAT_BSD || NETSTAT_BSD_BYTES || NETSTAT_SOLARIS || NETSTAT_NETBSD
|
||||||
|
/* check if we have a new iface or if its only a second line of the same one */
|
||||||
|
if (!strcmp(last_name,name)) continue; /* skip this line */
|
||||||
|
- strcpy(last_name,name);
|
||||||
|
+ strlcpy(last_name,name,MAX_LINE_BUFFER - 1);
|
||||||
|
#endif
|
||||||
|
/* init new interfaces and add fetched data to old or new one */
|
||||||
|
hidden_if = process_if_data (hidden_if, tmp_if_stats, &stats, name, current_if_num, verbose,
|
14
net/bwm-ng/pkg/DESCR
Normal file
14
net/bwm-ng/pkg/DESCR
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Bandwidth Monitor NG is a small and simple console-based live
|
||||||
|
bandwidth monitor for Linux, BSD, Solaris, Mac OS X and others.
|
||||||
|
|
||||||
|
Short list of features:
|
||||||
|
|
||||||
|
* supports /proc/net/dev, netstat, getifaddr, sysctl, kstat and
|
||||||
|
libstatgrab
|
||||||
|
* unlimited number of interfaces supported
|
||||||
|
* interfaces are added or removed dynamically from list
|
||||||
|
* white-/blacklist of interfaces
|
||||||
|
* output of KB/s, Kb/s, packets, errors, average, max
|
||||||
|
and total sum
|
||||||
|
* output in curses, plain console, CSV or HTML
|
||||||
|
* configfile
|
5
net/bwm-ng/pkg/PLIST
Normal file
5
net/bwm-ng/pkg/PLIST
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
@comment $OpenBSD: PLIST,v 1.1.1.1 2005/06/21 21:52:46 niallo Exp $
|
||||||
|
bin/bwm-ng
|
||||||
|
@man man/man1/bwm-ng.1
|
||||||
|
share/examples/bwm-ng/
|
||||||
|
share/examples/bwm-ng/bwm-ng.conf-example
|
Loading…
Reference in New Issue
Block a user