Messages in this thread |  | | From | Mark_H_Johnson@raytheon ... | | Subject | Re: [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm3-V0.7.32-15 | | Date | Fri, 10 Dec 2004 16:06:15 -0600 |
| |
Here is my get_ltrace.sh script (at the end).
So I read the preempt_max_latency (to see if its changed) before I copy the latency_trace output. I am not so sure that cat is really doing an "atomic" read when some of the latency traces are over 300 Kbytes in length.
Also note that some of the files were empty :-(. I don't think I've seen that symptom before.
Note that the preempt_max_latency value DID match the last line of the trace output in the example I described. It is just the header that had some stale data in it.
--Mark
--- get_ltrace.sh ---
#!/bin/sh
let MAX=`cat /proc/sys/kernel/preempt_max_latency` let I=0 J=1 let MP=${1:-1000} echo "Current Maximum is $MAX, limit will be $MP." while (( I < 100 )) ; do sleep 1s let NOW=`cat /proc/sys/kernel/preempt_max_latency` if (( MAX != NOW )) ; then echo "New trace $I w/ $NOW usec latency." cat /proc/latency_trace > lt.`printf "%02d" $I` # sync ; sync let I++ let MAX=NOW elif (( J++ >= 10 )) ; then if (( MAX != MP )) ; then echo "Resetting max latency from $MAX to $MP." echo $MP > /proc/sys/kernel/preempt_max_latency let MAX=$MP else echo "No new latency samples at `date`." fi let J=1 # else do nothing... fi done
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |