Index: trunk/Ohana/src/opihi/pantasks/Makefile
===================================================================
--- trunk/Ohana/src/opihi/pantasks/Makefile	(revision 25953)
+++ trunk/Ohana/src/opihi/pantasks/Makefile	(revision 26411)
@@ -73,4 +73,8 @@
 $(SRC)/controller_status.$(ARCH).o \
 $(SRC)/controller_jobstack.$(ARCH).o \
+$(SRC)/controller_hoststack.$(ARCH).o \
+$(SRC)/controller_machines.$(ARCH).o \
+$(SRC)/controller_parameters.$(ARCH).o \
+$(SRC)/controller_version.$(ARCH).o \
 $(SRC)/controller_verbose.$(ARCH).o \
 $(SRC)/controller_run.$(ARCH).o \
Index: trunk/Ohana/src/opihi/pantasks/controller.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller.c	(revision 25953)
+++ trunk/Ohana/src/opihi/pantasks/controller.c	(revision 26411)
@@ -1,26 +1,36 @@
 # include "pantasks.h"
 
-int controller_host    	PROTO((int, char **));
-int controller_exit    	PROTO((int, char **));
-int controller_status  	PROTO((int, char **));
-int controller_jobstack PROTO((int, char **));
-int controller_verbose  PROTO((int, char **));
-int controller_run     	PROTO((int, char **));
-int controller_stop    	PROTO((int, char **));
-int controller_check   	PROTO((int, char **));
-int controller_output  	PROTO((int, char **));
-int controller_pulse   	PROTO((int, char **));
+int controller_host    	  PROTO((int, char **));
+int controller_exit    	  PROTO((int, char **));
+int controller_status  	  PROTO((int, char **));
+int controller_jobstack   PROTO((int, char **));
+int controller_hoststack  PROTO((int, char **));
+int controller_machines   PROTO((int, char **));
+int controller_parameters PROTO((int, char **));
+int controller_verbose    PROTO((int, char **));
+int controller_version    PROTO((int, char **));
+int controller_run     	  PROTO((int, char **));
+int controller_stop    	  PROTO((int, char **));
+int controller_check   	  PROTO((int, char **));
+int controller_output  	  PROTO((int, char **));
+int controller_pulse   	  PROTO((int, char **));
 
 static Command controller_cmds[] = {
-  {1, "exit",     controller_exit,     "shutdown controller"},
-  {1, "host",     controller_host,     "define host for controller"},
-  {1, "check",    controller_check,    "check controller host/job"},
-  {1, "run",      controller_run,      "start controller operation / set run levels"},
-  {1, "stop",     controller_run,      "stop controller (no disconnect)"},
-  {1, "status",   controller_status,   "check controller status"},
-  {1, "jobstack", controller_jobstack, "check controller status"},
-  {1, "verbose",  controller_verbose,  "set controller verbosity"},
-  {1, "output",   controller_output,   "print controller output"},
-  {1, "pulse",    controller_pulse,    "set controller pulse"},
+  {1, "check",     controller_check,      "check controller host/job"},
+  // {1, "delete",    controller_delete,   "delete job on controller"},
+  {1, "exit",      controller_exit,       "shutdown controller"},
+  {1, "host",      controller_host,       "define host for controller"},
+  {1, "hoststack", controller_hoststack,  "define host for controller"},
+  // {1, "job",       controller_job,      "add jobs to controller"},
+  {1, "jobstack",  controller_jobstack,   "check controller status"},
+  {1, "machines",  controller_machines,   "print controller machine status"},
+  {1, "parameters",controller_parameters, "modify controller parameters"},
+  {1, "output",    controller_output,     "print controller output"},
+  {1, "run",       controller_run,        "start controller operation / set run levels"},
+  {1, "status",    controller_status,     "check controller status"},
+  {1, "stop",      controller_run,        "stop controller (no disconnect)"},
+  {1, "verbose",   controller_verbose,    "set controller verbosity"},
+  {1, "version",   controller_version,    "show controller version"},
+  {1, "pulse",     controller_pulse,      "set controller pulse"},
 };
 
Index: trunk/Ohana/src/opihi/pantasks/controller_hoststack.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller_hoststack.c	(revision 26411)
+++ trunk/Ohana/src/opihi/pantasks/controller_hoststack.c	(revision 26411)
@@ -0,0 +1,35 @@
+# include "pantasks.h"
+
+int controller_hoststack (int argc, char **argv) {
+
+  int status;
+  char command[1024];
+  IOBuffer buffer;
+
+  if (argc != 2) {
+    gprint (GP_ERR, "USAGE: controller hoststack (hoststack)\n");
+    gprint (GP_ERR, "       (hoststack) : pending, busy, exit, crash, hung, done\n");
+    return (FALSE);
+  }
+
+  /* check if controller is running */
+  status = CheckControllerStatus ();
+  if (!status) {
+    gprint (GP_LOG, "controller is not active\n");
+    return (TRUE);
+  }
+
+  // XXX this has an error?  test this out...
+  sprintf (command, "hoststack %s", argv[1]);
+  InitIOBuffer (&buffer, 0x100);
+
+  status = ControllerCommand (command, CONTROLLER_PROMPT, &buffer);
+
+  if (status) {
+    gwrite (buffer.buffer, 1, buffer.Nbuffer, GP_LOG);
+  } else {
+    gprint (GP_LOG, "controller is not communicating\n");
+  }
+  FreeIOBuffer (&buffer);
+  return (TRUE);
+}
Index: trunk/Ohana/src/opihi/pantasks/controller_machines.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller_machines.c	(revision 26411)
+++ trunk/Ohana/src/opihi/pantasks/controller_machines.c	(revision 26411)
@@ -0,0 +1,35 @@
+# include "pantasks.h"
+
+int controller_machines (int argc, char **argv) {
+
+  int status;
+  char command[1024];
+  IOBuffer buffer;
+
+  if (argc != 1) {
+    gprint (GP_ERR, "USAGE: controller machines\n");
+    gprint (GP_ERR, "       prints status of controller machines\n");
+    return (FALSE);
+  }
+
+  /* check if controller is running */
+  status = CheckControllerStatus ();
+  if (!status) {
+    gprint (GP_LOG, "controller is not active\n");
+    return (TRUE);
+  }
+
+  // XXX this has an error?  test this out...
+  sprintf (command, "machines");
+  InitIOBuffer (&buffer, 0x100);
+
+  status = ControllerCommand (command, CONTROLLER_PROMPT, &buffer);
+
+  if (status) {
+    gwrite (buffer.buffer, 1, buffer.Nbuffer, GP_LOG);
+  } else {
+    gprint (GP_LOG, "controller is not communicating\n");
+  }
+  FreeIOBuffer (&buffer);
+  return (TRUE);
+}
Index: trunk/Ohana/src/opihi/pantasks/controller_parameters.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller_parameters.c	(revision 26411)
+++ trunk/Ohana/src/opihi/pantasks/controller_parameters.c	(revision 26411)
@@ -0,0 +1,46 @@
+# include "pantasks.h"
+
+int controller_parameters (int argc, char **argv) {
+
+  int status;
+  char command[1024];
+  IOBuffer buffer;
+
+  if (argc < 2) goto usage;
+  if (argc > 4) goto usage;
+  if (argc == 3) goto usage;
+  if ((argc == 4) && strcmp(argv[2], "=")) goto usage;
+
+  /* check if controller is running */
+  status = CheckControllerStatus ();
+  if (!status) {
+    gprint (GP_LOG, "controller is not active\n");
+    return (TRUE);
+  }
+
+  // XXX this has an error?  test this out...
+  if (argc == 2) {
+    sprintf (command, "parameters %s", argv[1]);
+  } else {
+    sprintf (command, "parameters %s = %s", argv[1], argv[3]);
+  }
+  InitIOBuffer (&buffer, 0x100);
+
+  status = ControllerCommand (command, CONTROLLER_PROMPT, &buffer);
+
+  if (status) {
+    gwrite (buffer.buffer, 1, buffer.Nbuffer, GP_LOG);
+  } else {
+    gprint (GP_LOG, "controller is not communicating\n");
+  }
+  FreeIOBuffer (&buffer);
+  return (TRUE);
+
+  usage:
+
+  gprint (GP_LOG, "USAGE: controller parameters (param) [= value])\n");
+  gprint (GP_LOG, "  valid parameters: connect_time, wanthost_wait, unwanted_host_jobs\n");
+  gprint (GP_LOG, "  (minimum matching word is allowed)\n");
+  gprint (GP_LOG, "  example: controller parameters connect = 2.0\n");
+  return (FALSE);
+}
Index: trunk/Ohana/src/opihi/pantasks/controller_version.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller_version.c	(revision 26411)
+++ trunk/Ohana/src/opihi/pantasks/controller_version.c	(revision 26411)
@@ -0,0 +1,34 @@
+# include "pantasks.h"
+
+int controller_version (int argc, char **argv) {
+
+  int status;
+  char command[1024];
+  IOBuffer buffer;
+
+  if (argc != 1) {
+    gprint (GP_ERR, "USAGE: controller version\n");
+    return (FALSE);
+  }
+
+  /* check if controller is running */
+  status = CheckControllerStatus ();
+  if (!status) {
+    gprint (GP_LOG, "controller is not active\n");
+    return (TRUE);
+  }
+
+
+  sprintf (command, "version");
+  InitIOBuffer (&buffer, 0x100);
+
+  status = ControllerCommand (command, CONTROLLER_PROMPT, &buffer);
+
+  if (status) {
+    gwrite (buffer.buffer, 1, buffer.Nbuffer, GP_LOG);
+  } else {
+    gprint (GP_LOG, "controller is not communicating\n");
+  }
+  FreeIOBuffer (&buffer);
+  return (TRUE);
+}
