changeset 83:3635aea515f6

updating output texts and format of data in scripts with db commands
author Jana Fabrikova <jfabriko@redhat.com>
date Tue, 06 Aug 2013 10:44:08 +0200
parents 3eaf72da3c84
children 41fbd73e0c2f
files ChangeLog outputtexts/version3/output_of_exit_therm_shell.txt outputtexts/version3/output_of_help_therm_shell.txt outputtexts/version3/thermostat.txt outputtexts/version3/thermostat_help.txt outputtexts/version3/thermostat_help_agent.txt outputtexts/version3/thermostat_help_connect.txt outputtexts/version3/thermostat_help_disconnect.txt outputtexts/version3/thermostat_help_dump-heap.txt outputtexts/version3/thermostat_help_find-objects.txt outputtexts/version3/thermostat_help_find-root.txt outputtexts/version3/thermostat_help_gui.txt outputtexts/version3/thermostat_help_list-heap-dumps.txt outputtexts/version3/thermostat_help_list-vms.txt outputtexts/version3/thermostat_help_object-info.txt outputtexts/version3/thermostat_help_ping.txt outputtexts/version3/thermostat_help_save-heap-dump-to-file.txt outputtexts/version3/thermostat_help_service.txt outputtexts/version3/thermostat_help_shell.txt outputtexts/version3/thermostat_help_show-heap-histogram.txt outputtexts/version3/thermostat_help_storage.txt outputtexts/version3/thermostat_help_vm-info.txt outputtexts/version3/thermostat_help_vm-stat.txt outputtexts/version3/thermostat_help_webservice.txt scripts/.attach_pid25006 scripts/add_vm2.sh scripts/add_vm_db_commands2.txt src/org/thermostat/qa/testsuites/CliClientDBModificationsSmokeTest.java
diffstat 27 files changed, 288 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jul 17 17:52:14 2013 +0200
+++ b/ChangeLog	Tue Aug 06 10:44:08 2013 +0200
@@ -1,3 +1,12 @@
+2013-08-06  Jana Fabrikova  <jfabriko@redhat.com>
+	* outputtexts/version3:
+	new version of output texts
+	* src/org/thermostat/qa/testsuites/CliClientDBModificationsSmokeTest.java:
+	using new scripts for adding the data into database
+	* scripts/add_vm2.sh:
+	* scripts/add_vm_db_commands2.txt:
+	updated scripts for new data format in db
+
 2013-07-17  Jana Fabrikova  <jfabriko@redhat.com>
 	* src/org/thermostat/qa/framework/ThermostatTest.java:
 	added method (checkPresenceOfPatterns)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/output_of_exit_therm_shell.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,3 @@
