From q@uni.de  Fri Mar  4 15:55:19 2005
Return-Path: <q@uni.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 863A016A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  4 Mar 2005 15:55:19 +0000 (GMT)
Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6E96743D55
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  4 Mar 2005 15:55:18 +0000 (GMT)
	(envelope-from q@uni.de)
Received: from wrzx34.rz.uni-wuerzburg.de (wrzx34.rz.uni-wuerzburg.de [132.187.3.34])
	by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 932BED8419
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  4 Mar 2005 16:55:17 +0100 (CET)
Received: from virusscan (localhost [127.0.0.1])
	by wrzx34.rz.uni-wuerzburg.de (Postfix) with ESMTP id 7357CB3389
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  4 Mar 2005 16:55:17 +0100 (CET)
Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28])
	by wrzx34.rz.uni-wuerzburg.de (Postfix) with ESMTP id 43BD5B330F
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  4 Mar 2005 16:55:17 +0100 (CET)
Received: from coyote.q.local (wwsx14.win-screen.uni-wuerzburg.de [132.187.253.14])
	by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 018D7D8419
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  4 Mar 2005 16:55:17 +0100 (CET)
Received: from roadrunner.q.local (roadrunner.q.local [192.168.0.148])
	by coyote.q.local (8.13.1/8.13.1) with ESMTP id j24FtGRJ034275
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 4 Mar 2005 16:55:16 +0100 (CET)
	(envelope-from q@roadrunner.q.local)
Received: from roadrunner.q.local (localhost [127.0.0.1])
	by roadrunner.q.local (8.13.1/8.13.1) with ESMTP id j24FtBuf062238
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 4 Mar 2005 16:55:11 +0100 (CET)
	(envelope-from q@roadrunner.q.local)
Received: (from q@localhost)
	by roadrunner.q.local (8.13.1/8.13.1/Submit) id j24FtA0o062237;
	Fri, 4 Mar 2005 16:55:10 +0100 (CET)
	(envelope-from q)
Message-Id: <200503041555.j24FtA0o062237@roadrunner.q.local>
Date: Fri, 4 Mar 2005 16:55:10 +0100 (CET)
From: Ulrich Spoerlein <q@uni.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [NEW PORT] sysutils/symon: Performance and information monitoring tool
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         78416
>Category:       ports
>Synopsis:       [NEW PORT] sysutils/symon: Performance and information monitoring tool
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 04 16:00:37 GMT 2005
>Closed-Date:    Wed Mar 16 20:41:12 GMT 2005
>Last-Modified:  Wed Mar 16 20:41:12 GMT 2005
>Originator:     Ulrich Spoerlein
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD roadrunner 5.3-STABLE FreeBSD 5.3-STABLE #3: Sat Feb 19 22:14:03 CET 2005
>Description:
The symon project consists of three parts; a data monitor, a data consolidator
and a data displayer. 

symon is a is a lightweight system monitor that measures cpu, memory, pf,
interface and disk statistics every 5 seconds. It sends this data on to symux
for further processing. symon has been designed to inflict minimal performance
and security impact -- it can be run as nobody on the system it monitors. 

symux is a non-priviledged daemon that listens to incoming symon traffic. symux
can write the incoming symon streams into rrd files. Clients interested in
monitoring machine state can also log into symux and receive data as ascii as
it arrives. 

symon2web is a php script that can show the data stored in the rrd files.

