LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   syslogd options (https://www.linuxquestions.org/questions/linux-newbie-8/syslogd-options-561079/)

mahesh_sonawane 06-12-2007 01:00 AM

syslogd options
 
Hi All,

Is anybody know that syslogd has the line number option ?
and Can I disable the repeated logs ?
I read manual and search on google but I cant found it.
Your help will be appreciate.

Thank you.

:newbie:

Tinkster 06-12-2007 07:27 PM

Quote:

Originally Posted by mahesh_sonawane
Hi All,

Is anybody know that syslogd has the line number option ?
and Can I disable the repeated logs ?
I read manual and search on google but I cant found it.
Your help will be appreciate.

Thank you.

:newbie:

Hi,

Can you please explain what you mean with both statements?

Quote:

"syslogd has the line number option"
Are you asking whether syslogd can insert a number in the
log-files?


Quote:

"Can I disable the repeated logs"
What do you mean when you say "repeated logs"? Messages
like "this was repeated 20 times" to be expanded to have
all 28 entries instead? Do you want to stop log rotation?



Cheers,
Tink

mahesh_sonawane 06-12-2007 11:18 PM

Hello Tink,

Thank you very much for the reply.

1. I mean to say that "Is there any option to insert line number in syslog ?"

2. "Can I disable the repeated logs ?" means if same log came then I dont want to put that log in log file. Is this possible or is there any option for this ?

Will you please explain me what is "log rotation" ?

Sorry I am very new to syslog. I dont know the details about syslog.

Thank you.

Tinkster 06-13-2007 02:51 AM

Quote:

Originally Posted by mahesh_sonawane
Hello Tink,

Thank you very much for the reply.

1. I mean to say that "Is there any option to insert line number in syslog ?"

Not that I'm aware off, and it doesn't really make too
much sense, either, as far as I'm concerned. What would
the use case be?

Quote:

Originally Posted by mahesh_sonawane
2. "Can I disable the repeated logs ?" means if same log came then I dont want to put that log in log file. Is this possible or is there any option for this ?

Excellent question; on slackware that's something
that "just happens", I never thought about configuring
it explicitly. What distro are you using?


Quote:

Originally Posted by mahesh_sonawane
Will you please explain me what is "log rotation" ?

Sorry I am very new to syslog. I dont know the details about syslog.

Thank you.

Log rotation is not really a feature of syslog, but
rather of logrotate (which co-operates with syslog via cron).
What it does is to roll a log on an e.g. daily or weekly
basis for easy archival, or to prevent unlimited growth
of a file.


Cheers,
Tink

mahesh_sonawane 06-13-2007 03:19 AM

Hello Tink,
Thank you very much for the quick reply.
I am sorry that I couldn't explain you properly.

1. Line number option means suppose I want 100 lines only in the logfile. So log file should show only 100 lines. It should be overwrite the oldest line with 101th line.

2. I am using Fedora 5. I search some source code for syslogd I found 2 options one is busybox-1.6.0 (not used syslog.conf )and other is syslogd-1.4.1(uses syslog.conf). In busybox-1.6.0 version it shows all the log evenif it is repeated. In syslogd-1.4.1 version if log line get repeate it shows the message "last message repeated xx times".

3. How can I enable log rotate option ? Suppose I want log on hourly basis.


Thank you.

Regards

Tinkster 06-13-2007 08:01 PM

Quote:

Originally Posted by mahesh_sonawane
Hello Tink,
Thank you very much for the quick reply.
I am sorry that I couldn't explain you properly.

1. Line number option means suppose I want 100 lines only in the logfile. So log file should show only 100 lines. It should be overwrite the oldest line with 101th line.

I'm fairly certain that you can't. And I fail to see
the benefit in a size-based rotation.


Quote:

Originally Posted by mahesh_sonawane
2. I am using Fedora 5. I search some source code for syslogd I found 2 options one is busybox-1.6.0 (not used syslog.conf )and other is syslogd-1.4.1(uses syslog.conf). In busybox-1.6.0 version it shows all the log evenif it is repeated. In syslogd-1.4.1 version if log line get repeate it shows the message "last message repeated xx times".

3. How can I enable log rotate option ? Suppose I want log on hourly basis.


Thank you.

Regards

That's a question I hope someone with Fedora experience can answer.
I can't, since I don't use it. The distros I use (Slackware by
inclination; debian,suse and ubunut because they're here at work)
all come with logrotate, and the behaviour is configured via
/etc/logrotate.conf and files in /etc/logrotate.d


Cheers,
Tink

chrism01 06-14-2007 07:31 AM

Fedora uses the same logrotate arrangement


All times are GMT -5. The time now is 10:33 PM.