A running process has a set of attributes associated with it, such as the following:
- PID: This uniquely identifies the process
- Owner: This is the name of the user who launched the process
- Command: This is the command that runs under the process
- CPU time: This indicates the time for which the process has been active
- Start time: This indicates the time when the process was launched
These are a few attributes that we are generally interested in. Perhaps, we would also be interested in CPU usage or memory usage. Now, getting this information from within Java was not possible prior to Java 9. However, in Java 9, a new set of APIs have been introduced, which enables us to get the basic information ...