michielroos / doctor
Doctor 显示 TYPO3 的工作状态
v1.0.2
2019-08-22 09:23 UTC
Requires
- typo3/cms-core: ^6.2 || ^7.6
Requires (Dev)
- mikey179/vfsstream: ~1.6.4
- namelesscoder/typo3-repository-client: ~1.3.1
- nimut/testing-framework: ~1.1.8
- phpunit/phpunit: ^5.7
Replaces
- doctor: v1.0.2
- typo3-ter/doctor: v1.0.2
This package is auto-updated.
Last update: 2024-08-30 01:57:13 UTC
README
Doctor 告诉你您的 TYPO3 安装情况。
安装
使用 composer 安装
composer require michielroos/doctor
或克隆它
git clone https://github.com/Tuurlijk/t3ext-doctor.git doctor
使用方法
调用任意 cli 命令。命令 doctor:info
会运行其他所有命令。
EXTENSION "DOCTOR":
-------------------------------------------------------------------------------
doctor:info Information about the whole system
doctor:backenduser Backend user information
doctor:frontenduser Frontend user information
doctor:cache Cache information
doctor:content Content information
doctor:cruftcount Cruft Count; show amount and
percentage of deleted and hidden
records
doctor:database Database information
doctor:overrides Overrides information
doctor:site System information
doctor:typoscript Typoscript information
数据库信息
显示数据库信息以及表格页面的一些额外信息
./typo3/cli_dispatch.phpsh extbase doctor:database --table pages
示例结果部分
Record age for table pages
-------------------------------------------------------------------------------
total 60,482
Younger than 1 year 34,402 - 56.88%
Older than 1 years 26,080 - 43.12%
Older than 2 years 11,270 - 18.63%
Older than 3 years 8,064 - 13.33%
Older than 4 years 3,362 - 5.56%
Older than 5 years 1,046 - 1.73%
Deleted records for table pages
-------------------------------------------------------------------------------
total records 60,482
deleted records 14,352 - 23.73%
Deleted record age for table pages
-------------------------------------------------------------------------------
total 14,352
Younger than 1 year 12,218 - 85.13%
Older than 1 years 2,134 - 14.87%
Hidden records for table pages
-------------------------------------------------------------------------------
total records 60,482
hidden records 7,355 - 12.16%
Hidden record age for table pages
-------------------------------------------------------------------------------
total 7,355
Younger than 1 year 5,368 - 72.98%
Older than 1 years 1,987 - 27.02%
Older than 2 years 673 - 9.15%
Older than 3 years 412 - 5.60%
Older than 4 years 286 - 3.89%
Older than 5 years 73 - 0.99%
数据库中的垃圾数据量
随着数据库的增长,它们往往会积累大量的隐藏和删除的记录。对于页面,我们有回收站,但对于所有其他表格,我们无法直接知道删除了多少记录,除非询问数据库。显示数据库中所有隐藏和删除的垃圾数据信息
./typo3/cli_dispatch.phpsh extbase doctor:cruftcount
示例结果部分
Deleted records for table sys_refindex
-------------------------------------------------------------------------------
total records 1,220,516
deleted records 174,700 - 14.31%
Deleted records for table fe_users
-------------------------------------------------------------------------------
total records 171,627
deleted records 6,703 - 3.91%
Deleted records for table tt_content
-------------------------------------------------------------------------------
total records 148,542
deleted records 63,056 - 42.45%
Hidden records for table tt_content
-------------------------------------------------------------------------------
total records 148,542
hidden records 7,196 - 4.84%
Deleted records for table sys_file_collection
-------------------------------------------------------------------------------
total records 63,614
deleted records 20,195 - 31.75%
Hidden records for table sys_file_collection
-------------------------------------------------------------------------------
total records 63,614
Deleted records for table pages
-------------------------------------------------------------------------------
total records 60,668
deleted records 14,352 - 23.66%
Hidden records for table pages
-------------------------------------------------------------------------------
total records 60,668
hidden records 7,355 - 12.12%
Deleted records for table sys_file_reference
-------------------------------------------------------------------------------
total records 40,499
deleted records 20,261 - 50.03%
Hidden records for table sys_file_reference
-------------------------------------------------------------------------------
total records 40,499
hidden records 600 - 1.48%
Deleted records for table tx_cal_event
-------------------------------------------------------------------------------
total records 5,211
deleted records 1,475 - 28.31%
Hidden records for table tx_cal_event
-------------------------------------------------------------------------------
total records 5,211
hidden records 358 - 6.87%
Deleted records for table tt_address
-------------------------------------------------------------------------------
total records 4,809
deleted records 852 - 17.72%
Deleted records for table tx_djoaccordion_domain_model_accordion
-------------------------------------------------------------------------------
total records 3,923
deleted records 2,343 - 59.72%
Deleted records for table tx_powermail_domain_model_answers
-------------------------------------------------------------------------------
total records 2,806
deleted records 172 - 6.13%
未使用的内容
查找未使用的内容元素和插件类型
./typo3/cli_dispatch.phpsh extbase doctor:content
示例输出
Content information
-------------------------------------------------------------------------------
Total number of content elements 107,927
Content usage
-------------------------------------------------------------------------------
contentType count
-------------------------------------------------------------------------------
text 98,303
uploads 29,522
list 14,510
image 8,739
textpic 4,989
header 4,918
shortcut 4,899
bullets 572
menu 552
media 535
table 295
html 224
login 4
div 1
multimedia unused
swfobject unused
qtobject unused
search unused
default unused
Plugin usage
-------------------------------------------------------------------------------
pluginType count
-------------------------------------------------------------------------------
extbaseplugin_thing 2300
someotherplugin_pi2 99
9 77
powermail_pi1 30
cal_controller 1
multicolumn_pi1 unused
multicolumn_pi_sitemap unused
powermail_pi2 unused
pagebrowse_pi1 unused
tt_address_pi1 unused
后端用户信息
显示后端用户详情
./typo3/cli_dispatch.phpsh extbase doctor:backenduser --uid 287
示例输出
Tinus Tester
--------------------------------------------------------------------------------------
Id 287
Real name Tinus Tester
Username tinus
Description Test Account
Email tinus@test.com
Activated yes
Admin no
Groups:
--------------------------------------------------------------------------------------
Content editor Can create and edit content and pages
Powermail Create and edit powermail forms
Tables view:
--------------------------------------------------------------------------------------
- pages
- sys_collection
- tt_content
- tx_powermail_domain_model_field
- tx_powermail_domain_model_form
- tx_powermail_domain_model_mail
- tx_powermail_domain_model_page
Tables modify:
--------------------------------------------------------------------------------------
- pages
- sys_collection
- tt_content
- tx_powermail_domain_model_field
- tx_powermail_domain_model_form
- tx_powermail_domain_model_mail
- tx_powermail_domain_model_page
路线图
- 添加文档
- 添加后端模块?
- 使用语言标签
- 生成报告文档/ PDF
- 添加更多扫描
- 也为运行在 TYPO3 版本 8 及以上版本的扩展添加版本
已知问题
该扩展已知在 TYPO3 6.2 和 7.6 上工作,并且仅适用于 cli。