Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Tracelogger info during system boot up: (11 Items)
   
Tracelogger info during system boot up  
Hi,

I want to get trace logger info. during system boot up.
On one of the forum i seen below command which i included in the build script but it is not working. trace logger itself

 not yet started.
tracelogger -s15 &

Please suggest whats happening here also let me know any utility is there to work out which i can include on my build 
script so during boot up the trace logger will be automaticallly started and kev file will be available.

Thanks & Regards,
Robin
Re: Tracelogger info during system boot up  
Have a look at the script portion of a build file that I have attached here.  You will see how to start the tracelog and
 how to finish it.  The done_trace called at the end of the script simply injects a user event into the kernel log, it 
is not required for what you are doing.  
After the system has booted, copy the resulting kev file from /dev/shmem

- Dave Nickerson

> Hi,
> 
> I want to get trace logger info. during system boot up.
> On one of the forum i seen below command which i included in the build script 
> but it is not working. trace logger itself
>  not yet started.
> tracelogger -s15 &
> 
> Please suggest whats happening here also let me know any utility is there to 
> work out which i can include on my build 
> script so during boot up the trace logger will be automaticallly started and 
> kev file will be available.
> 
> Thanks & Regards,
> Robin


Attachment: Text trace_boot.bsh 1.17 KB
Re: Tracelogger info during system boot up  
Hi,

I have a requirement like I have to start the tracelogger when one event is passed and stop the logger when i received 
the response for that event. I want to embedd run it in the code.

Please help me know what is the command to use the same

Thanks,
Robin
AW: Tracelogger info during system boot up  
you have to start tracelogger in demon modem,
check the ref manual for this
http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/t/tracelogger.html

then you have to use TraceEvent() calls to do what you want to
here's an example:

// start tracing
// and configure filters
TraceEvent(_NTO_TRACE_ADDALLCLASSES);
TraceEvent(_NTO_TRACE_SETALLCLASSESFAST);
TraceEvent(_NTO_TRACE_SETEVENTWIDE,_NTO_TRACE_THRUNNING);
TraceEvent(_NTO_TRACE_START);

.....

// stop it
TraceEvent(_NTO_TRACE_STOP);
TraceEvent(_NTO_TRACE_FLUSHBUFFER);


check the manual
http://www.qnx.com/developers/docs/6.4.1/neutrino/lib_ref/t/traceevent.html

HTH
/hp


>-----Ursprüngliche Nachricht-----
>Von: Robin wood [mailto:community-noreply@qnx.com] 
>Gesendet: Mittwoch, 2. Dezember 2009 15:48
>An: momentics-community
>Betreff: Re: Tracelogger info during system boot up
>
>Hi,
>
>I have a requirement like I have to start the tracelogger when 
>one event is passed and stop the logger when i received the 
>response for that event. I want to embedd run it in the code.
>
>Please help me know what is the command to use the same
>
>Thanks,
>Robin
>
>
>
>_______________________________________________
>
>QNX Momentics Community Support
>http://community.qnx.com/sf/go/post43013
>
>
Re: AW: Tracelogger info during system boot up  
BTW - if you want ALL events enabled by default, you can use the -E option...

