View | Details | Raw Unified | Return to bug 80339
Collapse All | Expand All

(-)Makefile (-7 / +48 lines)
Lines 6-40 Link Here
6
#
6
#
7
7
8
PORTNAME=	symon
8
PORTNAME=	symon
9
PORTVERSION=	2.70
9
PORTVERSION=	2.71
10
CATEGORIES=	sysutils
10
CATEGORIES=	sysutils
11
MASTER_SITES=	http://www.xs4all.nl/~wpd/symon/philes/
11
MASTER_SITES=	http://www.xs4all.nl/~wpd/symon/philes/
12
12
13
MAINTAINER=	q@uni.de
13
MAINTAINER=	q@uni.de
14
COMMENT=	Performance and information monitoring tool
14
COMMENT=	Performance and information monitoring tool
15
15
16
LIB_DEPENDS=	rrd.0:${PORTSDIR}/net/rrdtool
16
USE_RC_SUBR=	yes
17
17
USE_REINPLACE=	yes
18
WRKSRC=		${WRKDIR}/${PORTNAME}
18
WRKSRC=		${WRKDIR}/${PORTNAME}
19
MAKE_ARGS+=	SYSCONFDIR=${LOCALBASE}/etc BINDIR=bin
20
PKGMESSAGE=	${WRKDIR}/.pkg-message
19
PKGMESSAGE=	${WRKDIR}/.pkg-message
21
20
22
MAN8=	symon.8 symux.8
21
# Synonym for WITHOUT_SYMUX
22
.if defined(WITHOUT_RRD)
23
WITHOUT_SYMUX=	yes
24
.endif
25
26
.if !defined(WITHOUT_SYMUX)
27
LIB_DEPENDS=	rrd.0:${PORTSDIR}/net/rrdtool
28
.endif
29
30
.if defined(WITHOUT_SYMUX) && defined(WITHOUT_SYMON)
31
IGNORE=	You have defined both WITHOUT_SYMUX or WITHOUT_RRD *and* WITHOUT_SYMON
32
.endif
33
34
SUBDIR=		lib
35
.if !defined(WITHOUT_SYMON)
36
SUBDIR+=	symon
37
MAN8+=		symon.8
38
PLIST_SUB+=	SYMON=""
39
.else
40
PLIST_SUB+=	SYMON="@comment "
41
.endif
42
.if !defined(WITHOUT_SYMUX)
43
SUBDIR+=	symux
44
MAN8+=		symux.8
45
PLIST_SUB+=	SYMUX=""
46
.else
47
PLIST_SUB+=	SYMUX="@comment "
48
.endif
49
SUBDIR+=	client
50
51
MAKE_ARGS+=	SUBDIR="${SUBDIR}"
23
52
24
.include <bsd.port.pre.mk>
53
.include <bsd.port.pre.mk>
25
54
26
.if ${OSVERSION} < 500000
55
# Symux doesn't need additional LIBS. Symon doesn't need libkvm on FreeBSD 4.x
27
post-patch:
56
post-patch:
28
	@${ECHO} "" > ${WRKSRC}/platform/FreeBSD/Makefile.inc
57
	@${REINPLACE_CMD} 's/^LIBS+=/LIBS=/' ${WRKSRC}/symux/Makefile
58
.if ${OSVERSION} < 500000
59
	@${REINPLACE_CMD} 's/-lkvm//' ${WRKSRC}/platform/FreeBSD/Makefile.inc
29
.endif
60
.endif
30
61
31
post-build:
62
post-build:
32
	@${SED} 's,%%LOCALBASE%%,${LOCALBASE},g' pkg-message > ${PKGMESSAGE}
63
	@${SED} 's,%%LOCALBASE%%,${LOCALBASE},g' pkg-message > ${PKGMESSAGE}
64
.for f in symon.sh symux.sh
65
	@${SED} 's,%%PREFIX%%,${PREFIX},; s,%%RC_SUBR%%,${RC_SUBR},' \
66
		${FILESDIR}/$f > ${WRKSRC}/$f
