<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 12, 2021 at 11:54 AM DaveD <<a href="mailto:mythtv@guiplot.com">mythtv@guiplot.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 12/6/20 11:34 AM, DaveD wrote:<br><br>
After a couple of days, I stopped checking the data and let it run for a <br>
week before looking again.  Unfortunately, after about 3 days the logged <br>
card started to always be "unknown".  That's the default.  When the <br>
program starts, it checks for adapters by listing /dev/dvb.  It then <br>
finds the chip for each adapter using "dmesg | grep 'DVB: registering <br>
adapter '" which lets me build a unique name for each card.  The problem <br>
occurred when dmesg got overloaded with messages and the old ones were <br>
dropped.  No more output from the dmesg | grep command.<br>
<br>
Whenever I've used dmesg in the past, it showed history all the way back <br>
to the boot.  I never even realized there was a limit, but now the <br>
driver for the Hauppauge spams dmesg every time it changes channels with <br>
"xc5000: Firmware dvb-fe-xc5000-1.6.114.fw loaded and running" <br>
(ridiculous!).  With my app changing channels 12 times every hour (plus <br>
normal use), it takes about 4 days to fill the dmesg ring buffer.  The <br>
Dvico does a similar output to dmesg, but only once per app invocation.<br><br>
<br>
Dave D.<br>
<br>
<br></blockquote><div><br></div><div>How about something such as</div><div><br></div><div>dmesg | grep 'DVB: registering adapter   >> adapters.txt    # append any new entries<br></div><div>sort 

adapters.txt > temp_file    # sort</div><div>uniq temp_file > 

adapters.txt    # get rid of dups and write to orig file</div><div>rm temp_file    # cleanup</div><div><br></div><div>And change your script to look at adapters.txt which will obviously accumulate the messages regardless of what ages out of dmesg.</div><div>This could probably be made into a one liner and skip the temp working file but this illustrates the process clearly.</div><div><br></div><div>-- </div><div>Jim Morton</div></div></div>