Hans-Peter Reichert wrote:
> you have to start tracelogger in demon modem,
> check the ref manual for this
> http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/t/tracelogger.html
> 
> then you have to use TraceEvent() calls to do what you want to
> here's an example:
> 
> // start tracing
> // and configure filters
> TraceEvent(_NTO_TRACE_ADDALLCLASSES);
> TraceEvent(_NTO_TRACE_SETALLCLASSESFAST);
> TraceEvent(_NTO_TRACE_SETEVENTWIDE,_NTO_TRACE_THRUNNING);
> TraceEvent(_NTO_TRACE_START);
> 
> .....
> 
> // stop it
> TraceEvent(_NTO_TRACE_STOP);
> TraceEvent(_NTO_TRACE_FLUSHBUFFER);
> 
> 
> check the manual
> http://www.qnx.com/developers/docs/6.4.1/neutrino/lib_ref/t/traceevent.html
> 
> HTH
> /hp
> 
> 
>> -----Ursprüngliche Nachricht-----
>> Von: Robin wood [mailto:community-noreply@qnx.com] 
>> Gesendet: Mittwoch, 2. Dezember 2009 15:48
>> An: momentics-community
>> Betreff: Re: Tracelogger info during system boot up
>>
>> Hi,
>>
>> I have a requirement like I have to start the tracelogger when 
>> one event is passed and stop the logger when i received the 
>> response for that event. I want to embedd run it in the code.
>>
>> Please help me know what is the command to use the same
>>
>> Thanks,
>> Robin
>>
>>
>>
>> _______________________________________________
>>
>> QNX Momentics Community Support
>> http://community.qnx.com/sf/go/post43013
>>
>>
> 
> 
> 
> _______________________________________________
> 
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post43015

-- 
cburgess@qnx.com
Re: AW: Tracelogger info during system boot up  
Hi,

As you suggested i gave (tracelogger -d1 -E -w -c -S32M -M -v &) but it is not working. Below is the error message i got
.
_____________________________________________________________
Process 4 (mount) exited status=0.
tracelogger: illegal option -- E

Process 16389 (tracelogger) terminated SIG code=0 by process 0 value=0.
______________________________________________________________

Please help on this.

Thanks,
Robin


Re: AW: Tracelogger info during system boot up  
Ah -E was added in 640 - so you will have to do the event setup that HP noted.

Cheers,

Colin

Robin wood wrote:
> Hi,
> 
> As you suggested i gave (tracelogger -d1 -E -w -c -S32M -M -v &) but it is not working. Below is the error message i got.
> 
_____________________________________________________________
> Process 4 (mount) exited status=0.
> tracelogger: illegal option -- E
> 
> Process 16389 (tracelogger) terminated SIG code=0 by process 0 value=0.
> ______________________________________________________________
> 
> Please help on this.
> 
> Thanks,
> Robin
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post43021
> 

-- 
cburgess@qnx.com
Re: AW: Tracelogger info during system boot up  
Hi,

This is working if i give (tracelogger -d1 E -w -c -S32M -M -v &) without any "-"

Thanks,
Robin
Re: AW: Tracelogger info during system boot up  
Hi,

i used the below cmd but i getting the error in running the Trace looger
Cmd:

tracelogger -d1 E -w -c -S32M -M -v &

Error:
Unable to start "tracelogger" (2)

Please help on this.
Re: AW: Tracelogger info during system boot up  
Hi,

I want to get the serious of KEV files one after the other in the same cycle for different scenario. After getting first
 KEV file i downloaded the file and then tried to delete by using "rm -f *.kev". But if again i try to start the 
tracelogger it is not working. There is no KEV files generated in \dev\shmem area.

Please let me know how to delete one file and to start the other in the same cycle. I am starting and stopping the 
tracelogger in the code itself by using the below cmd.

//start the trace
  TraceEvent(_NTO_TRACE_START);


//stop the trace
  TraceEvent(_NTO_TRACE_STOP);
  TraceEvent(_NTO_TRACE_FLUSHBUFFER);
Re: AW: Tracelogger info during system boot up  
as you're using daemon mode,
you will have to tell tracelogger to end before you're copying the file.
a TraceEvent(_NTO_TRACE_STOP) only tells proc to stop tracing, but not tracelogger to record.

so after doning the 
   TraceEvent(_NTO_TRACE_STOP);
   TraceEvent(_NTO_TRACE_FLUSHBUFFER);
you'll have to
   slay tracelogger
or
   SignalKill(0, LoggerPid, 0, SIGTERM, SI_USER, 0);
as long as tracelogger hasn't finished because the given data limit (-S16M) is reached.

now you can copy the file.
You will have to restart tracelogger for further logging sessions,
but you don't have to delete the *.kev files - they will be overwritten by subsequent restarts of tracelogger

HTH
/hp