开发者

How can I get command arguments with D-trace on OSX

开发者 https://www.devze.com 2023-04-08 23:50 出处:网络
I\'m trying to preview run commands with the args with D-trace. I tried something like开发者_如何学运维 this:

I'm trying to preview run commands with the args with D-trace. I tried something like开发者_如何学运维 this:

sudo dtrace -n 'syscall::execve:return {printf("%s\n", curpsinfo->pr_psargs);}'

But on OSX this code returns only commands names not their args.

I find this forum thread but code in last answer doesn't works for me.


with a little help of my colleague we manage to fix script mentioned in question. This is correct one. The problem was that forum markup removed some * and _ chars.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号