2

I echoed 1 to tracing_on in /sys/kernel/debug/tracing directory and echoed 0 again after a second. However, the timestamp of the first entry is 216.852 and that of the last entry is 234.136 giving me a total time span of the run of about 18 seconds. How is that possible? And I've tried this many times, on different computers; yet I get an unusual time span. Am I going wrong somewhere?

  • Can you show show us the commands you used to set up this particular trace? – Mark Plotnick May 30 '17 at 19:13
0

Without knowing the exact reason, I do know that Linux is not a real time OS, so operations are not guaranteed to work in a give time. Also, given that tracing on/off operations are fairly low priority, chances are that the kernel is waiting for an appropriate time to action your request, and this is the delay you are experiencing.

If the operation is asynchronous, then when you write to the file, the write command will return immediately, storing the request within the kernel - but the kernel will read and act on the change sometime later.

  • But it didn't wait for that much time; I mean it executed the command instantaneously; yet it gives such an output – Vishal Khopkar May 30 '17 at 18:19
  • I've edited the answer to hopefully explain this behaviour – einonm May 30 '17 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.