This page is no longer maintained, back to sewell.org.
funcshell took a similar approach to features as Func; it allows developers to easily extend and customize its functionality using a plugin system. It also assumes the most useful commands will be the ones you write yourself. That being said, funcshell currently comes with both the command and service module.
Here are some things you can do with funcshell.
Get a list of all clients (not very useful if you have hundreds):
funcshell> set clients *
funcshell> get clients
webapp001.example.net
webapp002.example.net
webapp003.example.net
webstatic001.example.net
webstatic002.example.net
Assuming webapp00[1-3].example.net are in the app and bpstatic00[1-2].example.net1 are in the static groups; remove some clients and restart a service:
funcshell> set clients - @static;webapp001*
funcshell> get clients
webapp002.example.net
webapp003.example.net
funcshell> service httpd restart
==> webapp003.example.net <==
True
==> webapp002.example.net <==
True
Run a command and get the results:
funcshell> set clients - webapp003*
funcshell> set clients + webstatic002*
funcshell> command run grep MemTotal /proc/meminfo | awk '{ print $2/1024 }'
==> webstatic002.example.net :: 0 <==
4099.44
==> webapp002.example.net :: 0 <==
8198.88
Get help:
funcshell> command <TAB><TAB>
exists run shell
funcshell> command ?
exists Check if a command exists
run Run a command
shell Run a command shell
Run a couple of commands in a row:
funcshell> set c<TAB> @static
funcshell> command shell
> du -sh /tmp
==> webstatic002.example.net :: 0 <==
7.2M /tmp
==> webstatic001.example.net :: 0 <==
3.4M /tmp
> cp -r /tmp /tmp
==> webstatic002.example.net :: 1 <==
cp: cannot copy a directory, '/tmp', into itself, '/tmp/tmp'
==> webstatic001.example.net :: 1 <==
cp: cannot copy a directory, '/tmp', into itself, '/tmp/tmp'
> asdf
==> webstatic002.example.net :: 127 <==
/bin/sh: asdf: command not found
==> webstatic001.example.net :: 127 <==
/bin/sh: asdf: command not found
> <CTRL-D>
funcshell> exit
[funcshell][funcshell] is a shell interface to [Func][func] which provides some useful features for managing a large number of machines. [funcshell]: http://github.com/silas/funcshell “funcshell” [func]: https://fedorahosted.org/func/ “func”
Posted on Apr 22, 2009
Licensing information is available on the about page, for additional questions or comments feel free to contact me.