![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Microsofts New Approach | iBot | Cartoons for Geeks | 0 | 08-02-2008 01:40 AM |
| getopts standard approach - does one exist? | dkieran | Shell Programming and Scripting | 8 | 05-18-2007 03:19 PM |
| Performance inquiry...guestimate better approach | DreamWarrior | High Level Programming | 6 | 01-22-2007 12:57 PM |
| Scp without writting | new2ss | Shell Programming and Scripting | 7 | 07-18-2006 05:59 AM |
| Writting to multiple file | jyotipg | Shell Programming and Scripting | 2 | 06-25-2004 08:16 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Approach to writting a script
Hello all,
I've just joined. I did a google search and your site came up, I had a look and thought I'd like to become a member. I'm from Ireland. I've written a few scripts before, but this new task has me foxed. I would like to figure out the best approach to achieving the following A single script that does the following login to machine a (I typically use putty to do this) login to machine b (as above) on machine_a run a command such as "service xxx stop; service xxx start" on machine_a ps -ef | grep AppName to confirm the app started right on machine_a run top, and grep for a process by name, and batch the cpu% usage result to a file ( I can do this already) on machine_b cd to a specific directory on machine_b run a script that points at machine_a on machine_b, when the script finishes machine_a will parse the result file, and confirm the average of the cpu% is less than a threshold That's pretty much it. The hard part I suppose would be the single script spawing scripts on two different machines and synchonising them? Thanks for your help in advance! ![]() Bloke |
|
||||
|
Thanks for reply.
When I tried that ssh root@XXX.XXX.XXX.XXX "ls -al" it asked me for a password. As I would like to automate the process by scripting, without having to type in passwords. Are there alternative approaches. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|