这篇文章主要是关于使用 JMP 的 SQL 功能,但也涉及 XML、Linux、MythTV。
SQL 查询生成器文档: https://www.jmp.com/support/help/14/query-builder.shtml#
神话电视https://www.mythtv.org/是一个开源程序 (TANSTAAFL),可以使用 PC 中的调谐卡(以及其他一些东西)录制无线电视广播。 这是了解 Linux 和 MySQL/MariaDB 并避免看电视的好方法。 该实现使用两台计算机,一台(或多台)后端进行录制,一台(或多台)前端进行观看。 SQL 数据库跟踪要记录的内容和已记录的内容。
https://code.mythtv.org/trac/ticket/12974#no1描述了为什么在 MythTV 后端磁盘上有很多非常旧、非常大的文件在 MythTV 前端不可见的原因。 它说在 deletepending 数据库字段周围有一个 MythTV 错误,如果 MythTV 在设置字段和删除文件之间崩溃,该错误会阻止文件被删除。
例如,使用 Linux ls命令列出一些文件,这里有一个 3GB 的例子(现在是 2019 年 12 月;3T 磁盘只能容纳大约两周的文件;这些文件应该早就没有了。)
-rw-r--r-- 1 神话电视 神话电视3.1G 2018 年 3 月 21 日1051_20180321073000.ts
或者,在导入数据库后,
JMP data table imported from database showing old, large filesJMP data table imported from database showing old, large filesJMP data table imported from database showing old, large filesJMP data table imported from database showing old, large files从数据库导入的 JMP 数据表显示旧的大文件
数据库导入似乎很有用;它将具有相关值的列(或字段)并排放置,并组合来自数据库中多个表的信息。 以下是执行此操作的步骤。
找到数据库凭据。
在运行 MythTV 前端的 Linux 系统上,将有一个文件 ~/.mythtv/config.xml 。
<CONFIGURATION>
<LOCALHOSTNAME>my-unique-identifier-goes-here</LOCALHOSTNAME>
<DATABASE>
<PINGHOST>1</PINGHOST>
<HOST>closet.local</HOST>
<USERNAME>mythtv</USERNAME>
<PASSWORD>this is the pw</PASSWORD>
<DATABASENAME>mythconverg</DATABASENAME>
<PORT>3306</PORT>
</DATABASE>
<WAKEONLAN>
<ENABLED>0</ENABLED>
<SQLRECONNECTWAITTIME>0</SQLRECONNECTWAITTIME>
<SQLCONNECTRETRY>5</SQLCONNECTRETRY>
<COMMAND>echo 'WOLsqlServerCommand not set'</COMMAND>
</WAKEONLAN>
<UPNP>
<UDN>
<MEDIARENDERER>52d20477-fda1-4e42-9edd-5992bd0ca45f</MEDIARENDERER>
</UDN>
</UPNP>
</CONFIGURATION>
将文件复制到您的 JMP 副本可以读取的位置,然后使用 JMP 15 像这样打开它:
// grab user name and password from the XML config file
dtConfig = Open( "F:\mythconfig.xml", invisible, XML Wizard( 0, guess( "huge" ) ) );
这将创建一个像这样的隐藏表
JMP data table loaded from XML file with one row and columns for UserName, Password, and DatabaseNameJMP data table loaded from XML file with one row and columns for UserName, Password, and DatabaseNameJMP data table loaded from XML file with one row and columns for UserName, Password, and DatabaseNameJMP data table loaded from XML file with one row and columns for UserName, Password, and DatabaseName从 XML 文件加载的 JMP 数据表,其中一行一列用于用户名、密码和数据库名称
Closet.local 是后端主机的名称,mythtv 是可以访问 mythconverg 数据库的 SQL 用户名,3306 是默认端口,因此不需要。
使用 windows ODBC 数据源管理器创建 DSN。
您可能需要 64 位驱动程序,并且可能需要下载它们。 https://dev.mysql.com/downloads/connector/odbc/或者可能https://downloads.mariadb.org/connector-odbc/+releases/ . 我很确定我实际上是在我的后端服务器上运行 MariaDB,并在前端使用 MySQL 连接器。 https://www.google.com/search?q=mysql+vs+mariadb
The Windows ODBC Data Source Administrator sets up a DSNThe Windows ODBC Data Source Administrator sets up a DSNThe Windows ODBC Data Source Administrator sets up a DSNThe Windows ODBC Data Source Administrator sets up a DSNWindows ODBC 数据源管理员设置 DSN
按配置并添加几个字段;我认为这些都可以在以后通过连接字符串覆盖。 我的 VirtualBox、网络和服务器对服务器名称 closet.local 不满意,因此使用了点分 IP。 您可以填写用户和密码并测试连接并查看可用的数据库名称。 下面的 JSL 将覆盖那些。
The ODBC Connector dialog supplies some information that can be overridden laterThe ODBC Connector dialog supplies some information that can be overridden laterThe ODBC Connector dialog supplies some information that can be overridden laterThe ODBC Connector dialog supplies some information that can be overridden laterODBC 连接器对话框提供了一些稍后可以覆盖的信息
发现 MythTV 数据库中的表名
多亏了一个例子@briancorcoran为下一段 JSL 指明方向。
https://community.jmp.com/t5/Discussions/How-do-I-get-the-list-of-the-databases-available-on-a-designated/mp/10589
// DSN=Mythtv comes from the windows ODBC Data Source Administrator applet
dt = Open Database(
"DSN=Mythtv;UID=" || dtConfig:UserName[1] || ";PWD=" || dtConfig:Password[1],
"SHOW tables from " || dtConfig:DatabaseName[1] || ";",
"tables in " || dtConfig:DatabaseName[1]
);
该 JSL 使用从上面的 XML 配置文件打开的 dtConfig JMP 数据表来获取实际密码和其他信息以覆盖 DSN(也称为 mythtv,与用户名无关。)Brian 的示例使用了 SHOW DATABASES。 此 JSL 使用 SHOW TABLES FROM mythconverg 从名为 mythconverg 的 mythtv 数据库中获取 80 多个表。
(SQL可以有多个数据库,一个数据库可以有多个表。 数据库彼此不交互,但数据库中的表通常具有允许连接两个表的公共键。 因此,宠物数据库、食谱数据库和 MythTV 数据库。 在 MythTV 数据库中,描述要录制哪些节目的表格和描述已录制哪些节目的表格以及许多其他表格......)
A JMP data table from Open Database(...) showing the 88 table names in the databaseA JMP data table from Open Database(...) showing the 88 table names in the databaseA JMP data table from Open Database(...) showing the 88 table names in the databaseA JMP data table from Open Database(...) showing the 88 table names in the database来自 Open Database(...) 的 JMP 数据表显示了数据库中的 88 个表名
开始弄清楚数据库的形状
如果你做错了并写入数据库,你将破坏数据库。 你可以去阅读源代码对于 MythTV,甚至可以找到解释表格工作原理的文档,或者您可以问一个令人兴奋的问题:明天我还能看录制的电视吗? 接下来是令人兴奋的方式。
翻翻上面数据表中数据库的表名,看看有没有有意思的。 有,但尚不清楚它们代表什么。
two of the high lighted table names, record and recorded, look promisingtwo of the high lighted table names, record and recorded, look promisingtwo of the high lighted table names, record and recorded, look promisingtwo of the high lighted table names, record and recorded, look promising两个高亮的表名,record 和 recorded,看起来很有前途
这是查看表及其列和一些数据的简单方法。
文件→数据库→OpenTable
The OpenTable dialog opens one database table into a JMP data tableThe OpenTable dialog opens one database table into a JMP data tableThe OpenTable dialog opens one database table into a JMP data tableThe OpenTable dialog opens one database table into a JMP data tableOpenTable 对话框将一个数据库表打开到 JMP 数据表中
这张表有50列,但是跳出来的是描述:
The record table seems to describe what to recordThe record table seems to describe what to recordThe record table seems to describe what to recordThe record table seems to describe what to record记录表似乎描述了要记录什么
这是对要记录的内容的描述(或者可能是不记录的内容……我写了那个规则。)这不是我需要的表格。
名为 recorded 的表呢?
The recorded table seems to be a list of programs that were recordedThe recorded table seems to be a list of programs that were recordedThe recorded table seems to be a list of programs that were recordedThe recorded table seems to be a list of programs that were recorded录制的表格似乎是录制的节目列表
这看起来像一张录制节目表。 这将是一个起点。
加入一些表格以在一个地方获得所需的一切
File→Database→Query Builder,选择记录的表...
Query Builder starts by choosing a single tableQuery Builder starts by choosing a single tableQuery Builder starts by choosing a single tableQuery Builder starts by choosing a single table查询生成器首先选择一个表
当你按下 NEXT 时,你会得到这个惊人的@埃里克希尔中间窗口:
The amazing Select Tables windows can view other tables and join them to the first tableThe amazing Select Tables windows can view other tables and join them to the first tableThe amazing Select Tables windows can view other tables and join them to the first tableThe amazing Select Tables windows can view other tables and join them to the first table惊人的选择表窗口可以查看其他表并将它们加入第一个表
此窗口用于浏览表格。 暂时不要单击 Build Query,这会将您带到一个窗口,您可以在其中选择列。 在此之前,使用此窗口加入其他表格。
(您可以稍后返回此窗口,但您应该能够在以后第一次访问时找到您需要的一切……也许吧。)
Clicking a table shows a snapshotClicking a table shows a snapshotClicking a table shows a snapshotClicking a table shows a snapshot单击表格显示快照
这是我最终使用的(几乎,请参见下面的另一项更改):
Three more tables joined with the firstThree more tables joined with the firstThree more tables joined with the firstThree more tables joined with the first与第一个相连的另外三个表
我使用 recordedfile(上面选择的)来获取数据库记住的文件大小。 我认为这个数据库没有规范化,因为 basename 出现在 recorded 和 recordedfile 中...... https://en.wikipedia.org/wiki/Database_normalization
(底部的按钮不同,因为我在构建查询中使用了返回选择更多表的红色三角形按钮来获取这张图片……按确定将返回到构建查询窗口。)
这里有很多功能:您可以使用蓝色圆圈按钮控制连接,可以看到列中任何表的快照,还可以预览连接结果。 并且列出了所有表格! 这就是解决难题的地方:需要什么表以及它们如何连接在一起。 选择 Table Snapshot 选项卡,在左列中选择一个表,然后使用向下箭头查看每个表。 很多 MythTV 的桌子都是空的,这意味着我可以忽略它们。
选择要保留的列
是时候单击 Build Query 按钮了。 此窗口允许您选择所需的列并尝试查询:
Build Query window chooses columns to keep in the JMP data tableBuild Query window chooses columns to keep in the JMP data tableBuild Query window chooses columns to keep in the JMP data tableBuild Query window chooses columns to keep in the JMP data table构建查询窗口选择要保留在 JMP 数据表中的列
双 X 按钮删除所有列选择;您可能想单击单个 X 以仅删除选定的列。 上下移动描述列的行以对列进行排序,并选择一个列以对数据进行预排序。
选择运行查询,研究表格,重新思考……
从上面的对话框中,Tables 旁边的红色三角形会将您带回到添加另一个表对话框(令人惊叹的对话框)。 我需要另一张桌子来真正了解发生了什么。
Added another table, recgroupAdded another table, recgroupAdded another table, recgroupAdded another table, recgroup添加了另一个表,recgroup
recgroups 表有 Deleted Group 指示符。 这是一些结果(类似于顶部的原始表)。所有这些基本名称都在默认组中,而不是已删除的组中。
The filesize column suggests there is a lot of space I might recoverThe filesize column suggests there is a lot of space I might recoverThe filesize column suggests there is a lot of space I might recoverThe filesize column suggests there is a lot of space I might recover文件大小列表明我可能会恢复很多空间
失去了那么多空间!
这是来自表中源脚本的 JSL/SQL。 将 <<
New SQL Query(
Connection( "ODBC:DSN=mythtv;SERVER=192.168.0.39;UID=mythtv;DATABASE=mythconverg;PORT=3306;PWD=%_PWD_%;"
),
QueryName( "recorded" ),
Select(
Column( "callsign", "t3" ),
Column( "channum", "t3" ),
Column( "starttime", "t1", Numeric Format( "m/d/y h:m:s", "0", "NO", "" ) ),
Column( "endtime", "t1", Numeric Format( "m/d/y h:m:s", "0", "NO", "" ) ),
Column( "title", "t1" ),
Column( "description", "t1" ),
Column( "autoexpire", "t1" ),
Column( "preserve", "t1" ),
Column( "deletepending", "t1" ),
Column( "recgroup", "t4" ),
Column( "basename", "t2" ),
Column( "filesize", "t2" ),
Column( "width", "t2" ),
Column( "height", "t2" ),
Column( "fps", "t2" ),
Column( "videoprop", "t5" ),
Column( "subtitletypes", "t5" )
),
From(
Table( "recorded", Alias( "t1" ) ),
Table( "recgroups", Alias( "t4" ),
Join( Type( Left Outer ),
EQ( Column( "recgroupid", "t1" ), Column( "recgroupid", "t4" ) )
)
),
Table( "recordedprogram", Alias( "t5" ),
Join(
Type( Left Outer ),
EQ( Column( "chanid", "t1" ), Column( "chanid", "t5" ) ) &
EQ(
Column("starttime","t1",Numeric Format( "m/d/y h:m:s", "0", "NO", "" ) ),
Column("starttime","t5",Numeric Format( "m/d/y h:m:s", "0", "NO", "" ) )
)
)
),
Table( "recordedfile", Alias( "t2" ),
Join( Type( Left Outer ),
EQ( Column( "recordedid", "t1" ), Column( "recordedid", "t2" ) )
)
),
Table( "channel", Alias( "t3" ),
Join( Type( Left Outer ),
EQ( Column( "chanid", "t1" ), Column( "chanid", "t3" ) )
)
)
),
Order By( Column( "starttime", "t1", Numeric Format( "m/d/y h:m:s", "0", "NO", "" ),
Order( "Ascending" ) )
)
) << Run;
所以我需要做一个小测试:对于单个卡住的文件,触摸数据库以重新打开 autoexpire 并关闭 deletepending。 也许停止并重新启动后端。 然后观察文件是否被删除,在接下来的几个小时或几天内的某个时间……MythTV 的那部分行为,即时删除,也令人困惑。
H嗯。 最好慢慢来。 总文件大小在数据库中是两倍大磁盘。让我们删除这个:1171_20180321043700.ts
首先,进行查询以找到它,使用过滤器。 我之所以选择这条路线,是因为 JMP 可以在 GUI 中为我完成大部分工作,而且如果没有一些帮助,我不太愿意编写 SQL。 在 JMP 为我完成困难部分后,我将修改 SQL。
Add a filter to select a single basename (file)Add a filter to select a single basename (file)Add a filter to select a single basename (file)Add a filter to select a single basename (file)添加过滤器以选择单个基本名称(文件)
好的! 过滤器将 WHERE 子句添加到 SQL 中,并且恰好找到了一行。 我认为是时候从查询生成器对话;需要添加 mythconverg。在每个表名之前:
// grab user name and password from the XML config file
dtConfig = Open( "F:\mythconfig.xml", invisible, XML Wizard( 0, guess( "huge" ) ) );
//https://community.jmp.com/t5/Discussions/How-do-I-get-the-list-of-the-databases-available-on-a-designated/m-p/10589
// dtConfig:UserName,Password,DatabaseName
//
// DSN=Mythtv comes from the windows ODBC Data Source Administrator applet
dbc=CreateDatabaseConnection("DSN=Mythtv;UID=" || dtConfig:UserName[1] || ";PWD=" || dtConfig:Password[1]);
rc=executesql(dbc,"\[
SELECT t3.callsign, t3.channum, t1.starttime, t1.endtime,
t1.title, t1.description, t1.autoexpire, t1.preserve,
t1.deletepending, t4.recgroup, t2.basename, t2.filesize,
t2.width, t2.height, t2.fps, t5.videoprop,
t5.subtitletypes
FROM mythconverg.recorded t1
LEFT OUTER JOIN mythconverg.recgroups t4
ON ( t1.recgroupid = t4.recgroupid )
LEFT OUTER JOIN mythconverg.recordedprogram t5
ON ( ( t1.chanid = t5.chanid ) AND ( t1.starttime = t5.starttime ) )
LEFT OUTER JOIN mythconverg.recordedfile t2
ON ( t1.recordedid = t2.recordedid )
LEFT OUTER JOIN mythconverg.channel t3
ON ( t1.chanid = t3.chanid )
WHERE ( ( ( t2.basename="1171_20180321043700.ts" ) ) )
ORDER BY t1.starttime ASC;
]\","one row");
Close Database Connection(dbc);
close(dtConfig,nosave);
show(nrows(rc)==1); // better only be one row
警告,危险代码如下,您可能会使用更新和设置清除您的数据库。
并替换 SELECT...从和更新并添加一个 SET 子句并删除 ORDER BY:
// grab user name and password from the XML config file
dtConfig = Open( "F:\mythconfig.xml", invisible, XML Wizard( 0, guess( "huge" ) ) );
dbc=CreateDatabaseConnection("DSN=Mythtv;UID=" || dtConfig:UserName[1] || ";PWD=" || dtConfig:Password[1]);
rc=executesql(dbc,"\[
UPDATE mythconverg.recorded t1
LEFT OUTER JOIN mythconverg.recgroups t4
ON ( t1.recgroupid = t4.recgroupid )
LEFT OUTER JOIN mythconverg.recordedprogram t5
ON ( ( t1.chanid = t5.chanid ) AND ( t1.starttime = t5.starttime ) )
LEFT OUTER JOIN mythconverg.recordedfile t2
ON ( t1.recordedid = t2.recordedid )
LEFT OUTER JOIN mythconverg.channel t3
ON ( t1.chanid = t3.chanid )
SET t1.autoexpire=1, t1.deletepending=0
WHERE ( ( ( t2.basename="1171_20180321043700.ts" ) ) );
]\","update");
Close Database Connection(dbc);
close(dtConfig,nosave);
再次获取表格显示更新:
The UPDATE and SET workedThe UPDATE and SET workedThe UPDATE and SET workedThe UPDATE and SET workedUPDATE 和 SET 有效
我不确定如何获取更新状态; rc 是一个缺失值,没有创建表,这是有道理的。 但它奏效了……
几分钟后,该文件仍然存在。 我要重新启动后端。 重新启动。 该文件现在确实显示在前端。
Part of the frontend GUI shows the ancient file is visible againPart of the frontend GUI shows the ancient file is visible againPart of the frontend GUI shows the ancient file is visible againPart of the frontend GUI shows the ancient file is visible again部分前端 GUI 显示旧文件再次可见
我会坐下来看看它是否会在几天后从磁盘上消失。 然后我将像这样处理其余的,看看为什么数据库似乎认为 3T 磁盘上有 6T...
几个小时之后: ls: 无法访问 '1171_20180321043700.ts': 没有那个文件或目录
如上所述(规范化注释),文件名出现在多个表中。 我将 6T 清理为更现实的 3T 的计划假设记录表中有条目引用不再存在于磁盘上的文件。 与其尝试从两个(也许更多?)表中删除记录,我想我会创建一个虚拟文件(如果没有)并让现有代码以通常的方式处理它。 也许一个好的第一步是将 recorded 和 recordedfile 数据库表同时打开到 JMP 数据表中,并确定磁盘上丢失文件和表之间不一致的位置。
文件→数据库→OpenTable 就可以了。 删除除 basename 和 recordedid 之外的所有列,按 recordedid 排序,比较数据表。 单击三个差异。 简单的。
好奇:1171_20180317233200.ts 在记录中,但不是记录文件
并作为 0 字节文件存在-rw-rw-r-- 1 mythtv mythtv 0 2018 年 4 月 4 日 1171_20180317233200.ts
并且 recordedfile 中有两个名称全为空的条目,在 recorded 中没有匹配的 recordedid。 可能不想清理它们,不知道其他表可能引用它们。
上面删除的文件, 1171_20180321043700.ts , 没有出现在任何一个表中。 耶!
我将使用 recorded as truth 因为它没有空白记录。 我将使用带有 fileexists() 函数的列公式来帮助查看发生了什么。
Graph; points at top represent real files on disk, points at bottom are files that are not on diskGraph; points at top represent real files on disk, points at bottom are files that are not on diskGraph; points at top represent real files on disk, points at bottom are files that are not on diskGraph; points at top represent real files on disk, points at bottom are files that are not on disk图形;顶部的点代表磁盘上的真实文件,底部的点是不在磁盘上的文件
有可能我会收回大量磁盘空间,但我想删除的集群中可能有很多长度为零或接近零的文件。 休息时间,不应该在晚上 9 点开始。
回答“多少钱?”问题,使用 filesize() 而不是 fileexists()。 许多文件存在,但都是零字节,因此只有大约 0.3T(10%!)的可恢复空间。
第 1 阶段:为不存在的文件添加虚拟文件,以便 MythTV 稍后可以清理它们。 当 MythTV 找不到文件时,记录保留在数据库中的原因是因为 MythTV 假设文件可能在不可用的磁盘上,如果删除数据库条目,它们将成为孤立的。
// actualsize is this formula:
// File Size( "f:/closet/" || :basename )
For Each Row(
If( :basename != "" & Is Missing( actualsize ),
If( !File Exists( "f:/closet/" || :basename ),
Show( :basename );
Save Text File( "f:/closet/" || :basename, "hi there" );// use “touch” on Linux
, // else
Throw( "oops" )
)
)
);
Write( "\!ndone" );
阶段 2:将数据库的新副本提取到数据表中。 看上去不错。 是时候重新处理 SQL 了,看看我们是否可以只选择要更新的记录:
// grab user name and password from the XML config file
dtConfig = Open( "F:\mythconfig.xml", invisible, XML Wizard( 0, guess( "huge" ) ) );
dbc=CreateDatabaseConnection("DSN=Mythtv;UID=" || dtConfig:UserName[1] || ";PWD=" || dtConfig:Password[1]);
rc=executesql(dbc,"\[
SELECT t3.callsign, t3.channum, t1.starttime, t1.endtime,
t1.title, t1.description, t1.autoexpire, t1.preserve,
t1.deletepending, t4.recgroup, t2.basename, t2.filesize,
t2.width, t2.height, t2.fps, t5.videoprop,
t5.subtitletypes
FROM mythconverg.recorded t1
LEFT OUTER JOIN mythconverg.recgroups t4
ON ( t1.recgroupid = t4.recgroupid )
LEFT OUTER JOIN mythconverg.recordedprogram t5
ON ( ( t1.chanid = t5.chanid ) AND ( t1.starttime = t5.starttime ) )
LEFT OUTER JOIN mythconverg.recordedfile t2
ON ( t1.recordedid = t2.recordedid )
LEFT OUTER JOIN mythconverg.channel t3
ON ( t1.chanid = t3.chanid )
WHERE ( ( ( t1.deletepending=1 ) ) )
ORDER BY t1.starttime ASC;
]\","one row");
Close Database Connection(dbc);
close(dtConfig,nosave);
show(nrows(rc)==1);
这会选择大约一半的记录,这些记录都非常旧,并且挂在 deletepending 上。 是时候变得大胆了……
第三阶段:做。
警告,危险代码如下,您可能会使用更新和设置清除您的数据库。
// grab user name and password from the XML config file
dtConfig = Open( "F:\mythconfig.xml", invisible, XML Wizard( 0, guess( "huge" ) ) );
dbc=CreateDatabaseConnection("DSN=Mythtv;UID=" || dtConfig:UserName[1] || ";PWD=" || dtConfig:Password[1]);
rc=executesql(dbc,"\[
UPDATE mythconverg.recorded t1
LEFT OUTER JOIN mythconverg.recgroups t4
ON ( t1.recgroupid = t4.recgroupid )
LEFT OUTER JOIN mythconverg.recordedprogram t5
ON ( ( t1.chanid = t5.chanid ) AND ( t1.starttime = t5.starttime ) )
LEFT OUTER JOIN mythconverg.recordedfile t2
ON ( t1.recordedid = t2.recordedid )
LEFT OUTER JOIN mythconverg.channel t3
ON ( t1.chanid = t3.chanid )
SET t1.autoexpire=1, t1.deletepending=0
WHERE ( ( ( t1.deletepending=1 ) ) );
]\","update");
Close Database Connection(dbc);
close(dtConfig,nosave);
deletependings 不再挂起,自动过期又回来了。 时间拭目以待。
第二天早上:我认为它起作用了;应该做更好的笔记。 这是在录制早间新闻节目(星期一早上 6:50)之前仍然存在的最旧文件:
-rw-r--r-- 1 mythtv mythtv 1.9G 2018 年 3 月 22 日 1111_20180322080000.ts
-rw-r--r-- 1 mythtv mythtv 3.2G 2018 年 3 月 22 日 1051_20180322080000.ts
-rw-rw-rw- 1 mythtv mythtv 1.1M 2018 年 3 月 22 日 1111_20180322043700.ts.png
-rw-r--r-- 1 mythtv mythtv 11G 2018 年 3 月 22 日 1171_20180322060700.ts
-rw-r--r-- 1 mythtv mythtv 5.6G 2018 年 3 月 22 日 1111_20180322063000.ts
-rw-rw-rw- 1 mythtv mythtv 1.4M 2018 年 3 月 22 日 1051_20180322033500.ts.png
-rw-r--r-- 1 mythtv mythtv 3.2G 2018 年 3 月 22 日 1051_20180322070000.ts
-rw-r--r-- 1 mythtv mythtv 5.7G 2018 年 3 月 22 日 1051_20180322060700.ts
-rw-r--r-- 1 mythtv mythtv 3.2G 2018 年 3 月 22 日 1051_20180322053700.ts
-rw-r--r-- 1 mythtv mythtv 1.6G 2018 年 3 月 22 日 1111_20180322053700.ts
-rw-r--r-- 1 mythtv mythtv 6.4G 2018 年 3 月 22 日 1051_20180322043700.ts
-rw-r--r-- 1 mythtv mythtv 5.4G 2018 年 3 月 22 日 1171_20180322043700.ts
-rw-rw-rw- 1 mythtv mythtv 1.4M 2018 年 3 月 22 日 1171_20180322030000.ts.png
-rw-rw-rw- 1 mythtv mythtv 3.4M 2018 年 3 月 22 日 1051_20180322030100.ts.png
-rw-r--r-- 1 mythtv mythtv 2.1G 2018 年 3 月 22 日 1111_20180322043700.ts
-rw-rw-rw- 1 mythtv mythtv 511K 2018 年 3 月 22 日 1111_20180322030000.ts.png
-rw-r--r-- 1 mythtv mythtv 6.6G 2018 年 3 月 22 日 1051_20180322033500.ts
-rw-r--r-- 1 mythtv mythtv 3.8G 2018 年 3 月 22 日 1111_20180322033500.ts
-rw-r--r-- 1 mythtv mythtv 3.3G 2018 年 3 月 21 日 1171_20180322030000.ts
-rw-r--r-- 1 mythtv mythtv 3.7G 2018 年 3 月 21 日 1051_20180322030100.ts
-rw-r--r-- 1 mythtv mythtv 2.4G 2018 年 3 月 21 日 1111_20180322030000.ts
-rw-r--r-- 1 mythtv mythtv 3.3G 2018 年 3 月 21 日 1051_20180321233000.ts
-rw-rw-rw- 1 mythtv mythtv 725K 2018 年 3 月 21 日 1111_20180321200000.ts.png
-rw-rw-rw- 1 mythtv mythtv 2.6M 2018 年 3 月 21 日 1051_20180321200000.ts.png
-rw-r--r-- 1 mythtv mythtv 2.9G 2018 年 3 月 21 日 1051_20180321200000.ts
-rw-r--r-- 1 mythtv mythtv 1.8G 2018 年 3 月 21 日 1111_20180321200000.ts
-rw-rw-rw- 1 mythtv mythtv 897K 2018 年 3 月 21 日 1111_20180321163000.ts.png
-rw-r--r-- 1 mythtv mythtv 3.2G 2018 年 3 月 21 日 1051_20180321163000.ts
-rw-r--r-- 1 mythtv mythtv 2.0G 2018 年 3 月 21 日 1111_20180321163000.ts
-rw-r--r-- 1 mythtv mythtv 2.0G 2018 年 3 月 21 日 1111_20180321160000.ts
-rw-r--r-- 1 mythtv mythtv 102M 2018 年 3 月 21 日 1171_20180321160000.ts
-rw-r--r-- 1 mythtv mythtv 26G 2018 年 3 月 21 日 1051_20180321110000.ts
-rw-r--r-- 1 mythtv mythtv 8.1G 2018 年 3 月 21 日 1111_20180321110000.ts
-rw-r--r-- 1 mythtv mythtv 3.3G 2018 年 3 月 21 日 1171_20180321100000.ts
-rw-r--r-- 1 mythtv mythtv 6.2G 2018 年 3 月 21 日 1051_20180321100000.ts
-rw-r--r-- 1 mythtv mythtv 3.9G 2018 年 3 月 21 日 1111_20180321100000.ts
-rw-rw-rw- 1 mythtv mythtv 743K 2018 年 3 月 20 日 1281_20180321010000.ts.png
-rw-rw-rw- 1 mythtv mythtv 867K 2018 年 3 月 20 日 1281_20180321002000.ts.png
drwxr-xr-x 12 root root 4.0K 2018 年 3 月 20 日 ..
drwx------ 2 root root 16K 2018 年 2 月 28 日丢失+找到
Programs recorded Friday will be recorded again today (Monday)Programs recorded Friday will be recorded again today (Monday)Programs recorded Friday will be recorded again today (Monday)Programs recorded Friday will be recorded again today (Monday)周五录制的节目今天(周一)再次录制
这三个程序上周五使用了大约 40GB。 9点30分,记录表中最后13.4G被删除。 我不确定其他 15G 是从哪里来的。 也许删除队列已经有一些文件。 也许这些是按最早的顺序添加的,在其他一些之后……我尽量不录制白天的电视节目,所以可能要到今晚我才能看到更多文件被删除。 (是的,它正在发生!)我希望 png(巨型)缩略图也能照顾好自己,现在下结论还为时过早。
我对 JMP 和 SQL 的了解:如果不需要连接(文件→数据库→打开表),有一种非常简单的方法可以将 SQL 表加载到 JMP 数据表中。加入(文件→数据库→查询生成器。)这两个还在表中生成一个可以重用的 JSL 脚本。 而且,如果您需要更新数据库,您需要使用 ExecueSQL() 函数,但您可以让查询生成器生成几乎满足您需要的 SQL,然后更改它并执行 UPDATE/SET。
我过去曾在 JMP 之外完成过一些 SQL 工作。 我发现使用 JSL 执行一些非 SQL 工作(创建虚拟文件、制作磁盘使用情况图)真的很棒,这有助于我更好地理解数据库。
https://code.mythtv.org/cgit/mythtv/tree/mythtv/programs/mythbackend/autoexpire.cpp与清理旧文件相关的 MythTV 源代码的起点
https://en.wikipedia.org/wiki/Cord-cutting
看起来一切都恢复正常了。 这张最终图表显示了不同站点如何优化其可用带宽。 带宽可分为一个或多个通道;更多的通道减少意味着更少的数据来制作高质量的图像。 其中一个地方电视台也选择了 720 60FPS 而不是 1080 30FPS,这可能意味着这不是一个同类比较。 每个突出显示的频道可能有一个或多个来自与其共享带宽的同一电台的其他频道。 底部灰色的站点可能正在同时播放多部老电影,或者购物频道。 它们已从图例中删除。
Lines with bigger slope have more bandwidth allocated to the pictureLines with bigger slope have more bandwidth allocated to the pictureLines with bigger slope have more bandwidth allocated to the pictureLines with bigger slope have more bandwidth allocated to the picture斜率越大的线分配给图片的带宽越多