func-command: handy in a pinch

January 26, 2011

during our outage and other fun on sunday/monday in fedora I had call to use func-command to give me some info. Thought I’d post that here.

needed to find all the hosts that were mounting a certain machine via nfs:

func-command ‘grep /proc/mounts’

returned that quickly.

ditto with finding out which systems were mounting it via iscsi.

Now – the objection here is ‘can’t you do this with ssh?’. That’s true except with ssh for many of the commands I would need to:

1. enable ssh as root or  sudo first and muck with all that

2. and then parse that all back.

func-command handles that for me.

Also func records all the commands it runs in its audit log:

2011-01-23 22:45:54,966 – puppet1 3550176746 called with (‘grep /proc/mounts’,)

Thought it was cool and that I would mention it.



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

%d bloggers like this: