print MBean ObjectName

This commit is contained in:
Doug MacEachern 2008-10-09 04:45:36 +00:00
parent 5deb0a0c97
commit 9756e558fc
1 changed files with 5 additions and 1 deletions

View File

@ -17,6 +17,7 @@
package org.hyperic.sigar.cmd;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
@ -75,7 +76,10 @@ public class Mx extends SigarCommandBase {
try {
Set beans =
server.queryNames(new ObjectName("sigar:*"), null);
println(beans.size() + " MBeans are registered");
println(beans.size() + " MBeans are registered...");
for (Iterator it=beans.iterator(); it.hasNext();) {
println(it.next().toString());
}
} catch (Exception e) {
throw new SigarException(e.getMessage());
}