# Monitor memory of different java process on same via cmdline

**URL:** <https://discuss.elastic.co/t/monitor-memory-of-different-java-process-on-same-via-cmdline/125055>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [March 21, 2018, 6:50pm UTC](https://discuss.elastic.co/t/monitor-memory-of-different-java-process-on-same-via-cmdline/125055 "2018-03-21T18:50:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsg](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@rsg](https://discuss.elastic.co/u/rsg)\
**Post date:** [March 21, 2018, 6:50pm UTC](https://discuss.elastic.co/t/monitor-memory-of-different-java-process-on-same-via-cmdline/125055/1 "2018-03-21T18:50:35Z")

</div>

i am looking for a way to separate javaprocess memory usage via commandline string and currently by default it shows total of all java process. Is there a way to do this via metricbeat?

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [March 22, 2018, 11:40am UTC](https://discuss.elastic.co/t/monitor-memory-of-different-java-process-on-same-via-cmdline/125055/2 "2018-03-22T11:40:59Z")

</div>

Metricbeat's [system process metricset](https://www.elastic.co/guide/en/beats/metricbeat/6.2/metricbeat-metricset-system-process.html) generates one event per process. So if there are two instances of the JVM running you will get two separate events with different `system.process.pid` values. Hopefully in your case you have a way of identifying what the two applications are that are each using the JVM (like by the command line args, the user, the CWD, the environment vars, etc).

> [@rsg](#):
>
> currently by default it shows total of all java process

Metricbeat does not do any aggregation between process metrics that it sends. Perhaps you are looking at some kind of aggregated view in Kibana? Take a look in the Kibana Discover tab at the raw data and see if you have metrics from each JVM process.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 19, 2018, 11:41am UTC](https://discuss.elastic.co/t/monitor-memory-of-different-java-process-on-same-via-cmdline/125055/3 "2018-04-19T11:41:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
