views:

67

answers:

3
+1  Q: 

performance tool

Hi,

I basically have a unix process running and it is doing some heavy processing as well as outputting data over the network. I was wondering what system calls are used to interact with the networking layer.

I would like to measure the performance metrics of this process: CPU usage, networking usage. I am not sure if this process is blocked because it is writing way too fast to the networking layer or if this process is spending too much time processing code.

Any suggestions?

Thanks!

A: 

What you really need is a profiler. That way, you'll be able to see which parts of your code are taking the most time.

Try http://oprofile.sourceforge.net/, or a specific profiler for your toolchain.

As a quick measurement you can try running your process under strace to see which system calls it makes and see live how long they take.

Vinko Vrsalovic
+1  A: 

What Unix? Solaris/FreeBSD/OSX have dtrace, Linux has oprofile. All of them have tcpdump for you to analyze the network flow.

Nikolai N Fetissov
Right, I don't know why I assumed that he's using Linux and that he owns the code.
Vinko Vrsalovic
A: 

I suggest valgrind which is another profiler.

Vereb