我需要检查 GoldenGate 进程的滞后。为此,我执行 Goldengate,而不是尝试运行 GoldenGate 自己的命令“info all”。
import subprocess as sub
import re
import os
location = str(sub.check_output(['ps -ef | grep mgr'], shell = True)).split()
pattern = re.compile(r'mgr\.prm$')
print(type(location))
for index in location:
if pattern.search(index)!=None:
gg_location = index[:-14] + "ggsci"
exec_ggate = sub.call(str(gg_location))
os.system('info all')
然而,当我执行 GoldenGate 时,它会打开一个新的 GoldenGate 自己的外壳。所以,我认为正因为如此,Python 无法运行“info all”命令。我怎么解决这个问题?如果缺少信息,请通知我。
先感谢您,