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):
- Prepare a documentation of all installed services, either create it or get it at hand
- Remove or disable all versions of Java
- Start one service after another
- Record all errors happening
- 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)
- 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.