Process attributes
You can obtain attributes of a process different than the running context in AIX 7.2 TL3. ProbeVue provides the following interfaces to access the attributes.
get_proc(<process identifier>, PROCESS_ATTRIBUTE_NAME, <variable>);-
- process identifier
- The process identifier of the process for which you are collecting attribute information about.
- PROCESS_ATTRIBUTE_NAME
- The process attribute name of the process for which you are collecting attribute information about.
- variable
- The ProbeVue variable that holds the results of the operation.
get_thread(<thread identifier>, THREAD_ATTRIBUTE_NAME, <variable>);-
- thread identifier
- The thread identifier of the thread whose attributes are requested.
- THREAD_ATTRIBUTE_NAME
- The thread attribute name of the thread for which you are collecting attributes about.
- variable
- The ProbeVue variable that holds the results of the operation.
get_ublock(<process/thread identifier>, UBLOCK_ATTRIBUTE_NAME,<variable>);-
- process/thread identifier
- The process/thread identifier.
- UBLOCK_ATTRIBUTE_NAME
- The
ublockattribute name. - The ProbeVue variable which holds the results of the operation.
get_cwd(<process> identifier , <variable>);-
- process identifier
- The process identifier.
- variable
- The ProbeVue variable that holds the results of the operation.
- The ProbeVue variable must be of type string with length greater than or equal to 1024.
Note: All
ublock attributes are of type string except
for the CWD attribute. All other attributes are of type long
long.Return values
These interfaces return 0 when successful and the following error codes during error
scenarios.
| SL No. | Error | Description |
|---|---|---|
| 1 | ERR_INTR_UBLOCK_ACCESS |
Ublock cannot be accessed in the current environment. |
| 2 | ERR_INTR_CWD_ACCESS |
CWD cannot be accessed in this environment. |
| 3 | ERR_INVALID_PROC |
Invalid process identifier provided |
| 4 | ERR_INVALID_THREAD |
Invalid thread identifier provided |
| 5 | ERR_PROC_INVALID_STATE |
Process is in an invalid state |
| 6 | ERR_THREAD_INVALID_STATE |
Thread is in an invalid state |
| 7 | ERR_VMATTACH |
Error encountered while attaching a VM segment |
| 8 | ERR_INVALID_STORAGE |
Invalid storage provided |
| 9 | ERR_INVALID_ATTR |
Invalid attribute requested |
| 10 | ERR_SHORT_STRING |
String provided is short |
| 11 | ERR_GET_PATH |
Error encountered while accessing PATH |
| 12 | ERR_INSUFF_SORAGE |
Internal EVM storage is insufficient |
Notes:
get_ublockandget_cwdare not allowed in the Java interval probe manager or the system trace probe manager.get_procandget_threadare not allowed in the Java Probe Manager (JPM).
Process attributes
You can use the following process attributes to access the interfaces.
| process_attribute_name | Description |
|---|---|
PID |
Process identifier |
PPID |
Parent process identifier |
PGID |
Process froup identifier |
PUID |
Real user identifier |
SUID |
Saved user identifier |
PRI |
Process priority |
NICE |
Process Nice Value |
CPU |
Processor Usage |
ADSPACE |
Process Address space |
MAJFLT |
I/O Page fault |
MINFLT |
Non-I/O page fault |
SIZE |
Size of image in pages |
SIGPEND |
Signals pending in the process |
SIGIGNORE |
Signals ignored by the process |
SIGCATCH |
Signals being caught by the process |
FORKTIME |
Creation time of the process |
Thread attributes
You can use the following thread attributes to access the interfaces.
| thread_attribute_name | Description |
|---|---|
TPID |
Process identifier |
POLICY |
Thread scheduling policy |
TPRI |
Thread priority |
CPUUSAGE |
CPU usage by thread |
CPUID |
CPU identifier where thread is running |
SIGMASK |
Signals blocked on the thread |
LOCKCOUNT |
Number of kernel locks taken by the thread |
PTID |
Pthread identifier of the thread |
HOMESRAD |
HOMESRAD of the thread |
HOMECPU |
HOMECPU of the thread |
ublock attributes
You can use the following ublock attributes to access the interfaces.
| ublock attribute name | Description |
|---|---|
TEXT |
Start of process text |
TSIZE |
Text size of the process |
DATA |
Start of the data for a process |
SDATA |
Current data size |
MDATA |
Maximum data size of the process |
STACK |
Start of STACK |
STKMAX |
Maximum size of stack |
EUID |
Effective user identifier |
UUID |
Real user identifier |
EGID |
Effective group identifier |
GID |
Group identifier |
UTIME |
Process user resource usage time in seconds |
STIME |
Process system resource usage time in seconds |
MAXFD |
MAX FD value in user |
IS64U |
Is a 64-bit process. |