From owner-freebsd-questions@FreeBSD.ORG Thu Jan 31 12:28:53 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7166216A41A for ; Thu, 31 Jan 2008 12:28:53 +0000 (UTC) (envelope-from sh1nny_kn1ght@yahoo.com) Received: from n8c.bullet.mail.tp2.yahoo.com (n8c.bullet.mail.tp2.yahoo.com [203.188.202.138]) by mx1.freebsd.org (Postfix) with SMTP id EE2D613C47E for ; Thu, 31 Jan 2008 12:28:52 +0000 (UTC) (envelope-from sh1nny_kn1ght@yahoo.com) Received: from [202.43.196.225] by n8.bullet.mail.tp2.yahoo.com with NNFMP; 31 Jan 2008 12:28:51 -0000 Received: from [217.12.4.214] by t2.bullet.tpe.yahoo.com with NNFMP; 31 Jan 2008 12:28:51 -0000 Received: from [216.252.122.219] by t1.bullet.ukl.yahoo.com with NNFMP; 31 Jan 2008 12:28:50 -0000 Received: from [69.147.65.153] by t4.bullet.sp1.yahoo.com with NNFMP; 31 Jan 2008 12:28:50 -0000 Received: from [127.0.0.1] by omp401.mail.sp1.yahoo.com with NNFMP; 31 Jan 2008 12:28:50 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 335559.9111.bm@omp401.mail.sp1.yahoo.com Received: (qmail 34818 invoked by uid 60001); 31 Jan 2008 12:28:50 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=6Y7WaJPUwnKANfkvTCPsWdCSuVHVf7aMcrosbKbB1vcDkQRWGFyapJGb8uQHyHAb5us0eifltVCLVImL7jXZj8kWKExeiViIX9lkhaXF921Y3PPiQ2nRfY4lYr5Wp9QCxeJZ3Mu+ISKNJdXK3jAjntZQgp9VTfyaH+ZBGCXpVvo=; X-YMail-OSG: Y8o70z0VM1lGPEYcBkpu.fJDUlLLR7Dfq5Zwuty2jG.yuH36hN3ZKD4O8rB98DgpHmVrwBP04_Gkvpb1iv8X8mAVlu3kDyGE1eMR Received: from [41.205.191.10] by web44813.mail.sp1.yahoo.com via HTTP; Thu, 31 Jan 2008 04:28:46 PST Date: Thu, 31 Jan 2008 04:28:46 -0800 (PST) From: shinny knight To: Rudy , freebsd-questions@freebsd.org In-Reply-To: <47A19934.6050709@monkeybrains.net> MIME-Version: 1.0 Message-ID: <108340.30428.qm@web44813.mail.sp1.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: karl.triebes@gmail.com Subject: Re: Future development of Jail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jan 2008 12:28:53 -0000 Rudy wrote: Karl Triebes wrote: > I would like to see per-jail quotas such as the ones Andy mentions, > and would like to hear if anyone would be interested in doing it for > the right price. You may contact me via this list or in private. Per-jail quotas are Trivial you use zfs... You can even resize a zfs mount 'on the fly'. Here is the command to resize a jail to 100GB of space:: # zfs set quota=100G tank/jails/myNeatoWebsite As for doing it for a price, I'll consult -- granted I just let The Secret out of the bag. :) I can build a 1TB to 6TB box for you and have it all set and ready for jails, or you could do it yourself. As for CPU, I 'auto nice' pids with high CPU usage: #!/usr/local/bin/perl # This is BEERWARE [b] Rudy # auto-nice-jails.pl - set this up in cron to run every 5 minutes #use strict; open PS, "/bin/ps -axo time,pid,nice,state,command | /usr/bin/sort -nr |" or die "no PS for me. $). $!"; while ( ) { # examples: #191:49.16 0 R+J ./q3ded +set fs_game arena +set vm_game 0 +set sv_pure ...etc... # 21:23.58 4 RN+J ./sc_serv /^\s*(\d+):(\d+).\d+\s+(\d+)\s+(\d+)\s+(\S+)\s+(.*)$/ or next; my ($cputime,$pid,$nice,$state,$command) = (($1*60+$2),$3,$4,$5,$6); ### print "($cputime,$pid,$nice,$state,$command)\n"; last if ($cputime < 30); next unless ($state =~ /J/); # only jailed procs... next if ($nice > 5); my $renice = 2; $renice = 4 if ($cputime > 1000); $renice = 5 if ($cputime > 10000); if ($renice > $nice) { print "$pid\t$nice\t$cputime\t$command\n"; system("/usr/bin/renice +$renice $pid"); } } Rudy _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscribe@freebsd.org Nice one Rudy, Thanks for the tip. Best Regards, Catalin --------------------------------- Looking for last minute shopping deals? Find them fast with Yahoo! Search.