Thread View: news.software.nntp
2 messages
2 total messages
Started by Hitesh Patel
Tue, 21 Jul 1998 00:00
Any way to reduce messages in control
Author: Hitesh Patel
Date: Tue, 21 Jul 1998 00:00
Date: Tue, 21 Jul 1998 00:00
14 lines
1168 bytes
1168 bytes
Are there any way's to keep the number of messages in my control.* below say 30,000 messages at a time... i'm having problems with the number of articles being so huge that it's affecting the performance of my server. -- Hitesh Patel Assistant Network Administrator Preferred Systems hitesh@presys.com http://www.presys.com
Re: Any way to reduce messages in control
Author: Jeremy
Date: Tue, 21 Jul 1998 00:00
Date: Tue, 21 Jul 1998 00:00
39 lines
1690 bytes
1690 bytes
Hitesh Patel <hitesh@presys.com> wrote:
> Are there any way's to keep the number of messages in my control.*
> below say 30,000 messages at a time... i'm having problems with the
> number of articles being so huge that it's affecting the performance
> of my server.
This can probably be improved on, but it's been working for me for
a while; it basically gives a group a one-hour expire, and nukes the
overview file for good measure.
#!/usr/local/bin/perl
$directory = "/var/news/spool/control/cancel";
$overview = "/var/news/spool_over/control/cancel/.overview";
$now = time;
chdir $directory;
opendir DIR, ".";
@files = readdir DIR;
closedir DIR;
FILE: foreach $file (@files) {
next FILE if (-d $file);
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,
$mtime,$ctime,$blksize,$blocks) = stat $file;
$age = $now - $mtime;
unlink $file if ($age > 3600);
}
unlink $overview;
--
Jeremy | jeremy@exit109.com
"Never tell me the odds." --Han Solo
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads