Sponsored Content
Full Discussion: SSH remote control question
Operating Systems Linux SSH remote control question Post 302520618 by mgsolid on Sunday 8th of May 2011 06:29:27 PM
Old 05-08-2011
Data 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:
Code:
...

i=1

for each $ip[] in ip[]   #just for example, i have saved all ips in a array ip[]
do
SSH -i aaa.rsa ubuntu@${ip[]} 'bash /home/ubuntu/program/runworker.sh'
echo "running worker in node $i"
let i++
done
...

code in each runworker.sh in each worker machine:
Code:
./worker.pl 7000 &
#worker.pl is a socket server program. it takes the parameter 7000 to run. it listens to port 7000

i can manually bash the runworker.sh file in each worker machine. So the worker.pl file should work fine. I can use the for loop to do other stuff on each node, so the loop should work fine too.
But the problem occurs when i run the script in the host machine, it stop responding after the first bashing, so the loop can not go on... the screen shows something like this:

Code:
ubuntu@1.1.1.1:~$ bash runallworkers.sh
running worker in node 1


please someone help me out...
Thanks in advance!!
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remote control of cde desktop>?

Does anyone know if there is software out there top allow me to take remote control of a remote CDE desktop like using MS netmeeting? I do not mean mimick the window I mean take over/share the same session. Any help is appreciated (1 Reply)
Discussion started by: boat73
1 Replies

2. Solaris

how to login with ssh to remote system with out applying the remote root/usr password

how to login with ssh to remote system with out applying the remote root/user password with rlogin we can ujse .rhosts file but with ssh howits possible plz guide (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

3. SuSE

Installin Suse 11 - Mouse issue using Remote Control

hi guys I want to exhaust all the possibilities so I'm going to ask this here I am installing a Suse 11 on IBM Blade Center using Remote Control. when using this is impossible to use the mouse I see the mouse but I have no control over it I try to move it but no way it moves to fast s no... (3 Replies)
Discussion started by: kopper
3 Replies

4. Solaris

T3-2 Remote control Problem

Hi Peeps, Wondering if anyone can help me, trying to launch the remote console on a T3-2. When I select use serial redirection it comes up with a dialogue box that says. "The remote console application requires java 5.0. Please Download java from http://www.java.com" "Do you wish to... (1 Reply)
Discussion started by: callmebob
1 Replies

5. AIX

Need to remote control client's ssh session

Is there a way that I can remotely control a user's ssh session so I can see what they are doing and walk them through the problem they are having on my AIX based application? (2 Replies)
Discussion started by: De@nneG
2 Replies
GEARMAN_WORKER_SET_WORKLOAD_FREE_FN(3)				     Gearmand				    GEARMAN_WORKER_SET_WORKLOAD_FREE_FN(3)

NAME
gearman_worker_set_workload_free_fn - Gearmand Documentation, http://gearman.info/ SYNOPSIS
#include <libgearman/gearman.h> gearman_worker_st gearman_worker_set_task_context_free_fn int gearman_worker_timeout(gearman_worker_st *worker) void gearman_worker_set_timeout(gearman_worker_st *worker, int timeout) void *gearman_worker_context(const gearman_worker_st *worker) void gearman_worker_set_context(gearman_worker_st *worker, void *context) void gearman_worker_set_workload_malloc_fn(gearman_worker_st *worker, gearman_malloc_fn *function, void *context) void gearman_worker_set_workload_free_fn(gearman_worker_st *worker, gearman_free_fn *function, void *context) gearman_return_t gearman_worker_wait(gearman_worker_st *worker) gearman_return_t gearman_worker_register(gearman_worker_st *worker, const char *function_name, uint32_t timeout) gearman_return_t gearman_worker_unregister(gearman_worker_st *worker, const char *function_name) gearman_return_t gearman_worker_unregister_all(gearman_worker_st *worker) gearman_job_st *gearman_worker_grab_job(gearman_worker_st *worker, gearman_job_st *job, gearman_return_t *ret_ptr) void gearman_job_free_all(gearman_worker_st *worker) bool gearman_worker_function_exist(gearman_worker_st *worker, const char *function_name, size_t function_length) gearman_return_t gearman_worker_work(gearman_worker_st *worker) Link with -lgearman DESCRIPTION
gearman_worker_st is used for worker communication with the server. gearman_worker_context() and gearman_worker_set_context() can be used to store an arbitrary object for the user. gearman_worker_set_task_context_free_fn() sets a trigger that will be called when a gearman_task_st is released. gearman_worker_timeout() and gearman_worker_set_timeout() get and set the current timeout value, in milliseconds, for the worker. gearman_worker_function_exist() is used to determine if a given worker has a specific function. Normally malloc(3) and free(3) are used for allocation and releasing workloads. gearman_worker_set_workload_malloc_fn() and gearman_worker_set_workload_free_fn() can be used to replace these with custom functions. If you need to remove a function from the server you can call either gearman_worker_unregister_all() to remove all functions that the worker has told the gearmand server about, or you can use gearman_worker_unregister() to remove just a single function. RETURN
Various HOME
To find out more information please check: http://gearman.info/ SEE ALSO
gearmand(8) libgearman(3) AUTHOR
Data Differential http://www.datadifferential.com/ COPYRIGHT
2012, Data Differential, http://www.datadifferential.com/ 0.33 May 04, 2012 GEARMAN_WORKER_SET_WORKLOAD_FREE_FN(3)
All times are GMT -4. The time now is 08:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy