• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Network Stats
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Network Stats


  • Subject: Re: Network Stats
  • From: Dave Rehring <email@hidden>
  • Date: Fri, 09 Jan 2004 13:55:54 -0800

On 1/9/04 10:01 AM, Charlie Boisseau at email@hidden wrote:

> Hi,
>
> I was wondering if anyone here knew how to get detailed network stats from
> the system. From The IONetworkInterface class in the IOKit I have been able
> to get the number of network packets sent and received along with collisions
> and errors. This works well, however I still can't get the number of bytes
> both sent and received, and this is really what I want.
>
> I know it must be possible without having to use some 3rd party library -
> Activity Monitor.app does it in Panther without any problems.
>
> Does anyone know where I can look to get these values? I have looked
> everywhere in the docs, on the web and on ADC - nothing! I know it might
> have to be done as root in a helper tool - that's OK; my program already has
> a couple of other tools it needs to authorize, so it can do them all at the
> same time.

/usr/sbin/netstat -ib

It's an 'suid' tool, so you shouldn't need to be 'authorized' to execute it.

Later,
--
David Rehring Psychos do not explode when light hits
VP of Research and Development them, no matter how crazy they are...
Atimi Software, Inc.
www.atimi.com And totally insane guy!
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >Network Stats (From: Charlie Boisseau <email@hidden>)

  • Prev by Date: Getting the MAC address via ioctl calls
  • Next by Date: Re: Getting the MAC address via ioctl calls
  • Previous by thread: Re: Network Stats
  • Next by thread: OTAsyncOpenInternetServicesInContext question
  • Index(es):
    • Date
    • Thread