Sponsored Content
Top Forums Shell Programming and Scripting A webservice running on multiple servers. A patch has been deployed to them and it got successful o Post 302993624 by Chandan_Bose on Sunday 12th of March 2017 12:00:50 PM
Old 03-12-2017
Display A webservice running on multiple servers. A patch has been deployed to them and it got successful o

A webservice running on multiple servers. A patch has been deployed to them and it got successful only in some set of servers. The change is in format of "logontime" from "dd.mm.yyyy hh24:mi:ss" to "dd/mm/yyyy hh24:mi:ss". A script has already generated the output from all servers with request and response. Please refer to the Sample Input for the report.

Your task is to write a script to find which servers are still serving the response of logontime in "dd.mm.yyyy hh24:mi:ss" format. Use any scripting/programming language you wish.

Sample Input
Code:
Server,DeploymentId,Request,Response
192.1.20.2,31232,getCustomerLogon,<Details><customer id=124><usertime>24.07.2016 01:52:53</usertime><logontime day="no" id="l">24/07/2016 06:54:53</logontime><access>1</access></customer></Details>
192.1.20.3,31234,getCustomerLogon,<Details><customer id=124><logontime id="l" day="yes">24/07/2016 06:54:53</logontime><access>1</access><usertime>24.07.2016 01:52:53</usertime></customer></Details>
192.1.20.4,31242,getCustomerLogon,<Details><customer id=124><usertime>25.07.2016 01:05:23</usertime><logontime id="l4">24.07.2016 06:54:53</logontime><access>1</access></customer></Details>
192.1.20.5,31251,getCustomerLogon,<Details><customer id=124><logontime id="l">24/07/2016 06:54:53</logontime><access>1</access></customer></Details>
192.1.20.6,31249,getCustomerLogon,<Details><customer id=124><usertime>24/07/2016 01:52:53</usertime><logontime id="l2">24/07/2016 06:54:53</logontime><access>1</access></customer></Details>
192.1.20.7,31221,getCustomerLogon,<Details><customer id=124><usertime>24.07.2016 01:52:53</usertime><logontime id="l1">24/07/2016 06:54:53</logontime><access>1</access></customer></Details>
192.1.20.8,31239,getCustomerLogon,<Details><customer id=124><usertime>24/07/2016 01:52:53</usertime><logontime>24.07.2016 06:54:53</logontime><access>1</access></customer></Details>
192.1.20.9,31243,getCustomerLogon,<Details><customer id=124><usertime>24.07.2016 01:52:53</usertime><logontime id="l0">24/07/2016 06:54:53</logontime><access>1</access></customer></Details>
192.1.20.10,31250,getCustomerLogon,<Details><customer id=124><logontime id="l1" day="yes"=>24.07.2016 06:54:53</logontime><usertime>24/07/2016 01:52:53</usertime><access>1</access></customer></Details>
192.1.20.11,31244,getCustomerLogon,<Details><customer id=124><usertime>24/07/2016 01:52:53</usertime><logontime day="no" id="l1">24/07/2016 06:54:53</logontime><access>1</access></customer></Details>


Sample Output
Code:
Server,DeploymentId
192.1.20.4,31242
192.1.20.8,31239
192.1.20.10,31250


Last edited by Don Cragun; 03-12-2017 at 04:21 PM.. Reason: Add CODE tags again.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

rsh to change multiple ip in multiple servers?

good day. i jsut wanted to know what is the best script or the best way changing a lot of Ip's in all servers. Do you have any idea? im using awk to change IP,what if, you have lots of servers. You need to change it one by one? It will take time to change it manually. (2 Replies)
Discussion started by: kenshinhimura
2 Replies

2. IP Networking

running servers parallel

I'm going to undertake a hardware refresh soon and I was wondering if it is possible to run two machines (X and Y) with the same hostname (but different IP addresses) on the same network? Server X is the original server and has an entry in DNS. Server Y is the new server and won't have an entry... (1 Reply)
Discussion started by: soliberus
1 Replies

3. UNIX for Dummies Questions & Answers

Is there a way to Grep processes running on Windows Servers...

Hi guys - newbie question: Is there a way for me to grep running processes from a windows machine? If its possible I could then try to script it. Currently I can see Windows file shares on my Linux server. (4 Replies)
Discussion started by: DallasT
4 Replies

4. UNIX for Dummies Questions & Answers

Running the same remote script on multiple servers

Experts, Im trying to remote into a server, run a script that resides on that server and capture the information displayed & store in a local file. I struggled with this yesterday & finally that script is working now. Now, here is a scope creep and the script that I wrote for 1 remote... (2 Replies)
Discussion started by: OMLEELA
2 Replies

5. Shell Programming and Scripting

Checking running process status using "grep" on multiple servers in load sharing system.

Suppose i have 3 different servers say x,y and z. Im running some process say ABC and 40 instances for the same is being created. In load sharing suppose on server x, 20 instances are running server y, 10 instances are running server z, 10 instances are running. While checking the... (1 Reply)
Discussion started by: ankitknit
1 Replies

6. Shell Programming and Scripting

Logging in to multiple Linux servers and running the command.

Hi, I am trying to write a script to run a command on multiple linux based servers and get the o/p. I am using ssh to login. It is a celerra box and EMC NAS product. I am able login but i am not able to run nas command nas_pool -size -all the NAS server. I am getting the following error. ... (2 Replies)
Discussion started by: jpkumar10
2 Replies

7. Shell Programming and Scripting

Remote login and running a script on multiple servers

Hi all, I am baffled on this. Solaris Irix system.:confused: I have 4 servers all connected to one another, :b: I need to write a script line that would login on to server 1-3 ($HOST) start a script in the back ground and log off while the back ground script runs over a length of time.:eek: ... (10 Replies)
Discussion started by: weddy
10 Replies

8. UNIX for Advanced & Expert Users

Issue with tracking successful completion of Child process running in background

Hello All, I am using Linux. I have two scripts: inner_script.ksh main_wrapper_calling_inner.ksh Below is the code snippet of the main_wrapper_calling_inner.ksh: #!/bin/ksh ppids=() ---> Main array for process ids. fppids=() ---> array to capture failed process ids. pcnt=0 --->... (5 Replies)
Discussion started by: dmukherjee
5 Replies

9. UNIX for Beginners Questions & Answers

How to apply the update statement in multiple servers on multiple dbs at a time .?

Hi , Can any please help the below requirement on all multiple servers and multiple dbs. update configuration set value='yes' ;1) the above statement apply on 31 Databases at a time on different Ip address eg : 10.104.1.12 (unix ip address ) the above ip box contains 4 db's eg : db... (2 Replies)
Discussion started by: venkat918
2 Replies
All times are GMT -4. The time now is 07:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy