Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 573451 Details for
Bug 807828
JMX Plugin - Unable to attach to jsvc.exec process; command line not available
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Java program
Test.java (text/plain), 2.29 KB, created by
Elias Ross
on 2012-03-28 20:33:03 UTC
(
hide
)
Description:
Java program
Filename:
MIME Type:
Creator:
Elias Ross
Created:
2012-03-28 20:33:03 UTC
Size:
2.29 KB
patch
obsolete
> >import java.util.*; >import java.net.*; >import com.sun.tools.attach.AgentInitializationException; >import com.sun.tools.attach.AgentLoadException; >import com.sun.tools.attach.AttachNotSupportedException; >import com.sun.tools.attach.VirtualMachine; >import com.sun.tools.attach.VirtualMachineDescriptor; >import com.sun.tools.attach.spi.AttachProvider; >import sun.jvmstat.monitor.HostIdentifier; >import sun.jvmstat.monitor.MonitorException; >import sun.jvmstat.monitor.MonitoredHost; >import sun.jvmstat.monitor.MonitoredVm; >import sun.jvmstat.monitor.MonitoredVmUtil; >import sun.jvmstat.monitor.VmIdentifier; >import sun.jvmstat.monitor.Monitor; >import sun.management.ConnectorAddressLink; > >public class Test { > > public static void main(String arg[]) { > MonitoredHost monitoredhost; > Set set; > try { > monitoredhost = MonitoredHost.getMonitoredHost(new HostIdentifier((String) null)); > set = monitoredhost.activeVms(); > } > catch (URISyntaxException urisyntaxexception) { > throw new InternalError(urisyntaxexception.getMessage()); > } > catch (MonitorException monitorexception) { > throw new InternalError(monitorexception.getMessage()); > } > > Iterator iterator = set.iterator(); > while (iterator.hasNext()) { > Object obj = iterator.next(); > if (obj instanceof Integer) { > int i = ((Integer) obj).intValue(); > String s = obj.toString(); > boolean flag = false; > String s1 = null; > try { > MonitoredVm monitoredvm = monitoredhost.getMonitoredVm(new VmIdentifier(s)); > List<Monitor> l = monitoredvm.findByPattern(".*"); > for (Monitor m : l) { > System.out.println("> " + m.getName() + " " + m.getValue()); > } > s = MonitoredVmUtil.commandLine(monitoredvm); > flag = MonitoredVmUtil.isAttachable(monitoredvm); > s1 = ConnectorAddressLink.importFrom(i); > monitoredvm.detach(); > } > catch (Exception exception) { > } > System.out.println(obj + " " + i + " cl[" + s + "] " + flag + " " + s1); > } > } > } >} > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 807828
: 573451