Home > Blockchain >  Finding installed Java versions actually being used on Linux servers?
Finding installed Java versions actually being used on Linux servers?

Time:02-25

Our Linux servers (1500 of them) has multiple Java versions installed (from Java 1.5 to Java 17) and we are in process of cleaning it up. is there a way to find out which installed versions are actually being used?

we can take a snapshot of a process running at any point but this will miss the process which comes for a second and goes down.

Anyway to automate capturing this data, we have options to run ansible playbooks etc.

Any suggestions will be highly appreciated.

CodePudding user response:

The brute force solution (will include downtime and a lot of work):

  1. Prepare a documentation of all installed services, either create it or get it at hand
  2. Remove or disable all versions of Java
  3. Start one service after another
  4. Record all errors happening
  5. Fill in the necessary Java version for each service in the documentation (probably you can find out by the logs which Java version is necessary for what service)
  6. Reinstall or enable one version of Java at a time - probably best the one for the service you just were trying to bring up again

Repeat for all services / java versions.

And for the future: keep records of the services that are running on your server and which dependencies they have.

CodePudding user response:

Running a ansible playbook and capturing the output to a excel sheet would be a good starting point.

  • Related