I have been experimenting with the time command(/usr/bin/time). I made the time command run as below
/usr/bin/time -v sleep 30
On the other terminal I did a ps -a and found out the PID of sleep process.Now I send a message to the sleep using kill -1 PID which terminated the process sleep.Since the sleep was running on the care of time,it listed out the resource usage statistics as below
Command being timed: "sleep 30"
User time (seconds): 0.00
System time (seconds): 0.00
Percent of CPU this job got: 0%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:21.81
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 2160
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 180
Voluntary context switches: 2
Involuntary context switches: 2
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
However to my surprise the Signals Delivered field has a 0! How is that possible?
EDIT:
Instead of sleep 30 ,I experimented with the following script.
trap "echo Hello" 1 2
sleep 30
Now I timed the above script and send signals 1 and 2 to it. In that case too the Signals delivered field was still 0.That makes me conclude that Signals Delivered field is 0 ,not because the signals are not handled.
time makes use of wait4 system call.I discovered one thing that some fields of struct rusage are remaining unmaintained. ru_nsignals is one such field in the struct rusage.
For details refer the right answer to this question