2

I am trying to get xmxBytes (size) metrics for monitoring jvm but I am unable to get from a java program.

I am using this package import: java.lang.management.RuntimeMXBean;
and this method:

RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();         
List<String> argument = runtimeMXBean.getInputArguments();`

Can anyone tell me?

1 Answer 1

2

Try the following.

long max = Runtime.getRuntime().totalMemory();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.