Is there a way to measure the total number of system calls per second on a Linux system?

strace gives counts, but only for a single process.
It looks like some versions of sar support this, but the one I have only shows context switches/sec or forks/sec. I'm running a 2.6.9-89 based kernel.

link|improve this question
feedback

2 Answers

up vote 4 down vote accepted

You could look into writing a SystemTap script. There is even an example script that could be modified to meet your needs.

link|improve this answer
+1, very easy to do with SystemTap – James Jul 21 '10 at 20:56
Thanks, I'll give it a try! – user33983 Jul 22 '10 at 21:29
feedback

If you try to run strace for every process in your machines and afterwards count them ?

link|improve this answer
Running strace has a lot of overhead and I can't think of a way to catch short lived processes with this method. – user33983 Jul 22 '10 at 21:31
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.