FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 05-20-2012, 06:51 AM
Paul Allen Newell
 
Default way to flush /var/log/message

Hello:

Is there a way to flush output to /etc/log/message so a tail -f catches
things when they happen rather than what I think I am seeing as a buffer
hold-until-full delay?


Thanks in advance,
Paul
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-20-2012, 07:18 AM
JD
 
Default way to flush /var/log/message

On 05/19/2012 11:51 PM, Paul Allen Newell wrote:

Hello:

Is there a way to flush output to /etc/log/message so a tail -f
catches things when they happen rather than what I think I am seeing
as a buffer hold-until-full delay?


Thanks in advance,
Paul

output of what?
See
logger (1) - a shell command interface to the syslog(3) system
log module

rsyslog.conf (5) - rsyslogd(8) configuration file
rsyslogd (8) - reliable and extended syslogd
Sys::Syslog (3pm) - Perl interface to the UNIX syslog(3) calls
syslog (2) - read and/or clear kernel message ring buffer; set
console_loglevel

syslog (3) - send messages to the system logger
syslog (3p) - control system log
vsyslog (3) - send messages to the system logger


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-20-2012, 12:20 PM
"Mikkel L. Ellertson"
 
Default way to flush /var/log/message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/19/2012 11:51 PM, Paul Allen Newell wrote:
> Hello:
>
> Is there a way to flush output to /etc/log/message so a tail -f
> catches things when they happen rather than what I think I am
> seeing as a buffer hold-until-full delay?
>
> Thanks in advance, Paul

What you are seeing is the last last 10 lines of the file, and
then new additions as it is added to the file. This is the way
tail -f works. You may want to read the man or info page on tail.

Mikkel
- --

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAk+44ZcACgkQqbQrVW3JyMRv1wCbBDEnRbhXLU/DVBxd7dfCLo2r
Ky4AnRv6uLKTVV1A+V6sQzSY2jNdYs4f
=BXW1
-----END PGP SIGNATURE-----
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-20-2012, 12:52 PM
suvayu ali
 
Default way to flush /var/log/message

On Sun, May 20, 2012 at 2:20 PM, Mikkel L. Ellertson
<mellertson@gmail.com> wrote:
>
> What you are seeing is the last last 10 lines of the file, and
> then new additions as it is added to the file. This is the way
> tail -f works. You may want to read the man or info page on tail.

Maybe `less +F /path/to/file` would be more appropriate here?

--
Suvayu

Open source is the future. It sets us free.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-20-2012, 01:03 PM
Reindl Harald
 
Default way to flush /var/log/message

Am 20.05.2012 14:52, schrieb suvayu ali:
> On Sun, May 20, 2012 at 2:20 PM, Mikkel L. Ellertson
> <mellertson@gmail.com> wrote:
>>
>> What you are seeing is the last last 10 lines of the file, and
>> then new additions as it is added to the file. This is the way
>> tail -f works. You may want to read the man or info page on tail.
>
> Maybe `less +F /path/to/file` would be more appropriate here?

"tail -n 1000 -f /var/log/messages" does practically the same
and is more suiteable on large files

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-20-2012, 06:35 PM
Paul Allen Newell
 
Default way to flush /var/log/message

On 5/20/2012 5:20 AM, Mikkel L. Ellertson wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/19/2012 11:51 PM, Paul Allen Newell wrote:

Hello:

Is there a way to flush output to /etc/log/message so a tail -f
catches things when they happen rather than what I think I am
seeing as a buffer hold-until-full delay?

Thanks in advance, Paul

What you are seeing is the last last 10 lines of the file, and
then new additions as it is added to the file. This is the way
tail -f works. You may want to read the man or info page on tail.

Mikkel
- --




JD: Thanks for the suggestions of things to "man" in your earlier reply

Mikkel: I understand tail. What I am having problems with is expecting
to see new additions from iptables logging rejections and not getting
them until much later, if at all? I just wanted to find out if there was
a need/way to make sure that nothing is "waiting" to be written as
Idon't know if there is any buffering of output (something like fflush()
in c++).


Suvayu and Reindl: Thanks for your suggestions.

To all: I am getting the sense from these answers that the assumption is
that anything that needs to be written to /var/log/messages happens on
demand and there is no buffering (as in "nobody replied that I need to
do something to flush").


Paul
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-21-2012, 12:48 PM
Tim
 
Default way to flush /var/log/message

On Sun, 2012-05-20 at 11:35 -0700, Paul Allen Newell wrote:
> I am having problems with is expecting to see new additions from
> iptables logging rejections and not getting them until much later, if
> at all? I just wanted to find out if there was a need/way to make sure
> that nothing is "waiting" to be written as Idon't know if there is any
> buffering of output (something like fflush() in c++).

You can configure iptables to log to somewhere else. Another file, or
directly to a console.

--
[tim@localhost ~]$ uname -r
2.6.27.25-78.2.56.fc9.i686

Don't send private replies to my address, the mailbox is ignored. I
read messages from the public lists.



--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-21-2012, 07:03 PM
Paul Allen Newell
 
Default way to flush /var/log/message

On 5/21/2012 5:48 AM, Tim wrote:

On Sun, 2012-05-20 at 11:35 -0700, Paul Allen Newell wrote:

I am having problems with is expecting to see new additions from
iptables logging rejections and not getting them until much later, if
at all? I just wanted to find out if there was a need/way to make sure
that nothing is "waiting" to be written as Idon't know if there is any
buffering of output (something like fflush() in c++).

You can configure iptables to log to somewhere else. Another file, or
directly to a console.


Tim:

When I first looked into the man pages et al for iptables, I found the
LOG but no way to specify a file. The best I could sort out was using a
prefix so I would at least have a token to search for in /var/log/messages.


I just did a quick google to see if I missed something. The only thing I
see is a level and a link to syslog.conf, which I did not get on first
reading (and it didn't feel like where I should be looking to begin with).


Can you point me to a link?

Thanks,
Paul
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-21-2012, 07:15 PM
"Alan J. Gagne"
 
Default way to flush /var/log/message

When I first looked into the man pages et al for iptables, I found the
LOG but no way to specify a file. The best I could sort out was using a
prefix so I would at least have a token to search for in /var/log/messages.

I just did a quick google to see if I missed something. The only thing I
see is a level and a link to syslog.conf, which I did not get on first
reading (and it didn't feel like where I should be looking to begin with).

Can you point me to a link?



You could look at sending iptables messages to /var/log/iptables
using rsyslog.




http://blog.shadypixel.com/log-iptables-messages-to-a-separate-file-with-rsyslog/



Alan





--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-21-2012, 07:21 PM
Paul Allen Newell
 
Default way to flush /var/log/message

On 5/21/2012 12:15 PM, Alan J. Gagne wrote:




You could look at sending iptables messages to /var/log/iptables
using rsyslog.




http://blog.shadypixel.com/log-iptables-messages-to-a-separate-file-with-rsyslog/



Alan








Alan:



Thanks for the reply. I did an initial read of the page and it looks
interesting. That being said, I'm going to have to take a few more
passes to make sure I understand it.



If I read correctly, it isn't a replacement for logging to
/var/log/messages, just a way to filter those logs into another log
that only gets what I want to see?



Paul





--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 03:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org