[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
FREESCO Support • View topic - To many log files gives problem to rmlogs

To many log files gives problem to rmlogs

Support section for FREESCO v0.3.x

To many log files gives problem to rmlogs

Postby knud-ch » Wed Sep 16, 2009 9:41 am

Hi

In our setup (on a school) we store the log files for a long time...

Once I got the problem that the box ran out of file space....the DHCP server then stalled because it could not access the lease file.

I wondered why it ran out of files space...it seems that rmlogs did not work proberly...
I did not think further about because we have a WAN attack which in other setup generate a huge amout of log files....

The yesterday I looked at the problem again...old logfiles was not removed !
I tested rmlogs manually...it gave a error...
"ls ..to many parameters.." or something

It seems that the problem is that if there are to many file in log directory the ls fails to work.

Knud
report attached
You do not have the required permissions to view the files attached to this post.
User avatar
knud-ch
Newbie
 
Posts: 13
Joined: Sun Aug 03, 2003 3:26 am
Location: Denmark

Re: To many log files gives problem to rmlogs

Postby Lightning » Wed Sep 16, 2009 8:48 pm

The problem is that there are only so many file descriptors and when you run out of them it causes the entire directory system they are in to fail. I suggest you manually remove the logs and make the rmlogs number of days for keeping logs to a reasonable number so this sort of problem doesn't happen.

rm -rf /home/root/var

Unfortunately with no disk space to play with it will be a little difficult to do anything else without somewhere to move the logs to.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12081
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: To many log files gives problem to rmlogs

Postby knud-ch » Thu Sep 17, 2009 1:07 am

The problem disk space was the problem at first but it was initiated
by the fact that rmlogs did not remove those old log files.

rmlogs (or correct ls wich is used in the rmlogs script) fails to operate on a big number
files even if there are a lot of diskspace / descriptors free.

So above a certain number of log files(within the number of days) rmlogs fails to remove the old log files
and the system fails in the end when the log file number grows infinity.

And yes of course I could set the "days" number lower but we want to have a long history
and we have plenty of disk space.

Knud
User avatar
knud-ch
Newbie
 
Posts: 13
Joined: Sun Aug 03, 2003 3:26 am
Location: Denmark

Re: To many log files gives problem to rmlogs

Postby Lightning » Thu Sep 17, 2009 7:54 pm

If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12081
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: To many log files gives problem to rmlogs

Postby knud-ch » Fri Sep 18, 2009 1:04 am

I dont dare to say it.....

For august month we have 1685 log files each 50k !

Allright I know that we have a bit unlucky setup regarding log files....I am working on that

Setup:

HW box router/firewall....WAN <=> LAN access....named router1

Linux server handling user login, user DIR's etc...named server1

Server OS/2 handling VPN, remote admin....named firewall

Linux server handling remote SSH user access.... named server2

FREESCO box handling DNS, DHCP....named dns1


router1 is the one which takes the attacks from outside + user access to the internet....is sending syslog to server1
server1 has nasty idea not to remember a allready known IP/name...so each syslog entry from router1 is resolved via DNS1
firewall does have its own WAN access, also attacks here....ask DNS1 for IP/name resolving.
server2 does have a SSH port mapping from router1....not much trafic on this one but gives some log entries resolving DNS

The setup is quite stable against attacks....single issue we had when the logs on dns1 flooded the disk and the DHCP server stopped running.

Just for data on the Freesco box:
Running on Compaq DL360 2* 1GHz P3 CPU's 1 G ram + 2*18G 10k rpm scsi disks
Files system is ext2. Running in SMP mode
So there are plenty of resources

Knud
User avatar
knud-ch
Newbie
 
Posts: 13
Joined: Sun Aug 03, 2003 3:26 am
Location: Denmark

Re: To many log files gives problem to rmlogs

Postby Lightning » Sat Sep 19, 2009 1:36 pm

If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12081
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: To many log files gives problem to rmlogs

Postby knud-ch » Sat Sep 19, 2009 2:11 pm

Thanks !

I will give it a try one of the days...

Knud
User avatar
knud-ch
Newbie
 
Posts: 13
Joined: Sun Aug 03, 2003 3:26 am
Location: Denmark


Return to FREESCO Support for v0.3.x

Who is online

Users browsing this forum: No registered users and 1 guest

cron