G E T   S O C K   P I D | |
What is is ? well, its a simple program that prints out socket information on FreeBSD. |
|
What does it look like ?COMMAND PID TYPE PORT (state) XFree86 20082 stream *.6000 LISTEN nmbd 56718 dgram *.137 LISTEN nmbd 56718 dgram *.138 LISTEN nmbd 56718 dgram *.137 LISTEN nmbd 56718 dgram *.138 LISTEN nmbd 56718 dgram *.137 LISTEN nmbd 56718 dgram *.138 LISTEN smbd 56716 stream *.139 LISTEN natd 56655 raw *.8668 LISTEN natd 56655 raw *.0 LISTEN xfs 243 stream *.7100 LISTEN sshd2 191 stream *.22 LISTEN rsync 181 stream *.873 LISTEN lpd 127 stream *.515 LISTEN |
|
Why make it ?
One: Because currently FreeBSD's netstat will not print out pid's with socket info. Linux's version of netstat will do this.
However on FreeBSD their are other programs (lsof etc..) that will give this info. Two: I like to program and this was a fun way to learn FreeBSD's kvm library and its kernel structures. |
|
do you want to participate ? email me: nathan@khmere.com |
|
Source | |
getsockpid_08.13.01.tar.gz     08.13.01 |