Hi experts. Is there any way to get the total sys cpu time used in a period? Our system has a low user cpu (less than 8%) but high sys cpu (more than 30%), this happened after upgraded from x4100 to x4440. The server is running mysql database. The workload didn''t change. And the high sys cpu happened for very short time, if sample the performance every 1 mins, we can''t find high sys cpu, but if sample the performance every 10 seconds ,we can see high sys cpu. I''d like to some tool to check whether the sys cpu comes from. Thanks, Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20100114/4538db43/attachment.html>
> And the high sys cpu > happened for very short time, if sample the > performance every 1 mins, we can''t find high sys > cpu, but if sample the performance every 10 seconds, > we can see high sys cpu. I''d like to some tool > to check whether the sys cpu comes from.Start with a kernel profile, lockstat -kIW -D 20 sleep 10 -- This message posted from opensolaris.org
Thanks Keil, As the sys cpu spike only happens several times a day and the during is very short, so it''s good to run a tool 24 hours a day to do the monitor. So how about performance impact of "lockstat -kIW -D 20 sleep 10". I''d like something like "vmstat 5 10000" to let it output every 5 seconds to catch what is happening during the high sys cpu, I checked the man page, looks like lockstat is not able to output as vmstat. Thanks, Daniel On Thu, Jan 14, 2010 at 6:04 PM, J?rgen Keil <jrgn.keil at googlemail.com>wrote:> > And the high sys cpu > > happened for very short time, if sample the > > performance every 1 mins, we can''t find high sys > > cpu, but if sample the performance every 10 seconds, > > we can see high sys cpu. I''d like to some tool > > to check whether the sys cpu comes from. > > Start with a kernel profile, > > lockstat -kIW -D 20 sleep 10 > -- > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20100116/491fdc84/attachment.html>
Brian Xu - Sun Microsystems - Beijing China
2010-Jan-26 03:09 UTC
[dtrace-discuss] how to trace sys cpu?
On 01/16/10 16:29, Qihua Wu wrote:> Thanks Keil, > > As the sys cpu spike only happens several times a day and the during > is very short, so it''s good to run a tool 24 hours a day to do the > monitor. So how about performance impact of "lockstat -kIW -D 20 sleep > 10". > > I''d like something like "vmstat 5 10000" to let it output every 5 > seconds to catch what is happening during the high sys cpu, I checked > the man page, looks like lockstat is not able to output as vmstat.lockstat can do kernel profiling with the option -I, just like what the dtrace profile provider does. the -i option specify the sample rate, just as the xxx in the probe ''profile-xxx''. For your specific purpose, you can write another shell script to invoke lockstat within desired intervals. -Brian> Thanks, > Daniel > On Thu, Jan 14, 2010 at 6:04 PM, J?rgen Keil <jrgn.keil at googlemail.com > <mailto:jrgn.keil at googlemail.com>> wrote: > > > And the high sys cpu > > happened for very short time, if sample the > > performance every 1 mins, we can''t find high sys > > cpu, but if sample the performance every 10 seconds, > > we can see high sys cpu. I''d like to some tool > > to check whether the sys cpu comes from. > > Start with a kernel profile, > > lockstat -kIW -D 20 sleep 10 > -- > This message posted from opensolaris.org <http://opensolaris.org> > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org <mailto:dtrace-discuss at opensolaris.org> > > > ------------------------------------------------------------------------ > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20100126/046f8d1b/attachment-0001.html>