Command line argument of running UNIX processes

(imported topic written by MartinZ91)

Hi everyone,

I’m looking for an easy way to find the command line argument given to a UNIX process at its creation. I did find the inspector “names of processes whose …” and also the “ids/pids of processes …”. But I could not find a “command line of processes …” are something similar.

It’s just on UNIX (all flavors), the shell-command “ps” shows this information, but piping the output of “ps” to a file does not reflect the current state of course.

I did look through the inspector.pdf but didn’t find it, sorry.

Any help appriciated, regards

Martin

(imported comment written by ryanlrussell)

We do not currently have that as an inspector. I’ll add a feature request.

There are two possible ways to do it, depending on the OSes in question, and what features they have turned on. You already know about the option of taking an action to pipe PS to a file and inspecting that, and that it’s not ideal. There are options for crating an action that runs on a schedule so the information is a bit more fresh, if that helps any.

Alternately (at least on Linux), there is often a /proc filesystem that has this. You could write a relevance expression that would go through all the /proc/nnn/cmdline files and built your own list. I’m not sure about equivalent functionality on other OSes, do you have a list of unix flavors that you’re working with?

Please let me know if either of those options seems useful, and I could expand on the idea if you like.

(imported comment written by MartinZ91)

Ryan,

Thanks for the answer and adding the feature request.

The UNIX’s we are working with (different flavors of Linux, Solaris, AIX) do all seem to have a /proc filesystem mounted (I just added a BES property to check this out). If I’ll find some time somewhere on my desk :wink: I’ll might look deeper into the structure of this /proc filesystem to find the cmdline args, but I wont object if You want to check things out.

I’m interested in finding specific strings in those cmdline args, i.e. “ora_x888_INST”

There are processes called “oracle” which have the instance name of the ORACLE DB as cmdline arg. There are a lot of those processes, I’m interested in only some of them with specific cmdline args. I know, that all those args start with “ora_” followed by some identifier of the ORACLE instance. I would like to see just those args as “” of an analysis property or as part of a relevance checking the existance of just one specific instance name (i.e. “ora_x888_INST”)

regards, Martin

hi,
Is there some answer, I also have this problem.
I’ve tried get it with “command line of process” but it cuts of the name of the instance.

thanks,
Ortal

someone please? it’s very urgent.

thanks,
Ortal

((names of it, ( if (exists command line arguments of it) then (command line arguments of it) else (“NA”)) of it) of processes)