Question
Add the o switch to the strace call in exercise E5 in order to direct strace output to a file and include a summary of
Add the o switch to the strace call in exercise E5 in order to direct strace output to a file and include a summary of the output together with a brief description what you observe in your report. Details of operating system calls will be discussed in Lab 2. You may want to check the manual page of strace for your documentation.
E5: Use strace to look at mycat in operation. Type $ strace ./mycat cmd2.sh to see it print to the console the contents of filecopy.c . You may well see quite a lot of things going on, but we can limit this to only a set of system calls we are interested in. Issue the command: $ strace -C -e trace=open,close,read,write ./mycat cmd2.sh This will limit the output to only the file system calls and also print a summary.
Note: the number of calls to both read and write may not be what you expect!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started