doushe2513 2019-02-28 00:10
浏览 41

在进程列表中多次显示相同的脚本文件

I have a PHP script which runs on a cron every 10 minutes - when the script finishes it seems to still remain in the running processes until a restart.

For example if I run

ps aux | grep -i scriptName

I get

root       684  0.2  0.0 383884 23188 ?        Ss   Feb27   0:07 /usr/bin/php -q /path/to/scriptName
root       846  0.9  0.0 383880 23124 ?        Ss   Feb27   4:39 /usr/bin/php -q /path/to/scriptName
root       925  0.5  0.0 383868 23136 ?        Ss   Feb27   1:39 /usr/bin/php -q /path/to/scriptName
root      1524  0.2  0.0 383884 23176 ?        Ss   Feb27   0:07 /usr/bin/php -q /path/to/scriptName
root      1632  0.6  0.0 383868 23132 ?        Ss   Feb27   1:45 /usr/bin/php -q /path/to/scriptName
root      1750  0.9  0.0 383880 23116 ?        Ss   Feb27   4:32 /usr/bin/php -q /path/to/scriptName
root      2172  0.2  0.0 383884 23184 ?        Ss   Feb27   0:06 /usr/bin/php -q /path/to/scriptName
root      2289  0.5  0.0 383868 23140 ?        Ss   Feb27   1:33 /usr/bin/php -q /path/to/scriptName

How can I get these to clean up once they have run?

I have other scripts which run on cron which do not seem to do this - this is the only one which does.

At the moment there are 100 of these running and I am worried they are going to cause a resource hit and cause issues or a performance problem.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 求用stm32f103c6t6在lcd1206上显示Door is open和password:
    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
    • ¥15 谁有desed数据集呀
    • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
    • ¥15 关于#hadoop#的问题
    • ¥15 (标签-Python|关键词-socket)
    • ¥15 keil里为什么main.c定义的函数在it.c调用不了
    • ¥50 切换TabTip键盘的输入法
    • ¥15 可否在不同线程中调用封装数据库操作的类