-
-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AIX Process list relies on running external application #1366
Comments
While there is a
We do try to avoid command line calls whenever possible, but unfortunately on many OS's, You do have a point about fully qualified path names, a flaw that should probably be fixed on all the platforms. |
Note: the So it would be possible to read that binary file and convert, for both processes and threads. If you can figure it out, I'd welcome a PR. |
Closing this and tracking in #1827 |
The AIXOSProcess class obtains a list of running processes by calling the "ps" command. Is there a reason it doesn't walk the /proc path like the LinuxOSProcess ?
The /proc has been available in AIX since 5.2 from what I can see.
Issues with current reliance is
calling an external binary incurs overhead
path the ps isn't fully qualified (e.g. /usr/bin/ps ) so it relies on PATH and hence is vulnerable to exploitation
Although unlikely, the user running the application may not have permission to invoke ps (e.g. running in a restricted shell)
If there is a valid reason for this implementation then that's fine otherwise I propose using the same method/impl as oshi.software.os.linux.LinuxOperatingSystem:getProcesses(int limit, ProcessSort sort)
The text was updated successfully, but these errors were encountered: