繁体   English   中英

如何从 Ubuntu 上的 PowerShell Core 获取进程命令行?

[英]How can I get process command line from PowerShell Core on Ubuntu?

我在 Ubuntu 18.04 服务器上。 我知道ps auxww可以获取完整的命令行信息。 例如,通过运行ps auxww ,我知道命令/usr/local/bin/my-program -parameter :8888正在运行。 如何从 PowerShell 获取相同的信息? 我四处搜索,所有信息都是关于如何在 Windows 上获取命令行信息的。

在 Ubuntu 18.04 PowerShell 上

你试过ps -a -F吗? 它应该提供您正在寻找的详细信息。

如果需要有关正在运行/所有进程的特定详细信息,请尝试使用更多选项

ps --help allps --help output命令

PS> ps --help output   

Usage:
 ps [options]

Basic options:
 -A, -e               all processes
 -a                   all with tty, except session leaders
  a                   all with tty, including other users
 -d                   all except session leaders
 -N, --deselect       negate selection
  r                   only running processes
  T                   all processes on this terminal
  x                   processes without controlling ttys

Output formats:
 -F                   extra full
 -f                   full-format, including command lines
  f, --forest         ascii art process tree
 -H                   show process hierarchy
 -j                   jobs format
  j                   BSD job control format
 -l                   long format
  l                   BSD long format
 -M, Z                add security data (for SELinux)
 -O <format>          preloaded with default columns
  O <format>          as -O, with BSD personality
 -o, o, --format <format>
                      user-defined format
  s                   signal format
  u                   user-oriented format
  v                   virtual memory format
  X                   register format
 -y                   do not show flags, show rss vs. addr (used with -l)
     --context        display security context (for SELinux)
     --headers        repeat header lines, one per page
     --no-headers     do not print header at all
     --cols, --columns, --width <num>
                      set screen width
     --rows, --lines <num>
                      set screen height
        --help <simple|list|output|threads|misc|all>
                      display help and exit

For more details see ps(1).

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM