compressing logs on multiple servers/modules


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting compressing logs on multiple servers/modules
# 1  
Old 09-27-2010
compressing logs on multiple servers/modules

Hi,

I have 3 servers and 8 modules on each server with log files. The path is something like: /path/(server)/app/(module)

the logs file are already in a file format of server.log.* on all modules.

To compress the modules i will be using
Code:
find . -name "server.log.*" -exec gzip {} \;

and move them to archive folder
Code:
mv *.gz /archive/

How do i go through each server and each module in that server to get the files and compress them?

Thanks
# 2  
Old 09-27-2010
Your find will output all files having that format, is that also the case for the currently used log?
Should we understand "server" as like apache for example, or do you mean separate boxes

Last edited by vbe; 10-04-2010 at 09:28 AM.. Reason: typo...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Search patterns in multiple logs parallelly.

Hi All, I am starting a service which will redirect its out put into 2 logs say A and B. Now for succesful startup of the service i need to search pattern1 in log A and pattern2 in log B which are writen continuosly. Now my requirement is to find the patterns in the increasing logs A and B... (19 Replies)
Discussion started by: Girish19
19 Replies

3. Shell Programming and Scripting

Shell Script for viewing multiple logs from multiple server

I am new to Shell scripting and below is my requirement. I need to search some specific word e.g. "exception" or "transaction" from log file. We have multiple env e.g. Level1 , Level2 etc and each env have Multiple boxes e.g. For Level 1 env we have "test11.test.com" , "test12.test.com". Each... (1 Reply)
Discussion started by: peeyush
1 Replies

4. Shell Programming and Scripting

Catching the exception in multiple logs

Hi folks, I have logs folder in which different type of logs are generated , I am monitoring them by the below command tail -f *.log but I want that if exception come in any of the logs then it should be catch so what i should prefix with tail -f *.log so that it imeediatley catches and... (3 Replies)
Discussion started by: punpun66
3 Replies

5. Shell Programming and Scripting

how to create custom modules in perl and how to import all modules with single command?

I have some custom functions which i want to use in perl Scripting all time. i want to How to create modules in perl and how to import them. Also if i create 15 modules and i want to > import all at once then how can i import? (0 Replies)
Discussion started by: Navrattan Bansa
0 Replies

6. UNIX for Dummies Questions & Answers

[Solved] Installing Multiple Perl Modules at Once

How could one install multiple Perl modules at once. I tried and get this at the cli: perl -MCPAN -e'install Crypt::DES Digest::CRC Digest::MD4 IO::Pty IO::Socket::SSL WWW::Mechanize Crypt::PasswdMD5 Net::Write' Can't locate object method "PasswdMD5" via package "Crypt" at -e line 1. ... (0 Replies)
Discussion started by: metallica1973
0 Replies

7. Shell Programming and Scripting

Grep string from logs of last 1 hour on files of 2 different servers and calculate count

Hi, I am trying to grep a particular string from the files of 2 different servers without copying and calculate the total count of its occurence on both files. File structure is same on both servers and for reference as follows: 27-Aug-2010... (4 Replies)
Discussion started by: poweroflinux
4 Replies

8. Solaris

Apache modules different sizes on 2 servers

Hi I have built 2 modules on 2 different servers (both nodes in a cluster) and the files sizes are different for the same module on each server (size in bytes): Server1: 45592 mod_deflate.so Server2: 45540 mod_deflate.so Server1: 38400 mod_headers.so Server2: 38368 mod_headers.so ... (3 Replies)
Discussion started by: skewbie
3 Replies

9. Shell Programming and Scripting

How to put multiple logs in single line?

Hi, I have a script which generates a log file on demand by redirecting the output to a log file. But the requirement is : echo A echo B echo C should print A B C not like A B C and this has to be handled in script only..not in the shell level (while running the script only) .... (5 Replies)
Discussion started by: bhaskar_m
5 Replies

10. 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
Login or Register to Ask a Question