Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgrep -U 无法识别,与容器里的pgrep指令不匹配 #343

Closed
yangcoolq opened this issue Sep 7, 2021 · 1 comment
Closed

pgrep -U 无法识别,与容器里的pgrep指令不匹配 #343

yangcoolq opened this issue Sep 7, 2021 · 1 comment

Comments

@yangcoolq
Copy link

cat: can't open '/root/.sandbox.token': No such file or directory

  • test -n '' -a -z ''
  • check_permission
  • pgrep java
  • grep 1
  • pgrep -U root
  • grep 1
    pgrep: unrecognized option: U
    BusyBox v1.27.2 (2017-12-12 10:41:50 GMT) multi-call binary.

Usage: pgrep [-flanovx] [-s SID|-P PPID|PATTERN]

Display process(es) selected by regex PATTERN

-l	Show command name too
-a	Show command line too
-f	Match against entire command line
-n	Show the newest process only
-o	Show the oldest process only
-v	Negate the match
-x	Match whole name (not substring)
-s	Match session ID (0 for current)
-P	Match parent process ID
  • exit_on_err 1 'permission denied, root is not allow attach to 1.'
  • [[ -n permission denied, root is not allow attach to 1. ]]
  • echo 'permission denied, root is not allow attach to 1.'
    permission denied, root is not allow attach to 1.

以上问题,其他人也提到过

@oldmanpushcart
Copy link
Collaborator

@z529192557 在docker下有遇到pgrep不可用么?我没有docker环境的经验。
@yangcoolq 能否帮助我们完善呢

  1. 小建议:不要用root来执行
  2. 期待回馈:我们没有你的环境比较难重现问题,sandbox.sh建议在实际公司部署的时候根据自己的环境情况进行修改,同时我们也很乐意能接收到你的pull-request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants