2

I want to list process by their executable name, using the comm column. But it always gets truncated even when it's the last column:

$ ps -C systemd-tty-ask-password-agent -o %cpu,%mem,comm
%CPU %MEM COMMAND
 0.0  0.0 systemd-tty-ask

How do I make sure that the COMMAND doesn't get truncated?

1 Answers1

7

Assuming this is on Linux, the value that ps retrieves from the kernel is truncated to 16 bytes (including terminating zero byte), so there is no way for ps to show more information for that value specifically.

If you want to see more information about the command being run, you can look at the args column instead.

See How to get a list of process ids of long command names, not command line parameters? for details.

Stephen Kitt
  • 434,908