From Fedora Project Wiki

Revision as of 13:59, 22 May 2013 by Jerboaa (talk | contribs)


This test case tests that the thermostat shell works correctly. This command provides a command line shell client for interacting with thermostat.


  1. Boot into the machine/VM you wish to test.
  2. If thermostat is not installed yet, install thermostat.
  3. Clear storage data: rm -rf ~/.thermostat/storage/db/*
  4. Start the thermostat storage: thermostat storage --start

How to test

  1. Start the thermostat shell: thermostat shell
  2. At the "Thermostat >" prompt type "help". This should show the list of all available commands. Feel free to use any of these after step 4 (otherwise these would be pretty boring ;-))
  3. Pressing the cursor up key should bring up the history. In this case "help". Other known shell keyboard shortcuts should work too: e.g. CTRL+L
  4. Next type "list-vms".
  5. In another terminal, start a thermostat agent: thermostat agent
  6. At the "Thermostat >" prompt type "list-vms" again.
  7. connect -d
  8. disconnect
  9. connect -d mongodb://
  10. Press CTRL+D

Expected Results

  1. After step 1, your terminal should look similar to the following:


  1. After step 2 available commands should be:
 help                   show help for a given command or help overview
 agent                  starts and stops the thermostat agent
 connect                persistently connect to storage
 disconnect             disconnect from the currently used storage
 dump-heap              trigger a heap dump on the VM
 find-objects           finds objects in a heapdump
 find-root              finds the shortest path from an object to a GC root
 gui                    launches the GUI client
 list-heap-dumps        list all heap dumps
 list-vms               lists all currently monitored VMs
 object-info            prints information about an object in a heap dump
 ping                   using the Command Channel, send a ping to a running agent
 save-heap-dump-to-file saves a heap dump to a local file
 service                starts and stops the thermostat storage and agent
 shell                  launches the Thermostat interactive shell
 show-heap-histogram    show the heap histogram
 storage                starts and stops the thermostat storage
 vm-info                shows basic information about a VM
 vm-stat                show various statistics about a VM
  1. After step 3 the output should look like:
  1. At step 5 the output of list-vms should show some JVMs
  2. At step 6 step thermostat should report that it is already connected to storage. This is because some commands try to automatically connect to some pre-configured storage URL (which may fail in some cases):
Already connected to storage: URL = mongodb://
Please use disconnect command to disconnect.
  1. At step 7 no errors/exceptions are expected.
  2. At step 8 connect should have succeeded this time around
  3. The last step should exit the shell without errors/exceptions.