benchmarking a process

Chuck Swiger cswiger at
Fri Oct 8 11:57:27 PDT 2004

Andrew Moran wrote:
> This isn't specific to freebsd I suppose.. but does anyone know any good 
> programs to measure how long a process took, how much memory it 
> requested, and how much network traffic it send/received?

See "man getrusage" and "man gprof" for the first two questions.

Measuring how much network traffic something sends is more complicated: 
counters kept at the application-level see different numbers than what 
actually goes out on the wire, due to collisions, lost packets, etc.  Using a 
network sniffer or IPFW rule to monitor the traffic is likely to give a more 
meaningful result, depending on what you want to do.


More information about the freebsd-questions mailing list