|
Re: Kernel trace : setup static filters to trace only specific processes
|
02/24/2012 8:17 AM
post91767
|
Re: Kernel trace : setup static filters to trace only specific processes
Hi Konstantin,
You will have to use dynamic filtering, the static pid filter is limited
to one pid.
On 12-02-24 5:23 AM, Konstantin V wrote:
> Hello QNX Developers,
>
> I need to setup kernel trace filters so only communication messages emitted by specific processes are recorded. I
followed QNX documentation and wrote little helper util, but eventually tracing is performed only for the last process
specified.
>
> The core functionality of this util is based on following TraceEvent() call :
> TraceEvent(_NTO_TRACE_SETCLASSPID, int class, pid_t pid)
>
> Usecase
>
> 1) Execute tracelogger : tracelogger -d1 -s 10 -f trace_mcd_`date -t`.kev
> 2) In another console, get required process ids : pidin -f "aA" | grep -i -E "eide|mcd|any_other"
> 3) Start tracing : ./mcd_event_filter 1 2 3
>
> Note that in case of tracelogger is not running, setting filters will (legally) fail : ./mcd_event_filter: line:109
function call TraceEvent() failed, errno(47): Operation canceled
>
> Expected results :
> - kernel trace for communication messages (and other trace classes) caused by all these processes is enabled
>
> Current behavior :
> - kernel trace only for the last (!) PID specified is available
>
> Could you please point me what`s wrong with this idea/util ?
>
> Is it possible to implement such filter without resorting to dynamic filtering ?
>
> See attached source for the mentioned code.
>
> Thank you!
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post91763
--
cburgess@qnx.com
|
|
|