Jared Ottley has a cool post on using jmxterm from CyclopsGroups.org. It lets you query and operate on Alfresco’s JMX beans from the command line. One of the examples he gives uses JMX to show how many users are logged in to Alfresco, a list of the logged in users, and then how to log off a specific user.
I used this recently to query the state of an Open Office process and then to restart the Open Office converter. It worked great.
JMX is only available in the Enterprise version of Alfresco.