WWW: http://www.xs4all.nl/~wpd/symon

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- symon-2.70.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	symon
#	symon/Makefile
#	symon/pkg-message
#	symon/distinfo
#	symon/pkg-plist
#	symon/pkg-descr
#	symon/pkg-install
#	symon/files
#	symon/files/patch-conf.sh
#	symon/files/patch-symux-Makefile
#	symon/files/patch-symon-Makefile
#
echo c - symon
mkdir -p symon > /dev/null 2>&1
echo x - symon/Makefile
sed 's/^X//' >symon/Makefile << 'END-of-symon/Makefile'
X# New ports collection makefile for:	sysutils/symon
X# Date created:				17.02.2005
X# Whom:					Ulrich Spoerlein <q@uni.de>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	symon
XPORTVERSION=	2.70
XCATEGORIES=	sysutils
XMASTER_SITES=	http://www.xs4all.nl/~wpd/symon/philes/
X
XMAINTAINER=	q@uni.de
XCOMMENT=	Performance and information monitoring tool
X
XLIB_DEPENDS=	rrd.0:${PORTSDIR}/net/rrdtool
X
XWRKSRC=		${WRKDIR}/${PORTNAME}
XMAKE_ARGS+=	SYSCONFDIR=${LOCALBASE}/etc BINDIR=bin
XPKGMESSAGE=	${WRKDIR}/.pkg-message
X
XMAN8=	symon.8 symux.8
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 500000
Xpost-patch:
X	@${ECHO} "" > ${WRKSRC}/platform/FreeBSD/Makefile.inc
X.endif
X
Xpost-build:
X	@${SED} 's,%%LOCALBASE%%,${LOCALBASE},g' pkg-message > ${PKGMESSAGE}
X
Xpre-install:
X	@${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-symon/Makefile
echo x - symon/pkg-message
sed 's/^X//' >symon/pkg-message << 'END-of-symon/pkg-message'
XFor the system monitor symon, use the following steps
X
X  1. Copy %%LOCALBASE%%/share/examples/symon/symon.conf
X     to %%LOCALBASE%%/etc and edit.
X  2. Run symon
X
XFor the data collector symux, use the following steps
X
X  1. Copy %%LOCALBASE%%/share/examples/symon/symux.conf
X     to %%LOCALBASE%%/etc and edit.
X  2. Enter the directory, where symux should store its data
X     (e.g. /var/db/symux) and run
X	%%LOCALBASE%%/share/symon/c_smrrds.sh all
X     to create the RR database.
X  3. Run symux
END-of-symon/pkg-message
echo x - symon/distinfo
sed 's/^X//' >symon/distinfo << 'END-of-symon/distinfo'
XMD5 (symon-2.70.tar.gz) = 01b3cf975185418c85845bddf0ee22e6
XSIZE (symon-2.70.tar.gz) = 75322
END-of-symon/distinfo
echo x - symon/pkg-plist
sed 's/^X//' >symon/pkg-plist << 'END-of-symon/pkg-plist'
Xbin/symon
Xbin/symux
X%%EXAMPLESDIR%%/symon.conf
X%%EXAMPLESDIR%%/symux.conf
X%%DATADIR%%/c_config.sh
X%%DATADIR%%/c_smrrds.sh
X%%DATADIR%%/client/SymuxClient.0
X%%DATADIR%%/client/SymuxClient.pm
X%%DATADIR%%/client/getsymonitem.pl
X@dirrm share/symon/client
X@dirrm %%DATADIR%%
X@dirrm %%EXAMPLESDIR%%
X@unexec echo "Warning: If you will *NOT* use this package anymore, please remove the _symon user manually."
END-of-symon/pkg-plist
echo x - symon/pkg-descr
sed 's/^X//' >symon/pkg-descr << 'END-of-symon/pkg-descr'
XThe symon project consists of three parts; a data monitor, a data consolidator
Xand a data displayer. 
X
Xsymon is a is a lightweight system monitor that measures cpu, memory, pf,
Xinterface and disk statistics every 5 seconds. It sends this data on to symux
Xfor further processing. symon has been designed to inflict minimal performance
Xand security impact -- it can be run as nobody on the system it monitors. 
X
Xsymux is a non-priviledged daemon that listens to incoming symon traffic. symux
Xcan write the incoming symon streams into rrd files. Clients interested in
Xmonitoring machine state can also log into symux and receive data as ascii as
Xit arrives. 
X
Xsymon2web is a php script that can show the data stored in the rrd files.
X
XWWW: http://www.xs4all.nl/~wpd/symon
END-of-symon/pkg-descr
echo x - symon/pkg-install
sed 's/^X//' >symon/pkg-install << 'END-of-symon/pkg-install'
X#!/bin/sh
X
XPATH=/bin:/usr/sbin
X
XUSER=_symon
XGROUP=daemon
XUID=115
X
Xcase $2 in
X  PRE-INSTALL)
X  if pw user show "${USER}" 2>/dev/null; then
X    echo "You already have a user \"${USER}\", so I will use it."
X  else
X    if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
X      -s /usr/sbin/nologin -L daemon -d /var/empty -c "Symon Account"
X    then
X      echo "Added user \"${USER}\"."
X    else
X      echo "Adding user \"${USER}\" failed..."
X      exit 1
X    fi
X  fi
X  ;;
Xesac
END-of-symon/pkg-install
echo c - symon/files
mkdir -p symon/files > /dev/null 2>&1
echo x - symon/files/patch-conf.sh
sed 's/^X//' >symon/files/patch-conf.sh << 'END-of-symon/files/patch-conf.sh'
X--- platform/FreeBSD/conf.sh.orig	Fri Mar  4 10:23:42 2005
X+++ platform/FreeBSD/conf.sh	Fri Mar  4 10:29:59 2005
X@@ -1,25 +1,29 @@
X-case `grep -cq "m_drops" /usr/include/sys/mbuf.h` in
X-1)	echo "#define HAS_MBUF_MDROPS	1" ;;
X-0)	echo "#undef HAS_MBUF_MDROPS" ;;
X-esac;
X-case `grep -cq "sf_allocfail" /usr/include/sys/mbuf.h` in
X-1)	echo "#define HAS_MBUF_SFALLOCFAIL	1" ;;
X-0)	echo "#undef HAS_MBUF_SFALLOCFAIL" ;;
X-esac;
X-case `grep -cq "VM_TOTAL" /usr/include/vm/vm_param.h` in
X-0)      echo "#define VM_TOTAL VM_METER" ;;
X-esac;
X-sysctl -N vm.nswapdev 1>/dev/null 2>&1
X-case $? in
X-1)      echo "#undef HAS_VM_NSWAPDEV" ;;
X-0)      echo "#define HAS_VM_NSWAPDEV	1" ;;
X-esac;
X+#!/bin/sh
X+if grep -q "m_drops" /usr/include/sys/mbuf.h; then
X+	echo "#define HAS_MBUF_MDROPS	1"
X+else
X+	echo "#undef HAS_MBUF_MDROPS"
X+fi
X+if grep -q "sf_allocfail" /usr/include/sys/mbuf.h; then
X+	echo "#define HAS_MBUF_SFALLOCFAIL	1"
X+else
X+	echo "#undef HAS_MBUF_SFALLOCFAIL"
X+fi
X+if ! grep -q "VM_TOTAL" /usr/include/vm/vm_param.h; then
X+	echo "#define VM_TOTAL VM_METER"
X+fi
X+if sysctl vm.nswapdev 1>/dev/null 2>&1; then
X+	echo "#define HAS_VM_NSWAPDEV	1"
X+else
X+	echo "#undef HAS_VM_NSWAPDEV"
X+fi
X if [ -f /usr/include/net/pfvar.h ]; then
X     echo "#define HAS_PFVAR_H	1"
X else
X     echo "#undef HAS_PFVAR_H"
X-fi;
X-case `grep -cq "ki_paddr" /usr/include/sys/user.h` in
X-1)      echo "#define HAS_KI_PADDR	1" ;;
X-0)      echo "#undef HAS_KI_PADDR" ;;
X-esac;
X+fi
X+if grep -q "ki_paddr" /usr/include/sys/user.h; then
X+	echo "#define HAS_KI_PADDR	1"
X+else
X+	echo "#undef HAS_KI_PADDR"
X+fi
END-of-symon/files/patch-conf.sh
echo x - symon/files/patch-symux-Makefile
sed 's/^X//' >symon/files/patch-symux-Makefile << 'END-of-symon/files/patch-symux-Makefile'
X--- symux/Makefile.orig	Fri Mar  4 10:43:43 2005
X+++ symux/Makefile	Fri Mar  4 10:44:01 2005
X@@ -17,9 +17,9 @@
X clean:
X 	rm -f conf.h symux symux.cat8 symux.core ${OBJS}
X 
X-install: symux symux.cat8 c_smrrds.sh symux.conf
X+install: symux symux.8 c_smrrds.sh symux.conf
X 	${INSTALL} -c -m 555 -g bin   -o root symux      ${PREFIX}/${BINDIR}
X-	${INSTALL} -c -m 444 -g wheel -o root symux.cat8 ${PREFIX}/${MANDIR}/cat8/symux.0
X+	${INSTALL} -c -m 444 -g wheel -o root symux.8 ${PREFIX}/${MANDIR}/man8/symux.8
X 	${INSTALL} -d -m 555 -g bin   -o root ${PREFIX}/${SHRDIR}
X 	${INSTALL} -c -m 544 -g bin   -o root c_smrrds.sh  ${PREFIX}/${SHRDIR}
X 	${INSTALL} -d -m 555 -g bin   -o root ${PREFIX}/${EXADIR}
END-of-symon/files/patch-symux-Makefile
echo x - symon/files/patch-symon-Makefile
sed 's/^X//' >symon/files/patch-symon-Makefile << 'END-of-symon/files/patch-symon-Makefile'
X--- symon/Makefile.orig	Fri Mar  4 10:39:20 2005
X+++ symon/Makefile	Fri Mar  4 10:43:13 2005
X@@ -26,9 +26,9 @@
X clean:
X 	rm -f conf.h symon symon.cat8 symon.core ${OBJS}
X 
X-install: symon symon.cat8 symon.conf
X+install: symon symon.8 symon.conf
X 	${INSTALL} -c -m 555  -g wheel -o root symon      ${PREFIX}/${BINDIR}
X-	${INSTALL} -c -m 444  -g wheel -o root symon.cat8 ${PREFIX}/${MANDIR}/cat8/symon.0
X+	${INSTALL} -c -m 444  -g wheel -o root symon.8 ${PREFIX}/${MANDIR}/man8/symon.8
X 	${INSTALL} -d -m 555  -g bin   -o root ${PREFIX}/${SHRDIR}
X 	${INSTALL} -c -m 555  -g wheel -o root c_config.sh ${PREFIX}/${SHRDIR}
X 	${INSTALL} -d -m 555  -g bin   -o root ${PREFIX}/${EXADIR}
END-of-symon/files/patch-symon-Makefile
exit
--- symon-2.70.shar ends here ---

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: pav 
State-Changed-When: Sun Mar 6 23:50:15 GMT 2005 
State-Changed-Why:  
Does not compile on FreeBSD 4.x: 

