Script for real time network traffic per process

Hi All Gurus,

I want to write a script (bash/ksh/csh) which will show real time network traffic ( TCP or UDP ) generated by per process/PID. For both
Linux/AIX system, as nethogs ( Linux package ) shows ?
Any suggestion is MOST welcome.

Thanks in Advance,
Amritendu Das

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.