10-03-2002
Controlling Tty For A Process
I have developed a Code to find out number and name of processes currently running in SunOS Release 5.8 Server. I have used 'prpsinfo' structure to retrieve process details. But however I am unable to decompose the controlling terminal for the processes. The member variable pr_lttydev holds controlling tty device number. It prints a seven digit numeric value like 6291465. I am unable to figure out the corresponding terminal name for it. Can anyone provide me a solution for it.
Thanks in advance.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I support an app that outputs alert and audit messages to one log file (vendor says they can't be separated). The script that I have written takes a copy (mv cmd) of the file to do the separation and reformatting. I have a problem that I loose records (messages are being written constantly, upto 3+... (5 Replies)
Discussion started by: nhatch
5 Replies
2. Programming
What is controlling terminal in the case of daemon process? (2 Replies)
Discussion started by: Madhu Babu
2 Replies
3. Filesystems, Disks and Memory
Hi guys,
Can anyone please tell me how I can control the I/O on my hardware devices in Suse Linux 8.1.
I find that everytime I am reading a CD, or copying from a CD, I am unable to listen to music of watch a movie.
Maybe this is intended to be like so, for the current high street technolgy... (1 Reply)
Discussion started by: bionicfysh
1 Replies
4. UNIX Desktop Questions & Answers
Hi,
I'm using xterm and aixterm with Mwm on AIX, and having trouble controlling icon placement when minimising windows. Basically when I run an xterm or aixterm I want to be able to specify where the icon will be if minimised.
The man page mentions the "#geometry Geometry" option to aixterm,... (1 Reply)
Discussion started by: cunningdavid
1 Replies
5. Shell Programming and Scripting
Any one know the below means :
ps: no controlling terminal
I had run a script in background :
nohup ./benchmark.sh &
and shutdown my windows system from where i connected through SSH
I am using bash:
The above script perfoms various tasks of Benchmarking Repositories
Today the... (3 Replies)
Discussion started by: sriram003
3 Replies
6. UNIX for Advanced & Expert Users
Hi all,
There is an application which can be launched once on our box and there are several suspected users telnet into the system with the same login ID.
Is there a way that i can find out from which tty the application is launched? If so, i can get the user name from the "finger"... (1 Reply)
Discussion started by: sleepy_11
1 Replies
7. Fedora
Hi All,
I have a general difficulty in understanding how to control single elements within a string. An example,
XYZ1234 ABCD5678 My expected output is :
ABCD1234 XYZ5678 (swapping subset of string elements of choice)
XYZ37 ACBD1214 (making calculations... (6 Replies)
Discussion started by: pawannoel
6 Replies
8. Red Hat
Why does removing "rhgb quiet" from the kernel boot parameters control whether or not the commands I enter are displayed in single user mode ?
For instance, if I do not remove "rhgb quiet", when I am in single user mode, whatever command I type will not be displayed on the screen.
The... (0 Replies)
Discussion started by: Hijanoqu
0 Replies
9. Shell Programming and Scripting
In bash, you can do something like this:
#!/bin/bash
echo -n "What is your name? " > /dev/tty
read thename < /dev/tty
How can I do the same in python?
I have a python script that has the following content:
#!/usr/bin/python2.7
import getpass
import sys
import telnetlib
import... (2 Replies)
Discussion started by: SkySmart
2 Replies
10. Shell Programming and Scripting
I'm trying to use a bash script for a psych experiment that involves listening to sound files and responding. If I have something like the code below, how can I make sure that a key press is assigned to RESPONSE only after the second echo statement?
for i in 1 2 3; do
echo "Ready?"
sleep 2
... (10 Replies)
Discussion started by: darwin_886
10 Replies
ptree(1) General Commands Manual ptree(1)
NAME
ptree - prints the process tree hierarchy
SYNOPSIS
[pid1|username1 [pid2|username2]...]
DESCRIPTION
prints the process tree of all processes that match the specified arguments. While printing the tree, the child processes are indented to
the right from their respective parent processes.
Options
Prints the tree starting from the children of
(usually pid 0). The default is to print the tree starting from the children of (pid 1).
Operands
pid Print the process tree for the process ID number specified by pid.
username Print the process tree for all the processes from the user specified by username. Note that only username (and not user ID) can
be specified for this instance.
If no operands are specified, then prints the process tree of all processes starting from the children of or (if is specified).
EXTERNAL INFLUENCES
Environment Variables
If is not specified or is null, it defaults to (see lang(5)).
EXAMPLES
Print the process tree for pid 100 and for all processes owned by
WARNINGS
Process information can change while is running; the tree displayed by is only a snapshot in time. Some data printed for defunct processes
is irrelevant.
Users of must not rely on the exact field widths and spacing of its output, as these will vary depending on the system and the release of
HP-UX.
SEE ALSO
pgrep(1), pkill(1), ps(1), fork(2).
ptree(1)