cc -O -pipe   -Wall -I../lib -I../platform/FreeBSD -I. -o ../platform/FreeBSD/sm_mem.o -c ../platform/FreeBSD/sm_mem.c 
../platform/FreeBSD/sm_mem.c: In function `get_mem': 
../platform/FreeBSD/sm_mem.c:134: storage size of `vmiswp_dat' isn't known 
../platform/FreeBSD/sm_mem.c:134: warning: unused variable `vmiswp_dat' 
*** Error code 1 

Stop in /tmp/a/ports/sysutils/symon/work/symon/symon. 

Are you able to fix this, or do you want this port marked BROKEN on FreeBSD 4? 


Responsible-Changed-From-To: freebsd-ports-bugs->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Sun Mar 6 23:50:15 GMT 2005 
Responsible-Changed-Why:  
Watch 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78416 

From: Ulrich Spoerlein <q@uni.de>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/78416: [NEW PORT] sysutils/symon: Performance and information monitoring tool
Date: Wed, 16 Mar 2005 17:41:33 +0100

 The port won't build in jail (it's calling sysctl) nor on 6.x, as there
 has been some header-shuffling.
 
 Please use this new shar instead.
 
 Ulrich Spoerlein
 
 
 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #	symon
 #	symon/Makefile
 #	symon/pkg-message
 #	symon/distinfo
 #	symon/pkg-plist
 #	symon/pkg-descr
 #	symon/pkg-install
 #	symon/files
 #	symon/files/patch-conf.sh
 #	symon/files/patch-symux-Makefile
 #	symon/files/patch-symon-Makefile
 #	symon/files/patch-sm_proc.c
 #
 echo c - symon
 mkdir -p symon > /dev/null 2>&1
 echo x - symon/Makefile
 sed 's/^X//' >symon/Makefile << 'END-of-symon/Makefile'
 X# New ports collection makefile for:	sysutils/symon
 X# Date created:				17.02.2005
 X# Whom:					Ulrich Spoerlein <q@uni.de>
 X#
 X# $FreeBSD$
 X#
 X
 XPORTNAME=	symon
 XPORTVERSION=	2.70
 XCATEGORIES=	sysutils
 XMASTER_SITES=	http://www.xs4all.nl/~wpd/symon/philes/
 X
 XMAINTAINER=	q@uni.de
 XCOMMENT=	Performance and information monitoring tool
 X
 XLIB_DEPENDS=	rrd.0:${PORTSDIR}/net/rrdtool
 X
 XWRKSRC=		${WRKDIR}/${PORTNAME}
 XMAKE_ARGS+=	SYSCONFDIR=${LOCALBASE}/etc BINDIR=bin
 XPKGMESSAGE=	${WRKDIR}/.pkg-message
 X
 XMAN8=	symon.8 symux.8
 X
 X.include <bsd.port.pre.mk>
 X
 X.if ${OSVERSION} < 500000
 Xpost-patch:
 X	@${ECHO} "" > ${WRKSRC}/platform/FreeBSD/Makefile.inc
 X.endif
 X
 Xpost-build:
 X	@${SED} 's,%%LOCALBASE%%,${LOCALBASE},g' pkg-message > ${PKGMESSAGE}
 X
 Xpre-install:
 X	@${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
 X
 Xpost-install:
 X	@${CAT} ${PKGMESSAGE}
 X
 X.include <bsd.port.post.mk>
 END-of-symon/Makefile
 echo x - symon/pkg-message
 sed 's/^X//' >symon/pkg-message << 'END-of-symon/pkg-message'
 XFor the system monitor symon, use the following steps
 X
 X  1. Copy %%LOCALBASE%%/share/examples/symon/symon.conf
 X     to %%LOCALBASE%%/etc and edit.
 X  2. Run symon
 X
 XFor the data collector symux, use the following steps
 X
 X  1. Copy %%LOCALBASE%%/share/examples/symon/symux.conf
 X     to %%LOCALBASE%%/etc and edit.
 X  2. Enter the directory, where symux should store its data
 X     (e.g. /var/db/symux) and run
 X	%%LOCALBASE%%/share/symon/c_smrrds.sh all
 X     to create the RR database.
 X  3. Run symux
 END-of-symon/pkg-message
 echo x - symon/distinfo
 sed 's/^X//' >symon/distinfo << 'END-of-symon/distinfo'
 XMD5 (symon-2.70.tar.gz) = 01b3cf975185418c85845bddf0ee22e6
 XSIZE (symon-2.70.tar.gz) = 75322
 END-of-symon/distinfo
 echo x - symon/pkg-plist
 sed 's/^X//' >symon/pkg-plist << 'END-of-symon/pkg-plist'
 Xbin/symon
 Xbin/symux
 X%%EXAMPLESDIR%%/symon.conf
 X%%EXAMPLESDIR%%/symux.conf
 X%%DATADIR%%/c_config.sh
 X%%DATADIR%%/c_smrrds.sh
 X%%DATADIR%%/client/SymuxClient.0
 X%%DATADIR%%/client/SymuxClient.pm
 X%%DATADIR%%/client/getsymonitem.pl
 X@dirrm share/symon/client
 X@dirrm %%DATADIR%%
 X@dirrm %%EXAMPLESDIR%%
 X@unexec echo "Warning: If you will *NOT* use this package anymore, please remove the _symon user manually."
 END-of-symon/pkg-plist
 echo x - symon/pkg-descr
 sed 's/^X//' >symon/pkg-descr << 'END-of-symon/pkg-descr'
 XThe symon project consists of three parts; a data monitor, a data consolidator
 Xand a data displayer. 
 X
 Xsymon is a is a lightweight system monitor that measures cpu, memory, pf,
 Xinterface and disk statistics every 5 seconds. It sends this data on to symux
 Xfor further processing. symon has been designed to inflict minimal performance
 Xand security impact -- it can be run as nobody on the system it monitors. 
 X
 Xsymux is a non-priviledged daemon that listens to incoming symon traffic. symux
 Xcan write the incoming symon streams into rrd files. Clients interested in
 Xmonitoring machine state can also log into symux and receive data as ascii as
 Xit arrives. 
 X
 Xsymon2web is a php script that can show the data stored in the rrd files.
 X
 XWWW: http://www.xs4all.nl/~wpd/symon
 END-of-symon/pkg-descr
 echo x - symon/pkg-install
 sed 's/^X//' >symon/pkg-install << 'END-of-symon/pkg-install'
 X#!/bin/sh
 X
 XPATH=/bin:/usr/sbin
 X
 XUSER=_symon
 XGROUP=daemon
 XUID=115
 X
 Xcase $2 in
 X  PRE-INSTALL)
 X  if pw user show "${USER}" 2>/dev/null; then
 X    echo "You already have a user \"${USER}\", so I will use it."
 X  else
 X    if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
 X      -s /usr/sbin/nologin -L daemon -d /var/empty -c "Symon Account"
 X    then
 X      echo "Added user \"${USER}\"."
 X    else
 X      echo "Adding user \"${USER}\" failed..."
 X      exit 1
 X    fi
 X  fi
 X  ;;
 Xesac
 END-of-symon/pkg-install
 echo c - symon/files
 mkdir -p symon/files > /dev/null 2>&1
 echo x - symon/files/patch-conf.sh
 sed 's/^X//' >symon/files/patch-conf.sh << 'END-of-symon/files/patch-conf.sh'
 X--- platform/FreeBSD/conf.sh.orig	Thu Mar 10 09:34:37 2005
 X+++ platform/FreeBSD/conf.sh	Thu Mar 10 09:35:24 2005
 X@@ -1,25 +1,34 @@
 X-case `grep -cq "m_drops" /usr/include/sys/mbuf.h` in
 X-1)	echo "#define HAS_MBUF_MDROPS	1" ;;
 X-0)	echo "#undef HAS_MBUF_MDROPS" ;;
 X-esac;
 X-case `grep -cq "sf_allocfail" /usr/include/sys/mbuf.h` in
 X-1)	echo "#define HAS_MBUF_SFALLOCFAIL	1" ;;
 X-0)	echo "#undef HAS_MBUF_SFALLOCFAIL" ;;
 X-esac;
 X-case `grep -cq "VM_TOTAL" /usr/include/vm/vm_param.h` in
 X-0)      echo "#define VM_TOTAL VM_METER" ;;
 X-esac;
 X-sysctl -N vm.nswapdev 1>/dev/null 2>&1
 X-case $? in
 X-1)      echo "#undef HAS_VM_NSWAPDEV" ;;
 X-0)      echo "#define HAS_VM_NSWAPDEV	1" ;;
 X-esac;
 X+#!/bin/sh
 X+if grep -q "m_drops" /usr/include/sys/mbuf.h; then
 X+	echo "#define HAS_MBUF_MDROPS	1"
 X+else
 X+	echo "#undef HAS_MBUF_MDROPS"
 X+fi
 X+if grep -q "sf_allocfail" /usr/include/sys/mbuf.h; then
 X+	echo "#define HAS_MBUF_SFALLOCFAIL	1"
 X+else
 X+	echo "#undef HAS_MBUF_SFALLOCFAIL"
 X+fi
 X+if ! grep -q "VM_TOTAL" /usr/include/vm/vm_param.h; then
 X+	echo "#define VM_TOTAL VM_METER"
 X+fi
 X+if grep -q "struct xswdev" /usr/include/vm/vm_param.h; then
 X+	echo "#define HAS_VM_NSWAPDEV	1"
 X+else
 X+	echo "#undef HAS_VM_NSWAPDEV"
 X+fi
 X if [ -f /usr/include/net/pfvar.h ]; then
 X     echo "#define HAS_PFVAR_H	1"
 X else
 X     echo "#undef HAS_PFVAR_H"
 X-fi;
 X-case `grep -cq "ki_paddr" /usr/include/sys/user.h` in
 X-1)      echo "#define HAS_KI_PADDR	1" ;;
 X-0)      echo "#undef HAS_KI_PADDR" ;;
 X-esac;
 X\ No newline at end of file
 X+fi
 X+if grep -q "ki_paddr" /usr/include/sys/user.h; then
 X+	echo "#define HAS_KI_PADDR	1"
 X+else
 X+	echo "#undef HAS_KI_PADDR"
 X+fi
 X+if grep -q "struct rusage_ext" /usr/include/sys/proc.h; then
 X+	echo "#define HAS_RUSAGE_EXT	1"
 X+else
 X+	echo "#undef HAS_RUSAGE_EXT"
 X+fi
 END-of-symon/files/patch-conf.sh
 echo x - symon/files/patch-symux-Makefile
 sed 's/^X//' >symon/files/patch-symux-Makefile << 'END-of-symon/files/patch-symux-Makefile'
 X--- symux/Makefile.orig	Fri Mar  4 10:43:43 2005
 X+++ symux/Makefile	Fri Mar  4 10:44:01 2005
 X@@ -17,9 +17,9 @@
 X clean:
 X 	rm -f conf.h symux symux.cat8 symux.core ${OBJS}
 X 
 X-install: symux symux.cat8 c_smrrds.sh symux.conf
 X+install: symux symux.8 c_smrrds.sh symux.conf
 X 	${INSTALL} -c -m 555 -g bin   -o root symux      ${PREFIX}/${BINDIR}
 X-	${INSTALL} -c -m 444 -g wheel -o root symux.cat8 ${PREFIX}/${MANDIR}/cat8/symux.0
 X+	${INSTALL} -c -m 444 -g wheel -o root symux.8 ${PREFIX}/${MANDIR}/man8/symux.8
 X 	${INSTALL} -d -m 555 -g bin   -o root ${PREFIX}/${SHRDIR}
 X 	${INSTALL} -c -m 544 -g bin   -o root c_smrrds.sh  ${PREFIX}/${SHRDIR}
 X 	${INSTALL} -d -m 555 -g bin   -o root ${PREFIX}/${EXADIR}
 END-of-symon/files/patch-symux-Makefile
 echo x - symon/files/patch-symon-Makefile
 sed 's/^X//' >symon/files/patch-symon-Makefile << 'END-of-symon/files/patch-symon-Makefile'
 X--- symon/Makefile.orig	Fri Mar  4 10:39:20 2005
 X+++ symon/Makefile	Fri Mar  4 10:43:13 2005
 X@@ -26,9 +26,9 @@
 X clean:
 X 	rm -f conf.h symon symon.cat8 symon.core ${OBJS}
 X 
 X-install: symon symon.cat8 symon.conf
 X+install: symon symon.8 symon.conf
 X 	${INSTALL} -c -m 555  -g wheel -o root symon      ${PREFIX}/${BINDIR}
 X-	${INSTALL} -c -m 444  -g wheel -o root symon.cat8 ${PREFIX}/${MANDIR}/cat8/symon.0
 X+	${INSTALL} -c -m 444  -g wheel -o root symon.8 ${PREFIX}/${MANDIR}/man8/symon.8
 X 	${INSTALL} -d -m 555  -g bin   -o root ${PREFIX}/${SHRDIR}
 X 	${INSTALL} -c -m 555  -g wheel -o root c_config.sh ${PREFIX}/${SHRDIR}
 X 	${INSTALL} -d -m 555  -g bin   -o root ${PREFIX}/${EXADIR}
 END-of-symon/files/patch-symon-Makefile
 echo x - symon/files/patch-sm_proc.c
 sed 's/^X//' >symon/files/patch-sm_proc.c << 'END-of-symon/files/patch-sm_proc.c'
 X--- platform/FreeBSD/sm_proc.c.orig	Thu Mar 10 09:29:00 2005
 X+++ platform/FreeBSD/sm_proc.c	Thu Mar 10 09:27:52 2005
 X@@ -181,9 +181,15 @@
 X 	      if (proc_kd) {
 X 		   if (kvm_read(proc_kd, (unsigned long)pp->ki_paddr, &pproc,
 X 				  sizeof(pproc)) == sizeof(pproc)) {
 X+#ifdef HAS_RUSAGE_EXT
 X+			cpu_uticks += pproc.p_rux.p_uticks;  /* user */
 X+			cpu_sticks += pproc.p_rux.p_sticks;  /* sys  */
 X+			cpu_iticks += pproc.p_rux.p_iticks;  /* int  */
 X+#else
 X 			cpu_uticks += pproc.p_uticks;  /* user */
 X 			cpu_sticks += pproc.p_sticks;  /* sys  */
 X 			cpu_iticks += pproc.p_iticks;  /* int  */
 X+#endif
 X 		   } else {
 X 			warning("while reading kvm: %s", kvm_geterr(proc_kd));
 X 		   }
 END-of-symon/files/patch-sm_proc.c
 exit
 
State-Changed-From-To: feedback->closed 
State-Changed-By: pav 
State-Changed-When: Wed Mar 16 20:41:04 GMT 2005 
State-Changed-Why:  
New port added, thank you! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78416 
>Unformatted:
