Open bmarwell opened 4 months ago
I found Temurin on Linux x64 to do the same, I have to look up some commands and their args in /proc/$pid/cmdline
. However, all are accessible. Not sure how to do the same on AIX, getargs does not seem to return more then the command without args on AIX...
This doesn't seem like an issue with OpenJ9 but rather with OpenJDK. The issue needs to be opened at the OpenJDK project. Semeru consumes OpenJDK mostly as-is.
Alright. Yeah, even Mac info seems incomplete. However, I do not have an OpenJDK account.
Without an account you can post to the mailing list to ask about it.
Java 22:
Stream<ProcessHandle> ProcessHandle.allProcesses();
will return a Stream ofProcessHandle
.ProcessHandle
has theProcessHandle.Info
interface.However, all optional fields are blank on AIX ppc64:
command()
is emptyarguments()
is emptyuser()
is sometimes unknownHaven't checked the others yet.
However, since Java 22 there is a workaround: Use FFM like so:
Here is some sample code I hacked together quickly: https://github.com/bmarwell/jtop/blob/67a7a2118ceb389d1d5c9eaef26b5fd8361350a7/library/aix/src/main/java/de/bmarwell/jtop/lib/aix/AixProcess.java
Sadly, this will only return the command, not the args (despite its name). And it is cumbersome to use for "casual" java devs.
Any chance
Stream<ProcessHandle> ProcessHandle.allProcesses();
could return all process information? Tested on Semeru 22 Milestone 1.