We have a service that we start up remotely with rsh but unfortunately, the rsh never returns to the calling server. This seems to be because the processes of the service we've just started hold the port open.
When run locally on the command line, all is well with the simple script and I can log off the session without issue or other prompt. When called with rsh, the script called does complete (we have logging to show that), so I'm wondering how I can disinherit/detach the service processes started up.
Server where script will run is AIX 5.1 and the server calling is RHEL 6.3
Suggestions would be most welcome. Many thanks, in advance,
Robin
Liverpool/Blackburn
UK
---------- Post updated at 11:59 AM ---------- Previous update was at 11:21 AM ----------
Cancel that. I managed it with a nohup xxxxx & call to start the service inside the script.
Hi All,
My rsh connecion is very slow, what should I look for...???
Note : I get the rsh connection, but it takes time.
Thanks & Regards,
jumadhiya. (3 Replies)
Hi
Can someone help me what is the problem, when i try to login via ftp, though i entered the correct password, i got an error message
Connection refused.
please help. thanks (3 Replies)
I am trying to connect to a remote server using rsh.
first i have given the following command.
$ rsh 242.13.45.54 -l
now i got the following message
"connect to address 242.13.45.54: Connection refused
Trying krb4 rlogin...
connect to address 242.13.45.54: Connection refused
trying... (1 Reply)
Hello. I would like to know how to close an existing tcp socket. I have read some stuff and learned how to create a socket and then close it but have not found anything about how to close an existing tcp socket created by another application. The situation is this: I have an ODBC server running and... (6 Replies)
Hi,
I have logged into a system using Telnet and iam unable to close the connection to connect to the next system using arrays.
Iam getting error "Connection Timed Out"
Iam using net::Telnet module.
Please suggest.. (1 Reply)
Hi. !
When I use the 'NOHUP' along with the '&', the process will be running in the background. Even when I attempt to close (Meaning 'EXIT') the session (say PUTTY in this case), it wont exit unless the process is completed.
But, say when I forcefully terminate the session (SHUT DOWN the... (2 Replies)
Hi,
I use solaris Unix .
I find there is some problem in application and it generate many "close-wait" tcp connect and stay in the server . it is generate by process id 7740
root@XX # netstat -an | grep CLOSE_WAIT | wc -l
285
root@XX # netstat -an | grep CLOSE_WAIT
10.158.35.4.34805 ... (2 Replies)
Can ssh to server. Asks for password.
Then seems to time out and close the connection. Any ideas?
---------- Post updated at 09:30 AM ---------- Previous update was at 07:51 AM ----------
Here is output from ssh -vvv -l user <IPaddress>
debug3: packet_send2: adding 64 (len 59 padlen 5... (4 Replies)
I'm trying to remotely run an upgrade script (via SSH) that update the SSH script on several hosts, just need to add several flags for the ssh command to look like this:
ssh -Nf -i id_logs -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -o ServerAliveCountMax=5... (4 Replies)
Hello,
I am running a bash script to do an rsync back on a computer running MacOS High Sierra. This is the script I am using,
#!/bin/bash
# main backup location, trailing slash included
backup_loc="/Volumes/Archive_Volume/00_macos_backup/"
# generic backup function
function backup {... (12 Replies)
Discussion started by: LMHmedchem
12 Replies
LEARN ABOUT SUSE
runsv
runsv(8) System Manager's Manual runsv(8)NAME
runsv - starts and monitors a service and optionally an appendant log service
SYNOPSIS
runsv service
DESCRIPTION
service must be a directory.
runsv switches to the directory service and starts ./run. If ./run exits and ./finish exists, runsv starts ./finish. If ./finish doesn't
exist or ./finish exits, runsv restarts ./run.
If ./run or ./finish exit immediately, runsv waits a second before starting ./finish or restarting ./run.
Two arguments are given to ./finish. The first one is ./run's exit code, or -1 if ./run didn't exit normally. The second one is the least
significant byte of the exit status as determined by waitpid(2); for instance it is 0 if ./run exited normally, and the signal number if
./run was terminated by a signal. If runsv cannot start ./run for some reason, the exit code is 111 and the status is 0.
If the file service/down exists, runsv does not start ./run immediately. The control interface (see below) can be used to start the ser-
vice and to give other commands to runsv.
If the directory service/log exists, runsv creates a pipe, redirects service/run's and service/finish's standard output to the pipe,
switches to the directory service/log and starts ./run (and ./finish) exactly as described above for the service directory. The standard
input of the log service is redirected to read from the pipe.
runsv maintains status information in a binary format (compatible to the daemontools' supervise program) in service/supervise/status and
service/log/supervise/status, and in a human-readable format in service/supervise/stat, service/log/supervise/stat, service/supervise/pid,
service/log/supervise/pid.
CONTROL
The named pipes service/supervise/control, and (optionally) service/log/supervise/control are provided to give commands to runsv. You can
use sv(8) to control the service or just write one of the following characters to the named pipe:
u Up. If the service is not running, start it. If the service stops, restart it.
d Down. If the service is running, send it a TERM signal, and then a CONT signal. If ./run exits, start ./finish if it exists.
After it stops, do not restart service.
o Once. If the service is not running, start it. Do not restart it if it stops.
p Pause. If the service is running, send it a STOP signal.
c Continue. If the service is running, send it a CONT signal.
h Hangup. If the service is running, send it a HUP signal.
a Alarm. If the service is running, send it a ALRM signal.
i Interrupt. If the service is running, send it a INT signal.
q Quit. If the service is running, send it a QUIT signal.
1 User-defined 1. If the service is running, send it a USR1 signal.
2 User-defined 2. If the service is running, send it a USR2 signal.
t Terminate. If the service is running, send it a TERM signal.
k Kill. If the service is running, send it a KILL signal.
x Exit. If the service is running, send it a TERM signal, and then a CONT signal. Do not restart the service. If the service is
down, and no log service exists, runsv exits. If the service is down and a log service exists, runsv closes the standard input of
the log service, and waits for it to terminate. If the log service is down, runsv exits. This command is ignored if it is given to
service/log/supervise/control.
Example: to send a TERM signal to the socklog-unix service, either do
# sv term /etc/service/socklog-unix
or
# printf t >/etc/service/socklog-unix/supervise/control
printf(1) usually blocks if no runsv process is running in the service directory.
CUSTOMIZE CONTROL
For each control character c sent to the control pipe, runsv first checks if service/control/c exists and is executable. If so, it starts
service/control/c and waits for it to terminate, before interpreting the command. If the program exits with return code 0, runsv refrains
from sending the service the corresponding signal. The command o is always considered as command u. On command d first service/control/t
is checked, and then service/control/d. On command x first service/control/t is checked, and then service/control/x. The control of the
optional log service cannot be customized.
SIGNALS
If runsv receives a TERM signal, it acts as if the character x was written to the control pipe.
EXIT CODES
runsv exits 111 on an error on startup or if another runsv is running in service.
runsv exits 0 if it was told to exit.
SEE ALSO sv(8), chpst(8), svlogd(8), runit(8), runit-init(8), runsvdir(8), runsvchdir(8), utmpset(8)
http://smarden.org/runit/
AUTHOR
Gerrit Pape <pape@smarden.org>
runsv(8)