SoFunction
Updated on 2025-03-08

How to check the memory usage of java process

  • VmPeakRepresents the peak memory occupies during the current process.
  • VmSizeRepresents the memory the process is now occupying
  • VmLckIt represents the size of physical memory that the process has locked. The locked physical memory cannot be exchanged to the hard disk.
  • VmHWMIt is the peak value that the program gets allocated to physical memory.
  • VmRSSIt is the physical memory used by the program now.
  • VmData: Indicates the size of the process data segment.
  • VmStk: Indicates the size of the process stack segment.
  • VmExe: Indicates the size of the process code.
  • VmLib: Indicates the size of the LIB library used by the process.
  • VmPTE:The size of the page table occupied.
  • VmSwap: The process takes up the Swap size.
  • Threads: Indicates the number of threads in the current process group.
  • SigPnd:Mask bit, stores the pending signal of the thread, which is equivalent to the PENDING signal of the thread.
  • ShnPnd: Mask bit, stores the pending signal of the thread group. It is equivalent to the PENDING signal of the process group.
  • SigBlk: Store blocked signals, which are equivalent to BLOCKED signals.
  • SigIgn: Stores ignored signals, which is equivalent to IGNORED signals.
  • SigCgt: Stores the captured signal, which is equivalent to the CAUGHT signal.
  • CapEff: When a process wants to perform a privileged operation, the operating system will check whether the corresponding bit of cap_effective is valid, instead of checking whether the valid UID of the process is 0.
  • CapPrm: Indicates the ability that a process can use. Cap_permitted can contain abilities that are not in cap_effective. These abilities are temporarily abandoned by the process itself. It can also be said that cap_effective is a subset of cap_permitted.
  • CapInh: Indicates the ability to inherit programs that can be executed by the current process.
  • CapBnd: It is the boundary capability of the system, we cannot change it.
  • Cpus_allowed:3 points out that the process can use the CPU affinity mask, because we specify it as two CPUs, so here is 3. If the process is specified as 4 CPUs (if there is any), here is F(1111).
  • Cpus_allowed_list:0-1 indicates that the process can use the CPU list, here is 0-1.
  • voluntary_ctxt_switchesIndicates the number of times the process actively switches.
  • nonvoluntary_ctxt_switchesIndicates the number of passive switching times of the process.