Current User: Guest Login
Please consider registering

Lost Your Password?

Search Forums:


Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Sort logs from different folders

Reply to Post Add a New Topic

4:50 am
May 15, 2009


posts 9

Hi Jean,

This is regarding the sorting of logfiles using

My website has a load balancing system, which logs the records on different folders (each folder for a accelerator). Also my website maintains two servers(i.e., any request will sent to one of the server by the load balancing system)

For example:

Below the logfiles folder structure.









Please find, all of the folders will have same log file names for logs of that date.

Example, for the logs of 24th March,




Problem is, i have to sort all the above logs into a single or may be two, one for each server.

For this, i'm currently using as below steps,

1. Run for server1/../WWW/*.*

2. Run for server1/../WWWDE/*.*

3. Run for server1/../WWWIN/*.*

4. Run for server1/../WWWUS/*.*

5. And then gain running the for the above four sorted logfile to generate a final sorted log file for server1.

6.The same way for server2.

7. Run for the two sorted logfiles of two servers, using pipe..

e.g. LogFile=”perl  /path/to/server1final.LOG /path/to/server1final.LOG |”

The problem with the above process is, its really a cumbersome process to me to deal with manually. Also the time i should spend here is not encouraging.

Could you please help me if i can use in a better way, so that i do not run for each accelerator of each server.

May be by running the for all the log files of each server at one RUN/STROKE ? e.g., wil run a command and it will sort all the logs under D:/server1/  and give me a sorted log file for that server.



5:32 am
May 15, 2009



posts 1125


I am not sure I understand what the problem is. If you want to merge all log files of a day into one, you can do it with one logresolvemerge command:

LogFile="perl /path_
server1/WWW/%DD-2%MM-2%YY-2-A.LOG /path
_server1/WWWDE/%DD-2%MM-2%YY-2-A.LOG /p
G /path_server2/WWWDE/%DD-2%MM-2%YY-2-A
.LOG /path_server2/WWWIN/%DD-2%MM-2%YY-
2-A.LOG |"

Correct me if I misunderstood your point.

Reply to Post

Reply to Topic:
Sort logs from different folders

Guest Name (Required):

Guest Email (Required):

NOTE: New Posts are subject to administrator approval before being displayed

Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
11 + 1

About the Forum

Forum Timezone: UTC 1

Most Users Ever Online: 302

Currently Online:
9 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 9
Topics: 639
Posts: 2710


There are 257 Members
There have been 304 Guests

There is 1 Admin
There is 1 Moderator

Top Posters:

cssfsu – 55
deepakgupta – 34
albert_newton – 30
cosminpana – 20
DTNMike – 19
ahtshun83 – 17

Recent New Members: raju, todd2taylor, sbdcunha, mansigill1987, ThomasDuh, ThomasKic

Administrators: Jean-Luc (1125 Posts)

Moderators: Jean-Luc (1125 Posts)