[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 334
  • Last Modified:

Regarding ps command

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
pigeon5566
Asked:
pigeon5566
  • 2
  • 2
  • 2
  • +1
1 Solution
 
biraCommented:
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
 
biraCommented:
a little more:

TTY represents The controlling workstation for the process

if it appears "?" The process is not associated with a workstation
0
 
TintinCommented:
A ? simply means a process that isn't associated with a terminal.  Typically daemons and detached processes come under this category.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
JJSmithCommented:

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
 
pigeon5566Author Commented:
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
 
TintinCommented:
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
 
pigeon5566Author Commented:
Thanks a lot for the info
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now