Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8807185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:18:28+00:00 2026-06-14T02:18:28+00:00

I want to write app in java which will get info about processes and

  • 0

I want to write app in java which will get info about processes and threads running on Jboss JVM (%cpu usage, memory etc.). I also want to find info about memory usage and other important things in JVM (JBoss). How to write it in pure java?

I know about things like JConsole, but I need to write it by myself. I’ve found java.lang.managament interface which gives some information about system, memory etc, but not all needed information are provided. For example I’d like to have opportunity read cpu usage (not cpu time) and memory used by every thread. (something like top command in bash, but I need to make it in java).

Any help?

EDIT: Eventually I can use some libraries to get this info.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:18:29+00:00Added an answer on June 14, 2026 at 2:18 am

    The JBoss AS 7 provide different management interfaces. All the management interfaces based on the Detyped Management representation (jboss-dmr).

    You can implemet a custom Java client with the jboss-dmr library and the jboss-as-controller-client. For an example, see our github repository.

    To get information about the JVM and other stuff, you need to implement the following operation:

    ModelNode operation = new ModelNode();
    operation.get("operation").set("read-resource");
    operation.get("recursive").set(true);
    operation.get("include-runtime").set(true);
    ModelNode address = operation.get("address");
    address.add("core-service", "platform-mbean");
    

    Alternatively, you can also use the PlatformMBeanServer:

        //Get a connection to the JBoss AS MBean server on localhost
        String host = "localhost";
        int port = 9999;  // management-native port
        String urlString = "service:jmx:remoting-jmx://" + host + ":" + port;
        JMXServiceURL serviceURL = new JMXServiceURL(urlString);
        JMXConnector jmxConnector = JMXConnectorFactory.connect(serviceURL, null);
        MBeanServerConnection connection = jmxConnector.getMBeanServerConnection();
    
        //Invoke on the JBoss AS MBean server
        connection.getObjectInstance(new ObjectName("java.lang:type=Threading"));
        //...
        jmxConnector.close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write a Java code, which will send a simple text file
I want to write application on android and windows which will use bluetooth. In
I'd like to write a Java app which can create executable jars at runtime.
I have Java console app, which i want to control from another computer. I
I want to write an app to transpose the key a wav file plays
Suppose I want to write an app for Android OS that is not going
Let's say I want to write a poker app for Android. It is fine
I want to write a file on my iPhone app. My file is in
I want to write a small Android app with a GUI that should display
I want to write a media management Metro app for windows 8 and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.