From mboxrd@z Thu Jan 1 00:00:00 1970 From: michel.dagenais@polymtl.ca (Michel Dagenais) Date: Fri, 17 Oct 2008 13:33:09 -0400 Subject: [ltt-dev] sys time In-Reply-To: <8d94e9280810170940r7a0eff65se68d7636acbb0d33@mail.gmail.com> References: <8d94e9280810170558j5b9ed8d1q7da37da677c7bf7d@mail.gmail.com> <8d94e9280810170606o729767f3p839c1c3a59c9565d@mail.gmail.com> <48F8AEBD.2030303@polymtl.ca> <20081017162849.GD5696@Krystal> <8d94e9280810170940r7a0eff65se68d7636acbb0d33@mail.gmail.com> Message-ID: <1224264789.16630.140.camel@localhost> On Fri, 2008-10-17 at 18:40 +0200, Gian Lorenzo Meocci wrote: > I agree with you but this don't resolv my problem. Infact my problem > is that "time" give me 1.74 sec of sys time when analising lttng-trace > I obtain only 0.87. The time command can be pretty far off when a process is making a lot of system calls. It usually underestimates the user time, which is consistent with what you are seeing. Basically, the kernel simply counts a full jiffy for the process currently executing when the timer generates an interrupt. If a process makes a lot of system calls, it will often be scheduled at the beginning of a timer interval but will quickly yield to another process and not be there at the timer interrupt.