FreeBSD 8.1 and df

I had already pointed to the freebsd check_mk agent and it seems to not have any big-time bugs.

Im my last discussion with Mathias Kettner he advised me to not overdo the compatibility with the linux agent.

The reasoning is: rather write a new check for FreeBSD that knows freebsd well than stack awks to the sky for a check that tries to look like Linux.

Well, one thing came up even with the df check now.

On FreeBSD below 8.0 or 8.1 you can’t use df -kTP -t ufs to echo out the FS type like the linux agent does (which is a total non-posix option 😉

Normal df will work and then you’ll have to change your agent to rewrite it to contain the “ufs” fs type.

df -kP -t ufs | egrep -v ‘(Filesystem|devfs|procfs|fdescfs|basejail)’ | \

awk ‘{print $1″ ufs “$2” “$3” “$4” “$5” “$6}’

Alternative options:

  • Patch the agent to check for the options availability
  • Don’t use -T -t ufs, but just use -t use and hardwire the (known!) fs type into the output
  • Upgrade your world to FreeBSD 8 (i like that one)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s