mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-23 06:35:42 +00:00
Light improvement in FreeBSD part of ps parsing
This commit is contained in:
parent
0ea6b7fa9c
commit
f0015e24e4
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ regex given as the process name, as reported by ps.
|
|||
#%# capabilities=autoconf
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
0.3 light improvement in FreeBSD part of ps parsing
|
||||
0.2 second release, it should now work on machines without GNU sed
|
||||
0.1 first release, based on:
|
||||
multimemory.in 1590 2008-04-17 18:21:31Z matthias
|
||||
|
@ -91,7 +91,7 @@ for name in $names; do
|
|||
printf "$fieldname.value "
|
||||
|
||||
if [ "$os" = "freebsd" ]; then
|
||||
ps auxww | grep -w $name | grep -v grep | sed -Ee 's/[ ]{1,}/ /g' | /usr/bin/cut -d ' ' -f 6 | /usr/bin/awk '{ total = total + $1 } END { print total * 1024 }'
|
||||
ps awxo rss,command | grep -w $name | grep -v grep | /usr/bin/awk '{ total += $1 } END { print total * 1024 }'
|
||||
else
|
||||
ps auxww | grep -w $name | grep -v grep | sed -re 's/[ ]{1,}/ /g' | /usr/bin/cut -d ' ' -f 6 | /usr/bin/awk '{ total = total + $1 } END { print total * 1024 }'
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue