I am working on Solaris 11 zone and I need to check which shell a running process is using. I have the PID but I am not sure where to get the information from.
I have a scenario where some resource limits (limit on open file descriptors) should be applied to all processes. But it looks like some processes are not following the limit. It might be possible that they are being launched using a different shell which has different limit parameters.
For a little insight, I am using the ulimit
command in /etc/profile
to set the files limit. That way, it gets set for every session, whenever a user logs in. The problem scenario is explained in detail in this question.
So I just need to see whether those processes are using Bash or some other shell. That would answer whether the assumption is correct or not.
pstree
to see the parents of process.exec
falls that replace the spawning process might be in the way here (since you lose information about the spawner). In addition on linux machinesps
will give tty information which is often the same as who spawned things.tty
for zsched?