Control process from different terminal (over SSH)


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Control process from different terminal (over SSH)
# 1  
Old 12-19-2007
Control process from different terminal (over SSH)

I pressed CTRL Z and suspended the job. then I pressed bg, The process re-started to throw output on the terminal and its not allowing me to access the prompt.

its not even accepting CTRL Z. The process has been running for about 2 hours now and I want to suspend it by opening another terminal. (I am using SSH)

How can I take control of this process from another terminal and then suspend/resume/bg/fg it there

please help
# 2  
Old 12-19-2007
You could try

"kill -STOP <pid-of-process-you-want-to-pause>"

and

"kill -CONT <pid-of-shell-that-is-paused>"
# 3  
Old 12-19-2007
Quote:
Originally Posted by porter
You could try

"kill -STOP <pid-of-process-you-want-to-pause>"

and

"kill -CONT <pid-of-shell-that-is-paused>"
Seems like it worked, but how can I see the output on a different terminal
# 4  
Old 12-19-2007
Quote:
Originally Posted by rakeshou
Seems like it worked, but how can I see the output on a different terminal
Ah, leap into your time machine and set the dial to the moment before you started the program, (use top to find out when that was), then use "nohup mylongprogram &". Then go to other terminal and type "tail -f nohup.out".
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Linux

SSH remote control question

I am pretty new to linux so forgive me for asking a basic question :P I am using SSH to control 40 machines. What i am trying to do is remotely bash a shell script on each machine. I am using a for loop to bash every script, code as follows. code in host machine runallworkers.sh: ... ... (2 Replies)
Discussion started by: mgsolid
2 Replies

2. Shell Programming and Scripting

control timeout of sqlplus process

Hi, I'm using simple sqlplus to test DB availability. When DB is going down, sqlplus command is hang for a few minutes I want to implement the following: 1. execute sqlplus 2. if after 20 sec I dont get a response, kill the process and exit with error. 3. if I get immediate response... (2 Replies)
Discussion started by: gdan2000
2 Replies

3. Programming

terminal device control through a C/C++ program

Hi, I want to fork a new process from a daemon that needs terminal attachment to some ttyN or pts/N device. Here is the code #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <string.h> int main(int... (5 Replies)
Discussion started by: ku@ntum
5 Replies

4. UNIX for Dummies Questions & Answers

init and process control

I'm trying to wrap my head around process control in Unix... particularly init and how it fits in to the equation. Init is responsible for creating sessions by spawning instances of getty which calls login effectively creating sessions right? Why then can init belong to a session? If you ps jx... (4 Replies)
Discussion started by: dexfantasy
4 Replies

5. Shell Programming and Scripting

2 Questions about my process control script

Hi all, My tiny mind is struggling with the following script that shuts down Tomcat on Sol. 8 and kills any defunct processes Tomcat might leave behind (as it so often does). I realize that fixing Tomcat would be best, but this is a band-aid so I won't have to do as much off-hours support of... (3 Replies)
Discussion started by: dkaplowitz
3 Replies

6. UNIX for Advanced & Expert Users

control the process

I found that in my system , there are some strange process , it will make the system crash so I would like to control the system no such process is running , this is if the system process that its process name is "ora" AND its ppid is not "2" , then it will crash the system, can suggest how to... (2 Replies)
Discussion started by: ust
2 Replies

7. Shell Programming and Scripting

Terminal control from rsh

I call "rsh -l username HOSTMANE myscript.sh" from the script on TRU64 OSF1 cluster. The myscript.sh does some logic one the different cluster node and output requested info on my terminal. If I try to use commands to control output (clear, tput etc..) it just does not work. Obviously the rsh... (2 Replies)
Discussion started by: zam
2 Replies

8. SCO

Terminal Control Database Entry

Hi, can someone pls help resolves this problem. I have an Openserver 5.0.4 running but had this error after having a power failure problem. error: cannot access termainl control database entry I have a arnetport also install with wyse 60 terminals, non of the users can have access on... (2 Replies)
Discussion started by: kayode
2 Replies

9. Filesystems, Disks and Memory

unix process control

can anyone send me enything about "unix process control " nicko@freemail.com.mk (2 Replies)
Discussion started by: nicko
2 Replies
Login or Register to Ask a Question