Home > java > Delving deeper into Jconsole and VisualVm

Delving deeper into Jconsole and VisualVm

Jconsole and visual VM help monitor java applications in any environment. Here are a few additional details that can help you monitor your java applications better

Jconsole and permissions:

Jconsole lists the PIDs of local java applications when you start it. But what if there are java applications that are running under a different user ? Jconsole will not display those java PIDs that do not belong to the user who started Jconsole. The JConsole FAQ lists a few troubleshooting tips to get around this problem. You can alternatively expose the Jconsole connection through a remote port using the -Dcom.sun.management.jmxremote.port property. Securing the remote JMX URL with a username and password should do the trick.

Viewing Jconsole / JMC Beans with VisualVm:

While it is great that you can profile your applications on VisualVm, some users miss some of the features provided by Jconsole such as viewing JMX beans etc. You can use the Tools -> Plugins option in VisualVm to install Jconsole / Jmx or related plugins. There is of course the option of writing a custom plugin to display more information. This article already explains how to go about writing a custom plugin.

OQL Plugin:

There are some cool plugins on the way for visual VM. One of them is support for OQL syntax. The language allows you to go through objects on the heap based on a selection criteria. You can use jhat and jmap to get a feel for what the language is like. The syntax is already supported on the existing heap dump analyzers.

Performance:

Switching on jconsole monitoring in production is a bad idea. The article linked on the last sentence made a performance comparison around 2006, so here is a more recent comparison running a java program which solves the FoxSequence problem (a problem at topcoder.com) 1000000 times. The overhead is highlighted by the orange area. The difference represents overhead in milli seconds.

jconsole overhead

The average overhead comes to around ~7% when calculated across several trials. The question to ask though is ’7% of what ?’. For applications that take on huge traffic, an overhead of 7% spread across millions of transactions is costly. The overhead % itself may vary for your application based on a variety of factors.

Take these factors into consideration the next time you profile / monitor java apps.





Categories: java Tags: , ,
  1. August 30th, 2011 at 09:43 | #1

    Of course, what a fantastic blog and instructive posts, I will bookmark your website.All the Best!

  2. May 14th, 2014 at 06:03 | #2

    Thank you, I’ve just been looking for information approximately this subject for ages
    and yours is the greatest I have came upon till now.
    But, what in regards to the bottom line? Are you sure in regards to the supply?

  3. May 29th, 2014 at 03:21 | #3

    Excellent article. Keep writing such kind of info on your blog.
    Im really impressed by it.
    Hey there, You have performed an incredible job.
    I’ll certainly digg it and inn my opinon suggest to my friends.
    I’m sure they’ll be benefited from this site.

  4. May 29th, 2014 at 05:23 | #4

    It is in reality a great and useful piece
    of info. I’m happy that you just shared this useful info with us.
    Please stay us up to date like this. Thanks for sharing.

  5. June 2nd, 2014 at 13:21 | #5

    After checking out a number of the blog articles on your blog, I really like your
    way of blogging. I added it to my bookmark site list and will be checking
    back in the near future. Please check out my
    web site as well and tell me how you feel.

  6. June 2nd, 2014 at 16:13 | #6

    You have some really interesting info here, well written and your website is user-friendly.

  7. June 3rd, 2014 at 21:29 | #7

    Hello are using WordPress for your blog platform?
    I’m new to the blog world but I’m trying to get started and create my own. Do you
    require any coding knowledge to make your own blog? Any help would be
    greatly appreciated!

  8. June 4th, 2014 at 01:04 | #8

    Hey! This post could not be written any better! Reading through this post reminds me of my old room mate!
    He always kept talking about this. I will forward this article to him.
    Fairly certain he will have a good read. Many thanks for sharing!

  9. June 4th, 2014 at 09:56 | #9

    Today, I went to the beachfront with my children. I found a sea shell and
    gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put the
    shell to her ear and screamed. There was a hermit crab inside and it pinched her ear.
    She never wants to go back! LoL I know this is completely off topic but I had to tell someone!

  10. June 5th, 2014 at 20:36 | #10

    Aw, this was an incredibly good post. Taking the time and actual effort to
    generate a good article… but what can I say…
    I put things off a whole lot and don’t manage to
    get anything done.

  11. June 8th, 2014 at 23:35 | #11

    I love your blog.. very nice colors & theme. Did you
    create this website yourself or did you hire someone
    to do it for you? Plz reply as I’m looking to construct my own blog and would like to find out where u got this from.

    thanks

  12. June 10th, 2014 at 01:30 | #12

    Attractive section of content. I just stumbled upon your
    site and in accession capital to assert that I get in fact enjoyed
    account your blog posts. Any way I’ll be subscribing to
    your feeds and even I achievement you access consistently quickly.

  13. June 11th, 2014 at 18:09 | #13

    Right here is the perfect webpage for everyone who wishes
    to find out about this topic. You realize a whole lott its almost hard
    to argue with you (not that I personally would
    want to…HaHa). You certainly put a fresh spin on a topic that’s been discussed for ages.
    Excellent stuff, just wonderful!

  14. June 13th, 2014 at 17:21 | #14

    Thanks for ones marvelous posting! I truly enjoyed reading it,
    you happen to be a great author. I will make certain to bookmark your blog and may come back in the
    foreseeable future. I want to encourage yourself to continue your great posts, have a nice holiday weekend!

  15. June 19th, 2014 at 06:04 | #15

    This is a topic which is near to my heart… Thank you!

    Where are your contact details though?

  16. June 19th, 2014 at 07:25 | #16

    excellent submit, very informative. I’m wondering why the other experts of this sector don’t notice this.
    You must proceed your writing. I am sure, you’ve a great readers’ base already!

  17. June 21st, 2014 at 23:13 | #17

    Hey there! Would you mind if I share your blog with my twitter group?

    There’s a lot of folks that I think would really
    appreciate your content. Please let me know. Thanks

  18. August 30th, 2014 at 07:41 | #18

    For newest information you have to pay a quick visit world wide web and
    on internet I found this site as a finest site for latest updates.

  19. September 21st, 2014 at 14:30 | #19

    Hello very cool site!! Guy .. Excellent .. Superb ..
    I’ll bookmark your blog and take the feeds also? I am satisfied to find a lot of useful info
    right here within the post, we need develop more strategies in this regard,
    thanks for sharing. . . . . .

  20. September 22nd, 2014 at 04:48 | #20

    I take pleasure in, lead to I discovered just what
    I used to be having a look for. You’ve ended my four day lengthy hunt!
    God Bless you man. Have a great day. Bye

  21. October 10th, 2014 at 03:15 | #21

    Nice post. I learn something new and challenging on blogs I stumbleupon everyday.
    It’s always helpful to read content from other writers and practice something
    from their websites.

  22. October 16th, 2014 at 01:16 | #22

    It’s really a cool and useful piece of info.
    I’m happy that you shared this helpful information with us.
    Please stay us up to date like this. Thank you for sharing.

  23. October 20th, 2014 at 02:18 | #23

    It’s laborious to search out educated people on this matter, however you sound like you realize what you’re talking about! Thanks

  24. October 29th, 2014 at 03:41 | #24

    Hi there it’s me, I am also visiting this site daily, this web page is genuinely nice and the visitors are truly sharing good thoughts.

  1. July 1st, 2011 at 04:33 | #1