/[sysadmin-cookbook]/recepies/gearman/grep_logs.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /recepies/gearman/grep_logs.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 202 - (hide annotations)
Sat May 1 12:37:46 2010 UTC (14 years, 1 month ago) by dpavlin
File MIME type: application/x-sh
File size: 223 byte(s)
simple grep_hostname worker

1 dpavlin 202 #!/bin/sh -x
2    
3     # echo 'error' | gearman -f grep_logs
4    
5     if [ -z "$1" ] ; then
6     hostname=`hostname`
7     exec /srv/gearmand/bin/gearman -h 10.60.0.244 -w -f grep_$hostname $0 $hostname
8     fi
9    
10     read pattern
11     grep $pattern /var/log/*.log

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26