1 The following is an example of the shortlived.d program.
2 It can measure time spent processing short lived processes,
3 that may be responsible for heavy load on the system but
4 are usually difficult to see with sampling tools like prstat.
8 Here we run in for a few seconds on a server,
11 Tracing... Hit Ctrl-C to stop.
13 short lived processes: 0.456 secs
14 total sample duration: 9.352 secs
16 Total time by process name,
25 In the above output, around 5% of the CPU was lost to short
26 lived processes - mostly perl. This may be many perl processes,
27 here we are aggregating on the process name not the instance.
31 Now shortlived.d is run on a server with a performance problem,
34 10:58pm up 5 day(s), 1:28, 1 user, load average: 2.20, 1.81, 1.04
37 Tracing... Hit Ctrl-C to stop.
39 short lived processes: 4.546 secs
40 total sample duration: 9.858 secs
42 Total time by process name,
50 3279 pts/10 0:45 report.sh
52 shortlived.d showed that 50% of the CPU was consumed by short lived
53 processes, all of them the "expr" command, and all having the
54 parent proccess-ID 3279. We finished by checking PID 3279 to find
55 it is a Bourne shell script called "report.sh".