i just want how to use this in processes trace
hot to get the exact user for this pid
i want to trace PID which out from top -c & ps -aux
""i know the cd /proc/pid but in case if it lead to nothing !!""
I often use 'lsof -i' to see which program is listening to an open port. The '-i' option will show you a program's open internet connections. Great for when you've got an open port and don't know what its attached to.
I'm afraid you'll really have to read the manual, or use google to find useful examples yourself. lsof has many options. Having said that, you don't need to use them all and the ones given are a useful place to start.
If you're new to all this I really wouldn't be wanting to put together my own server monitoring when there's a lot of existing packages out there.