summaryrefslogtreecommitdiff
path: root/sysutils/munin-node/files
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2008-10-15 13:13:09 +0000
committerhe <he@pkgsrc.org>2008-10-15 13:13:09 +0000
commitc2c18a008e19188fb1c1846258ab5e5fdf286b0a (patch)
treec62753b83653e7439be3430a042c24d509969fb7 /sysutils/munin-node/files
parent3b5d0c70a5f6ee975b060d1188aa7b6539e36245 (diff)
downloadpkgsrc-c2c18a008e19188fb1c1846258ab5e5fdf286b0a.tar.gz
Convert from using an input-less awk job (how did that ever work?)
to using shell arithmetic, which should be more light-weight and should not pose a danger of hanging.
Diffstat (limited to 'sysutils/munin-node/files')
-rwxr-xr-xsysutils/munin-node/files/node/node.d.netbsd/open_files.in11
1 files changed, 7 insertions, 4 deletions
diff --git a/sysutils/munin-node/files/node/node.d.netbsd/open_files.in b/sysutils/munin-node/files/node/node.d.netbsd/open_files.in
index 5ed473ba126..f8d5349e838 100755
--- a/sysutils/munin-node/files/node/node.d.netbsd/open_files.in
+++ b/sysutils/munin-node/files/node/node.d.netbsd/open_files.in
@@ -8,6 +8,11 @@
# autoconf (optional - used by munin-config)
#
# $Log: open_files.in,v $
+# Revision 1.2 2008/10/15 13:13:09 he
+# Convert from using an input-less awk job (how did that ever work?)
+# to using shell arithmetic, which should be more light-weight and should
+# not pose a danger of hanging.
+#
# Revision 1.1.1.1 2006/06/04 20:53:57 he
# Import the client version of the Munin system monitoring/graphing
# tool -- project homepage is at http://munin.sourceforge.net/
@@ -67,10 +72,8 @@ if [ "$1" = "config" ]; then
echo 'max.label max open files'
echo 'max.info The maximum supported number of open files.'
- awk -v filemax=$filemax '{
- printf "used.warning %d\n", $filemax * 0.92;
- printf "used.critical %d\n", $filemax * 0.98;
-}'
+ echo "used.warning $(($filemax * 92/100))"
+ echo "used.critical $(($filemax * 98/100))"
exit 0
fi