337 Example 3 Tracing a Shell Script
338
339
340 The following example produces a trace of the spell(1) command on the
341 file truss.out:
342
343
344 example$ truss -f -o truss.out spell document
345
346
347
348
349 spell is a shell script, so the -f flag is needed to trace not only the
350 shell but also the processes created by the shell. (The spell script
351 runs a pipeline of eight processes.)
352
353
354 Example 4 Abbreviating Output
355
356
357 The following example abreviates output:
358
359
360 example$ truss nroff -mm document >nroff.out
361
362
363
364
365 because 97% of the output reports lseek(), read(), and write() system
366 calls. To abbreviate it:
367
368
369 example$ truss -t !lseek,read,write nroff -mm document >nroff.out
370
371
372
373 Example 5 Tracing Library Calls From Outside the C Library
374
375
376 The following example traces all user-level calls made to any function
377 in the C library from outside the C library:
|
337 Example 3 Tracing a Shell Script
338
339
340 The following example produces a trace of the spell(1) command on the
341 file truss.out:
342
343
344 example$ truss -f -o truss.out spell document
345
346
347
348
349 spell is a shell script, so the -f flag is needed to trace not only the
350 shell but also the processes created by the shell. (The spell script
351 runs a pipeline of eight processes.)
352
353
354 Example 4 Abbreviating Output
355
356
357 The following example abbreviates output:
358
359
360 example$ truss nroff -mm document >nroff.out
361
362
363
364
365 because 97% of the output reports lseek(), read(), and write() system
366 calls. To abbreviate it:
367
368
369 example$ truss -t !lseek,read,write nroff -mm document >nroff.out
370
371
372
373 Example 5 Tracing Library Calls From Outside the C Library
374
375
376 The following example traces all user-level calls made to any function
377 in the C library from outside the C library:
|