I need to write a C program in AIX environment which will give me the process name. I can get the pid but not the process name based on the pid. Any specific system calls available in aix environment??
Thanks
I need to write a C program in AIX environment which will give me the process name. I can get the pid but not the process name based on the pid. Any specific system calls available in aix environment??
Thanks
I realize this is an old question. But, to convert the @CoreyStup answer into a function that more closely addresses the OP, I offer this: (tested on AIX 6.1, using: g++ -o pn pn.cc)
--- pn.cc ---
getprocs
is likely what you want. I created this under AIX 5.x.I have a little routine that cycles thru all processes and dumps their information.