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.


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.


  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.

  25. February 18th, 2015 at 19:04 | #25

    Great post. Thank you for your time in helping me understand on the matter.

  26. September 14th, 2015 at 06:33 | #26

    Utterly composed articles , thankyou for information .

  27. September 14th, 2015 at 06:48 | #27

    I like this site very much, Its a very nice situation to read and incur info . “Young men think old men are fools but old men know young men are fools.” by George Chapman.

  28. October 20th, 2015 at 07:36 | #28

    Thanks, I’ve recently been searching for info approximately this topic for a while and yours is the greatest I’ve came upon so far. But, what concerning the conclusion? Are you certain concerning the supply?

  29. November 13th, 2015 at 08:54 | #29

    Thanks for sharing excellent informations. Your website is so cool. I’m impressed by the details that you’ve on this site. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for extra articles. You, my friend, ROCK! I found simply the info I already searched everywhere and just could not come across. What a great site.

  30. November 13th, 2015 at 09:07 | #30

    I would like to show my thanks to the writer for rescuing me from this particular dilemma. After browsing through the online world and seeing tips which were not beneficial, I figured my entire life was done. Being alive without the strategies to the problems you’ve solved by way of this blog post is a serious case, as well as ones that might have negatively affected my entire career if I had not noticed your web page. Your main expertise and kindness in maneuvering every aspect was invaluable. I am not sure what I would have done if I hadn’t come upon such a point like this. I can also now look ahead to my future. Thanks for your time very much for the impressive and result oriented guide. I won’t think twice to suggest your web page to any individual who should receive direction about this area.

  31. November 23rd, 2015 at 08:34 | #31

    You can certainly see your expertise within the work you write. The sector hopes for even more passionate writers like you who are not afraid to mention how they believe. All the time follow your heart. “History is the version of past events that people have decided to agree upon.” by Napoleon.

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