import slurm:

Yet another network load monitor. Slurm started as a port of a Linux
PPP link monitor called pppstatus by Gabriel Montenegro. It was then
transformed into a generic netowrk load monitor that supports *BSD,
Linux, HP-UX, and Solaris.

Slurm shows `realtime' traffic statistics, has three graph modes,
can monitor any network device, and uses curses to draw ascii
graphics, including ascii theme support.

From maintainer Ryan Freeman, adjusted by myself and ajacoutot.
ok ajacoutot@
This commit is contained in:
sthen 2008-09-18 23:02:31 +00:00
parent 54622ab45b
commit 41dfb51146
7 changed files with 125 additions and 0 deletions

40
net/slurm/Makefile Normal file
View File

@ -0,0 +1,40 @@
# $OpenBSD: Makefile,v 1.1.1.1 2008/09/18 23:02:31 sthen Exp $
COMMENT = network traffic monitor and statistics
DISTNAME = slurm-0.3.3
CATEGORIES = net
HOMEPAGE = http://www.wormulon.net/slurm/
MAINTAINER = Ryan Freeman <ryan@slipgate.org>
# GPLv2+
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = c ncurses
MASTER_SITES = ${HOMEPAGE}
BUILD_DEPENDS = ${MODGNU_AUTOCONF_DEPENDS}
AUTOCONF_VERSION = 2.59
MAKE_ENV = AUTOCONF_VERSION=${AUTOCONF_VERSION}
CONFIGURE_STYLE = gnu
pre-configure:
${SUBST_CMD} ${WRKSRC}/theme.c ${WRKSRC}/slurm.1
do-install:
${INSTALL_PROGRAM} ${WRKBUILD}/slurm ${PREFIX}/bin/
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/slurm/
${INSTALL_DATA_DIR} ${PREFIX}/share/slurm/
.for i in COPYRIGHT FAQ THANKS COPYING
${INSTALL_DATA} ${WRKBUILD}/$i ${PREFIX}/share/doc/slurm/
.endfor
${INSTALL_DATA} ${WRKBUILD}/themes/*.theme ${PREFIX}/share/slurm/
${INSTALL_MAN} ${WRKBUILD}/slurm.1 ${PREFIX}/man/man1/
.include <bsd.port.mk>

5
net/slurm/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (slurm-0.3.3.tar.gz) = 5o0JICuDXGRPf2t/Bw8pog==
RMD160 (slurm-0.3.3.tar.gz) = bxVOXmvgrHRtxn4VLPnK8VgMFP4=
SHA1 (slurm-0.3.3.tar.gz) = Iyp/KOw0V7Lp1VTthEpFZC3qHMU=
SHA256 (slurm-0.3.3.tar.gz) = sliJqhkQsbtI5Or9rAyBC8Aui5jdsq3grtLsZGctaDQ=
SIZE (slurm-0.3.3.tar.gz) = 122839

View File

@ -0,0 +1,27 @@
avoid makewhatis error; N.B. hand-edited to avoid CVS keyword.
$OpenBSD: patch-slurm_1,v 1.1.1.1 2008/09/18 23:02:31 sthen Exp $
--- slurm.1.orig Fri Feb 6 02:33:54 2004
+++ slurm.1 Wed Sep 17 10:24:47 2008
@@ -1,3 +1,3 @@
-.TH slurm 1
+.Th slurm 1
.Dd February 23, 2003
.Dt slurm 1
@@ -11,6 +11,7 @@ slurm \- yet another network load monitor
.Op Fl csl
.Op Fl d Ar delay
.Op Ar "i interface"
+.Op Ar "t theme"
.Sh DESCRIPTION
slurm is a generic network load monitor which shows device statistics
together with a nice ascii graph. Three different types of graphs are
@@ -33,6 +34,8 @@ virtually zero traffic counters instead of showing val
delay between screen updates in milliseconds (1000 = once per second)
.It Fl i Ar interface
select interface to monitor (required)
+.It Fl t Ar theme
+select theme, searches ~/.slurm and ${PREFIX}/share/slurm
.Sh KEYS
slurm supports several different keys for interaction:
.Bl -tag -width Ds

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-src_if_media_c,v 1.1.1.1 2008/09/18 23:02:31 sthen Exp $
--- src/if_media.c.orig Mon Sep 27 14:08:59 2004
+++ src/if_media.c Wed Sep 17 09:17:25 2008
@@ -95,8 +95,16 @@ int get_if_speed (char *ifstring)
*
*/
+#ifdef IFM_TYPE
+ type = IFM_TYPE(ifmr.ifm_active);
+#else
type = ifmr.ifm_active & 0xf0;
+#endif
+#ifdef IFM_TYPE
+ physical = IFM_SUBTYPE(ifmr.ifm_active);
+#else
physical = ifmr.ifm_active & 0x0f;
+#endif
#ifdef MEDIADEBUG
printf(" all: %6d\n", ifmr.ifm_current);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-theme_c,v 1.1.1.1 2008/09/18 23:02:31 sthen Exp $
--- theme.c.orig Wed Sep 17 10:25:11 2008
+++ theme.c Wed Sep 17 10:23:26 2008
@@ -75,7 +75,7 @@ int theme_readfile(theme *t, char *name)
#elif __Debian__
snprintf(filename, BUFSIZ, "/usr/share/slurm/%s.theme", name);
#else
- snprintf(filename, BUFSIZ, "/usr/local/share/slurm/%s.theme", name);
+ snprintf(filename, BUFSIZ, "${PREFIX}/share/slurm/%s.theme", name);
#endif
if ((f = fopen(filename, "r")) == NULL)
error(ERR_FATAL, "cannot find theme '%s'", name);

8
net/slurm/pkg/DESCR Normal file
View File

@ -0,0 +1,8 @@
Yet another network load monitor. Slurm started as a port of a Linux
PPP link monitor called pppstatus by Gabriel Montenegro. It was then
transformed into a generic netowrk load monitor that supports *BSD,
Linux, HP-UX, and Solaris.
Slurm shows `realtime' traffic statistics, has three graph modes,
can monitor any network device, and uses curses to draw ascii
graphics, including ascii theme support.

13
net/slurm/pkg/PLIST Normal file
View File

@ -0,0 +1,13 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2008/09/18 23:02:31 sthen Exp $
@bin bin/slurm
@man man/man1/slurm.1
share/doc/slurm/
share/doc/slurm/COPYING
share/doc/slurm/COPYRIGHT
share/doc/slurm/FAQ
share/doc/slurm/THANKS
share/slurm/
share/slurm/black.theme
share/slurm/blue.theme
share/slurm/cyan.theme
share/slurm/foo.theme