在Matomo Diagnostics中,有一个“设置Cron -通过CLI管理进程”的复选框。让它正常工作是很有帮助的,特别是当您管理一个高流量的Matomo实例时,或者如果有很多网站或片段需要存档(了解更多关于提高Matomo性能的信息)。
For this diagnostic “Setup Cron – Managing processes via CLI” to work OK you need:
要使此诊断程序“Setup Cron - Managing processes via CLI”正常工作,您需要:
Notes:
注:
You can manually test if Managing processes via CLI is supported by running the following command in your server:
您可以通过在服务器中运行以下命令来手动测试是否支持通过CLI管理进程:
./console diagnostics:run --all | grep -i "processes via cli"
If it returns Setup Cron - Managing processes via CLI: INFORMATIONAL not supported (optional) learn more then it means that it is not supported yet (even on CLI). To troubleshoot why, and find out how to solve this issue, here are the following commands that should be running (from your terminal or SSH window as the Matomo user) for the diagnostic to display OK:
如果返回Setup Cron -通过CLI管理进程:INFORMATIONAL not supported(可选)了解更多信息,则意味着它还不受支持(即使在CLI上)。要查找原因并找出解决此问题的方法,应运行以下命令(以Matomo用户身份从您的终端或SSH窗口),以使诊断显示OK:
ps -e
# Should return a list containing PID, TTY, TIME and CMD for ps
awk -V
# Should return the installed version of awk, for example GNU Awk 4.2.1, API: 2.0
ls /proc
# Should return the full contents of the /proc folder
php -r "var_dump(function_exists('shell_exec'));"
php -r "var_dump(function_exists('getmypid'));"
# Should both return bool(true)
which
#should return nothing, if which is not installed it will return "command not found"
#in this case you will need to install the which package from your distributions repository