完整的命令在solaris中使用ps不可见

问题描述 投票:1回答:2

由cronjob运行的命令

bin/bash /abc/bcd/def/ghi/connectivity/connectivity_script.sh start tof as abcde with abc/abc.prop

但是我尝试使用]查看此过程时>

/usr/ucb/ps -auwwwxxxx | egrep "connectivity_script.sh"  | cat

我只是看到下面的内容,而不是整个命令。

bin/bash /abc/bcd/def/ghi/connectivity/connectivity_script.sh start tof as

如何获取使用ps运行的整个命令,因为我需要知道已使用哪个属性文件?

在这种情况下为abc / abc.prop

由cronjob bin / bash /abc/bcd/def/ghi/connectivity/connectivity_script.sh运行的命令使用abc / abc.prop以abcde的形式启动tof,但是我尝试使用/ usr / ucb / ps -...

unix solaris ps
2个回答
4
投票

您可以在Solaris中使用:


2
投票

正如Sasha所说,pargs是查看进程的整个参数向量的最佳方法(也是唯一的方法),但是pgrep首先是查找进程的最佳方法。因为您要搜索的不是可执行文件的名称,所以需要-f参数。因此:

© www.soinside.com 2019 - 2024. All rights reserved.