ports/sysutils/symon/files/patch-conf.sh
Pav Lucistnik 7eb5b4f04c 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.

PR:		ports/78416
Submitted by:	Ulrich Spoerlein <q@uni.de>
2005-03-16 20:39:33 +00:00

59 lines
1.7 KiB
Bash

--- platform/FreeBSD/conf.sh.orig Thu Mar 10 09:34:37 2005
+++ platform/FreeBSD/conf.sh Thu Mar 10 09:35:24 2005
@@ -1,25 +1,34 @@
-case `grep -cq "m_drops" /usr/include/sys/mbuf.h` in
-1) echo "#define HAS_MBUF_MDROPS 1" ;;
-0) echo "#undef HAS_MBUF_MDROPS" ;;
-esac;
-case `grep -cq "sf_allocfail" /usr/include/sys/mbuf.h` in
-1) echo "#define HAS_MBUF_SFALLOCFAIL 1" ;;
-0) echo "#undef HAS_MBUF_SFALLOCFAIL" ;;
-esac;
-case `grep -cq "VM_TOTAL" /usr/include/vm/vm_param.h` in
-0) echo "#define VM_TOTAL VM_METER" ;;
-esac;
-sysctl -N vm.nswapdev 1>/dev/null 2>&1
-case $? in
-1) echo "#undef HAS_VM_NSWAPDEV" ;;
-0) echo "#define HAS_VM_NSWAPDEV 1" ;;
-esac;
+#!/bin/sh
+if grep -q "m_drops" /usr/include/sys/mbuf.h; then
+ echo "#define HAS_MBUF_MDROPS 1"
+else
+ echo "#undef HAS_MBUF_MDROPS"
+fi
+if grep -q "sf_allocfail" /usr/include/sys/mbuf.h; then
+ echo "#define HAS_MBUF_SFALLOCFAIL 1"
+else
+ echo "#undef HAS_MBUF_SFALLOCFAIL"
+fi
+if ! grep -q "VM_TOTAL" /usr/include/vm/vm_param.h; then
+ echo "#define VM_TOTAL VM_METER"
+fi
+if grep -q "struct xswdev" /usr/include/vm/vm_param.h; then
+ echo "#define HAS_VM_NSWAPDEV 1"
+else
+ echo "#undef HAS_VM_NSWAPDEV"
+fi
if [ -f /usr/include/net/pfvar.h ]; then
echo "#define HAS_PFVAR_H 1"
else
echo "#undef HAS_PFVAR_H"
-fi;
-case `grep -cq "ki_paddr" /usr/include/sys/user.h` in
-1) echo "#define HAS_KI_PADDR 1" ;;
-0) echo "#undef HAS_KI_PADDR" ;;
-esac;
\ No newline at end of file
+fi
+if grep -q "ki_paddr" /usr/include/sys/user.h; then
+ echo "#define HAS_KI_PADDR 1"
+else
+ echo "#undef HAS_KI_PADDR"
+fi
+if grep -q "struct rusage_ext" /usr/include/sys/proc.h; then
+ echo "#define HAS_RUSAGE_EXT 1"
+else
+ echo "#undef HAS_RUSAGE_EXT"
+fi