On Tue, Dec 2, 2014 at 8:49 PM, Einfach Jemand <rru....@gmail.com> wrote:
>
> Hi,
>
> Am 02.12.2014 22:46, schrieb sven falempin:
> > Hello,
> >
> > I am more or less forced to test Squid.
> > OpenBSD test.my.domain 5.6 GENERIC.MP#333 amd64
> >
> > I have two problems:
> >
> > <<
> > WARNING! Your cache is running out of filedescriptors
> >>>
> >
> > And probably have to read more about ICAP
> > <<
> > suspending ICAP service for too many failures
> >>>
> >
> >
> > My question is about the fds,
> > i tried to add
> >
> > squid:\
> >         :openfiles-cur=4096:\
> >         :tc=daemon:
> >
> > into login.conf and did not forget to 'push' it
> >
> > # cap_mkdb /etc/login.conf
> > # echo $?
> > 0
>
> Hmm, I checked on one of my boxen and there /etc/passwd has
>
> _squid
> ^------------! Note the underline.
>
> as account for this package, so you probably want
>
> _squid:\
>         :openfiles-cur=4096:\
>         :tc=daemon:
>
> in /etc/login.conf
>
> > It looks like it has no effect. Is this the way to go ? have I to change a
> > limit somewhere else ?
> >
> > Best regards,
> > Sven
> >
>
> HTH
> rru
>

about _ :

$ grep bgpd /etc/passwd /etc/login.conf

/etc/passwd:_bgpd:*:75:75:BGP Daemon:/var/empty:/sbin/nologin

/etc/login.conf:bgpd:\

Other test:

 Using ulimit -n 4096
my perl script open <1025> file


# cat /root/fds.pl #!/usr/bin/perl

use warnings;

use strict;

use v5.10;

use POSIX;

use File::Temp qw/tempfile/;

if (defined $ARGV[0] and $ARGV[0] =~ /^\d+$/) {

setuid ($ARGV[0]);

} else {

setuid ( 515 );

}

system('id');

my @fds = ();

while (0xBAD) {

my($fh, $filename) = tempfile();

last unless $fh; #but tempfile croak

push @fds, { fd=>$fh,n=>$filename};

}



END{

say 'Count:'.($#fds+1);

foreach my $fd (@fds) {

close $fd->{fd};

unlink $fd->{n};

}

}

Reply via email to