zoukankan      html  css  js  c++  java
  • crontab 状态-关闭-重 启

    crond dead but pid file exists 问题解决办法

     

    [root@gql_if_pj-znjr_znjr-python_formal_10.991 model]#service crond status
    crond dead but pid file exists
    [root@gql_if_pj-znjr_znjr-python_formal_10.991 model]#service crond restart
    Starting crond: [ OK ]
    [root@gql_if_pj-znjr_znjr-python_formal_10.991 model]#service crond status
    crond (pid 30193) is running...
     

      之前写过一个定时关机的crontab,后来关掉之后发现还是每天定时关机

    查看crontab状态

    1 [root@puppetclient var]# service crond status
    2 crond dead but pid file exists

    提示报错: crond dead but pid file exists

    解决过程

    ps -ef | grep crond 以及把进程杀死 查看还是有该报错

    尝试把进程文件删除掉

    复制代码
     1 [root@puppetclient var]# find -name cron*
     2 ./spool/anacron/cron.daily
     3 ./spool/anacron/cron.weekly
     4 ./spool/anacron/cron.monthly
     5 ./spool/cron
     6 ./lock/subsys/crond
     7 ./run/cron.reboot
     8 ./run/crond.pid
     9 
    10 [root@puppetclient run]# rm -rf crond.pid 
    11 [root@puppetclient run]# service crond status
    12 crond dead but subsys locked
    复制代码

    查看还是有该报错

    然后,尝试重启crontab

    复制代码
    1 [root@puppetclient run]# service crond restart
    2 Starting crond:                                            [  OK  ]
    3 [root@puppetclient run]# service crond status 
    4 crond (pid  6131) is running...
    5 [root@puppetclient run]# service crond stop
    6 Stopping crond:                                            [  OK  ]
    7 [root@puppetclient run]# service crond status
    8 crond is stopped
    复制代码

    解决方法

    建议先尝试重启下查看是否还有该报错

    如果还有的话 需要把进程文件删除掉

  • 相关阅读:
    MVP的理解和使用
    Fragment
    ProgressBar及其子类
    几种Menu和几种对话框
    APP打包上线应注意的问题!
    Linux常用命令大全
    如何调试Android Framework?
    Android Studio你不知道的调试技巧
    OSError: [WinError 193] %1 不是有效的 Win32 应用程序。
    LookupError: Couldn't find path to unrar library.
  • 原文地址:https://www.cnblogs.com/gina11/p/14709085.html
Copyright © 2011-2022 走看看