What is lvmid in java?

I am learning how to use jps and I find this page: jps . It states that:

lvmid is usually, but not necessarily, the identifier of the operating system process for the JVM process.

So, I am wondering, in what situation is jps not an identifier for an operating system process?

Anyone help?

+6
java
source share
3 answers

Do all operating systems have the concept of a process identifier? Probably no. Some of them may even represent process identifiers, not as whole, but in a completely different form. Process identifiers are a platform concept and may change in the future. Java is designed to be platform independent. That is why this may not always work.

However, in all major operating systems that are currently in use today, lvmid must always return the operating system process identifier for the JVM process.

+3
source share

This basically suggests that lvmid usually matches the O / S pid (process id), but it does not have to be the same. Some operating systems can distinguish between them (I do not know which ones).

+1
source share

Today I discovered that a java process running on CygWin and running on its own Linux machine will have a different lvmid than pid. This caused my script to look for lvmid to complete the Java process so that it failed to pass the wrong pid.

As you can see from my picture, lvmid is 6704, but pid is 19248

enter image description here

0
source share

All Articles