DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 8th August 2008
Sylhouette Sylhouette is offline
New User
 
Join Date: May 2008
Posts: 3
Thanked 0 Times in 0 Posts
Default merging log files

Hello i have several dansguardian and squid log files on different hosts.
Now i run on each host the sarg package to graph the usage of the servers.

Can i somehow merge all the log files to one file, so that i can run sarg on one box and get 1 total picture of the usage.

regards.

Johan

Last edited by Sylhouette; 8th August 2008 at 02:07 PM.
Reply With Quote
  #2   (View Single Post)  
Old 8th August 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
formerly killasmurf86
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 588
Thanked 29 Times in 26 Posts
Default

don't really understand how your system is... but
you can transfer all files to one PC (if nessacery)
and then use script to merge scritps

for example
Code:
#!/bin/sh 
cat /var/log/some.log >> /root/AllInOne.Log
rm -f /var/log/some.log
cat /var/log/some.other.log >> /root/AllInOne.Log
rm -f /var/log/some.other.log
It's really simple and stupid solution.
Reply With Quote
  #3   (View Single Post)  
Old 8th August 2008
Sylhouette Sylhouette is offline
New User
 
Join Date: May 2008
Posts: 3
Thanked 0 Times in 0 Posts
Default

Is it really that simple?

My network consist of some remote sites which all have there own proxy/dansguardian server to give them access to the internet.

now i run sarg to create web based stats to see where clients are going.

So it would be nice if i can download all the log files after the log rotate and copy them to one machine, and the create on big file and run sarg on that file.

But like you say it could be just that simple, i will try that on monday.
thanks for the pointer.

regards,
Johan
Reply With Quote
  #4   (View Single Post)  
Old 8th August 2008
dk_netsvil dk_netsvil is offline
Real Name: Devon
Fdisk Soldier
 
Join Date: May 2008
Location: New York
Posts: 75
Thanked 7 Times in 7 Posts
Default

I use awstats for some of my sites to provide some logfile aggregation and I use logresolvemerge to parse my logs.
Reply With Quote
  #5   (View Single Post)  
Old 8th August 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
formerly killasmurf86
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 588
Thanked 29 Times in 26 Posts
Default

Quote:
Originally Posted by Sylhouette View Post
Is it really that simple?

My network consist of some remote sites which all have there own proxy/dansguardian server to give them access to the internet.

now i run sarg to create web based stats to see where clients are going.

So it would be nice if i can download all the log files after the log rotate and copy them to one machine, and the create on big file and run sarg on that file.

But like you say it could be just that simple, i will try that on monday.
thanks for the pointer.

regards,
Johan
Well you need to edit it a bit, to make it more usefull.
you need to add some lines that separate logs, and describe where they came from, but it;s easy with echo >
Reply With Quote
  #6   (View Single Post)  
Old 9th August 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,064
Thanked 198 Times in 156 Posts
Default

If the stuff is logged with syslog, then you can just set up a syslog server and log everything to one file ... No need for any merging ...
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cleaning Portsnap files in /var/db/portsnap/files bram85 FreeBSD Ports and Packages 2 5th October 2009 09:54 AM
finding files by uid carpman FreeBSD General 3 5th February 2009 07:51 PM
How to sync files over ftp graudeejs FreeBSD General 4 4th August 2008 10:18 PM
Moving files Weaseal Programming 2 14th July 2008 07:30 AM


All times are GMT. The time now is 06:39 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick