title: how to list glassfish instances?
body: <p>I have a glassfish domain running, but I cannot get the PID of the associated java process, is this broken or am I doing something wrong?  I have FreeBSD 10.1, OpenJDK 1.7.0, and Glassfish 4.1.</p>
  
  <pre><code>$ asadmin list-domains -l
  DOMAIN   ADMIN_HOST  ADMIN_PORT  RUNNING  RESTART_REQUIRED
  domain1  127.0.0.1   4848        true     false
  Command list-domains executed successfully.
  $ asadmin list-instances -l
  Nothing to list.
  Command list-instances executed successfully.
  </code></pre>
  
  <p>I can do <code>jps -v</code>, but with that I am not 100% sure the listed PID is my glassfish server...</p>
  
  <pre><code>$ jps -v
  62737 Jps -Dapplication.home=/usr/local/openjdk7 -Xms8m
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Ok. the <code>jps</code> command is definitely not what I want - that is just showing itself.  Also I tried</p>
  
  <pre><code>$ asadmin list-instances -l domain1
  remote failure: The target, domain1, is not an instance, cluster, domain, node or config.
  Command list-instances failed.
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$ asadmin list-instances -l 127.0.0.1
  remote failure: The target, 127.0.0.1, is not an instance, cluster, domain, node or config.
  Command list-instances failed.
  </code></pre>