From e8c1cb08a77138039ecbca6ce9d616496834165d Mon Sep 17 00:00:00 2001 From: dami Date: Thu, 7 May 2026 18:47:45 +0800 Subject: [PATCH] update --- plugins/alist/index.py | 2 +- plugins/cloudreve/index.py | 2 +- plugins/dztasks/index.py | 2 +- plugins/gorse/index.py | 2 +- plugins/grafana/index.py | 2 +- plugins/ldap/index.py | 2 +- plugins/loki/index.py | 2 +- plugins/mariadb/index.py | 3 +-- plugins/memcached/index.py | 2 +- plugins/migration_api/index.py | 4 ++-- plugins/mosquitto/index.py | 2 +- plugins/mosquitto/init.d/mosquitto.tpl | 2 +- plugins/mysql-community/index.py | 2 +- plugins/mysql/index.py | 2 +- plugins/pgadmin/pg_init.sh | 2 +- plugins/php-apt/index_php_apt.py | 2 +- plugins/php/index.py | 2 +- plugins/php/index_php.py | 2 +- plugins/postgresql/init.d/postgresql.tpl | 2 +- plugins/prometheus/index.py | 2 +- plugins/redis/index.py | 2 +- plugins/simpleping/index.py | 2 +- plugins/system_safe/init.d/system_safe.tpl | 8 ++++---- plugins/tamper_proof_py/init.d/tamper_proof_py.tpl | 8 ++++---- plugins/task_manager/task_manager_index.py | 2 +- plugins/tgbot/init.d/tgbot.tpl | 4 ++-- plugins/tgclient/init.d/tgclient.tpl | 2 +- plugins/valkey/index.py | 2 +- plugins/zabbix/index.py | 2 +- plugins/zabbix_agent/index.py | 2 +- 30 files changed, 38 insertions(+), 39 deletions(-) diff --git a/plugins/alist/index.py b/plugins/alist/index.py index c22f551f4..9bbeb4535 100755 --- a/plugins/alist/index.py +++ b/plugins/alist/index.py @@ -122,7 +122,7 @@ def openPort(): return True def status(): - cmd = "ps aux|grep alist |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" + cmd = "ps -ef|grep alist |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" data = mw.execShell(cmd) if data[0] == '': return 'stop' diff --git a/plugins/cloudreve/index.py b/plugins/cloudreve/index.py index d01cf0865..0f82a26ab 100755 --- a/plugins/cloudreve/index.py +++ b/plugins/cloudreve/index.py @@ -99,7 +99,7 @@ def readConfigTpl(): def status(): data = mw.execShell( - "ps aux|grep cloudreve |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'") + "ps -ef|grep cloudreve |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'") if data[0] == '': return 'stop' diff --git a/plugins/dztasks/index.py b/plugins/dztasks/index.py index 4bd9f79c9..1ae4db9bf 100755 --- a/plugins/dztasks/index.py +++ b/plugins/dztasks/index.py @@ -106,7 +106,7 @@ def getPidFile(): return tmp.groups()[0].strip() def status(): - cmd = "ps aux|grep dztasks|grep -v grep|grep -v python|grep -v mdserver-web|awk '{print $2}'" + cmd = "ps -ef|grep dztasks|grep -v grep|grep -v python|grep -v mdserver-web|awk '{print $2}'" data = mw.execShell(cmd) if data[0] == '': return 'stop' diff --git a/plugins/gorse/index.py b/plugins/gorse/index.py index 1276f6c10..fb35ee2ed 100755 --- a/plugins/gorse/index.py +++ b/plugins/gorse/index.py @@ -113,7 +113,7 @@ def status(): # if not os.path.exists(pid_file): # return 'stop' - cmd = "ps aux|grep gorse |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" + cmd = "ps -ef|grep gorse |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" data = mw.execShell(cmd) if data[0] == '': diff --git a/plugins/grafana/index.py b/plugins/grafana/index.py index 857b6b17b..035904a51 100755 --- a/plugins/grafana/index.py +++ b/plugins/grafana/index.py @@ -84,7 +84,7 @@ def getPidFile(): return tmp.groups()[0].strip() def status(): - cmd = "ps aux|grep grafana |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" + cmd = "ps -ef|grep grafana |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" data = mw.execShell(cmd) if data[0] == '': return 'stop' diff --git a/plugins/ldap/index.py b/plugins/ldap/index.py index 64e267b1e..11fc23f97 100755 --- a/plugins/ldap/index.py +++ b/plugins/ldap/index.py @@ -115,7 +115,7 @@ def status(): return 'stop' # data = mw.execShell( - # "ps aux|grep redis |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'") + # "ps -ef|grep redis |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'") # if data[0] == '': # return 'stop' diff --git a/plugins/loki/index.py b/plugins/loki/index.py index 0fe8c8224..7ee4f254d 100755 --- a/plugins/loki/index.py +++ b/plugins/loki/index.py @@ -91,7 +91,7 @@ def getPidFile(): return tmp.groups()[0].strip() def status(): - cmd = "ps aux|grep loki |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" + cmd = "ps -ef|grep loki |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" data = mw.execShell(cmd) if data[0] == '': return 'stop' diff --git a/plugins/mariadb/index.py b/plugins/mariadb/index.py index dad563e5b..1db97d51b 100755 --- a/plugins/mariadb/index.py +++ b/plugins/mariadb/index.py @@ -585,8 +585,7 @@ def setMyDbPos(): mw.writeFile(myfile, mycnf) start() - result = mw.execShell( - 'ps aux|grep mysqld| grep -v grep|grep -v python') + result = mw.execShell('ps -ef|grep mysqld| grep -v grep|grep -v python') if len(result[0]) > 10: mw.writeFile('data/datadir.pl', t_datadir) return mw.returnJson(True, '存储目录迁移成功!') diff --git a/plugins/memcached/index.py b/plugins/memcached/index.py index 617f33a2e..da5b5981a 100755 --- a/plugins/memcached/index.py +++ b/plugins/memcached/index.py @@ -96,7 +96,7 @@ def checkArgs(data, ck=[]): def status(): - cmd = "ps aux|grep " + getPluginName() + " |grep -v grep | grep -v mdserver-web | awk '{print $2}'" + cmd = "ps -ef|grep " + getPluginName() + " |grep -v grep | grep -v mdserver-web | awk '{print $2}'" # print(cmd) data = mw.execShell(cmd) # print(data) diff --git a/plugins/migration_api/index.py b/plugins/migration_api/index.py index 5932d3caa..2b83eef19 100755 --- a/plugins/migration_api/index.py +++ b/plugins/migration_api/index.py @@ -230,7 +230,7 @@ class classApi: def close_sync(self, args): # 取消迁移 mw.execShell("kill -9 {}".format(self.get_pid())) - mw.execShell("kill -9 $(ps aux|grep index.py|grep -v grep|awk '{print $2}')") + mw.execShell("kill -9 $(ps -ef|grep index.py|grep -v grep|awk '{print $2}')") # 删除迁移配置 time.sleep(1) if os.path.exists(self._INFO_FILE): @@ -1032,7 +1032,7 @@ def stepThree(): def getPid(): - cmd = "ps aux|grep 'plugins/migration_api/index.py bg_process' |grep -v grep|awk '{print $2}'|xargs" + cmd = "ps -ef|grep 'plugins/migration_api/index.py bg_process' |grep -v grep|awk '{print $2}'|xargs" result = mw.execShell(cmd)[0].strip() if not result: return None diff --git a/plugins/mosquitto/index.py b/plugins/mosquitto/index.py index 5739b1a14..f3b268d5d 100755 --- a/plugins/mosquitto/index.py +++ b/plugins/mosquitto/index.py @@ -78,7 +78,7 @@ def getArgs(): def status(): data = mw.execShell( - "ps aux|grep mosquitto |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'") + "ps -ef|grep mosquitto |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'") if data[0] == '': return 'stop' diff --git a/plugins/mosquitto/init.d/mosquitto.tpl b/plugins/mosquitto/init.d/mosquitto.tpl index 9ff8fd5a0..afee80d3e 100644 --- a/plugins/mosquitto/init.d/mosquitto.tpl +++ b/plugins/mosquitto/init.d/mosquitto.tpl @@ -57,7 +57,7 @@ app_start(){ app_stop(){ echo -e "stopping mosquitto ... \c"; - arr=`ps aux | grep 'mosquitto' | grep -v grep | awk '{print $2}'` + arr=`ps -ef | grep 'mosquitto' | grep -v grep | awk '{print $2}'` for p in ${arr[@]} do kill -9 $p > /dev/null 2>&1 diff --git a/plugins/mysql-community/index.py b/plugins/mysql-community/index.py index 7e414682e..b4efc631c 100755 --- a/plugins/mysql-community/index.py +++ b/plugins/mysql-community/index.py @@ -662,7 +662,7 @@ def setMyDbPos(version=''): mw.writeFile(myfile, mycnf) restart(version) - result = mw.execShell('ps aux|grep mysqld| grep -v grep|grep -v python') + result = mw.execShell('ps -ef|grep mysqld| grep -v grep|grep -v python') if len(result[0]) > 10: mw.writeFile('data/datadir.pl', t_datadir) return mw.returnJson(True, '存储目录迁移成功!') diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 09e98f6a9..575f55cea 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -802,7 +802,7 @@ def setMyDbPos(version): mw.writeFile(myfile, mycnf) start(version) - result = mw.execShell('ps aux|grep mysqld| grep -v grep|grep -v python') + result = mw.execShell('ps -ef|grep mysqld| grep -v grep|grep -v python') if len(result[0]) > 10: mw.writeFile('data/datadir.pl', t_datadir) return mw.returnJson(True, '存储目录迁移成功!') diff --git a/plugins/pgadmin/pg_init.sh b/plugins/pgadmin/pg_init.sh index 31c9dd6bb..80d7840eb 100644 --- a/plugins/pgadmin/pg_init.sh +++ b/plugins/pgadmin/pg_init.sh @@ -19,7 +19,7 @@ expect { expect eof EOF -pids=$(ps aux | grep 'pgAdmin4:app' | grep -v grep | awk '{print $2}') +pids=$(ps -ef | grep 'pgAdmin4:app' | grep -v grep | awk '{print $2}') arr=($pids) for p in ${arr[@]} do diff --git a/plugins/php-apt/index_php_apt.py b/plugins/php-apt/index_php_apt.py index 0712e2825..6d23a54b3 100755 --- a/plugins/php-apt/index_php_apt.py +++ b/plugins/php-apt/index_php_apt.py @@ -59,7 +59,7 @@ def getFpmConfFile(version): def status_progress(version): # ps -ef|grep 'php/81' |grep -v grep | grep -v python | awk '{print $2} - cmd = "ps aux|grep 'php/" + version + \ + cmd = "ps -ef|grep 'php/" + version + \ "' |grep -v grep | grep -v python | awk '{print $2}'" data = mw.execShell(cmd) if data[0] == '': diff --git a/plugins/php/index.py b/plugins/php/index.py index 6da46e92d..a2fff90c3 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -88,7 +88,7 @@ def getFpmFile(version): def status_progress(version): # ps -ef|grep 'php/81' |grep -v grep | grep -v python | awk '{print $2} - cmd = "ps aux|grep 'php/" + version + \ + cmd = "ps -ef|grep 'php/" + version + \ "' |grep -v grep | grep -v python | awk '{print $2}'" data = mw.execShell(cmd) if data[0] == '': diff --git a/plugins/php/index_php.py b/plugins/php/index_php.py index 5495680a1..98af52499 100755 --- a/plugins/php/index_php.py +++ b/plugins/php/index_php.py @@ -53,7 +53,7 @@ def getFpmConfFile(version): def status_progress(version): # ps -ef|grep 'php/81' |grep -v grep | grep -v python | awk '{print $2} - cmd = "ps aux|grep 'php/" + version + \ + cmd = "ps -ef|grep 'php/" + version + \ "' |grep -v grep | grep -v python | awk '{print $2}'" data = mw.execShell(cmd) if data[0] == '': diff --git a/plugins/postgresql/init.d/postgresql.tpl b/plugins/postgresql/init.d/postgresql.tpl index b4b2f7acd..e7e4d394e 100644 --- a/plugins/postgresql/init.d/postgresql.tpl +++ b/plugins/postgresql/init.d/postgresql.tpl @@ -38,7 +38,7 @@ pg_stop() pg_status() { - isStart=$(ps aux | grep 'postgres'| grep -v grep | grep -v 'postgresql status' | awk '{print $2}') + isStart=$(ps -ef | grep 'postgres'| grep -v grep | grep -v 'postgresql status' | awk '{print $2}') if [ "$isStart" != '' ];then echo -e "\033[32mPostgreSQL (pid $isStart) already running\033[0m" else diff --git a/plugins/prometheus/index.py b/plugins/prometheus/index.py index bbf0e9db0..a8f15b32f 100755 --- a/plugins/prometheus/index.py +++ b/plugins/prometheus/index.py @@ -84,7 +84,7 @@ def getPidFile(): return tmp.groups()[0].strip() def status(): - cmd = "ps aux|grep prometheus |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" + cmd = "ps -ef|grep prometheus |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" data = mw.execShell(cmd) if data[0] == '': return 'stop' diff --git a/plugins/redis/index.py b/plugins/redis/index.py index 08d2dbba0..720b41912 100755 --- a/plugins/redis/index.py +++ b/plugins/redis/index.py @@ -114,7 +114,7 @@ def status(): return 'stop' # data = mw.execShell( - # "ps aux|grep redis |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'") + # "ps -ef|grep redis |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'") # if data[0] == '': # return 'stop' diff --git a/plugins/simpleping/index.py b/plugins/simpleping/index.py index 6fc8e92fa..49f2cf340 100755 --- a/plugins/simpleping/index.py +++ b/plugins/simpleping/index.py @@ -127,7 +127,7 @@ def getPidFile(): def status(): data = mw.execShell( - "ps aux|grep simpleping |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'") + "ps -ef|grep simpleping |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'") if data[0] == '': return 'stop' diff --git a/plugins/system_safe/init.d/system_safe.tpl b/plugins/system_safe/init.d/system_safe.tpl index ae460a4b7..ef7f7b626 100644 --- a/plugins/system_safe/init.d/system_safe.tpl +++ b/plugins/system_safe/init.d/system_safe.tpl @@ -23,13 +23,13 @@ fi sys_start() { - isStart=$(ps aux |grep -E "(system_safe)"|grep -v grep|grep -v '/bin/bash'|grep -v 'system_safe/system_safe.py start' | grep -v 'system_safe/system_safe.py reload' | grep -v 'system_safe/system_safe.py restart' | grep -v systemctl | grep -v '/bin/sh' | awk '{print $2}'|xargs) + isStart=$(ps -ef |grep -E "(system_safe)"|grep -v grep|grep -v '/bin/bash'|grep -v 'system_safe/system_safe.py start' | grep -v 'system_safe/system_safe.py reload' | grep -v 'system_safe/system_safe.py restart' | grep -v systemctl | grep -v '/bin/sh' | awk '{print $2}'|xargs) if [ "$isStart" == '' ];then echo -e "Starting system_safe service... \c" cd $rootPath/mdserver-web nohup python3 plugins/system_safe/system_safe.py bg_start &> $mw_path/service.log & sleep 0.5 - isStart=$(ps aux |grep -E "(system_safe)"|grep -v grep|awk '{print $2}'|xargs) + isStart=$(ps -ef |grep -E "(system_safe)"|grep -v grep|awk '{print $2}'|xargs) if [ "$isStart" == '' ];then echo -e "\033[31mfailed\033[0m" echo '------------------------------------------------------' @@ -47,7 +47,7 @@ sys_start() sys_stop() { echo -e "Stopping system_safe service... \c"; - pids=$(ps aux |grep -E "(system_safe)"|grep -v grep|grep -v '/bin/bash'|grep -v systemctl | grep -v 'system_safe/system_safe.py bg_stop'|grep -v 'system_safe/system_safe.py stop' | grep -v 'system_safe/system_safe.py reload' | grep -v 'system_safe/system_safe.py restart' |awk '{print $2}'|xargs) + pids=$(ps -ef |grep -E "(system_safe)"|grep -v grep|grep -v '/bin/bash'|grep -v systemctl | grep -v 'system_safe/system_safe.py bg_stop'|grep -v 'system_safe/system_safe.py stop' | grep -v 'system_safe/system_safe.py reload' | grep -v 'system_safe/system_safe.py restart' |awk '{print $2}'|xargs) arr=($pids) for p in ${arr[@]} do @@ -60,7 +60,7 @@ sys_stop() sys_status() { - isStart=$(ps aux |grep -E "(system_safe)"|grep -v grep|grep -v systemctl|awk '{print $2}'|xargs) + isStart=$(ps -ef |grep -E "(system_safe)"|grep -v grep|grep -v systemctl|awk '{print $2}'|xargs) if [ "$isStart" != '' ];then echo -e "\033[32msystem_safe service (pid $isStart) already running\033[0m" else diff --git a/plugins/tamper_proof_py/init.d/tamper_proof_py.tpl b/plugins/tamper_proof_py/init.d/tamper_proof_py.tpl index ae38bab4c..3287ea94e 100644 --- a/plugins/tamper_proof_py/init.d/tamper_proof_py.tpl +++ b/plugins/tamper_proof_py/init.d/tamper_proof_py.tpl @@ -24,13 +24,13 @@ fi # cd /www/server/mdserver-web && python3 plugins/tamper_proof_py/tamper_proof_service.py start sys_start() { - isStart=$(ps aux |grep -E "(tamper_proof_service)"|grep -v grep |grep -v 'tamper_proof_py/tamper_proof_service.py start' | grep -v 'tamper_proof_py/tamper_proof_service.py reload' | grep -v 'tamper_proof_py/tamper_proof_service.py restart' | grep -v systemctl | grep -v '/bin/sh' | grep -v '/bin/bash' | awk '{print $2}'|xargs) + isStart=$(ps -ef |grep -E "(tamper_proof_service)"|grep -v grep |grep -v 'tamper_proof_py/tamper_proof_service.py start' | grep -v 'tamper_proof_py/tamper_proof_service.py reload' | grep -v 'tamper_proof_py/tamper_proof_service.py restart' | grep -v systemctl | grep -v '/bin/sh' | grep -v '/bin/bash' | awk '{print $2}'|xargs) if [ "$isStart" == '' ];then echo -e "Starting tamper_proof_service... \c" cd $rootPath/mdserver-web nohup python3 plugins/tamper_proof_py/tamper_proof_service.py start &> $mw_path/service.log & sleep 0.5 - isStart=$(ps aux |grep -E "(tamper_proof_service)"|grep -v grep|awk '{print $2}'|xargs) + isStart=$(ps -ef |grep -E "(tamper_proof_service)"|grep -v grep|awk '{print $2}'|xargs) if [ "$isStart" == '' ];then echo -e "\033[31mfailed\033[0m" echo '------------------------------------------------------' @@ -48,7 +48,7 @@ sys_start() sys_stop() { echo -e "Stopping tamper_proof_service... \c"; - pids=$(ps aux |grep -E "(tamper_proof_service)"|grep -v grep|grep -v '/bin/bash'|grep -v systemctl | grep -v 'tamper_proof_py/tamper_proof_service.py stop' | grep -v 'tamper_proof_py/tamper_proof_service.py reload' | grep -v 'tamper_proof_py/tamper_proof_service.py restart' |awk '{print $2}'|xargs) + pids=$(ps -ef |grep -E "(tamper_proof_service)"|grep -v grep|grep -v '/bin/bash'|grep -v systemctl | grep -v 'tamper_proof_py/tamper_proof_service.py stop' | grep -v 'tamper_proof_py/tamper_proof_service.py reload' | grep -v 'tamper_proof_py/tamper_proof_service.py restart' |awk '{print $2}'|xargs) arr=($pids) for p in ${arr[@]} do @@ -61,7 +61,7 @@ sys_stop() sys_status() { - isStart=$(ps aux |grep -E "(tamper_proof_service)"|grep -v grep|grep -v "init.d/tamper_proof_py"|grep -v systemctl|awk '{print $2}'|xargs) + isStart=$(ps -ef |grep -E "(tamper_proof_service)"|grep -v grep|grep -v "init.d/tamper_proof_py"|grep -v systemctl|awk '{print $2}'|xargs) if [ "$isStart" != '' ];then echo -e "\033[32mtamper_proof_service (pid $isStart) already running\033[0m" else diff --git a/plugins/task_manager/task_manager_index.py b/plugins/task_manager/task_manager_index.py index 22a44fb91..3a2966c9e 100755 --- a/plugins/task_manager/task_manager_index.py +++ b/plugins/task_manager/task_manager_index.py @@ -625,7 +625,7 @@ class mainClass(object): if pid == self.panel_pid: return True if not self.task_pid: try: - self.task_pid = int(mw.execShell("ps aux | grep 'python3 task.py' |grep -v grep|head -n1|awk '{print $2}'")[0]) + self.task_pid = int(mw.execShell("ps -ef | grep 'python3 task.py' |grep -v grep|head -n1|awk '{print $2}'")[0]) except: self.task_pid = -1 if pid == self.task_pid: return True diff --git a/plugins/tgbot/init.d/tgbot.tpl b/plugins/tgbot/init.d/tgbot.tpl index 55e6097f2..773da0727 100644 --- a/plugins/tgbot/init.d/tgbot.tpl +++ b/plugins/tgbot/init.d/tgbot.tpl @@ -59,7 +59,7 @@ tg_start(){ tg_stop(){ echo -e "stopping tgbot ... \c"; - arr=`ps aux|grep 'tgbot.py'|grep -v grep|awk '{print $2}'` + arr=`ps -ef|grep 'tgbot.py'|grep -v grep|awk '{print $2}'` for p in ${arr[@]} do kill -9 $p > /dev/null 2>&1 @@ -68,7 +68,7 @@ tg_stop(){ echo -e "stopping tgpush ... \c"; - arr=`ps aux|grep 'tgpush.py'|grep -v grep|awk '{print $2}'` + arr=`ps -ef|grep 'tgpush.py'|grep -v grep|awk '{print $2}'` for p in ${arr[@]} do kill -9 $p > /dev/null 2>&1 diff --git a/plugins/tgclient/init.d/tgclient.tpl b/plugins/tgclient/init.d/tgclient.tpl index b44d3fa01..01d4da046 100644 --- a/plugins/tgclient/init.d/tgclient.tpl +++ b/plugins/tgclient/init.d/tgclient.tpl @@ -59,7 +59,7 @@ tg_start(){ tg_stop(){ echo -e "stopping tgclient ... \c"; - arr=`ps aux|grep 'tgclient.py'|grep -v grep|awk '{print $2}'` + arr=`ps -ef|grep 'tgclient.py'|grep -v grep|awk '{print $2}'` for p in ${arr[@]} do kill -9 $p > /dev/null 2>&1 diff --git a/plugins/valkey/index.py b/plugins/valkey/index.py index 11d175df9..65ca8a815 100755 --- a/plugins/valkey/index.py +++ b/plugins/valkey/index.py @@ -114,7 +114,7 @@ def status(): return 'stop' # data = mw.execShell( - # "ps aux|grep redis |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'") + # "ps -ef|grep redis |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'") # if data[0] == '': # return 'stop' diff --git a/plugins/zabbix/index.py b/plugins/zabbix/index.py index 7be515276..abcce8b24 100755 --- a/plugins/zabbix/index.py +++ b/plugins/zabbix/index.py @@ -84,7 +84,7 @@ def getPidFile(): return tmp.groups()[0].strip() def status(): - cmd = "ps aux|grep zabbix_server |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" + cmd = "ps -ef|grep zabbix_server |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" data = mw.execShell(cmd) if data[0] == '': return 'stop' diff --git a/plugins/zabbix_agent/index.py b/plugins/zabbix_agent/index.py index d87b1b689..928aed7c1 100755 --- a/plugins/zabbix_agent/index.py +++ b/plugins/zabbix_agent/index.py @@ -75,7 +75,7 @@ def getPidFile(): return tmp.groups()[0].strip() def status(): - cmd = "ps aux|grep zabbix_agentd |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" + cmd = "ps -ef|grep zabbix_agentd |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'" data = mw.execShell(cmd) if data[0] == '': return 'stop'