In New Relic, when I SELECT * FROM ProcessSample
, I can see the fields COMMAND NAME
and PROCESS DISPLAY NAME
. What is the difference between them, and what command can I use in bash to see the process display name?
So, to illustrate, SELECT processId, commandName, processDisplayName FROM ProcessSample
returns:
PROCESS ID | COMMAND NAME | PROCESS DISPLAY NAME |
---|---|---|
42 | ruby | sample_app |
In my case, sample_app
is the sytemd
service name.
The process display name is a made-up field that exists only in New Relic.
It doesn't come from the process itself. You can't get it in bash
. It's determined by New Relic, as you can see in this entry in the New Relic data dictionary.
processDisplayName
The display name (friendly name) of the process.
This is derived from the command name by default, but if it can be determined that the process is associated with a service from the inventory system, New Relic uses the service name. Another source of the name may be a parsed component of the command line, if it is a known command line format (for example, Java app).
So, it comes from the running system, of course, but New Relic may even extract only part of what you're seeing. So you won't find the same field in Linux.
This also explains why you see the service name there.