Cluster @hostname link utilities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
We all know the use of programs like "cat" or "tail" to show file
contents. I have a cluster of apache and each httpd logs to
/var/log/httpd/access.log where /var/log is a link to a gfs filesystem

[root@apache1]# ls -la /var/log/httpd
lrwxrwxrwx  1 root root 20 27 feb 15:44 /var/log/httpd ->
/gfsvolume/log/httpd_local/@hostname

For each apache I have a directory, like 

/gfsvolume/log/httpd_local/apache1
/gfsvolume/log/httpd_local/apache2

I'd like to show on screen, like with a cat program, all access.log
files reading them from each directory in cronological order. Is there
an already made program to do this? I need something as follow:

If /gfsvolume/log/httpd_local/apache1/access.log contains something like
the following:

127.0.0.1 - - [14/Mar/2006:13:27:26 +0100] "GET
/ocsinventory/deploy/label HTTP/1.0" 500 616 "-" "NSISDL/1.2" 
192.168.26.163 - - [14/Mar/2006:13:27:41 +0100] "POST /ocsinventory
HTTP/1.1" 200 83 "-" "OCS-NG_windows_client_v4014"

And /gfsvolume/log/httpd_local/apache2.comune.prato.it/access.log
contains something like the following:

192.168.26.163 - - [14/Mar/2006:13:27:23 +0100] "GET
/ocsinventory/deploy/label HTTP/1.0" 500 616 "-" "NSISDL/1.2"
192.168.1.110 - - [14/Mar/2006:13:27:42 +0100] "GET
/ocsinventory/deploy/ocsagent.exe HTTP/1.0" 500 616 "-" "NSISDL/1.2"

With "multicat" (the program I am looking for, just invented a name to
refer to it) multicat /var/log/httpd/acces.log I obtain the following:

192.168.26.163 - - [14/Mar/2006:13:27:23 +0100] "GET
/ocsinventory/deploy/label HTTP/1.0" 500 616 "-" "NSISDL/1.2"
127.0.0.1 - - [14/Mar/2006:13:27:26 +0100] "GET
/ocsinventory/deploy/label HTTP/1.0" 500 616 "-" "NSISDL/1.2" 
192.168.26.163 - - [14/Mar/2006:13:27:41 +0100] "POST /ocsinventory
HTTP/1.1" 200 83 "-" "OCS-NG_windows_client_v4014"
192.168.1.110 - - [14/Mar/2006:13:27:42 +0100] "GET
/ocsinventory/deploy/ocsagent.exe HTTP/1.0" 500 616 "-" "NSISDL/1.2"

I understand there be some configuration file that map
/var/log/httpd/access.log to 

/gfsvolume/log/httpd_local/apache1/access.log
/gfsvolume/log/httpd_local/apache2/access.log

And inform the program about the format and the position of the sorting
key.

Leandro

--

Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux