who - man pages
Hi All,
When I went through the man pages of who regarding the listing of PID's the PID displayed is the pid of the user's current shell Code:
who -uH only the PID of the login program which spawned the users-shell is displayed and not the pid of users-shell This is really confusing. Could you please explain it? |
Can't answer that but if you want to see all processes owned by a specific user you can type:
ps -fu<username> If you want to see all processes associated with a certain terminal (tty/pty) type: ps -ft<terminal> Either of the above will show you the user's shell and all other processes for that user (in case of username) or on that user's terminal (in the case of terminal). The reason you might want to use the latter is that the user may have multiple logins and you may only be interested in what one of those logins is doing. Also this will let you see if the user has changed users with the su command as the process for the switched user will still be associated with the terminal. |
thanks for the reply,
but I am afraid the answer you had posted is no where thinking of question that I had posted. My intention is not about listing of process. I would just like to clarify regarding the statement in the man pages of who and the output generated I hope am clear with the question once again. |
Works ok-ish for me on solaris.
comes up with -ksh and FvwmConsole that's who for you though. It never does what you want. |
tried for the same reading the UTMP structure
but still the same output could somebody please try the same on their sun boxes? and please point me if I am wrong in my code. Code:
# include<utmpx.h> |
here's my output.
SunOS primadtpdev 5.8 Generic_108528-20 sun4u sparc SUNW,Ultra-250 Code:
billym.primadtpdev>1 |
thanks bigearsbilly,
but it would have been great and helpful if you could please post the discription of the PID's listed whether they are PID's of the login program or that of the shell's |
a bit like this:
Code:
billym.primadtpdev>1 | cut -f3 -d:|xargs -n1 ps -fp|sort -u |
"who -uH" on Solaris is correctly giving me the logged users shell's pids.
Code:
NAME LINE TIME IDLE PID COMMENTS |
I'm connecting to my solaris using an Exceed X server on a dos machine.
Maybe that throws it off. |
kshkid, can you post the "who -uH" output on your machine, and the PIDs it outputs that are confusing ?
|
Quote:
sorry this isnt related. but i sometimes see difeernces in the rows returned by w and who. maybe w does what you are expecting? |
here is the output
Code:
NAME LINE TIME IDLE PID COMMENTS Code:
root 28956 28953 0 Feb 20 pts/24 0:00 login -p -d /dev/pts/24 -h 105.7.4.10 28957 |
Quote:
You're correct for terminals there's not a lot of difference. However you can initiate the session from the server side on an X Window and also give it tons more options than you can a standard PuTTY window. However I mainly use Exceed for a lot of the other X Windows one has from Unix/Linux. I wouldn't be able to display a browser from my Linux workstation to my Windows through PuTTY but can with Exceed. A lot of the admin tools on HP-UX (which are superior to Solaris' hodge-podge of tools IHMO) have both a text based and GUI version and generally like using the latter. |
Can you give the full process stack of this process (pstack 28956), I suspect the command is launched by something like "xterm -e login -p ...".
|
All times are GMT -5. The time now is 12:00 AM. |