[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Obtaining information on running processes

Hi there,

How can I retrieve information on the running processes thru a program written 
in c? Is there any function that does something like lsof ?? I need 
specifically info on processes communicating thru the local network, like 
lsof -i. I know I can get most of the info from /proc/net/tcp (inode, ports, 
etc...), but how can I get the PID of the processes listed in this file, and 
also, the NAME of the process (field NAME when running lsof -i)

Thiago dos Santos Guzella
Linux User #354160
UIN 13465286

"Software is like sex: it's better when it's free." Linus Torvalds 

Reply to: