WebIf EPG not displaying. Fix in documentation not working

rhyds

New Member
As the thread title really. My Foxsat HDR's webif works perfectly apart from the lack of EPG, which I noticed after going to check if S4C could now have recordings scheduled.

I followed the instructions in the documentation to try and force a reinstall of epg but there was no epg.db-opkg file, and forcing a reinstall of epg did nothing. I then tried a full removal/reinstall of the whole firmware with little success.

Is there anything else I can try?
 
It's just possible that the epg boot time script did not complete properly.
From telnet try running this command which will take a few minutes to complete.
/opt/bin/epg -f /opt/tmp/epg.copy dumpsql
 
I'm facing similar issues, my epg.db is 3 days old at this point. I've refreshed the native EPG on the box using the remote to no avail.

top reports that the boot EPG copy takes over 30% of the CPU and it keeps running for hours:

Code:
Mem: 122108K used, 3244K free, 0K shrd, 41108K buff, 38444K cached
CPU: 30.0% usr 38.8% sys  0.0% nic  2.7% idle 25.0% io  3.3% irq  0.0% sirq
Load average: 1.71 1.79 1.30 3/125 1143
  PID  PPID USER  STAT  VSZ %MEM CPU %CPU COMMAND
  391  1 root  R  9292  7.4  0 33.8 /opt/bin/epg -f /opt/tmp/epg.copy
  581  573 root  S  309m252.4  0 16.0 /opt/bin/settop-new
  139  1 root  SW  0  0.0  0  7.8 [kjournald]
  640  573 root  S  309m252.4  0  3.1 /opt/bin/settop-new
  735  573 root  S  309m252.4  0  2.3 /opt/bin/settop-new
  729  573 root  S  309m252.4  0  1.3 /opt/bin/settop-new
1132  1101 root  R  1632  1.3  0  1.3 top
  663  573 root  S  309m252.4  0  1.1 /opt/bin/settop-new
  671  573 root  S  309m252.4  0  0.9 /opt/bin/settop-new
  579  573 root  S  309m252.4  0  0.5 /opt/bin/settop-new
  574  573 root  S  309m252.4  0  0.5 /opt/bin/settop-new
  687  573 root  S  309m252.4  0  0.3 /opt/bin/settop-new
  641  573 root  S  309m252.4  0  0.3 /opt/bin/settop-new
  743  573 root  S  309m252.4  0  0.2 /opt/bin/settop-new
  740  573 root  S  309m252.4  0  0.2 /opt/bin/settop-new
  667  573 root  S  309m252.4  0  0.2 /opt/bin/settop-new

Code:
ls -al /opt/tmp/*epg* /opt/epg/*epg*
-rw-r--r--  1 root  root  16266240 Apr  8 10:43 /opt/epg/epg.db
-rwxr-xr-x  1 root  root  936 Jan 28  2012 /opt/epg/epgDBinit.sql
-rw-r--r--  1 root  root  782336 Apr 11 10:22 /opt/epg/epgnew.db
-rw-r--r--  1 root  root  15992 Apr 11 10:22 /opt/epg/epgnew.db-journal
-rw-r--r--  1 root  root  6529024 Apr 11 10:00 /opt/tmp/epg.copy

Code:
sqlite3 /opt/epg/epg.db "select strftime('%Y%m%d %H%M', lastfileprocessed, 'unixepoch') from epgtimestamp;"
20160408 0900

sqlite3 /opt/epg/epg.db "select strftime('%Y%m%d %H%M', max(starttime), 'unixepoch') from epg;"
20160415 2355

Any suggestions, please?
 
Last edited:
Hi,

I can't remember what I did exactly to sort it in the end, but I think it was raydon's last post upthread that worked in the end
 
Thank you, I missed that the suggested command had the extra parameter dumpsql.

Running it manually, I discovered that /opt/tmp was full!

Code:
/opt/bin/epg -f /opt/tmp/epg.copy dumpsql
SQL error executing script : database or disk is full
RC  : 13
SQL : insert into epg (serviceid, eventid, starttime, duration, encrypted, name,descr, warning, contentcode, contenttype, ECRID, SCRID, RCRID) values (8932,39384,1460468700,600,0,'Ruff-Ruff, Tweet an)

It turns out that this box is configured with a very small /opt/tmp (about 1GB), where another identical box has almost 25GB. They have the same type of 1TB disk and AFAIA were installed the same way.

Code:
Box 1 (the one that ran full):
df -h /opt/tmp
Filesystem  Size  Used Available Use% Mounted on
/dev/hda4  1019.1M  130.4M  836.9M  13% /mnt/hd4

Code:
Box 2 (identical box):
df -h /opt/tmp
Filesystem  Size  Used Available Use% Mounted on
/dev/hda4  24.6G  263.1M  23.1G  1% /mnt/hd4

However, the command still fails owing to a single quote in ECRID that isn't escaped:

Code:
/opt/bin/epg -f /opt/tmp/epg.copy dumpsql
SQL error executing script : near "sSweetheart160435": syntax error
RC  : 1
SQL : insert into epg (serviceid, eventid, starttime, duration, encrypted, name,descr, warning, contentcode, contenttype, ECRID, SCRID, RCRID) values (52016,44602,1460664000,3600,0,'Taylor Swift: America''s Sweetheart','The MVD Music Documentary series lives up to its credo of Serving Artists and Audiences with an interesting look at today''s most intriguing musical artists.','',10,'Leisure','/TaylorSwift:America'sSweetheart160435','','')
Segmentation fault

The single quote in the title is escaped correctly, but not in the ECRID. I guess this error is highly critical because it prevents the EPG from populating for all users?
 
Hi MofTot,

Looks like you still have corrupt EPG data. Certainly there are no issues processing the current EPG data on my Humax :) (although the specific programme details which relate to the problem no longer exist in the EPG).

Would suggest that you follow the instructions in the FAQ relating to EPG problems in the documentation page. Specifically forcing a refresh of the EPG data by going into the Guide pages on the box etc. Let us know the results.

It's true that "special characters" are not escaped in certain fields of the EPG data but historically this has never been an issue. I'll take a look at the EPG parsing code used by the WebIf and see if it can be "beefed up" a bit in this respect.
 
Would suggest that you follow the instructions in the FAQ relating to EPG problems in the documentation page. Specifically forcing a refresh of the EPG data by going into the Guide pages on the box etc. Let us know the results.

Thanks, I had already done that a couple of times, to no avail. However, after a few hours, suddenly the problem had gone away, perhaps because the ECRID had been updated to no longer contain a single quotes for that offending program...
 
Back
Top