1

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?

1
  • Can you show show us the commands you used to set up this particular trace? Commented May 30, 2017 at 19:13

1 Answer 1

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .