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
UserPost

4:50 am
May 15, 2009


Sravan.tech

Member

posts 9

Hi Jean,

This is regarding the sorting of logfiles using logresolvemerge.pl

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.

D:/server1/folder1/folder2/WWW/*.LOG

D:/server1/folder1/folder2/WWWDE/*.LOG

D:/server1/folder1/folder2/WWWIN/*.LOG

D:/server1/folder1/folder2/WWWUS/*.LOG

D:/server2/folder1/folder2/WWW/*.LOG

D:/server2/folder1/folder2/WWWDE/*.LOG

D:/server2/folder1/folder2/WWWIN/*.LOG

D:/server2/folder1/folder2/WWWUS/*.LOG

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

Example, for the logs of 24th March,

WWW/240309-A.LOG

WWWDE/240309-A.LOG

WWWIN/240309-A.LOG

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 logresolvemerge.pl as below steps,

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

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

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

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

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

6.The same way for server2.

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

e.g. LogFile=”perl logresolvemerge.pl  /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 logresolvemerge.pl in a better way, so that i do not run logresolvemerge.pl for each accelerator of each server.

May be by running the logresolvemerge.pl 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.

Thanks,

Sravan

5:32 am
May 15, 2009


Jean-Luc

Admin

posts 1125

Hi,

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 logresolvemerge.pl /path_
server1/WWW/%DD-2%MM-2%YY-2-A.LOG /path
_server1/WWWDE/%DD-2%MM-2%YY-2-A.LOG /p
ath_server1/WWWIN/%DD-2%MM-2%YY-2-A.LOG
 /path_server2/WWW/%DD-2%MM-2%YY-2-A.LO
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

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

Guest URL (required)

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


About the InternetOfficer.com Forum

Forum Timezone: UTC 1

Most Users Ever Online: 302

Currently Online:
12 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 9
Topics: 638
Posts: 2709

Membership:

There are 257 Members
There have been 302 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)