Solved

Regarding  ps command

Posted on 2006-07-13
7
326 Views
Last Modified: 2010-04-21
When i did a ps -eaf | grep -i Tscr i got the below output
ncc 25957 25953  0 18:00:00 ?         0:00 /usr/bin/ksh /top/cmds/Tscript

what does this "?"   in the output of the coomand means. Does this mean process is still running?

0
Comment
Question by:pigeon5566
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 6

Expert Comment

by:bira
ID: 17102801
the "?" represents a unknown TTY.

TTY is a short form of several things: # Short form of Teletype, in turn short form of Teletypewriter.# In general computing: any kind of terminal.# In the operating system Unix: any kind of terminal, or serial port, represented in the device hierarchy as /dev/tty*.# Is the most often used abbreviation for Telecommunications Device for the Deaf.
0
 
LVL 6

Expert Comment

by:bira
ID: 17103259
a little more:

TTY represents The controlling workstation for the process

if it appears "?" The process is not associated with a workstation
0
 
LVL 48

Accepted Solution

by:
Tintin earned 25 total points
ID: 17104315
A ? simply means a process that isn't associated with a terminal.  Typically daemons and detached processes come under this category.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 6

Expert Comment

by:JJSmith
ID: 17110487

If a process shows in your ps list - then it was 'running' at that time. Although the purists' might argue about when a process is actually running.

A ? under the tty column heading signifies that the process, as commented earlier, has no controlling device. What this typically means is that there is no way to directly interact with the process via a man-machine-interface (terminal/keyboard) - sorry about the non-PC term MMI. ;-)

An 'uncontrolled' process will naturally conclude or it will need 'signalling' to change its behaviour.

On some versions of unix there is a -t? option to the ps command to list processes with no ttys' assigned.

If you have the online manual installed you might want to do a 'man ps' and check the -t option.

You might also want to do a 'man signal' to understand how these processes could be communicated with.

Chuck in a 'man nohup' for good measure.

Cheers
JJ
0
 

Author Comment

by:pigeon5566
ID: 17116932
Thanks a lot for the info.  I am not clear with the below things

1. who
sdc        ttyp0        Jul 16 01:57
sdc        ttyp1        Jul 16 03:29

what is the ttyp0? . Is it a random terminal name assigned to each time i login?

2. Also when i do a echo $TERM i am getting vt100 what is the TERM and is it purpose?

0
 
LVL 48

Expert Comment

by:Tintin
ID: 17118356
Now you are asking a different question.  It is better to open a new question for this.

However....

ttyp0 refers to the terminal device you are logged onto.  There are two types of tty devices:

1.  Physical, eg: console, serial
2.  Pseudo, eg: connecting via telent, ssh etc.

Psuedo device names vary.  Sometimes you'll see pts/0 or other variants.  The device numbers are simply allocated on a incrementing scale.

the $TERM environment variable refers to what terminal settings you are using.  All Unix/Linux systems come with a database of terminal definitions (terminfo) that has contains the escape/control sequences for things like bold text and what the function keys and arrow sequences are.  By setting the TERM environment variable, you are simply saying that the terminal you are using uses the definitions of a vt100 (which is a very common terminal emulation)
0
 

Author Comment

by:pigeon5566
ID: 17136882
Thanks a lot for the info
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now