If you run an ssh command remotely the stdout from the command is returned to your local terminal. You can capture it there and send to a local file. So, say you want the output of the date command from multiple servers put in a file and then emailed. You could just:
if it's a script that has to run they you could have it in a shared location and run it
If there's something in the script that varies by server you're just going to have to work that out. Either have a different script in each location or, if you need more automation, have it accept command line input for the difference and pass it with the script:
(As you can see I'm an array junkie. Might be overkill here. Dunno. Works for me though If you need any parts of my example explained please don't hesitate to ask)
I want to write a Kshell program which will start the servers(Oracle,DataIntegrator).
Can anybody help me with this?
I would appreciate your help.
Thanks in advance (0 Replies)
Hi to all
now we running mksysb to nim on aix servers.
we are planning to take mksysb from vio servers.
can we use the same script for vio servers.
thanks (10 Replies)
Hi,
I have to run several unix commands like lsof or sed and need to execute across different servers as part of my monitoring tasks.
There are around 40 Unix Servers. It is really cumbersome to run those command on several servers.
can some help me in this regard. Is it possible to run... (6 Replies)
Hello,
I am a Unix newbie and I need a script in which I can run a command on multiple servers at work. The command is to start a storage process and I am sick of doing it manually on all servers..
Here's the command:
/opt/bss/bin/snmptable -CB -v2c -c P67LzuBm hostname hrStorageTable... (4 Replies)
Hello Everyone,
How do we run vi/vim encrypted shell script without decryption on multiple servers. It is a simple bash script and vim -nx <filename> has been used to encrypt with desired password. Now I have few errors, the syntax is absolutely fine as I have run that script multiple times on... (0 Replies)
Hi all,
I have a task for which I need to run some commands on one server1 and then jump from the server1 (using ssh and asking user to enter login credentials manually for server2 server) to server2 and run some commands there and exit.
I know the script I need here but problem is when I... (5 Replies)
Hi,
I have a problem runnig from script two diferents process in background mod. Is there a limitation to do this?
For example
echo "Running process one:"
./ProcessOne &
echo "Running process two:"
./ProcessTwo &
echo "The process are runnig. Bye"
The problem is that the... (7 Replies)
I need run a command such as ps -ef |grep xxx on a batch of servers, how to write a script to run it without password? don't need go in each server to check?
Thanks (7 Replies)
I need to run a script on a bunch of remote servers. how can this be done without ssh into each individual server and run it
its under /sbin/script.sh on each server (1 Reply)
We have 15 servers. Hostnames for these 15 servers are stored in a text files and loop through each server to connect to the remote server and run a command, but this loop process runs the command one after another. However, the requirement is to run the same command on all 15 servers at the same... (10 Replies)
Discussion started by: laknar
10 Replies
LEARN ABOUT OPENSOLARIS
script
script(1) User Commands script(1)NAME
script - make record of a terminal session
SYNOPSIS
script [-a] [filename]
DESCRIPTION
The script utility makes a record of everything printed on your screen. The record is written to filename. If no file name is given, the
record is saved in the file typescript. See WARNINGS.
The script command forks and creates a sub-shell, according to the value of $SHELL, and records the text from this session. The script ends
when the forked shell exits or when Control-d is typed.
OPTIONS
The following option is supported:
-a Appends the session record to filename, rather than overwriting it.
NOTES
script places everything that appears on the screen in filename, including prompts.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
SEE ALSO attributes(5)WARNINGS
script can pose a security risk when used in directories that are writable by other users (for example, /tmp), especially when run by a
privileged user, that is, root. Be sure that typescript is not a link before running script.
SunOS 5.11 30 Jan 2004 script(1)