ps -u myname


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ps -u myname
# 1  
Old 08-14-2010
ps -u myname

I got these results.
Code:
   PID TTY         TIME CMD
  8535 pts/24      0:00 ksh
  8528 ?           0:00 sshd
  7949 pts/23      0:00 ksh
  7878 ?           0:00 sshd

I've got two sessions running - is that the ksh entries?
I have one background job running that I submitted # 7435 - that' the number that the log shows me in nohup.out. I can't even see that in the list???? I type jobs 7435 and it says no such job.
What are the sshd jobs shown?
Would this be/result from sudo su command I entered?
What can I type to get more details on the two sshd jobs?

I have no Unix training so I hope you'll forgive my newbie - ness

Last edited by Scott; 08-14-2010 at 03:43 PM.. Reason: Please use code tags
# 2  
Old 08-14-2010
You're logging in with ssh, right? That's what the sshd jobs are there for -- they're the processes that handle the network talk.

The ksh processes are the shells for each of your sessions.

Try 'ps pid' to see if your nohup-ed process is actually still running.

What more details do you want on the sshd jobs?

the 'sudo su' command would show up under a different user than you, since that's what sudo and su are used for.
# 3  
Old 08-14-2010
Quote:
Originally Posted by ido1957
I type jobs 7435 and it says no such job.
The jobs command is built into the shell. It optionally takes as an argument the job number that the shell assigned to the command; not the PID. The job number is presented by the shell when you add an & suffix to any command:

Code:
$ nohup t16 >x 2>&1 &
[1]     16217

Depending on the shell, if you want to query the job information for job 1, the command would be:
Code:
jobs %1     # kshell
jobs 1         #bash

I think bash might also accept %1, but Im not sure. Regardless, issuing the jobs command without any parameters will show you all of the commands that the shell is running asynchronously.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. OS X (Apple)

OSX: ./Users/myname OR. /usr/myname ? 1) what is the truth on UNIX ./usr/ directory.

OSX uses its own directory strecture on the BSD core, for example /Users/Bob_Alice/. but legacy Unix structure /usr/... remains. Adding confustion, some Unix books say /usr/ was never intended for specific users. and others show it being used for Bor or Alice. I am not sure where to put my third... (5 Replies)
Discussion started by: michaelayres
5 Replies

2. Shell Programming and Scripting

for i in `cat myname.txt` && for y in `cat yourname.txt`

cat myname.txt John Doe I John Doe II John Doe III ----------------------------------------------------------------------- for i in `cat myname.txt` do echo This is my name: $i >> thi.is.my.name.txt done ----------------------------------------------------------------------- cat... (1 Reply)
Discussion started by: danimad
1 Replies
Login or Register to Ask a Question