1 This is a demonstration of the procsystime tool, which can give details
2 on how processes make use of system calls.
4 Here we run procsystime on processes which have the name "bash",
7 Tracing... Hit Ctrl-C to end...
10 Elapsed Times for process bash,
21 By default procsystime prints elapsed times, the time from when the syscall
22 was issued to it's completion. In the above output, we can see the read()
23 syscall took the most time for this process - 8.57 seconds for all the
24 reads combined. This is because the read syscall is waiting for keystrokes.
28 Here we try the "-o" option to print CPU overhead times on "bash",
30 # procsystime -o -n bash
31 Tracing... Hit Ctrl-C to end...
34 CPU Times for process bash,
45 This identifies which syscall type from bash is consuming the most CPU time.
46 This is ioctl, at 932 microseconds. Compare this output to the default in
47 the first example - both are useful for different reasons, this CPU overhead
48 output helps us see why processes are consuming a lot of sys time.
52 This demonstrates using the "-a" for all details, this time with "ssh",
54 # procsystime -a -n ssh
55 Tracing... Hit Ctrl-C to end...
58 Elapsed Times for processes ssh,
66 CPU Times for processes ssh,
74 Syscall Counts for processes ssh,
82 Now we can see elapsed times, overhead times, and syscall counts in one
83 report. Very handy. We can also see totals printed as "TOTAL:".
87 procsystime also lets us just examine one PID. For example,
90 Tracing... Hit Ctrl-C to end...
93 Elapsed Times for PID 1304,
105 Here is a longer example of running procsystime on mozilla,
107 # procsystime -a -n mozilla-bin
108 Tracing... Hit Ctrl-C to end...
111 Elapsed Times for processes mozilla-bin,
124 CPU Times for processes mozilla-bin,
137 Syscall Counts for processes mozilla-bin,