|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | 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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Script needed...
Hi! I have a file which has a list of host, I want to ssh to each of the first box for an app and grep through the logs for version of the application and look for a certain string "Connection is open" in the log file. The file I am referring to looks like this - Code:
prod1-doms-2001.corp.zap.com:App1-America:PROD:8000 prod2-doms-2001.corp.zap.com:App1-Asia:PROD:8020 prod3-doms-2002.corp.zap.com:App1-Europe:PROD:8040 prod1-doms-2001.corp.zap.com:App2-America:PROD:9000 prod2-doms-2001.corp.zap.com:App2-Asia:PROD:9020 prod3-coms-2002.corp.zap.com:App2-Europe:PROD:9040 where columns are separated by colons - Code:
First column - hostname Second column - app name Third column - env name Forth column - port # I want to ssh to first host of each app then grep for a string called "connection is open" and also parse out (20100613) from a string of line like the following from the log file - Code:
.... -JbossRootDirectory=/remote/QB/packages/App1-20100712-133944-249b7220ac454586864a7... Currently I am doing this manually but since there are some 30 hosts, I want to have this executed from a central admin box. The log file name changes with appname and hostname /port and is of the pattern - /App1-region_prod1-doms-2001.corp_8000 Please share if someone has developed a script which can do this. I want to do this after restart of each app. Thanks, Allan
Last edited by zaxxon; 09-08-2010 at 03:37 AM.. |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
Have you tried to write it? Now is a good time to learn so you can be self sufficent in the future. If you write it yourself you will appreciate the time saved later
This can be done with a small/simple shell script. Try to write it first. There are many examples to look at. |
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help needed with script. | sparcman | Shell Programming and Scripting | 5 | 05-14-2010 09:37 AM |
| help needed for a script!! | rahul195 | Shell Programming and Scripting | 5 | 10-04-2009 06:15 PM |
| Script help needed | Sagarddd | Shell Programming and Scripting | 1 | 11-18-2008 01:02 PM |
| Script needed | vpandey | Shell Programming and Scripting | 3 | 03-04-2008 08:45 AM |
| help needed! my first script | fcbarcelona1984 | Shell Programming and Scripting | 1 | 11-04-2007 11:32 AM |
|
|