67
.endfor
33
68
34
pre-install:
69
pre-install:
35
	@${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
70
	@${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
36
71
37
post-install:
72
post-install:
73
.if !defined(WITHOUT_SYMON)
74
	@${INSTALL_SCRIPT} -m 555 ${WRKSRC}/symon.sh ${PREFIX}/etc/rc.d/symon.sh
75
.endif
76
.if !defined(WITHOUT_SYMUX)
77
	@${INSTALL_SCRIPT} -m 555 ${WRKSRC}/symux.sh ${PREFIX}/etc/rc.d/symux.sh
78
.endif
38
	@${CAT} ${PKGMESSAGE}
79
	@${CAT} ${PKGMESSAGE}
39
80
40
.include <bsd.port.post.mk>
81
.include <bsd.port.post.mk>
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (symon-2.70.tar.gz) = 01b3cf975185418c85845bddf0ee22e6
1
MD5 (symon-2.71.tar.gz) = a9c0c77239c834fad0f326521d76437e
2
SIZE (symon-2.70.tar.gz) = 75322
2
SIZE (symon-2.71.tar.gz) = 79223
(-)pkg-descr (-3 / +1 lines)
Lines 6-16 Link Here
6
for further processing. symon has been designed to inflict minimal performance
6
for further processing. symon has been designed to inflict minimal performance
7
and security impact -- it can be run as nobody on the system it monitors. 
7
and security impact -- it can be run as nobody on the system it monitors. 
8
8
9
symux is a non-priviledged daemon that listens to incoming symon traffic. symux
9
symux is a non-privileged daemon that listens to incoming symon traffic. symux
10
can write the incoming symon streams into rrd files. Clients interested in
10
can write the incoming symon streams into rrd files. Clients interested in
11
monitoring machine state can also log into symux and receive data as ascii as
11
monitoring machine state can also log into symux and receive data as ascii as
12
it arrives. 
12
it arrives. 
13
14
symon2web is a php script that can show the data stored in the rrd files.
15
13
16
WWW: http://www.xs4all.nl/~wpd/symon
14
WWW: http://www.xs4all.nl/~wpd/symon
(-)pkg-plist (-6 / +8 lines)
Lines 1-9 Link Here
1
bin/symon
1
%%SYMON%%bin/symon
2
bin/symux
2
%%SYMUX%%bin/symux
3
%%EXAMPLESDIR%%/symon.conf
3
%%SYMON%%etc/rc.d/symon.sh
4
%%EXAMPLESDIR%%/symux.conf
4
%%SYMUX%%etc/rc.d/symux.sh
5
%%DATADIR%%/c_config.sh
5
%%SYMON%%%%EXAMPLESDIR%%/symon.conf
6
%%DATADIR%%/c_smrrds.sh
6
%%SYMUX%%%%EXAMPLESDIR%%/symux.conf
7
%%SYMON%%%%DATADIR%%/c_config.sh
8
%%SYMUX%%%%DATADIR%%/c_smrrds.sh
7
%%DATADIR%%/client/SymuxClient.0
9
%%DATADIR%%/client/SymuxClient.0
8
%%DATADIR%%/client/SymuxClient.pm
10
%%DATADIR%%/client/SymuxClient.pm
9
%%DATADIR%%/client/getsymonitem.pl
11
%%DATADIR%%/client/getsymonitem.pl
(-)files/patch-conf.sh (-59 lines)
Removed Link Here
1
--- platform/FreeBSD/conf.sh.orig	Thu Mar 10 09:34:37 2005
2
+++ platform/FreeBSD/conf.sh	Thu Mar 10 09:35:24 2005
3
@@ -1,25 +1,34 @@
4
-case `grep -cq "m_drops" /usr/include/sys/mbuf.h` in
5
-1)	echo "#define HAS_MBUF_MDROPS	1" ;;
6
-0)	echo "#undef HAS_MBUF_MDROPS" ;;
7
-esac;
8
-case `grep -cq "sf_allocfail" /usr/include/sys/mbuf.h` in
9
-1)	echo "#define HAS_MBUF_SFALLOCFAIL	1" ;;
10
-0)	echo "#undef HAS_MBUF_SFALLOCFAIL" ;;
11
-esac;
12
-case `grep -cq "VM_TOTAL" /usr/include/vm/vm_param.h` in
13
-0)      echo "#define VM_TOTAL VM_METER" ;;
14
-esac;
15
-sysctl -N vm.nswapdev 1>/dev/null 2>&1
16
-case $? in
17
-1)      echo "#undef HAS_VM_NSWAPDEV" ;;
18
-0)      echo "#define HAS_VM_NSWAPDEV	1" ;;
19
-esac;
20
+#!/bin/sh
21
+if grep -q "m_drops" /usr/include/sys/mbuf.h; then
22
+	echo "#define HAS_MBUF_MDROPS	1"
23
+else
24
+	echo "#undef HAS_MBUF_MDROPS"
25
+fi
26
+if grep -q "sf_allocfail" /usr/include/sys/mbuf.h; then
27
+	echo "#define HAS_MBUF_SFALLOCFAIL	1"
28
+else
29
+	echo "#undef HAS_MBUF_SFALLOCFAIL"
30
+fi
31
+if ! grep -q "VM_TOTAL" /usr/include/vm/vm_param.h; then
32
+	echo "#define VM_TOTAL VM_METER"
33
+fi
34
+if grep -q "struct xswdev" /usr/include/vm/vm_param.h; then
35
+	echo "#define HAS_VM_NSWAPDEV	1"
36
+else
37
+	echo "#undef HAS_VM_NSWAPDEV"
38
+fi
39
 if [ -f /usr/include/net/pfvar.h ]; then
40
     echo "#define HAS_PFVAR_H	1"
41
 else
42
     echo "#undef HAS_PFVAR_H"
43
-fi;
44
-case `grep -cq "ki_paddr" /usr/include/sys/user.h` in
45
-1)      echo "#define HAS_KI_PADDR	1" ;;
46
-0)      echo "#undef HAS_KI_PADDR" ;;
47
-esac;
48
\ No newline at end of file
49
+fi
50
+if grep -q "ki_paddr" /usr/include/sys/user.h; then
51
+	echo "#define HAS_KI_PADDR	1"
52
+else
53
+	echo "#undef HAS_KI_PADDR"
54
+fi
55
+if grep -q "struct rusage_ext" /usr/include/sys/proc.h; then
56
+	echo "#define HAS_RUSAGE_EXT	1"
57
+else
58
+	echo "#undef HAS_RUSAGE_EXT"
59
+fi
(-)files/patch-sm_proc.c (-18 / +15 lines)
Lines 1-18 Link Here
1
--- platform/FreeBSD/sm_proc.c.orig	Thu Mar 10 09:29:00 2005
1
--- platform/FreeBSD/sm_proc.c.orig	Mon Apr 25 17:34:28 2005
2
+++ platform/FreeBSD/sm_proc.c	Thu Mar 10 09:27:52 2005
2
+++ platform/FreeBSD/sm_proc.c	Mon Apr 25 17:34:43 2005
3
@@ -181,9 +181,15 @@
3
@@ -182,9 +182,9 @@
4
 	      if (proc_kd) {
4
 		if (kvm_read(proc_kd, (unsigned long)pp->ki_paddr, &pproc,
5
 		   if (kvm_read(proc_kd, (unsigned long)pp->ki_paddr, &pproc,
5
 			     sizeof(pproc)) == sizeof(pproc)) {
6
 				  sizeof(pproc)) == sizeof(pproc)) {
6
 #ifdef HAS_RUSAGE_EXT
7
+#ifdef HAS_RUSAGE_EXT
7
-		    cpu_uticks += pproc.p_rux.p_uticks;  /* user */
8
+			cpu_uticks += pproc.p_rux.rux_uticks;  /* user */
8
-		    cpu_sticks += pproc.p_rux.p_sticks;  /* sys  */
9
+			cpu_sticks += pproc.p_rux.rux_sticks;  /* sys  */
9
-		    cpu_iticks += pproc.p_rux.p_iticks;  /* int  */
10
+			cpu_iticks += pproc.p_rux.rux_iticks;  /* int  */
10
+		    cpu_uticks += pproc.p_rux.rux_uticks;  /* user */
11
+#else
11
+		    cpu_sticks += pproc.p_rux.rux_sticks;  /* sys  */
12
 			cpu_uticks += pproc.p_uticks;  /* user */
12
+		    cpu_iticks += pproc.p_rux.rux_iticks;  /* int  */
13
 			cpu_sticks += pproc.p_sticks;  /* sys  */
13
 #else
14
 			cpu_iticks += pproc.p_iticks;  /* int  */
14
 		    cpu_uticks += pproc.p_uticks;  /* user */
15
+#endif
15
 		    cpu_sticks += pproc.p_sticks;  /* sys  */
16
 		   } else {
17
 			warning("while reading kvm: %s", kvm_geterr(proc_kd));
18
 		   }
(-)files/patch-symon-Makefile (-14 lines)
Removed Link Here
1
--- symon/Makefile.orig	Fri Mar  4 10:39:20 2005
2
+++ symon/Makefile	Fri Mar  4 10:43:13 2005
3
@@ -26,9 +26,9 @@
4
 clean:
5
 	rm -f conf.h symon symon.cat8 symon.core ${OBJS}
6
 
7
-install: symon symon.cat8 symon.conf
8
+install: symon symon.8 symon.conf
9
 	${INSTALL} -c -m 555  -g wheel -o root symon      ${PREFIX}/${BINDIR}
10
-	${INSTALL} -c -m 444  -g wheel -o root symon.cat8 ${PREFIX}/${MANDIR}/cat8/symon.0
11
+	${INSTALL} -c -m 444  -g wheel -o root symon.8 ${PREFIX}/${MANDIR}/man8/symon.8
12
 	${INSTALL} -d -m 555  -g bin   -o root ${PREFIX}/${SHRDIR}
13
 	${INSTALL} -c -m 555  -g wheel -o root c_config.sh ${PREFIX}/${SHRDIR}
14
 	${INSTALL} -d -m 555  -g bin   -o root ${PREFIX}/${EXADIR}
(-)files/patch-symux-Makefile (-14 lines)
Removed Link Here
1
--- symux/Makefile.orig	Fri Mar  4 10:43:43 2005
2
+++ symux/Makefile	Fri Mar  4 10:44:01 2005
3
@@ -17,9 +17,9 @@
4
 clean:
5
 	rm -f conf.h symux symux.cat8 symux.core ${OBJS}
6
 
7
-install: symux symux.cat8 c_smrrds.sh symux.conf
8
+install: symux symux.8 c_smrrds.sh symux.conf
9
 	${INSTALL} -c -m 555 -g bin   -o root symux      ${PREFIX}/${BINDIR}
10
-	${INSTALL} -c -m 444 -g wheel -o root symux.cat8 ${PREFIX}/${MANDIR}/cat8/symux.0
11
+	${INSTALL} -c -m 444 -g wheel -o root symux.8 ${PREFIX}/${MANDIR}/man8/symux.8
12
 	${INSTALL} -d -m 555 -g bin   -o root ${PREFIX}/${SHRDIR}
13
 	${INSTALL} -c -m 544 -g bin   -o root c_smrrds.sh  ${PREFIX}/${SHRDIR}
14
 	${INSTALL} -d -m 555 -g bin   -o root ${PREFIX}/${EXADIR}
(-)files/symon.sh (+18 lines)
Added Link Here
1
#!/bin/sh
2
# $FreeBSD$
3
4
# PROVIDE: symon
5
# REQUIRE: NETWORKING SERVERS
6
# KEYWORD: FreeBSD
7
8
. %%RC_SUBR%%
9
10
name="symon"
11
rcvar=`set_rcvar`
12
command="%%PREFIX%%/bin/symon"
13
14
symon_enable=${symon_enable:-"NO"}
15
16
load_rc_config $name
17
run_rc_command "$1"
18
(-)files/symux.sh (+17 lines)
Added Link Here
1
#!/bin/sh
2
# $FreeBSD$
3
4
# PROVIDE: symux
5
# REQUIRE: NETWORKING SERVERS
6
# KEYWORD: FreeBSD
7
8
. %%RC_SUBR%%
9
10
name="symux"
11
rcvar=`set_rcvar`
12
command="%%PREFIX%%/bin/symux"
13
symux_enable=${symux_enable:-"NO"}
14
15
load_rc_config $name
16
run_rc_command "$1"
17

Return to bug 80339