| Author |
What is the best way to program socket staticstics?
|
|
| Owen Zhang 2007-09-27, 7:37 pm |
| I am working on a project that counts the incoming and outgoing
messages on a certain port. I know "nestat" may be able to do it. But
is there any programmable way to get this data like "ioctl"? I am
working on Solaries 5.9. Thanks.
| |
| Frank Cusack 2007-09-27, 7:37 pm |
| On Thu, 27 Sep 2007 13:35:37 -0700 Owen Zhang <owenzhang.chicago@gmail.com> wrote:
> I am working on a project that counts the incoming and outgoing
> messages on a certain port. I know "nestat" may be able to do it. But
I'm pretty sure netstat can't report per-port statistics.
> is there any programmable way to get this data like "ioctl"? I am
> working on Solaries 5.9. Thanks.
I don't think so. With Solaris 10 you can use dtrace. Earlier
versions I think you'd have to use snoop or tcpdump.
-frank
| |
| Owen Zhang 2007-09-28, 1:24 pm |
| I don't need the content of the packets. Intead I just need to count
the number of the packets.
|
|
|
|