We are running Red hat Enterprise 7.7 (Maipo) and for a specific oracle process I'm getting two different values under "CMD" column. See below examples:
ps -p [process_id]
109401 ? 00:09:57 ora_pmon_testAnd:
ps -f -p [process_id]
oracle 109401 1 0 2019 ? 00:09:57 ora_pmon_test01I have put sample names, but basically "CMD" for the first output is truncated. What is the difference of these two ways of running the ps command?
What do these two outputs represent?
1 Answer
In the first case you're seeing the comm column, which is stored as a separate field in the process (/proc/PID/comm) and is limited to 16 bytes.
In the second case you're seeing the command aka cmd aka args column, which is taken directly from the process' command line (/proc/PID/cmdline) and has no such limit.