You may use in Solaris:
(您可以在Solaris中使用:)
pargs -l PID
to get all arguments of process in one line if you know its PID.
(如果知道进程的PID,则将其所有参数放在一行中。)
Also you may get the particular argument of process in such way: (您也可以通过以下方式获得过程的特定论点:)
pargs -a PID | grep 'argv[8]' | cut -d: -f 2
Or you may use ps with options if you know only one of process arguments:
(或者,如果您只知道以下过程参数之一,则可以将ps与选项一起使用:)
/usr/bin/ps -A -o pid,args | grep connectivity_script.sh | grep -v grep
In older Solaris versions ouput of arguments in /usr/bin/ps is limited with 80 chars, so you need two-steps to do: 1) get PID from ps, 2) get full args from pargs.
(在较早的Solaris版本中,/ usr / bin / ps中的参数输出限制为80个字符,因此您需要执行两个步骤:1)从ps获取PID,2)从pargs获取完整args。)
PID=$(/usr/bin/ps -A -o pid,args |
grep connectivity_script.sh |
grep -v grep |
cut -d" " -f 1 )
pargs -l $PID
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…