Examples of HotSpotDiagnosticMXBean


Examples of com.sun.management.HotSpotDiagnosticMXBean

          {
            boolean live = (args.length == 2) && !args[1].isEmpty() && (args[1].equals("live") || args[1].equals("l"));
            new File("dumps").mkdir();
            String filename = "dumps/HeapDump" + (live ? "Live" : "") + "-" + new SimpleDateFormat("MMddHHmmss").format(System.currentTimeMillis()) + ".hprof";
            MBeanServer server = ManagementFactory.getPlatformMBeanServer();
            HotSpotDiagnosticMXBean bean = ManagementFactory.newPlatformMXBeanProxy(server, "com.sun.management:type=HotSpotDiagnostic", HotSpotDiagnosticMXBean.class);
            bean.dumpHeap(filename, live);
            sb.append("Heap dumped.\n");
          }
          catch (IOException e)
          {
            sb.append("Exception: " + e.getMessage() + "!\n");
View Full Code Here

Examples of com.sun.management.HotSpotDiagnosticMXBean

  private static HotSpotDiagnosticMXBean getHotspotMBean()
  {
    try
    {
      MBeanServer server = ManagementFactory.getPlatformMBeanServer();
      HotSpotDiagnosticMXBean bean = ManagementFactory.newPlatformMXBeanProxy(server, "com.sun.management:type=HotSpotDiagnostic", HotSpotDiagnosticMXBean.class);
      return bean;
    }
    catch(RuntimeException re)
    {
      throw re;
View Full Code Here

Examples of com.sun.management.HotSpotDiagnosticMXBean

  // get the hotspot diagnostic MBean from the
  // platform MBean server
  private static HotSpotDiagnosticMXBean getHotspotMBean() {
    try {
      MBeanServer server = ManagementFactory.getPlatformMBeanServer();
      HotSpotDiagnosticMXBean bean = ManagementFactory
          .newPlatformMXBeanProxy(server, HOTSPOT_BEAN_NAME,
              HotSpotDiagnosticMXBean.class);
      return bean;
    } catch (RuntimeException re) {
      throw re;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.