[Check_mk (english)] Solaris check_mk_agent <<<zfs_arc_cache>>>

Matthew.Stier at us.fujitsu.com Matthew.Stier at us.fujitsu.com
Mon Feb 6 20:26:19 CET 2017

One of the biggest performance hits caused by the Solaris check_mk_agent script, is the invocation of 'mdb', and on pre-Solaris 11.3 systems, it is being invoked twice.

Here is a re-write of the zfs_arc_cache segment of the check_mk_agent script, choosing to use 'kstat' by default, and only falling back to 'mdb' if 'kstat' is not present.

echo '<<<zfs_arc_cache>>>'
if type kstat &>/dev/null
  kstat -p zfs:0:arcstats |
  sed -e 's/.*arcstats://g' |
  awk '{printf "%s = %s\n", $1, $2;}'
elif type mdb &>/dev/null
  echo '::arc' | mdb -k
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mathias-kettner.de/pipermail/checkmk-en/attachments/20170206/c6eab0ec/attachment.html>

More information about the checkmk-en mailing list