0

(updated for requested clarification)

I need to associate a running service to a particular jvm / java command with args. To complicate things, the application uses nssm (non-sucking service manager) to execute a .bat. Inside the .bat are the args that end up running with the java process.

  1. There is a running service, let's call it service1. This service is listed in the list of services, you can stop and restart it, and that usually works.

  2. Sometimes, service1 restarts, but the underlying jvm stays running, and causes a problem when the next one is created because it cannot bind to the same listening port.

  3. So you find out the path for the service with this command:

Get-CimInstance win32_service | where-object Name -eq "service1" | select pathname

pathname

\nssm\nssm.exe

So far, so good.

  1. (to be continued)

Has anyone faced this scenario before? Is there some way when nssm starts a process that it keeps track of what is executed in child processes?

adamt8
  • 308
  • 1
  • 7

0 Answers0