slogger inserts garbage characters in disk file in version 6

I am using slogger for creating my erro message file on disk;
#slogger -l . However when i view the file i am getting garabage charcacters inserted into the file.

Sep 13 01:28:31 3 816243 1780 1667444327 540489018 1701996870 1735355424 1735289191 1953068832 1919230056 5
4370546 1917132851 544370546 1701080899 824195616 536879150 864121 2147152 1263356590 1700021059 1867281523 1852
01511 1667444327 540554042 1702129221 1735289202 1767992608 1699553390 1685022836 775370272 808464439 536883248
64125 2147152 1263356590 1700021059 1867281523 1852401511 1667444327 540030010 1953069125 543649385 1767992608 1
99553390 1685022836 775370272 808464439 536883248 733051 2097159 1263356590 1700021059 1867281523 1852401511 166
444327 540161082 1701012289 1852404595 1968054375 1344302188 1953393007 771781221 798586 2097159 1263356590 1700
21059 1867281523 1852401511 1667444327 540292154 1852534357 544110447 1701017701 1869182064 1668227182 170199997
808452196 601978 2097159 1263356590 1700021059 1867281523 1852401511 1667444327 540357690 1852399981 840970784
Jan 06 16:18:26 6 12336 3
Jan 13 09:53:10 4 7 2 CCTestLogging.cc:55 Fire logging with error 2 Error Code : 1.
Jan 13 09:53:10 0 7 2 CCTestLogging.cc:57 Fire logging with error 3 Error Code : 1.
Jan 13 09:53:10 1 50000 2 CCTestLogging.cc:38 Entering main Method 67.700000
Jan 13 09:53:10 5 50000 2 CCTestLogging.cc:40 Exiting main Method 67.700000
Jan 13 09:53:10 3 7 2 CCTestLogging.cc:42 Accessing Null Pointer
Jan 13 09:53:10 2 7 2 CCTestLogging.cc:44 Unknown exception occured
Jan 13 09:53:10 2 7 2 CCTestLogging.cc:45 main 2 2.300000
Jan 13 09:53:10 2 7 2 CCTestLogging.cc:46 main
Jan 13 09:53:10 1 7 2 CCTestLogging.cc:51 Queue is full overflowing . Error Code : 1.
Jan 13 09:53:10 6 7 2 CCTestLogging.cc:53 Fire logging with error 1 Error Code : 1.
Jan 13 09:53:10 4 7 2 CCTestLogging.cc:55 Fire logging with error 2 Error Code : 1.
Jan 13 09:53:10 0 7 2 CCTestLogging.cc:57 Fire logging with error 3 Error Code : 1.
Jan 13 09:53:10 1 50000 2 CCTestLogging.cc:38 Entering main Method 67.700000
Jan 13 09:53:10 5 50000 2 CCTestLogging.cc:40 Exiting main Method 67.700000

Please help

Clear slogger using command slogger -c. It will clear the existing slog messages and re run your application and validate slog message.
I have observed that junk data will apprears in slogger during any problem in application. I had also got same problem earlier or might be application or driver control goes to infinite loop.

I had tried clearing the buffer. Even after that the problem seems to persist.It normally happens when there are many messages logged within a short span. Can this be a problem because many threads are accessing slogger , do we need locking?

even if application goes in infinite loop, the messages need to be logged for debugging.

Please reply

What is the solution to resolving this issue?

Thanks

Have you tried running slogger2 instead?

qnx.com/developers/docs/qnxc … gger2.html

Not sure what the ‘limitations of the original logger’ are but perhaps whatever they are is the problem you are experiencing.

Tim

Hi Tim,

I dont have slogger2 utility in my current qnx OS. Mine is QNX 6.4 and running on PPC target arch, I think slogger2 is for QNX7, and target arch is x86, ARM.

Thanks

Hi Madokapeng,

slogger2 is available in 6.6 but I can’t find any references to earlier versions of QNX. So it very well could be that it’s not available in 6.4.

In the other thread you commented on regarding this the person said they solved it by logging to a RAM disk. Maybe you can try redirecting the log file to a RAM disk instead of the hard drive and see if it solves your issues. That’s some of what slogger2 does.

Tim

Another solution is to open “/dev/slog” in read mode, parse the content with the help of <sys/slog.h> and <sys/slogcodes.h> and do whatever you want with it.
On my side, I send the raw packets on a TCP socket to a PC. The PC decodes the packets and displays them. This way, I get an “infinite” trace log. Of course, this is also possible to record the (raw) packets on the PC for further analysis.