+Thermostat version 0.12.0
+Thermostat > exit
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/output_of_help_therm_shell.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,22 @@
+Thermostat version 0.12.0
+Thermostat > help
+list of commands:
+
+ help                   show help for a given command or help overview
+ clean-history          Drop all data related to all of the specified agents
+ 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
+ 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
+ show-heap-histogram    show the heap histogram
+ validate               validates a thermostat plug-in XML file against the schema
+ vm-info                shows basic information about a VM
+ vm-stat                show various statistics about a VM
+Thermostat > exit
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,22 @@
+list of commands:
+
+ help                   show help for a given command or help overview
+ agent                  starts and stops the thermostat agent
+ clean-history          Drop all data related to all of the specified agents
+ 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
+ validate               validates a thermostat plug-in XML file against the schema
+ vm-info                shows basic information about a VM
+ vm-stat                show various statistics about a VM
+ webservice             starts and stops the thermostat web service
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,22 @@
+list of commands:
+
+ help                   show help for a given command or help overview
+ agent                  starts and stops the thermostat agent
+ clean-history          Drop all data related to all of the specified agents
+ 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
+ validate               validates a thermostat plug-in XML file against the schema
+ vm-info                shows basic information about a VM
+ vm-stat                show various statistics about a VM
+ webservice             starts and stops the thermostat web service
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_agent.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,10 @@
+usage: thermostat agent [-d <url>] [-s] [-l <level>]
+                  starts and stops the thermostat agent
+
+thermostat agent
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
+  -s,--saveOnExit             save the data on exit
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_connect.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,9 @@
+usage: thermostat connect -d <url> [-l <level>]
+                  persistently connect to storage
+Note: this command is only supported inside the shell
+thermostat connect
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_disconnect.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,8 @@
+usage: thermostat disconnect [-l <level>]
+                  disconnect from the currently used storage
+Note: this command is only supported inside the shell
+thermostat disconnect
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_dump-heap.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,12 @@
+usage: thermostat dump-heap --vmId <vm> --hostId <host> [--dbUrl <dbUrl>]
+                  [--logLevel <logLevel>]
+                  trigger a heap dump on the VM
+
+thermostat dump-heap
+  -a,--hostId <host>          the ID of the host to monitor
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
+  -v,--vmId <vm>              the ID of the VM to monitor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_find-objects.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,12 @@
+usage: thermostat find-objects --heapId <heap> [--dbUrl <dbUrl>] [--limit
+                  <limit>] [--logLevel <logLevel>] pattern
+                  finds objects in a heapdump
+
+thermostat find-objects
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -h,--heapId <heap>          the ID of the heapdump to analyze
+  -L,--limit <limit>          limit search to top N results, defaults to 10
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_find-root.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,13 @@
+usage: thermostat find-root --objectId <heap> --heapId <heap> [--dbUrl <dbUrl>]
+                  [--all] [--logLevel <logLevel>]
+                  finds the shortest path from an object to a GC root
+
+thermostat find-root
+  -a,--all                    finds all paths to GC roots
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -h,--heapId <heap>          the ID of the heapdump to analyze
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
+  -o,--objectId <heap>        the ID of the object to query
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_gui.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,8 @@
+usage: thermostat gui [-l <level>]
+                  launches the GUI client
+
+thermostat gui
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_list-heap-dumps.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,12 @@
+usage: thermostat list-heap-dumps [--vmId <vm>] [--dbUrl <dbUrl>] [--hostId
+                  <host>] [--logLevel <logLevel>]
+                  list all heap dumps
+
+thermostat list-heap-dumps
+  -a,--hostId <host>          the ID of the host to monitor
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
+  -v,--vmId <vm>              the ID of the VM to monitor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_list-vms.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,9 @@
+usage: thermostat list-vms [-d <url>] [-l <level>]
+                  lists all currently monitored VMs
+
+thermostat list-vms
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_object-info.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,12 @@
+usage: thermostat object-info --objectId <object> --heapId <heap> [--dbUrl
+                  <dbUrl>] [--logLevel <logLevel>]
+                  prints information about an object in a heap dump
+
+thermostat object-info
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -h,--heapId <heap>          the ID of the heapdump to analyze
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
+  -o,--objectId <object>      the ID of the object to query
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_ping.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,9 @@
+usage: thermostat ping <agentId> [-d <url>] [-l <level>]
+                  using the Command Channel, send a ping to a running agent
+
+thermostat ping
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_save-heap-dump-to-file.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,12 @@
+usage: thermostat save-heap-dump-to-file --file <filename> --heapId <heap>
+                  [--dbUrl <dbUrl>] [--logLevel <logLevel>]
+                  saves a heap dump to a local file
+
+thermostat save-heap-dump-to-file
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -f,--file <filename>        the file name to save to
+  -h,--heapId <heap>          the ID of the heapdump to analyze
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_service.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,8 @@
+usage: thermostat service [-l <level>]
+                  starts and stops the thermostat storage and agent
+
+thermostat service
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_shell.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,5 @@
+usage: thermostat shell
+                  launches the Thermostat interactive shell
+
+thermostat shell
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_show-heap-histogram.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,11 @@
+usage: thermostat show-heap-histogram --heapId <heap> [--dbUrl <dbUrl>]
+                  [--logLevel <logLevel>]
+                  show the heap histogram
+
+thermostat show-heap-histogram
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -h,--heapId <heap>          the ID of the heapdump to analyze
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_storage.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,13 @@
+usage: thermostat storage <--start|--stop|--status> [--dryRun] [-q] [-l <level>]
+                  starts and stops the thermostat storage
+
+thermostat storage
+  -d,--dryRun                 run the service in dry run mode
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
+  -q,--quiet                  don't produce any output
+     --start                  start the database
+     --status                 check if the database is running
+     --stop                   stop the database
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_vm-info.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,12 @@
+usage: thermostat vm-info [--vmId <vm>] [--hostId <host>] [-d <url>] [-l
+                  <level>]
+                  shows basic information about a VM
+
+thermostat vm-info
+  -a,--hostId <hostId>        the ID of the host to monitor
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
+  -v,--vmId <vmId>            the ID of the VM to monitor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_vm-stat.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,12 @@
+usage: thermostat vm-stat --hostId <host> --vmId <vm> [-d <url>] [-l <level>]
+                  show various statistics about a VM
+
+thermostat vm-stat
+  -a,--hostId <hostId>        the ID of the host to monitor
+  -c,--continuous             print data continuously
+  -d,--dbUrl <dbUrl>          connect to the given URL
+  -l,--logLevel <logLevel>    sets the log level for this invocation. Possible
+                              values for <logLevel> in decreasing severity are:
+                              SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
+                              and OFF
+  -v,--vmId <vmId>            the ID of the VM to monitor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/outputtexts/version3/thermostat_help_webservice.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,12 @@
+usage: thermostat webservice -d <url> -b <addrs> [-l <level>]
+                  starts and stops the thermostat web service
+
+thermostat webservice
+  -b,--bindAddrs <bindAddrs>    A comma separated list of IP address, port pairs
+                                used for binding (e.g.
+                                127.0.0.1:8888,127.0.0.1:8889)
+  -d,--dbUrl <dbUrl>            connect to the given URL
+  -l,--logLevel <logLevel>      sets the log level for this invocation. Possible
+                                values for <logLevel> in decreasing severity
+                                are: SEVERE, WARNING, INFO, CONFIG, FINE, FINER,
+                                FINEST and OFF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/add_vm2.sh	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,1 @@
+mongo --port `cat scripts/mongoPortNumber.txt` < scripts/add_vm_db_commands2.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/add_vm_db_commands2.txt	Tue Aug 06 10:44:08 2013 +0200
@@ -0,0 +1,7 @@
+use thermostat
+db
+db["host-info"].insert({ "agentId" : "non-existing-agent-no1", "hostname" : "artif.added.host0.name" })
+db["vm-info"].insert({ "agentId" : "non-existing-agent-no1", "environmentAsArray" : [ { "key" : "HOSTNAME", "value" : "artif.added.host0.name" } ], "startTimeStamp" : NumberLong("1234567891011"),  "stopTimeStamp" : NumberLong("-9223372036854775808"), "vmId" : "12345", "vmPid" : NumberInt("12345") })
+db["vm-info"].find()
+exit
+
--- a/src/org/thermostat/qa/testsuites/CliClientDBModificationsSmokeTest.java	Wed Jul 17 17:52:14 2013 +0200
+++ b/src/org/thermostat/qa/testsuites/CliClientDBModificationsSmokeTest.java	Tue Aug 06 10:44:08 2013 +0200
@@ -80,8 +80,8 @@
      * This method uses scripts and files 
      * <ul>
      * <li><a href="scripts/find_mongo_port.sh">find_mongo_port.sh</a>,
-     * <li><a href="scripts/add_vm.sh">add_vm.sh</a>,
-     * <li><a href="scripts/add_vm_db_commands.txt">add_vm_db_commands.txt</a>, 
+     * <li><a href="scripts/add_vm.sh">add_vm2.sh</a>,
+     * <li><a href="scripts/add_vm_db_commands.txt">add_vm_db_commands2.txt</a>, 
      * <li><a href="scripts/list-vms_therm_shell.txt">list-vms_therm_shell.txt</a>,
      * <li><a href="scripts/delete_added_vm.sh">delete_added_vm.sh</a>,
      * <li><a href="scripts/remove_vm_db_commands.txt">remove_vm_db_commands.txt</a>
@@ -104,7 +104,7 @@
         {
             logInfo("run", "Finding mongo port: " +  s);
         }
-        output1 = runHelperBashScript("add_vm.sh");
+        output1 = runHelperBashScript("add_vm2.sh");
         for (String s : output1)
         {
             logInfo("run", "Adding vm to mongo: " +  s);