[mythtv-users] live TV plays, recordings fail
Daryl McDonald
darylangela at gmail.com
Wed Nov 6 16:10:02 UTC 2019
On Sat, Nov 2, 2019 at 5:27 PM Bill Meek <keemllib at gmail.com> wrote:
> On 11/2/19 10:02 AM, Daryl McDonald wrote:
> > ***** Total ines in logfile: 29999 /var/log/mythtv/mythbackend.log
>
> Note the missing 'l' above. Should be: Total lines in logfile. See if it's
> correct on your old disk. If so, your new SSD didn't get a proper copy.
>
> Here's a new copy: http://paste.ubuntu.com/p/g6Wz2nP5gX/ the only
> change is the addition of a Version: line. It was really written just
> to demonstrate how to get the most recent run of a MythTV log.
>
> I'd run it without the pipe to pastebinit, then copy/paste the output
> to pastebin.com. Or try doing a cat of some other (non secret) file and
> see if pastebinit works.
>
> --
> Bill
> ______________________________________
>
Hey Bill, can you see what is going wrong here?
daryl at trieli:~$ sudo ./shortlog.sh mythbackend
[sudo] password for daryl:
Can't find pattern 'mythbackend version:' in
/var/log/mythtv/mythbackend.log. Fix PATTERN in: ./shortlog.sh
daryl at trieli:~$ cat shortlog.sh
#!/bin/bash
# Save this in a file, for example shortlog.sh and make it executable:
# chmod 755 shortlog.sh
# type ./shortlog.sh for help
if test -z ${1}; then
echo "usage: $0 mythprogramname (e.g. mythbackend)"
exit 1
fi
# You may need to adjust one or both of the next two lines
# for your system:
LOGDIRECTORY="/var/log/mythtv"
PATTERN="${1} version:"
type -P "${1}" > /dev/null
if [ $? -eq 1 ]; then
/bin/echo "${1} doesn't appear to be installed, or isn't in your PATH,
aborting."
exit 1
fi
LOGFILE=$LOGDIRECTORY/${1}.log
if test ! -s $LOGFILE; then
/bin/echo -e "\n$LOGFILE is empty or doesn't exist. Fix LOGDIRECTORY
in: $0"
exit 1
fi
grep "$PATTERN" $LOGFILE 2>&1 > /dev/null
if test $? -ne 0; then
/bin/echo -e "\nCan't find pattern '$PATTERN' in $LOGFILE. Fix PATTERN
in: $0"
exit 1
else
/bin/echo -n -e "\n***** Total ines in logfile: $(wc -l $LOGFILE)\n"
LATESTSTART="$(grep -h "$PATTERN" $LOGFILE | tail -1 | cut -c1-17)"
/bin/echo -e "\n***** Starting timestamp = '$LATESTSTART'\n"
sed --quiet "/^${LATESTSTART}/,\$p" $LOGFILE
fi
daryl at trieli:~$ sudo ls -al /var/log/mythtv
total 307904
drwxr-sr-x 2 syslog adm 4096 Nov 6 09:45 .
drwxrwxr-x 18 root syslog 4096 Nov 6 09:45 ..
-rw-r--r-- 1 syslog adm 18813 Nov 6 11:01 mythbackend.log
-rw-r--r-- 1 syslog adm 167891267 Nov 6 09:45 mythbackend.log.1
-rw-r--r-- 1 syslog adm 10487573 Sep 27 00:06 mythbackend.log.2
-rw-r--r-- 1 syslog adm 28699368 Sep 10 00:08 mythbackend.log.3
-rw-r--r-- 1 syslog adm 51473694 Sep 9 00:07 mythbackend.log.4
-rw-r--r-- 1 syslog adm 10595180 Sep 4 00:06 mythbackend.log.5
-rw-r--r-- 1 syslog adm 10853738 Jun 20 00:07 mythbackend.log.6
-rw-r--r-- 1 syslog adm 3694248 Nov 5 22:03 mythcommflag.log
-rw-r--r-- 1 syslog adm 1556087 Nov 5 17:01 mythfilldatabase.log
-rw-r--r-- 1 syslog adm 1926569 Nov 5 22:31 mythfrontend.log
-rw-r--r-- 1 syslog adm 10533184 Oct 16 00:08 mythfrontend.log.1
-rw-r--r-- 1 syslog adm 4995026 Nov 6 09:42 mythmetadatalookup.log
-rw-r--r-- 1 syslog adm 1486824 Nov 5 22:31 mythpreviewgen.log
-rw-r--r-- 1 syslog adm 10666658 Oct 18 00:06 mythpreviewgen.log.1
-rw-r--r-- 1 syslog adm 356304 Nov 5 13:26 mythtv-setup.log
daryl at trieli:~$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20191106/50516d0d/attachment.htm>
More information about the mythtv-users
mailing list