Hi, I am looking to measure how long a thread takes to migrate between cpu's and how often , what I have is below which is checking just one process is this the correct track to be on here?
My aim is to look at a process and look at upping the reboose_interval on some of our servers. #!/usr/sbin/dtrace -s sched:::off-cpu { self->cpu = cpu; self->timestamp=timestamp; } sched:::on-cpu /self->cpu != cpu && execname=="mstragent"/ { printf("%s migrated from cpu %d to cpu %d nsec:%d \n",execname,self->cpu,cpu,timestamp-self->timestamp); printf("%s migrated from cpu %d to cpu %d ms:%d \n",execname,self->cpu,cpu,(timestamp-self->timestamp)/1000000); self->cpu = 0; self->timestamp = 0; } Sample output is as follows dtrace: script './migr.d' matched 3 probes CPU ID FUNCTION:NAME 1 782 resume:on-cpu mstragent migrated from cpu 0 to cpu 1 nsec:1123786101964690 mstragent migrated from cpu 0 to cpu 1 ms:1123786101 0 782 resume:on-cpu mstragent migrated from cpu 1 to cpu 0 nsec:38049334 mstragent migrated from cpu 1 to cpu 0 ms:38 0 782 resume:on-cpu mstragent migrated from cpu 1 to cpu 0 nsec:39942749 mstragent migrated from cpu 1 to cpu 0 ms:39 0 782 resume:on-cpu mstragent migrated from cpu 1 to cpu 0 nsec:40069916 mstragent migrated from cpu 1 to cpu 0 ms:40 0 782 resume:on-cpu mstragent migrated from cpu 1 to cpu 0 nsec:39936750 mstragent migrated from cpu 1 to cpu 0 ms:39 0 782 resume:on-cpu mstragent migrated from cpu 1 to cpu 0 nsec:39991167 mstragent migrated from cpu 1 to cpu 0 ms:39 0 782 resume:on-cpu mstragent migrated from cpu 1 to cpu 0 nsec:40012583 mstragent migrated from cpu 1 to cpu 0 ms:40 0 782 resume:on-cpu mstragent migrated from cpu 1 to cpu 0 nsec:39956000 mstragent migrated from cpu 1 to cpu 0 ms:39 0 782 resume:on-cpu mstragent migrated from cpu 1 to cpu 0 nsec:39970999 mstragent migrated from cpu 1 to cpu 0 ms:39 Thanks Al -- This message posted from opensolaris.org _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org