Search code examples
javajbossaffinity

Jboss java process affinity settings


I have a requirement to bind JBoss and it's related processes (java.exe) to 1 CPU of 2 Cores on a given server.

Problem is there are another java batch process running using there own separate java.exe so how to bind JBOSS invoked processes using affinity?

Please guide, i am on a windows server.

Updated: Or there is a way to identify java.exe using some identifier like if we add some parameter in JVM which can tell if present it is JBOSS initiated other wise others.


Solution

  • Here is what I am doing to identify Jboss initiated Java.exe, below is Powershell script. I hope you will find it useful.

    $javaProc = .\jps.exe -v | select-string "jboss"
    Write-host $javaProc.ToString().Substring(0,$javaProc.ToString().IndexOf(" "))