LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-24-2015, 02:56 AM   #1
papakota
Member
 
Registered: May 2015
Distribution: Ubuntu 14.04
Posts: 56

Rep: Reputation: Disabled
How to deal with growing BIND9 log files


My DNS server's logs are the text files that growing too fast and one of them is already over 30 MB in size. I didn't set up the max. file sizes. I would prefer just to manually delete the lines inside the files. Let's say, my log contains entries for the last 10 days.The entries that refer to 9 days I would manually delete and leave there just the last day's entries. Is it something that's not gonna cause any damage to anything, I hope???
 
Old 10-24-2015, 05:30 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by papakota View Post
My DNS server's logs are the text files that growing too fast and one of them is already over 30 MB in size.
Are these all legitimate entries? Meaning nothing that would require adjusting / filtering / blocking in the configuration file?


Quote:
Originally Posted by papakota View Post
I didn't set up the max. file sizes.
Why not?


Quote:
Originally Posted by papakota View Post
I would prefer just to manually delete the lines inside the files. Let's say, my log contains entries for the last 10 days.The entries that refer to 9 days I would manually delete and leave there just the last day's entries. Is it something that's not gonna cause any damage to anything, I hope???
You probably want to use logrotate instead. 'man logrotate.conf' for more nfo.
 
Old 10-24-2015, 07:59 PM   #3
papakota
Member
 
Registered: May 2015
Distribution: Ubuntu 14.04
Posts: 56

Original Poster
Rep: Reputation: Disabled
Thanks for your reply! Definitely, I would have to learn more about this topic and it requires a separate thread to discuss. But right now I won't get into it. I'm assuming that it's safe to delete manually since you haven't said otherwise.
 
Old 10-24-2015, 10:10 PM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by papakota View Post
Thanks for your reply! Definitely, I would have to learn more about this topic and it requires a separate thread to discuss. But right now I won't get into it. I'm assuming that it's safe to delete manually since you haven't said otherwise.
When you modify a file at the same time some other process modifies it, you risk corrupting the data in the file. Which, admittedly, is not such a big deal with a log file. If you want to avoid that, though, perhaps you should stop your DNS server before deleting lines from the log.

I don't want to sound patronizing, but here are a few other considerations. If you don't understand a tool like logrotate, you shouldn't operate a DNS server. Most distros come with logrotate installed and configured by default, so that you should investigate how such a large file could be created. If your DNS server generates that output volume in a few days, something must be misconfigured; have a look at those messages before you delete them.
 
Old 10-25-2015, 12:21 AM   #5
papakota
Member
 
Registered: May 2015
Distribution: Ubuntu 14.04
Posts: 56

Original Poster
Rep: Reputation: Disabled
If you don't want to sound, then don't! As simple as that... That's first. No need for personal attacks. If you wanna help, then help. If you don't... Don't bother replying.
Second... I did stop BIND before manually deleting part of its log files content.
Sure, I will have to configure log management sooner rather than later... That's true...
 
Old 10-25-2015, 02:25 AM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by papakota View Post
If you wanna help, then help. If you don't... Don't bother replying.
That's why I gave a precise answer to your precise question. You were under no obligation to read any further.
 
Old 10-25-2015, 02:40 AM   #7
papakota
Member
 
Registered: May 2015
Distribution: Ubuntu 14.04
Posts: 56

Original Poster
Rep: Reputation: Disabled
No need to play games here. We're not in kindergarten. I've read because you'd written, not the other way around.
Forum exists so people who come here would read. That's what I do here. But forum doesn't exist to give you a way to offend people you don't know.
 
Old 10-25-2015, 03:49 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by papakota View Post
If you don't want to sound, then don't! As simple as that... That's first. No need for personal attacks. If you wanna help, then help. If you don't... Don't bother replying.
Second... I did stop BIND before manually deleting part of its log files content.
Sure, I will have to configure log management sooner rather than later... That's true...
Quote:
Originally Posted by papakota View Post
No need to play games here. We're not in kindergarten. I've read because you'd written, not the other way around.
Forum exists so people who come here would read. That's what I do here. But forum doesn't exist to give you a way to offend people you don't know.
you are overreacting. nobody's offending or attacking.
both contributors here are trying to help you, i think a "thank you" is in order instead of complaining about their phrasing.
'nuff said.
 
Old 10-25-2015, 05:46 AM   #9
papakota
Member
 
Registered: May 2015
Distribution: Ubuntu 14.04
Posts: 56

Original Poster
Rep: Reputation: Disabled
Who cares what you think? How does this concern you? "If you don't understand a tool like logrotate, you shouldn't operate a DNS server."
Who wrote that? My mom?
Who is he and who are you to try to teach me manners or patronize me. I simply asked a purely technical question here. Period.
All the other B.S. came after someone here said something PERSONAL. Though it might be his legal right to be rude and attacking, then I also have a right to express how I see it. Isn't it fair? Call it subjective... Fine... I'll call you an idiot and you have a right not to take the offense. Fine by me!
 
Old 10-25-2015, 03:46 PM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by papakota View Post
Who cares what you think? How does this concern you?
it concerns me because i'm a member of this forum just like everybody else who contributed to this thread.

Quote:
"If you don't understand a tool like logrotate, you shouldn't operate a DNS server."
Who wrote that? My mom?
a wise mom.
seriously, i think in a year or so (if you manage to keep your server running for that long) you will turn back to this moment and think "i should have listened to my mom, then".

Quote:
All the other B.S. came after someone here said something PERSONAL.
this is why i said you're overreacting - you are taking it personally, and in the end you're just reacting to your own projections.

Quote:
Though it might be his legal right to be rude and attacking
it isn't his right by the forum rules. and he wasn't.
you, on the other hand, are sailing close to the edge:
Quote:
I'll call you an idiot
 
1 members found this post helpful.
Old 10-25-2015, 06:06 PM   #11
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by papakota View Post
Who cares what you think? How does this concern you!
You shouldn't think that this forum thread is only for you. It is for everybody who comes to Linuxquestions, including people who might have similar problems. If my remark about not operating a DNS server (or any server) without having logrotate enabled doesn't apply to you, why don't you just ignore it?
 
Old 10-27-2015, 04:44 PM   #12
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Linuxquestions.org is a place where you can ask any Linux question and get a friendly answer. This is our goal. We also have rules that clearly say what is not acceptable, including personal attacks, calling names etc. Please take that into account before posting.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/log/messages growing tremendously george_john Linux - Newbie 3 05-14-2015 06:28 AM
using tac with a growing log file fantasy1215 Programming 3 08-06-2012 01:43 PM
access.log is growing too much mbnaik Linux - Server 2 01-07-2009 11:51 AM
mgetty.log.9600 growing to large, how to manage? dgr Linux - Newbie 3 01-16-2008 02:25 PM
How to deal with huge swp files such as .store.log.2.swp from squid directory? Niceman2005 Linux - General 2 11-01-2005 07:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration