2.2.2 Exercise: Using the printf() Function to Format Output

Amend the arguments to the printf() function so that dtrace also prints the process ID and user ID for the process. Use a conversion specifier such as %-4d.

See Output Formatting in the Oracle® Linux: DTrace Guide for a description of the printf() function.

The process ID and user ID are available as the variables pid and uid. Use the BEGIN probe to create a header for the output.

(Estimated completion time: 10 minutes)