From: Alexander K. <kri...@fr...> - 2012-03-09 12:56:57
|
[Oh please, set Reply-To in the mailing list as a header. Againt, my first shot was a private answer to someone because the list is only on CC.] Denys Vlasenko, 09.03.2012 13:43: > On 03/08/2012 02:47 PM, Alexander Kriegisch wrote: >> Okay, here is the script as an attachment. Call it like this: >> >> ./strace_no_pending mc.log mc >> ./strace_no_pending test.log -p 719 -p 1010 >> >> Please note: >> - If you want the PID as first column, you need to do that *after* >> sorting by timestamp, which would make the script more complicated. >> I guess this is not needed. >> - The "trap" avoids the script to be aborted before log file >> unification if the user wants to stop strace via Ctrl-C. >> - The pid-numbered logfiles are cleaned up after unification. If you >> still want to keep them, remove the last command. > > I think you should not run strace. Write a separate tool > which post process the logs. Such as this. My script was just a quick-shot skeleton and good enough for me. Why not share it? And I do like one-stop shopping, so why not run strace? Having said that, your version is undoubtedly better. I never used something like "sort -k2" and always enjoy learning something from Mr. BusyBox. I really do! :) Reapectfully -- Alexander |