Question: How do I check the ulimit values of running processes?  For Linux,  I can view the /proc/process_id/limits file. However, AIX does not provide such file.

 

Answer:

On AIX you can use dbx to attach the running process as shown below. Be aware that the drawback from this method  is that dbx interrupts the process by sending a SIGTRAP signal. After the dbx sessions finishes, the process terminates. A Design Change Request was made to address this.

 

$ dbx -a 10223814
Waiting to attach to process 10223814 ...
Successfully attached to ssh-agent.
warning: Directory containing ssh-agent could not be determined.
Apply 'use' command to initialize source path.
Type 'help' for help.
reading symbolic information ...
stopped in __fd_select at 0xd0236ebc ($t1)
0xd0236ebc (__fd_select+0xbc) 80410014 lwz r2,0x14(r1)
(dbx) proc rlimit
rlimit name: rlimit_cur rlimit_max (units)
 RLIMIT_CPU: (unlimited) (unlimited) sec
 RLIMIT_FSIZE: (unlimited) (unlimited) bytes
 RLIMIT_DATA: 134217728 (unlimited) bytes
 RLIMIT_STACK: 33554432 4294967296 bytes
 RLIMIT_CORE: 0 0 bytes
 RLIMIT_RSS: 33554432 (unlimited) bytes
 RLIMIT_AS: (unlimited) (unlimited) bytes
 RLIMIT_NOFILE: 2000 (unlimited) descriptors
 RLIMIT_THREADS: (unlimited) (unlimited) per process
 RLIMIT_NPROC: (unlimited) (unlimited) per user
(dbx) quit