Running a script on multiple machines


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Running a script on multiple machines
Prev   Next
# 1  
Old 06-17-2003
Data Running a script on multiple machines

To clear the web cache on my web server, I run this command:

find $APACHE_HOME/cache/plsql/plsql -type d -name "[0-9]*" -exec rm -R {} \;

To clear the cache on all the web servers(we have 4), I log on to any one machine, clear its cache, ssh to another machine, clear cache etc;

Is there any way to write a script so that this operation can be performed in one script ?

In other words, the script automatically ssh's into the 2nd server, clears the cache and then logs on to 3rd server and so on.

The ssh is over a trusted network and I am using the same account on each of these boxes so I am not prompted for password when going from one machine to another.

I tried to write such a script but what happens is although it logs into the other machine, I see a prompt for the other machine and when I exit it, I am back to the original machine. The script then runs on the original machine.

The shell is ksh and the OS is Solaris 2.8.

Thanx
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl script running multiple commands at once

Hi All, I have put a perl script together to go and collect some information from multiple nodes/endpoints. The script works absolutly fine however I want to make it quicker. You will see in the below that my script calls an expect script called ssh_run_cmd2.exp followed by the IP of... (7 Replies)
Discussion started by: mutley2202
7 Replies

2. Shell Programming and Scripting

Shell Script to find out if a process is running on any all machines

Hi All, I have been a guest visitor from a long time and this forum is wonderful. I finally am a member of this forum too, so i am here stuck with a shell script that i was trying to write My requirement is that i should be able to create a shell script which will check if a process is running on... (3 Replies)
Discussion started by: Rex0226
3 Replies

3. UNIX for Dummies Questions & Answers

Running commands on remote machines

so i want to monitor a variety of things on hundreds of servers. the old process was to have an agent running on each one of these servers. but now i'm looking to see if its possible to have agentless monitoring. the only other straight forward option other than having an agent on the hosts, is... (2 Replies)
Discussion started by: SkySmart
2 Replies

4. Shell Programming and Scripting

Running a script on multiple remote hosts at once

I have a script on about 15 hosts that I need to run for each host whenever I want (not crontab). Problem is, this script takes 5-10 mins to run for each host. Is there a way I can run the script in parallel for all the hosts instead of 1 at a time? Also, I'm remotely running the script on the... (3 Replies)
Discussion started by: mrskittles99
3 Replies

5. UNIX for Dummies Questions & Answers

running script in multiple locations

Hey guys I have written a bash script that compares two directories and displays the files that are different in the directories. Now my problem is the script only runs in my home directory. What do I have to do so it will run in other directories. Thanks if anyone can help. Duplicate post.... (0 Replies)
Discussion started by: Joey12
0 Replies

6. UNIX for Advanced & Expert Users

stagger ssh command to multiple machines

Good day, I am extracting information from Apache log files from 41 servers. Every day I have 7 cronjobs scheduled to do this for me and it works beautifully :D... only problem is that it takes about 6-9 hours to run through, as the script runs about 6 ssh commands for each box then goes to the... (3 Replies)
Discussion started by: msullivan
3 Replies

7. Shell Programming and Scripting

Running same script multiple times concurrently...

Hi, I was hoping someone would be able to help me out. I've got a Python script that I need to run 60 times concurrently (with the number added as an argument each time) via nightly cron. I figured that this would work: 30 1 * * * for i in $(seq 0 59); do $i \&; done However, it seems to... (4 Replies)
Discussion started by: ckhowe
4 Replies

8. AIX

Printing problem in AIX machines running SAP

Hi all, We have a intermittent problem with printing from SAP running on AIX5.2 . Version of Sap is 4.6b. When a print is fired from SAP, the spool is created fine and then transferred to the host spool system (in this case the AIX Print queue). The problem seems to be happening when AIX... (3 Replies)
Discussion started by: pauldavi26
3 Replies

9. Shell Programming and Scripting

running multiple rsh command in a script

hi scripting experts, juz wondering if it's possible to have multiple rsh command in a single script? :confused: ie: rsh -l <username> "<command>" rsh -l <username> "<command>" thanks. regards, wee :) (0 Replies)
Discussion started by: lweegp
0 Replies
Login or Register to Ask a Question
nca(1)																	    nca(1)

NAME
nca, snca - the Solaris Network Cache and Accelerator (NCA) The Solaris Network Cache and Accelerator ("NCA") is a kernel module designed to provide improved web server performance. The kernel mod- ule, ncakmod, services HTTP requests. To improve the performance of servicing HTTP requests, the NCA kernel module maintains an in-kernel cache of web pages. If the NCA kernel module cannot service the request itself, it passes the request to the http daemon (httpd). It uses either a sockets interface, with family type designated PF_NCA, or a private Solaris doors interface that is based on the Solaris doors RPC mechanism, to pass the request. To use the sockets interface, the web server must open a socket of family type PF_NCA. The PF_NCA family supports only SOCK_STREAM and pro- tocol 0, otherwise an error occurs. The following features are not presently supported: o You cannot initiate a connection from a PF_NCA type socket. The connect(3SOCKET) interface on PF_NCA fails. o System calls that are associated with type SO_DGRAM, such as send(), sendto(), sendmsg(), recv(), recvfrom(), and recvmsg(), fails. o You cannot set TCP or IP options on a PF_NCA type socket through setsockopt(3SOCKET). The NCA cache consistency is maintained by honoring HTTP headers that deal with a given content type and expiration date, much the same way as a proxy cache. For configuration information, see When native PF_NCA socket support does not exist in the web server, the ncad_addr(4) interface must be used to provide NCA support in that web server. NCA is intended to be run on a dedicated web server. Running other large processes while running NCA might cause undesirable behavior. NCA supports the logging of in-kernel cache hits. See ncalogd.conf(4). NCA stores logs in a binary format. Use the ncab2clf(1) utility to convert the log from a binary format to the Common Log File format. /etc/nca/ncakmod.conf Lists configuration parameters for NCA. /etc/nca/ncalogd.conf Lists configuration parameters for NCA logging. /etc/nca/nca.if Lists the physical interfaces on which NCA runs. /etc/nca/ncaport.conf ncaport configuration file /etc/hostname.{}{0-9} Lists all physical interfaces configured on the server. /etc/hosts Lists all host names associated with the server. Entries in this file must match with entries in /etc/host- name.{}{0-9} for NCA to function. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWncar (32-bit) | +-----------------------------+-----------------------------+ | |SUNWncarx (64-bit) | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ ncab2clf(1), ncakmod(1), close(2), read(2), write(2), sendfilev(3EXT), accept(3SOCKET), bind(3SOCKET)connect(3SOCKET), door_bind(3DOOR), door_call(3DOOR), door_create(3DOOR), getsockopt(3SOCKET), listen(3SOCKET), setsockopt(3SOCKET), shutdown(3SOCKET), socket.h(3HEAD), socket(3SOCKET), ncad_addr(4), nca.if(4), ncakmod.conf(4), ncaport.conf(4), ncalogd.conf(4), attributes(5) 22 Feb 2005 nca(1)