我在 CentOS 5 机器上继承了一个运行 Apache/PHP 的 Web 服务器。这是一台托管服务器,所以我仍在熟悉环境。这台机器上实际上没有用户活动,但在“top”中,我不断看到 php 进程弹出和关闭。当 php 进程处于活动状态时,我看到它占用了大约 40% 的 CPU。我注意到一个名为“suphp_log”的日志文件,并注意到它每 3 或 4 秒就会写入一次,其中包含以下条目:
[Thu Oct 21 02:56:34 2010] [info] Executing "/home/user/public_html/index.php" as UID 511, GID 511
[Thu Oct 21 02:56:35 2010] [info] Executing "/home/user/public_html/index.php" as UID 511, GID 511
[Thu Oct 21 02:56:37 2010] [info] Executing "/home/user/public_html/index.php" as UID 511, GID 511
[Thu Oct 21 02:56:40 2010] [info] Executing "/home/user/public_html/index.php" as UID 511, GID 511
[Thu Oct 21 02:56:44 2010] [info] Executing "/home/user/public_html/index.php" as UID 511, GID 511
[Thu Oct 21 02:56:44 2010] [info] Executing "/home/user/public_html/index.php" as UID 511, GID 511
[Thu Oct 21 02:56:47 2010] [info] Executing "/home/user/public_html/index.php" as UID 511, GID 511
我对 suphp 不太熟悉,但是否有一些配置设置或其他东西导致它不断读取 index.php 文件或其他东西?我如何控制 suphp 的配置?我假设这就是我系统负载的来源。我该怎么办?
答案1
suPHP 不会自行执行此操作。应该有一些事件导致 Web 服务器通过 suPHP 模块提供 index.php。访问日志说了什么?