[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: distributed grep
From: |
Hans Schou |
Subject: |
Re: distributed grep |
Date: |
Sun, 19 Feb 2012 21:50:40 +0100 (CET) |
User-agent: |
Alpine 2.02 (DEB 1266 2009-07-14) |
On Sat, 18 Feb 2012, siddharth chhabra wrote:
Hi
I have have 3 servers (lets say server1.mycompany.com,server2.mycompany.com and
server3.mycompany.com)
On all 3 servers I have log files called server.log in the following locations -
/home/testuser/store1/log/server.log
/home/testuser/store2/log/server.log
/home/testuser/store3/log/server.log
I want to do a grep on all these log files (9 in total 3 on each) from my
current computer (server1.mycompany.com) and have the results displayed on my
computer.
I dont want to use -trc as there is nothing to really transfer amongst servers
(each has 3 logfiles).
I have setup servers.txt and am using the --sshloginfile from the documentation
but am not able to come up with the exact command I need.
parallel --tag ssh {} grep foo
/home/testuser/store{1,2,3}/log/server.log ::: a b c
Where 'a b c' is the name of your servers.
If this is doing what you want, you can make a shorter command which
does the same.
/hans
--
Horsebakken 78, DK-2400 København NV
- distributed grep, siddharth chhabra, 2012/02/19
- Re: distributed grep,
Hans Schou <=