Class PsInfo
java.lang.Object
oshi.driver.common.unix.aix.PsInfo
Shared utility to query the pure-Java parts of AIX
/proc/<pid>/psinfo and
/proc/<pid>/lwp/<tid>/lwpsinfo.
The address-space reads queryArgsEnv performs need libc open/pread and live in the JNA
(PsInfoJNA) and FFM (PsInfoFFM) drivers respectively.
-
Method Summary
Modifier and TypeMethodDescriptionqueryArgsEnvAddrs(int pid, AixPsInfo psinfo) Reads thepr_argc,pr_argv, andpr_envpfields from apsinfo_t.static AixLwpsInfoqueryLwpsInfo(int pid, int tid) Reads/proc/<pid>/lwp/<tid>/lwpsinfoand returns the parsed structure.static AixPsInfoqueryPsInfo(int pid) Reads/proc/<pid>/psinfoand returns the parsed structure.
-
Method Details
-
queryPsInfo
Reads/proc/<pid>/psinfoand returns the parsed structure.- Parameters:
pid- the process ID- Returns:
- a structure containing information for the requested process
-
queryLwpsInfo
Reads/proc/<pid>/lwp/<tid>/lwpsinfoand returns the parsed structure.- Parameters:
pid- the process IDtid- the thread ID (lwpid)- Returns:
- a structure containing information for the requested thread
-
queryArgsEnvAddrs
Reads thepr_argc,pr_argv, andpr_envpfields from apsinfo_t.- Parameters:
pid- the process ID (used for diagnostic logging only)psinfo- a populatedAixPsInfocontaining the offset pointers- Returns:
- a triplet of
(argc, argv, envp), ornullif the psinfo is unusable
-