Re: using tail correctly
- From: mmccaws2 <mmccaws@xxxxxxxxxxx>
- Date: Wed, 24 Oct 2007 14:22:17 -0700
On Oct 24, 4:37 am, edcrosbys <edcros...@xxxxxxxxx> wrote:
Can you provide an example of the wap.log (a few lines would do
fine)?
mmccaws2 wrote:
Hi
I need to capture when devices come available, and they when they do
come available, they're only available for 15 to 20 minutes at a
time. The devices 'presence' is monitored/detected through syslog
entries from a WAP. So, what I am trying to do is capture the
information coming into syslog using
tail -f wap.log | grep -i wap >> wap.log
This is in a loop that sleeps every 2 minutes then kills the tail
process. moves wap.log to wap.log.1 then removes wap.log then
restarts. I don't see much activity. So my concern is this. Does
tail require a certain amount of buffer in order to write to grep or
file? If so, how do I adjust this so that I don't miss information
because it was in the buffer when the tail process is killed?
any examples?
Thanks
Mike
while :
do
sudo tail -f /syslog/wap.log | grep -i wap >> /home/wapmon/
wgb.log &
sleep 120
sudo kill `cat tailpid.txt`
rm tailpid.txt
test -f wgb.log && mv wgb.log wgb.log.1
cp /dev/null wgb.log
chmod 755 wgb.log
done
Oct 23 19:23:58 6R:air2southbase 93784: Oct 23 19:23:58.240 PST:
%DOT11-6-ASSOC: Interface Dot11Radio0, Stati on KCM-000-WAP-110
0019.2f99.4236 Associated KEY_MGMT[NONE]
Oct 23 19:24:04 6R:air2southbase 93799: Oct 23 19:24:03.115 PST:
%DOT11-6-ASSOC: Interface Dot11Radio0, Stati on KCM-000-WAP-111
0019.2f99.422e Associated KEY_MGMT[NONE]
Oct 23 19:24:05 6R:air2southbase 93801: Oct 23 19:24:04.285 PST:
%DOT11-6-ASSOC: Interface Dot11Radio0, Stati on KCM-000-WAP-118
0019.56e7.9f04 Associated KEY_MGMT[NONE]
I noticed that all the files are multiples of 8192 and the last line
doesn't have the" Associated Key_MGMT[NONE]". At the end. So could
that be syslog function or the tail function doing this. I can't
imagine it being the syslog. That's a gut feeling sort of statement.
No first hand experience backing that statement.
Thanks for getting back.
Mike
.
- Follow-Ups:
- Re: using tail correctly
- From: Frank Slootweg
- Re: using tail correctly
- References:
- using tail correctly
- From: mmccaws2
- Re: using tail correctly
- From: edcrosbys
- using tail correctly
- Prev by Date: HPVM console
- Next by Date: Re: using tail correctly
- Previous by thread: Re: using tail correctly
- Next by thread: Re: using tail correctly
- Index(es):
Relevant Pages
|