Re: Kernel panic: flush_pagedep_deps: flush failed

2008-05-21 Thread Thomas Herzog

with backtrace, it looks like:

[EMAIL PROTECTED] STORAGE kgdb kernel.debug /var/crash/vmcore.1
[GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined 
symbol ps_pglobal_lookup]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as amd64-marcel-freebsd.

Unread portion of the kernel message buffer:
ad8: FAILURE - WRITE_DMA48 timed out LBA=314770767
g_vfs_done():ad8s1a[WRITE(offset=161162592256, length=16384)]error = 5
panic: flush_pagedep_deps: flush failed
cpuid = 0
Uptime: 3d15h11m52s
Physical memory: 1011 MB
Dumping 271 MB: 256 240 224 208 192 176 160 144 128 112 96 80 64 48 32 16

#0  doadump () at pcpu.h:194
194 __asm __volatile(movq %%gs:0,%0 : =r (td));
(kgdb) backtrace
#0  doadump () at pcpu.h:194
#1  0x0004 in ?? ()
#2  0x804abe09 in boot (howto=260) at 
/usr/src/sys/kern/kern_shutdown.c:409
#3  0x804ac20d in panic (fmt=0x104 Address 0x104 out of bounds) at 
/usr/src/sys/kern/kern_shutdown.c:563
#4  0x8068f122 in softdep_sync_metadata (vp=0xff003c30eba0) at 
/usr/src/sys/ufs/ffs/ffs_softdep.c:5689
#5  0x806957ae in ffs_syncvnode (vp=0xff003c30eba0, waitfor=Variable 
waitfor is not available.
) at /usr/src/sys/ufs/ffs/ffs_vnops.c:310
#6  0x8067c6bc in ffs_truncate (vp=0xff003c30eba0, length=328192, 
flags=2176, cred=0xff0001079d00,
td=0xff00049b19c0) at /usr/src/sys/ufs/ffs/ffs_inode.c:268
#7  0x8069b3af in ufs_direnter (dvp=0xff003c30eba0, tvp=0xff0033d5a7c0, dirp=0xa4715640, 
cnp=Variable cnp is not available.

)
at /usr/src/sys/ufs/ufs/ufs_lookup.c:950
#8  0x806a13b7 in ufs_makeinode (mode=Variable mode is not available.
) at /usr/src/sys/ufs/ufs/ufs_vnops.c:2422
#9  0x807a0b90 in VOP_CREATE_APV (vop=Variable vop is not available.
) at vnode_if.c:206
#10 0x8053234d in vn_open_cred (ndp=0xa4715a10, flagp=0xa471595c, cmode=Variable cmode is not 
available.

) at vnode_if.h:112
#11 0x80530022 in kern_open (td=0xff00049b19c0, path=0x7f3f9760 
Address 0x7f3f9760 out of bounds,
pathseg=Variable pathseg is not available.
) at /usr/src/sys/kern/vfs_syscalls.c:1028
#12 0x8075dc57 in syscall (frame=0xa4715c70) at 
/usr/src/sys/amd64/amd64/trap.c:852
#13 0x8074418b in Xfast_syscall () at 
/usr/src/sys/amd64/amd64/exception.S:290
#14 0x0008011ebe7c in ?? ()
Previous frame inner to this frame (corrupt stack?)


Thomas Herzog wrote:

hi,

[EMAIL PROTECTED] STORAGE kgdb kernel.debug /var/crash/vmcore.1
[GDB will not be able to debug user-mode threads: 
/usr/lib/libthread_db.so: Undefined symbol ps_pglobal_lookup]

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you 
are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as amd64-marcel-freebsd.

Unread portion of the kernel message buffer:
ad8: FAILURE - WRITE_DMA48 timed out LBA=314770767
g_vfs_done():ad8s1a[WRITE(offset=161162592256, length=16384)]error = 5
panic: flush_pagedep_deps: flush failed
cpuid = 0
Uptime: 3d15h11m52s
Physical memory: 1011 MB
Dumping 271 MB: 256 240 224 208 192 176 160 144 128 112 96 80 64 48 32 16

#0  doadump () at pcpu.h:194
194__asm __volatile(movq %%gs:0,%0 : =r (td));

both cores says the same.

Thomas

Toni Schmidbauer wrote:

At Tue, 20 May 2008 07:59:19 +0200,
Thomas Herzog wrote:

cat /var/crash/info.1


follow this guide:

http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-gdb.html 



and post the results. if nobody answers, open a pr (problem report)

http://www.freebsd.org/send-pr.html

hth,
toni

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Kernel panic: flush_pagedep_deps: flush failed

2008-05-21 Thread Thomas Herzog

since i activate ataidle i have this errors:

ad8: FAILURE - WRITE_DMA48 timed out LBA=314770799
+ad8: TIMEOUT - READ_DMA retrying (1 retry left) LBA=12207
+ad4: WARNING - SETFEATURES SET TRANSFER MODE taskqueue timeout - completing 
request directly

after disable it, this messages are gone.

so i think its a problem with ataidle, but why this panics the kernel?

thomas

Thomas Herzog wrote:

hi,

[EMAIL PROTECTED] STORAGE kgdb kernel.debug /var/crash/vmcore.1
[GDB will not be able to debug user-mode threads: 
/usr/lib/libthread_db.so: Undefined symbol ps_pglobal_lookup]

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you 
are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as amd64-marcel-freebsd.

Unread portion of the kernel message buffer:
ad8: FAILURE - WRITE_DMA48 timed out LBA=314770767
g_vfs_done():ad8s1a[WRITE(offset=161162592256, length=16384)]error = 5
panic: flush_pagedep_deps: flush failed
cpuid = 0
Uptime: 3d15h11m52s
Physical memory: 1011 MB
Dumping 271 MB: 256 240 224 208 192 176 160 144 128 112 96 80 64 48 32 16

#0  doadump () at pcpu.h:194
194__asm __volatile(movq %%gs:0,%0 : =r (td));

both cores says the same.

Thomas

Toni Schmidbauer wrote:

At Tue, 20 May 2008 07:59:19 +0200,
Thomas Herzog wrote:

cat /var/crash/info.1


follow this guide:

http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-gdb.html 



and post the results. if nobody answers, open a pr (problem report)

http://www.freebsd.org/send-pr.html

hth,
toni

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Your suggestions about this Dell configuration?

2008-05-21 Thread VeeJay
Hello friends,

My employer is buying this Dell server and I would like to have your opinion
about the configuration.

Requirements are:
2 Websites with 3-4 million hits per month with video ads.

Operating System:
*FreeBSD AMD647-STABBLE*

Database:
*PHP+MySQL with Apache*


Server Configuration:
*PowerEdge™ 6850 SCSI*

Dual Core Intel(R) Xeon(R) Processor 7130M, 3.2GHz, 8MB L3 Cache, 800Mhz FSB
1x Additional Dual Core Intel(R) Xeon(R) Processor 7130M, 3.2GHz, 8MB L3 Cache,
800MHz FSB

  16GB 400MHz Dual Rank DDR2 Memory (8X2GB)
 C5 Drives attached to embedded PERC4ei, RAID 10

  PERC 4/DC RAID controller (128MB cache) (1 intern and 1 extern Channel)
(Should I use controller with Both Internal or Both External Channel? What
they do?)

5 x 146GB SCSI Ultra320 (15000rpm) 1'' 80 pin harddrives

Chassis with support for 3.5'' SCSI Hard Drives

Dell Remote Access Card 4 SERVER MANAGEMENT CARD

(I will have hot swappable drives  chassis)

Thank you in advance.
-- 
Thanks!

BR / vj
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Sed, shell and hexadecimal character codes

2008-05-21 Thread Karel Miklav

There's a tip in the FreeBSD fortunes database that says:

 Want to strip UTF-8 BOM(Bye Order Mark) from given files?

 sed -e '1s/^\xef\xbb\xbf//'  bomfile  newfile

I can't make it work, and I can't find any other method to
work with hexa codes in scripts or on the command line so
I'm kind-a depressed :) I help myself with xxd now, but if
it is possible to avoid it, I'd like to hear about it.

--

Regards,
Karel Miklav


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Now what would you expect this to print out?

2008-05-21 Thread Jonathan McKeown
On Tuesday 20 May 2008 16:44, RW wrote:
 On Tue, 20 May 2008 11:33:50 +0200

 Jonathan McKeown [EMAIL PROTECTED] wrote:
  On Tuesday 20 May 2008 02:41, RW wrote:
   On Mon, 19 May 2008 21:46:03 +1200
  
   Jonathan Chen [EMAIL PROTECTED] wrote:
find /usr/src \( -name Makefile -or -name '*.mk' \) -print
  
   Why does that make a difference, when print always evaluates to
   true?
  
   x AND true   =   x
  
   so
  
   (a OR b) AND true   =   a OR b
a OR (b AND true)  =   a OR b
 
  It makes a difference (as in programming) because -print is used for
  its side-effect rather than its value, and the binding order
  influences when the side-effect happens.

 That's still a bit counter-intuitive because in normal programming
 languages the binding order modifies side-effects via the evaluation
 order. And in both cases the evaluation order would be expected to be
 left-to-right, with -print running last.

Yes. I'm actually talking rubbish. find evaluates its argument expression 
left-to-right, and the ``precedence'' actually applies to term grouping 
rather than evaluation order. (This does affect the outcome, but not in the 
way I glibly said it did).

What I should have said is that like a lot of programming languages, find is 
lazy when it comes to Boolean expressions: when it gets a TRUE in an -or or a 
FALSE in an -and, the value of the whole expression must be TRUE or FALSE 
respectively, regardless of what the remaining terms are, so why bother 
evaluating them? (It's usually referred to as short-circuiting).

 I guess what you are saying is that the side-effect of print is based-on
 a Boolean running-value. And without the brackets, the first test  has
 been evaluated, but not yet ORed into that running-value, by the time
 that print runs.

That's not quite how it works. Rewriting

find /usr/src -name Makefile -or -name '*.mk' -print

using extra parens to emphasise the implicit grouping, and including the 
implicit -and, gives:

find /usr/src -name Makefile -or \( -name '*.mk' -and -print \)

in other words, an -or with two terms, one of which happens to be an 
expression.

If -name Makefile is true, the -or is satisfied, so nothing else is evaluated, 
and find goes on to the next filename.

Otherwise, the expression in the second term has to be evaluated. If -name 
'*.mk' is false, the -and is satisfied (which also satisfies the -or) and 
find moves to the next filename. If it's true, the -and can't be satisfied 
without evaluating the -print. The end result is that only files matching 
'*.mk' are printed.

Rewriting the other case,

find /usr/src \( -name Makefile -or -name '*.mk' \) -and -print

If the first expression is false, the -and is satisfied and the -print is not 
evaluated. If the first expression is true (meaning either of the -name 
arguments is true), then the -and can't be satisfied without evaluating the 
-print.

The last case is

find /usr/src -name Makefile -or -name '*.mk'

find quickly analyses this, finds no output action, and converts it to the 
second form above, internally placing parens around the whole expression and 
an -and -print after it.

Jonathan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Which version

2008-05-21 Thread Russell Schoen

Hi,
Do you have a version that will run with an AMD Sempron 3100+, 1.8Ghz,  
32 bit, X86 family processor?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Instant reboot with FreeBSD 6.3 and 2GB RAM

2008-05-21 Thread votdev
Hello,

some users of FreeNAS which is based on FreeBSD 6.3 reported instant reboots on 
systems with  2GB RAM (most of them use 4GB). The reboot occurs right after 
displaying the FreeBSD loader menu. Most of them told me that they can boot if 
they reduce RAM to = 2GB.

We are using the following kernel configuration which is based on GENERIC:
http://freenas.svn.sourceforge.net/viewvc/freenas/branches/0.69/build/kernel-config/FREENAS-i386?revision=3291view=markup

I found out another problem that causes a reboot on my 2GB machine. We are 
using a image for the LiveCD which is 64MB great. If i change back mfs_root 
size to 63MB all works well, but all above 64MB causes a reboot.
Is there any limitation?

Could someone help me out of this problem?

Regards
Volker
-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Which version

2008-05-21 Thread Christian Zachariasen
On Wed, May 21, 2008 at 10:01 AM, Russell Schoen [EMAIL PROTECTED] wrote:

 Hi,
 Do you have a version that will run with an AMD Sempron 3100+, 1.8Ghz, 32
 bit, X86 family processor?
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 [EMAIL PROTECTED]


Please do some reading before asking questions on the mailing list. The
FreeBSD Handbook (google it) is an excellent resource and will
answer most of your questions about FreeBSD.


But to answer this specific question: Yes, it's called FreeBSD. Just get the
latest release (7.0) and install it.

Christian Zachariasen
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ipw2200 freebsd 7 firmware problem

2008-05-21 Thread Vince Hoffman

Fernando Apesteguía wrote:
 Hi all,
 
 I have an ipw2200 bg. I can't make it work under FreeBSD 7 on AMD64.
 
 This is the output of pciconf -lv
 
 [EMAIL PROTECTED]:0:5:0:   class=0x028000 card=0x27028086 chip=0x42208086
 rev=0x05 hdr=0x00
 vendor = 'Intel Corporation'
 device = 'MPCI3B  driverIntel PRO/Wireless 2200BG'
 class  = network
 
 dmesg shows the following:
 
 pci0: network at device 5.0 (no driver attached)
 
 I tried to instal the iwi-firmware from ports:
 

Have you read the manpage for iwi?
no ports are needed the firmware is now in the base system, Just add the
entries as specified in this snippet from man iwi

  Alternatively, to load the driver as a module at boot time, place the
 following lines in loader.conf(5):

   if_iwi_load=YES
   wlan_load=YES
   firmware_load=YES

 In both cases, place the following lines in loader.conf(5) to load the
 firmware modules:

   iwi_bss_load=YES
   iwi_ibss_load=YES
   iwi_monitor_load=YES

and

 This driver requires firmware to be loaded before it will work.  For
the loaded firmware to work the license at
 /usr/share/doc/legal/intel_iwi/LICENSE must be agreed to and the
follow-ing line be added to loader.conf(5):

   legal.intel_iwi.license_ack=1



regards,
Vince
 ===  iwi-firmware-2.4_8 is configured with iwicontrol(8) which you
 don't need, use 'make rmconfig' and uncheck CONTROL.
 *** Error code 1
 
 Stop in /usr/ports/net/iwi-firmware.
 
 I tried the suggested workaround, but I got:
 
 === No user-specified options configured for iwi-firmware-2.4_8
 
 I tried with pkg_add -r iwi-firmware-2.4_8 and I got
 
 Error: FTP Unable to get
 ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.0-release/Latest/iwi-firmware-2.4_8.tbz:
 File unavailable (e.g., file not found, no access)
 pkg_add: unable to fetch
 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.0-release/Latest/iwi-firmware-2.4_8.tbz'
 by URL
 
 My ports are up to date (cvsup.de.FreeBSD.org)
 
 So... How can I make the wireless card work?
 
 Any help is appreciated. Thanks in advance.
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Server crashing, no explanations

2008-05-21 Thread Christian Zachariasen
On Tue, May 20, 2008 at 8:34 PM, Wojciech Puchar 
[EMAIL PROTECTED] wrote:

 Then, if crash dumps are enabled, it could be a HW failure..


 no it is not. i have similar problems but not with apache, it is certainly
 FreeBSD bug that causes it to randomly reboot under certain types of load.

 i found the way to fix it in my case

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 [EMAIL PROTECTED]


Yeah, because hardware never fails, right Wojciech?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: resident memory limit

2008-05-21 Thread Brad Penoff
On Tue, May 20, 2008 at 2:39 PM, Brad Penoff [EMAIL PROTECTED] wrote:
 On Tue, May 20, 2008 at 1:54 PM, Bill Moran [EMAIL PROTECTED] wrote:
 In response to Brad Penoff [EMAIL PROTECTED]:

 I have an application that runs on Linux or Mac OS X but seems to have
 a problem when I run on FreeBSD (6.3 or 7).  The issue is the memory
 footprint for the application (osubw_sctpclien below) is quite large;
 on Linux it can be as much as 950 MB in resident memory, according to
 top.  However, on FreeBSD I start to get ENOMEM always around the time
 my resident memory size is about 200 MB.

 I read a few posts and have seen people fixing their problems by
 adjusting kern.maxdsiz in /boot/loader.conf and/or by adding a swap
 file.  I've tried both and for my application, it still seems to be
 limited to 200 MB resident memory regardless of maxdsize and swap file
 setting.  I wrote a toy application (malloctest below) that calls
 malloc in a while(1) and breaks once it gets ENOMEM (doing another
 while(1) so it doesn't exit); this application's memory size in top
 always matches the kern.maxdsiz setting, however it has a very low
 resident memory number, according to top.

 Have a look at /etc/login.conf and the associated man pages.


BTW, we've seen the exact behavior on FreeBSD 7 as well (6.3 was
reported here).  We've tried on different hardware as well, and keep
getting haunted by this resident memory limit that we don't know how
to set.

Any idea why, in the data I originally reported, I can allocate
kern.maxdsiz + swap (see SIZE from top output) for malloc(1 MB) in a
while loop, yet the top value for RES is always really low?

How come, in contrast, my application starts to report ENOMEM when
SIZE is 203 MB and RES is 201 MB?  This is why I titled the thread
asking about an unknown (to me ;-) limit for resident memory...

Any other suggestions?

brad


 Thanks for the prompt reply.

 This system has the default settings for all users set to unlimited
 for more or less all login.conf categories.  I've pasted them below.
 My application uses a raw socket so I was running it as root, which
 also uses the default settings.

 It mentioned that setting memoryuse is the same as setting both -cur
 and -max ; any ideas why memoryuse is saying it's unlimited even
 though it is not?  I tried explicitly setting -cur to 1000M and it
 still started giving ENOMEM around 200 MB resident memory in top...

 brad


 default:\
:passwd_format=md5:\
:copyright=/etc/COPYRIGHT:\
:welcome=/etc/motd:\
:setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
:path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
 /usr/local/bin /usr/X11R6/bin ~/bin:\
:nologin=/var/run/nologin:\
:cputime=unlimited:\
:datasize=unlimited:\
:stacksize=unlimited:\
:memorylocked=unlimited:\
:memoryuse=unlimited:\
:filesize=unlimited:\
:coredumpsize=unlimited:\
:openfiles=unlimited:\
:maxproc=unlimited:\
:sbsize=unlimited:\
:vmemoryuse=unlimited:\
:priority=0:\
:ignoretime@:\
:umask=022:

 root:\
:ignorenologin:\
:tc=default:



 --
 Bill Moran
 http://www.potentialtech.com



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Server crashing, no explanations

2008-05-21 Thread Alan Gilmour
I guess it can, but in the past when hardware has failed for me, I
generally got some indicative errors in the logs.

I managed to move a lot of the intensive operations across to another
server and for the moment,its working much better on the other server
which has a newer kernel.

Cheers

Alan

On 21/05/2008, Christian Zachariasen [EMAIL PROTECTED] wrote:
 On Tue, May 20, 2008 at 8:34 PM, Wojciech Puchar 
 [EMAIL PROTECTED] wrote:

  Then, if crash dumps are enabled, it could be a HW failure..
 
 
  no it is not. i have similar problems but not with apache, it is certainly
  FreeBSD bug that causes it to randomly reboot under certain types of load.
 
  i found the way to fix it in my case
 
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to 
  [EMAIL PROTECTED]
 

 Yeah, because hardware never fails, right Wojciech?
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]



-- 
This message, together with any attachments, is for the confidential
and exclusive use of the intended addressee(s). If you receive it in
error, please delete the message. All information contained within
this e-mail is without prejudice. Do not disclose, copy, circulate or
use any information contained herein.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


rc script REQUIRE-ing a service on another host

2008-05-21 Thread Jonathan McKeown
We had a power failure last night, and this morning I found that imapproxyd 
(running on a webserver which provides webmail) had failed to start because 
it depends on imapd (running on the mailserver, a different host), and 
imapproxyd had won the startup race.

I need to prevent the race by making one service depend on another service 
running remotely. While I sketch out some horribly untidy fix, can the 
Lazyweb tell me if there is already a neat solution for this?

Jonathan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Your suggestions about this Dell configuration?

2008-05-21 Thread Wojciech Puchar


Requirements are:
2 Websites with 3-4 million hits per month with video ads.


which means 10 per day. some time ago i wa doing somethink like that 
on 486/100.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: resident memory limit

2008-05-21 Thread Wojciech Puchar

a problem when I run on FreeBSD (6.3 or 7).  The issue is the memory
footprint for the application (osubw_sctpclien below) is quite large;
on Linux it can be as much as 950 MB in resident memory, according to
top.  However, on FreeBSD I start to get ENOMEM always around the time
my resident memory size is about 200 MB.



check ulimit

then fix login.conf


I read a few posts and have seen people fixing their problems by
adjusting kern.maxdsiz in /boot/loader.conf and/or by adding a swap
file.  I've tried both and for my application, it still seems to be
limited to 200 MB resident memory regardless of maxdsize and swap file
setting.  I wrote a toy application (malloctest below) that calls
malloc in a while(1) and breaks once it gets ENOMEM (doing another
while(1) so it doesn't exit); this application's memory size in top
always matches the kern.maxdsiz setting, however it has a very low
resident memory number, according to top.

I have all the data below from these two applications.  For
malloctest, I can malloc as much as maxdsiz allows (without panic'ing
the kernel).  My main question is, in FreeBSD how can I increase the
permitted resident memory of the system for my application to beyond
200 MB?  Any ideas where this 200 MB resident memory limit is coming
from?  Why (in the last data entry below) does the resident memory
limit become 80 MB after I increase maxdsiz AND use a swap file (the
settings where malloctest can malloc the most!)?

Thanks!
brad


Using FreeBSD 6.3.


kern.maxdsiz  default setting ( 524288 kB )
no swap file.

Mem: 218M Active, 9184K Inact, 36M Wired, 14M Buf, 1739M Free
Swap: 512M Total, 512M Free

 PID USERNAME  THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
 978 root4 1180   203M   201M RUN  0:12  0.00% osubw_sctpclien

... separate run...

 969 penoff  1 1250   513M  1144K RUN  0:09 90.73% malloctest

--

kern.maxdsiz  default setting ( 524288 kB )
512 MB swap file.

Mem: 218M Active, 9144K Inact, 36M Wired, 12K Cache, 14M Buf, 1739M Free
Swap: 1024M Total, 1024M Free

 PID USERNAME  THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
 982 root3 1200   203M   201M RUN  0:13  0.00% osubw_sctpclien

... separate run...

 967 penoff  1 1260   513M  1144K RUN  0:10 94.60% malloctest

--


kern.maxdsiz=2147483648   # Set the max data size
no swap file.

Mem: 218M Active, 9168K Inact, 36M Wired, 14M Buf, 1739M Free
Swap: 512M Total, 512M Free

 PID USERNAME  THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
 967 root3 1220   203M   201M RUN  0:31  0.00% osubw_sctpclien

... separate run...

 980 root1 1290  2050M  2680K RUN  0:12 97.64% malloctest




kern.maxdsiz=2147483648   # Set the max data size
512 MB swap file.

Mem: 220M Active, 12M Inact, 41M Wired, 12K Cache, 20M Buf, 1730M Free
Swap: 1024M Total, 1024M Free

 PID USERNAME  THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
1041 root4  200   204M   202M kserel   0:04  0.00% osubw_sctpclien

... separate run...

 967 root1 1210  2050M  2680K RUN  0:07 93.16% malloctest


kern.maxdsiz=30
no swap file

kernel panic


kern.maxdsiz=30   # Set the max data size
512 MB swap file.


Mem: 103M Active, 52M Inact, 106M Wired, 112M Buf, 1742M Free
Swap: 1024M Total, 1024M Free

 PID USERNAME  THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
15286 root2 1280 81172K 79080K RUN  1:47  0.00% osubw_sctpclien

... separate run...

 963 penoff  1 1220  2865M  3500K RUN  0:08 96.62% malloctest

-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Server crashing, no explanations

2008-05-21 Thread Wojciech Puchar

I guess it can, but in the past when hardware has failed for me, I
generally got some indicative errors in the logs.


hardware failures are different. rarely causes reboot, or reboots ramdomly 
independent of what you do.


with bad memory it usually produces sig11 or similar errors much more 
often than rebooting.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Your suggestions about this Dell configuration?

2008-05-21 Thread VeeJay
Yes,
but its 4 million each.. so its 8 million hits per day

Just a hint

VJ
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Server crashing, no explanations

2008-05-21 Thread Wojciech Puchar


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]



Yeah, because hardware never fails, right Wojciech?


it does. but this is software failure.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Server crashing, no explanations

2008-05-21 Thread Daniel Marsh
On Wed, May 21, 2008 at 6:11 PM, Wojciech Puchar 
[EMAIL PROTECTED] wrote:

 I guess it can, but in the past when hardware has failed for me, I
 generally got some indicative errors in the logs.


 hardware failures are different. rarely causes reboot, or reboots ramdomly
 independent of what you do.

 with bad memory it usually produces sig11 or similar errors much more often
 than rebooting.


heavy load, heats the cpu,  cpu reaches upper  temp limit set in bios,
computer reboots without warning to OS, nothing in logs, nothing recorded in
bios, no crashdump cos the os didn't crash.

I've seen it happen.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Large filesystems help/ideas

2008-05-21 Thread Matias Surdi

Hi,
I'm implementing a backup solution at work.We've bought a x86 server 
with two hardware raid 5 with for a total storage capacity of about 7Tb.


For the software we are using for backups, the ideal scenario would be 
to have just one big disk so that no space problems would appear.


I've tried to install FreeBSD 7 with no success, as it seems... the 
sysinstall tool doesn't support such big slices.


I've read about the Large Data Storage on FreeBSD but I'm still confused.

I've also thought on using slices of 1Tb, and join all them using vinum. 
What do you think about this last option?


Thanks a lot for your help.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large filesystems help/ideas

2008-05-21 Thread Julien Cigar
You cannot use fdisk slices/partitions with disks over 2TB. For those
GPT should be used. More info is available from here :
http://www.freebsd.org/projects/bigdisk

On Wed, 2008-05-21 at 13:57 +0200, Matias Surdi wrote:
 Hi,
 I'm implementing a backup solution at work.We've bought a x86 server 
 with two hardware raid 5 with for a total storage capacity of about 7Tb.
 
 For the software we are using for backups, the ideal scenario would be 
 to have just one big disk so that no space problems would appear.
 
 I've tried to install FreeBSD 7 with no success, as it seems... the 
 sysinstall tool doesn't support such big slices.
 
 I've read about the Large Data Storage on FreeBSD but I'm still confused.
 
 I've also thought on using slices of 1Tb, and join all them using vinum. 
 What do you think about this last option?
 
 Thanks a lot for your help.
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
-- 
Julien Cigar
Belgian Biodiversity Platform
http://www.biodiversity.be
Université Libre de Bruxelles (ULB)
Campus de la Plaine CP 257
Bâtiment NO, Bureau 4 N4 115C (Niveau 4)
Boulevard du Triomphe, entrée ULB 2
B-1050 Bruxelles
Mail: [EMAIL PROTECTED]
@biobel: http://biobel.biodiversity.be/person/show/471
Tel : 02 650 57 52

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Slightly OT - steaming data server software?

2008-05-21 Thread Bob McConnell
On Sun, 2008-05-18 at 15:32 -0700, John Pettitt wrote:
 
 
 Slightly OT but since I'm going to run this on FreeBSD 7 I figured I'd

 ask here ..
 
 I have an application where data arrives in what is effectively 
 continuous stream (actually NMEA messages from an AIS receiver) and
I'd 
 like to have a server where an arbitrary number of clients can connect

 to a tcp port and receive a copy of the stream.I could probably 
 write this in perl without too much work but somebody has to have done

 something similar already - does anybody know of code that does this? 
 (and yes I know sending the messages as individual udp packets would
be 
 easier - I'm already doing that internally but it doesn't work for 
 opening up the data stream to the public).

Already been done. See http://sourceforge.net/projects/aprsd/

Bob McConnell
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: resident memory limit

2008-05-21 Thread Bill Moran
In response to Brad Penoff [EMAIL PROTECTED]:

 On Tue, May 20, 2008 at 2:39 PM, Brad Penoff [EMAIL PROTECTED] wrote:
  On Tue, May 20, 2008 at 1:54 PM, Bill Moran [EMAIL PROTECTED] wrote:
  In response to Brad Penoff [EMAIL PROTECTED]:
 
  I have an application that runs on Linux or Mac OS X but seems to have
  a problem when I run on FreeBSD (6.3 or 7).  The issue is the memory
  footprint for the application (osubw_sctpclien below) is quite large;
  on Linux it can be as much as 950 MB in resident memory, according to
  top.  However, on FreeBSD I start to get ENOMEM always around the time
  my resident memory size is about 200 MB.
 
  I read a few posts and have seen people fixing their problems by
  adjusting kern.maxdsiz in /boot/loader.conf and/or by adding a swap
  file.  I've tried both and for my application, it still seems to be
  limited to 200 MB resident memory regardless of maxdsize and swap file
  setting.  I wrote a toy application (malloctest below) that calls
  malloc in a while(1) and breaks once it gets ENOMEM (doing another
  while(1) so it doesn't exit); this application's memory size in top
  always matches the kern.maxdsiz setting, however it has a very low
  resident memory number, according to top.
 
  Have a look at /etc/login.conf and the associated man pages.
 
 
 BTW, we've seen the exact behavior on FreeBSD 7 as well (6.3 was
 reported here).  We've tried on different hardware as well, and keep
 getting haunted by this resident memory limit that we don't know how
 to set.
 
 Any idea why, in the data I originally reported, I can allocate
 kern.maxdsiz + swap (see SIZE from top output) for malloc(1 MB) in a
 while loop, yet the top value for RES is always really low?
 
 How come, in contrast, my application starts to report ENOMEM when
 SIZE is 203 MB and RES is 201 MB?  This is why I titled the thread
 asking about an unknown (to me ;-) limit for resident memory...

It's called memory overcommit.  If the OS thinks it _might_ be able
to get you the memory, it will allow it.  You only actually use the
memory when you start putting data in it (hence the difference between
SIZE and RES)  Add a statement to fill up the malloc()ed memory with
some sort of data in your loop, and you'll see different behaviour.

As to what's limiting your application, I'm not sure.  What does the
output of 'ulimit -a' say?

 
 Any other suggestions?
 
 brad
 
 
  Thanks for the prompt reply.
 
  This system has the default settings for all users set to unlimited
  for more or less all login.conf categories.  I've pasted them below.
  My application uses a raw socket so I was running it as root, which
  also uses the default settings.
 
  It mentioned that setting memoryuse is the same as setting both -cur
  and -max ; any ideas why memoryuse is saying it's unlimited even
  though it is not?  I tried explicitly setting -cur to 1000M and it
  still started giving ENOMEM around 200 MB resident memory in top...
 
  brad
 
 
  default:\
 :passwd_format=md5:\
 :copyright=/etc/COPYRIGHT:\
 :welcome=/etc/motd:\
 :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
 :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
  /usr/local/bin /usr/X11R6/bin ~/bin:\
 :nologin=/var/run/nologin:\
 :cputime=unlimited:\
 :datasize=unlimited:\
 :stacksize=unlimited:\
 :memorylocked=unlimited:\
 :memoryuse=unlimited:\
 :filesize=unlimited:\
 :coredumpsize=unlimited:\
 :openfiles=unlimited:\
 :maxproc=unlimited:\
 :sbsize=unlimited:\
 :vmemoryuse=unlimited:\
 :priority=0:\
 :ignoretime@:\
 :umask=022:
 
  root:\
 :ignorenologin:\
 :tc=default:
 
 
 
  --
  Bill Moran
  http://www.potentialtech.com
 
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]


-- 
Bill Moran
http://www.potentialtech.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large filesystems help/ideas

2008-05-21 Thread Matias Surdi
As far as I understand from the following sentence taken from the link 
you are pointing and the text following it:


...Many systems don't require an MBR or GPT, and even PCs don't require 
it if booting and inter-operating with other OS's is not required. The 
next limit that comes in, though, is with the BSD disklabel...


I understand that I could have up to 8 slices of 2 Tb, with partitions 
(disklabel ones) inside each slice with up to 2Tb.


Is that correct?

What do you think about using this scheme and then join all them with 
vinum on a software raid-0 array?


Thanks a lot for your time and help.




Julien Cigar escribió:

You cannot use fdisk slices/partitions with disks over 2TB. For those
GPT should be used. More info is available from here :
http://www.freebsd.org/projects/bigdisk

On Wed, 2008-05-21 at 13:57 +0200, Matias Surdi wrote:

Hi,
I'm implementing a backup solution at work.We've bought a x86 server 
with two hardware raid 5 with for a total storage capacity of about 7Tb.


For the software we are using for backups, the ideal scenario would be 
to have just one big disk so that no space problems would appear.


I've tried to install FreeBSD 7 with no success, as it seems... the 
sysinstall tool doesn't support such big slices.


I've read about the Large Data Storage on FreeBSD but I'm still confused.

I've also thought on using slices of 1Tb, and join all them using vinum. 
What do you think about this last option?


Thanks a lot for your help.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: rc script REQUIRE-ing a service on another host

2008-05-21 Thread Tandon, Sahil (IM)
Jonathan McKeown:

 We had a power failure last night, and this morning I found 
 that imapproxyd (running on a webserver which provides 
 webmail) had failed to start because it depends on imapd 
 (running on the mailserver, a different host), and imapproxyd 
 had won the startup race.
 
 I need to prevent the race by making one service depend on 
 another service running remotely. While I sketch out some 
 horribly untidy fix, can the Lazyweb tell me if there is 
 already a neat solution for this?

I do not know if this is possible within the rc script itself.
Have you looked into sysutils/monit (to monitor and restart a 
service like imapproxyd)?  Nagios is probably overkill for this.  
Monit can be configured to check whether imapproxyd is running 
and restart it if necessary.

Just make sure you do not make the monit rc script depend on
anything running remotely. :-)

--
Sahil Tandon


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large filesystems help/ideas

2008-05-21 Thread Julien Cigar
If you only have FreeBSD installed on the box or if you don't need
slices/partitions you can just do newfs /dev/xxx (dedicate).

vinum should not be used on 6.x and above, gvinum (GEOM + vinum)
replaced it but I'm not sure if it's still actively
supported/developped .. (?)

Also, take a look at gconcat and unionfs.

On Wed, 2008-05-21 at 15:24 +0200, Matias Surdi wrote:
 As far as I understand from the following sentence taken from the link 
 you are pointing and the text following it:
 
 ...Many systems don't require an MBR or GPT, and even PCs don't require 
 it if booting and inter-operating with other OS's is not required. The 
 next limit that comes in, though, is with the BSD disklabel...
 
 I understand that I could have up to 8 slices of 2 Tb, with partitions 
 (disklabel ones) inside each slice with up to 2Tb.
 
 Is that correct?
 
 What do you think about using this scheme and then join all them with 
 vinum on a software raid-0 array?
 
 Thanks a lot for your time and help.
 
 
 
 
 Julien Cigar escribió:
  You cannot use fdisk slices/partitions with disks over 2TB. For those
  GPT should be used. More info is available from here :
  http://www.freebsd.org/projects/bigdisk
  
  On Wed, 2008-05-21 at 13:57 +0200, Matias Surdi wrote:
  Hi,
  I'm implementing a backup solution at work.We've bought a x86 server 
  with two hardware raid 5 with for a total storage capacity of about 7Tb.
 
  For the software we are using for backups, the ideal scenario would be 
  to have just one big disk so that no space problems would appear.
 
  I've tried to install FreeBSD 7 with no success, as it seems... the 
  sysinstall tool doesn't support such big slices.
 
  I've read about the Large Data Storage on FreeBSD but I'm still confused.
 
  I've also thought on using slices of 1Tb, and join all them using vinum. 
  What do you think about this last option?
 
  Thanks a lot for your help.
 
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to [EMAIL PROTECTED]
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
-- 
Julien Cigar
Belgian Biodiversity Platform
http://www.biodiversity.be
Université Libre de Bruxelles (ULB)
Campus de la Plaine CP 257
Bâtiment NO, Bureau 4 N4 115C (Niveau 4)
Boulevard du Triomphe, entrée ULB 2
B-1050 Bruxelles
Mail: [EMAIL PROTECTED]
@biobel: http://biobel.biodiversity.be/person/show/471
Tel : 02 650 57 52

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Instant reboot with FreeBSD 6.3 and 2GB RAM

2008-05-21 Thread Vivek Khera


On May 21, 2008, at 4:01 AM, [EMAIL PROTECTED] wrote:

some users of FreeNAS which is based on FreeBSD 6.3 reported instant  
reboots on systems with  2GB RAM (most of them use 4GB). The reboot  
occurs right after displaying the FreeBSD loader menu. Most of them  
told me that they can boot if they reduce RAM to = 2GB.


For what it's worth, I have run several systems with 4GB RAM on  
FreeBSD/i386 6.3.  The only i386 I have left with this much RAM was  
recently upgraded to 7.0; the rest of my large RAM systems run FreeBSD/ 
amd64.


I didn't see anything obviously bad in your kernel config.

By the way, thanks for making FreeNAS... I use it on my home NFS/AFP  
server to great success... the only thing I wish it included was the  
amrstat binary to test my LSI RAID controller status (I just copy it  
from another 6.3 system I have and it works).


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Asus eee (was Re: G4 Quicksilver as Web Server?)

2008-05-21 Thread Matthias Apitz
El día Friday, January 18, 2008 a las 10:41:28PM -0500, Garance A Drosehn 
escribió:

 At 9:14 AM -0500 1/2/08, Ed Maste wrote:
 On Tue, Jan 01, 2008 at 06:20:22PM +, James Jeffery wrote:
 
  Before i end the toipic, anyone got any feeback on the Asus Eee (mini
  laptops) with FreeBSD?
 
 It works, but no drivers exist for the wireless or wired Ethernet ports.
 The wireless is a newer Atheros part and ath(4) should gain support for
 it, but I have no idea what the timeline will be.  The wired Ethernet
 is an Atheros (formerly Attansic) L2 10/100, and I'm not aware of any
 concrete plans for a driver for it.
 
 I've used a Linksys USB200M USB ethernet (axe(4) driver) with mine and
 that works well.
 
 One of the guys I know is running FreeBSD on the Eee, and has written
 up the following information for anyone who is interested in doing
 what he did:
 
 http://nighthack.org/wiki/EeeBSD
 
 This includes tips on how to get the wireless working, and sound,
 and some oddities with how X11 works.

Thanks for that hint. I'm thinking in buying such a device to have it
with me as a typewriter, mostly; normally I use FreeBSD 7.0-REL on my
laptop with around 200 compiled ports: KDE, OpenOffice, Lyx, StarDict,
...
the compilation normally takes 2-3 days to have it all ready;

of course, on that limited device with 4 or 8 GByte SSD it is not an
option to compile the stuff up from /usr/ports on the system itself, not
only from the point of view of disk space, but also because of the limited
lifetime write cycles of the SSD;

in short: what would be the easiest way to move the installed ports from
my laptop to such an Eee PC? can I make, for example, packages from my
ports and install them?

Thx

matthias

-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e [EMAIL PROTECTED] - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
«...una sola vez, que es cuanto basta si se trata de verdades definitivas.»
«...only once, which is enough if it has todo with definite truth.»
José Saramago, Historia del Cerca de Lisboa
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Instant reboot with FreeBSD 6.3 and 2GB RAM

2008-05-21 Thread Jeremy Chadwick
On Wed, May 21, 2008 at 10:01:56AM +0200, [EMAIL PROTECTED] wrote:
 Hello,
 
 some users of FreeNAS which is based on FreeBSD 6.3 reported instant reboots 
 on systems with  2GB RAM (most of them use 4GB). The reboot occurs right 
 after displaying the FreeBSD loader menu. Most of them told me that they can 
 boot if they reduce RAM to = 2GB.
 
 We are using the following kernel configuration which is based on GENERIC:
 http://freenas.svn.sourceforge.net/viewvc/freenas/branches/0.69/build/kernel-config/FREENAS-i386?revision=3291view=markup
 
 I found out another problem that causes a reboot on my 2GB machine. We are 
 using a image for the LiveCD which is 64MB great. If i change back mfs_root 
 size to 63MB all works well, but all above 64MB causes a reboot.
 Is there any limitation?
 
 Could someone help me out of this problem?

Is the mfsroot problem what I've documented here?

http://jdc.parodius.com/freebsd/pxeboot_serial_install.html#step7

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Server crashing, no explanations

2008-05-21 Thread Chris Pratt


On May 20, 2008, at 7:17 AM, Alan Gilmour wrote:


Hey all,

We have recently been getting a lot of traffic to one of our sites.
The CPU is consistently during busy periods using 100% utilisation.
When this happens we have approx 150 apache threads, and the loads
goes way above 15.

However recently the server has been auto-restarting (when under heavy
load) with no explanation in any logs. I've checked the console log,
messages, db logs e.t.c. but no mention of anything wrong.

Brief server summary :

FreeBSD 6.3-STABLE #0:
CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2800.11-MHz 686-class CPU)
 Logical CPUs per core: 2
real memory  = 17716740096 (16896 MB)
avail memory = 16837763072 (16057 MB)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs

We tried installing mbmon and lmmon and healthd, but none seem to  
work.


Anyone got any suggestions for other things we can try to detect why
the server is failing? or other ways to check things like CPU temp and
memory status?


We have experienced this since 6.x began and it's not hardware.
It can be reproduced by moving the role to another similar server.
When the role is changed and the traffic (not necessarily the load),
the problem goes away or rather, will transfer to the new box.

Look at the thread named zonealarm issues on Freebsd-Net a
couple of months ago. You may find it will apply but there aren't
any answers there yet. I gather that people need more data
collection. I have never figured out how to get a dump though
people have recommended things to try over the last couple of
years. I was hoping 7.0 would be the solution but I'm told it's
not.

Reduce your traffic and the problem will go away. Split the
traffic to more than one server is a way to do this. We increased
our uptime drastically by doing this but we still get hit hard enough
at times to go down. During our low traffic periods of the year,
we simply stay up all the time (in the hottest days of summer).

By the way, the symptom I see is never immediate reboot, it will
hang for reasonable period of time prior to rebooting. As I
monitor ours 24/7, I reset power on the box before it reboots to
reduce the outage to customers. If I'm not watching it eventually
will reboot. Brutal but it works.

Realize it's possible you don't have this problem but there are a
few of us who do. It has something to do with buffers not being
freed up.



Cheers

Alan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions- 
[EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Server crashing, no explanations

2008-05-21 Thread Chris Pratt


On May 21, 2008, at 8:05 AM, Chris Pratt wrote:



On May 20, 2008, at 7:17 AM, Alan Gilmour wrote:


Hey all,

We have recently been getting a lot of traffic to one of our sites.
The CPU is consistently during busy periods using 100% utilisation.
When this happens we have approx 150 apache threads, and the loads
goes way above 15.

However recently the server has been auto-restarting (when under  
heavy

load) with no explanation in any logs. I've checked the console log,
messages, db logs e.t.c. but no mention of anything wrong.

Brief server summary :

FreeBSD 6.3-STABLE #0:
CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2800.11-MHz 686-class CPU)
 Logical CPUs per core: 2
real memory  = 17716740096 (16896 MB)
avail memory = 16837763072 (16057 MB)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs

We tried installing mbmon and lmmon and healthd, but none seem to  
work.


Anyone got any suggestions for other things we can try to detect why
the server is failing? or other ways to check things like CPU temp  
and

memory status?


We have experienced this since 6.x began and it's not hardware.
It can be reproduced by moving the role to another similar server.
When the role is changed and the traffic (not necessarily the load),
the problem goes away or rather, will transfer to the new box.

Look at the thread named zonealarm issues on Freebsd-Net a


BIG CORRECTION: zonelimit issues (geez, I hadn't touched a
windows product in 3 years, no idea where that came from,
sorry).



couple of months ago. You may find it will apply but there aren't
any answers there yet. I gather that people need more data
collection. I have never figured out how to get a dump though
people have recommended things to try over the last couple of
years. I was hoping 7.0 would be the solution but I'm told it's
not.

Reduce your traffic and the problem will go away. Split the
traffic to more than one server is a way to do this. We increased
our uptime drastically by doing this but we still get hit hard enough
at times to go down. During our low traffic periods of the year,
we simply stay up all the time (in the hottest days of summer).

By the way, the symptom I see is never immediate reboot, it will
hang for reasonable period of time prior to rebooting. As I
monitor ours 24/7, I reset power on the box before it reboots to
reduce the outage to customers. If I'm not watching it eventually
will reboot. Brutal but it works.

Realize it's possible you don't have this problem but there are a
few of us who do. It has something to do with buffers not being
freed up.



Cheers

Alan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions- 
[EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions- 
[EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: fxload (ports/misc/ezload for usb firmware loading)

2008-05-21 Thread Steve Franks
On Wed, May 21, 2008 at 5:28 AM, bridd [EMAIL PROTECTED] wrote:
 Hi Steve,

 I saw your thread
 http://lists.freebsd.org/pipermail/freebsd-usb/2008-April/004753.html
 via googling for FreeBSD fxload equivalents.  Did you get any further
 with it?

 I'm wondering, because I've got an m-audio USB midi keyboard, and under
 linux it's possible to use it, using a combo of fxload, the firmware and
 a nice auto-detect script... It'd be great for me if I could get this up
 and running under FreeBSD.

 Anyway, I hope you don't mind the email out of the blue like this, I was
 wondering and figured it was easy enough to just ask :)

 Cheers,

 Dave // bridd



Dave,

FreeBSD has an equivalent program in ports/misc called ezload.  I just
had to add one line to it to recognize the newer hardware and it works
like a charm.  Annoyingly, the installed binary is called ezdownload,
so it took awhile to find the thing after it installed.  Included is
the patch to add the line, tell me if you don't understand patches
(patch file.c  file.patch) - basically just open it and add the line
that starts with + manually to the mentioned file - everyone always
assumes everyone with a *nix box is a super-hacker, and I sure ain't.

I tried pestering the ezdownload maintainer/author (can't remember
which) to add my patch and make a new release, but I never heard back.
 Guess I will have to follow up on that - don't love patching 20
programs every time I bring up a new box, and I haven't heard of old
hardware in several years, making ezload pretty much irrelevant
without the patch - everything uses the fx2 cypress usb devices now.

I'll ask you a question in return - what software  drivers do you use
with the m-audio stuff?  I've got an m-audio UNO USB-MIDI dongle
I've never attempted to plug in - maybe you can point me in the
direction of the apps I need to make it go!

Steve
--- ./ezdownload-0.4.0/ezdownload.c	2004-12-23 16:14:43.0 -0700
+++ ezdownload.c	2008-04-07 13:49:10.0 -0700
@@ -96,7 +96,7 @@
 /* See http://www.anchorchips.com for the
  * EZ-USB Technical Reference Manual (EZUSB_TRM.pdf).
  */
-#define CPUCS 0x7f92
+static unsigned int CPUCS = 0x7f92;
 #define USBSC 0x7fd6
 
 /* This whole reading routine sucks. you could do it in
@@ -340,7 +340,7 @@
 char * progname;
 void usage() 
 {
-	fprintf(stderr, Syntax: %s [-r] [-v] [-f hexfile] device\n, progname);
+	fprintf(stderr, Syntax: %s [-r] [-v] [-2] [-f hexfile] device\n, progname);
 	exit(1);
 }
 
@@ -363,7 +363,7 @@
 	progname = argv[0];
 
 	/* handle the arguments */
-	while((ch = getopt(argc, argv, xrvf:)) != -1) 
+	while((ch = getopt(argc, argv, 2xrvf:)) != -1) 
 		switch (ch) {
 		case 'v':
 			verbose++;
@@ -374,6 +374,9 @@
 		case 'f':
 			hexfile = optarg;
 			break;
+		case '2':
+			CPUCS  = 0xe600;
+			break;
 		case 'x':
 			force = 1;
 			break;
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Asus eee (was Re: G4 Quicksilver as Web Server?)

2008-05-21 Thread Manolis Kiagias



Matthias Apitz wrote:

El día Friday, January 18, 2008 a las 10:41:28PM -0500, Garance A Drosehn 
escribió:

  

At 9:14 AM -0500 1/2/08, Ed Maste wrote:


On Tue, Jan 01, 2008 at 06:20:22PM +, James Jeffery wrote:

  

Before i end the toipic, anyone got any feeback on the Asus Eee (mini
laptops) with FreeBSD?


It works, but no drivers exist for the wireless or wired Ethernet ports.
The wireless is a newer Atheros part and ath(4) should gain support for
it, but I have no idea what the timeline will be.  The wired Ethernet
is an Atheros (formerly Attansic) L2 10/100, and I'm not aware of any
concrete plans for a driver for it.

I've used a Linksys USB200M USB ethernet (axe(4) driver) with mine and
that works well.
  

One of the guys I know is running FreeBSD on the Eee, and has written
up the following information for anyone who is interested in doing
what he did:

http://nighthack.org/wiki/EeeBSD

This includes tips on how to get the wireless working, and sound,
and some oddities with how X11 works.



Thanks for that hint. I'm thinking in buying such a device to have it
with me as a typewriter, mostly; normally I use FreeBSD 7.0-REL on my
laptop with around 200 compiled ports: KDE, OpenOffice, Lyx, StarDict,
...
the compilation normally takes 2-3 days to have it all ready;

of course, on that limited device with 4 or 8 GByte SSD it is not an
option to compile the stuff up from /usr/ports on the system itself, not
only from the point of view of disk space, but also because of the limited
lifetime write cycles of the SSD;

in short: what would be the easiest way to move the installed ports from
my laptop to such an Eee PC? can I make, for example, packages from my
ports and install them?

Thx

matthias

  
[Sending this a second time to the list only, since it had too many 
recipients the first time and was probably rejected]


I happen to have an eeePC and have successfully installed FreeBSD on it. 
It can be done in various ways (even without a CDROM, if you have an 
external USB disk).
I can attest the instructions in nighthack.org work: Sound and wireless 
work fine. There are a few things you can do it to speed it up:


- The SSD is too small for the classic partitioning scheme of FreeBSD. 
Probably a large '/' partition or a '/' and '/home' will do. Do not use 
swap.

- Turn of logging (syslogd_enable=NO in /etc/rc.conf)
- Edit /etc/ttys and reduce the number of virtual terminals.  You 
probably don't need them.
- Do not compile anything on the eee. It wil be a test of its abilities 
and your patience. Compile the kernel on another a PC and copy it via a 
USB key. Either use ready made packages (possibly after setting 
PACKAGESITE to packages-7-stable) or use 'make package' on your main pc 
to create packages and transfer them.
- The eee will happily run X and any environment you choose. I have 
tried XFCE and GNOME with no problem. More memory will be better, but 
not absolutely necessary.

- As others have said, the wired LAN does not currently work.
- Note you can install either to SSD or an external SDHC. The SSD is 
somewhat faster though. (But you can get larger SDHCs). I am dual 
booting Linux and FreeBSD on mine right now. Linux is on the SSD and 
FreeBSD on an 8GB SDHC.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Multiple instances of BIND at startup

2008-05-21 Thread Steve Bertrand

Hi everybody,

I am attempting to configure a BIND 9 name server that will be 
authoritative for certain domains which will listen exclusively on IPv6.


This same box will also be a caching server for a handful of networks 
(IPv6 and IPv4).


The way I have it set up is that the authoritative and caching services 
each run a single instance of BIND on it's own IP address, with both 
instances each doing exactly what they are supposed to do.


However, how can I make the FreeBSD (7.0) startup scripts load both 
instances of BIND, each with it's own configuration?


I've read through the Administrators handbook for BIND and numerous 
newsgroup postings about 'views', but I don't think this is what I want. 
It seems 'views' are more for split-DNS, segregating internal access and 
external access to the same service. That is not what I am after.


Any pointers much appreciated.

Regards,

Steve

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large filesystems help/ideas

2008-05-21 Thread David Robillard
 Hi,
 I'm implementing a backup solution at work.We've bought a x86 server
 with two hardware raid 5 with for a total storage capacity of about 7Tb.

 For the software we are using for backups, the ideal scenario would be
 to have just one big disk so that no space problems would appear.

 I've tried to install FreeBSD 7 with no success, as it seems... the
 sysinstall tool doesn't support such big slices.

 I've read about the Large Data Storage on FreeBSD but I'm still confused.

 I've also thought on using slices of 1Tb, and join all them using vinum.
 What do you think about this last option?

 Thanks a lot for your help.

I would suggest to use different partitions for your OS and another
big one for your backup data. In fact, if you can use two smaller
disks in RAID 1 for the OS and leave your two RAID 5 for the backup
data alone, that would be even better.

This way you can both a) install the OS without any problem and b)
prevent a *very* long fsck in case the machine crashes and your 7TB
partition is broken beyond the background fsck process. Once you have
the OS installed on the smaller partitions, you can then use gpt(8) to
create your 2TB+ filesystems.  YMMV.

We use a scenario quite identical as what you're trying to do. We use
a few ports to do so, like sysutils/rsnapshot and shells/rssh with
rsync and OpenSSH along with an encrypted backup volume and OpenPGP to
encrypt the tapes. For VMWare images, we use sysutils/rdiff-backup. It
works very well for 100+ mixed FreeBSD, RedHat, Ubuntu and AIX hosts.
If you need any help with the backup setup and all, just ask, I'll
send you the howto.

Have fun,

DA+
-- 
David Robillard
UNIX systems administrator  Oracle DBA
CISSP, RHCE  Sun Certified Security Administrator
Montreal: +1 514 966 0122
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Jails and multiple ip addresses with FreeBSD 7.0

2008-05-21 Thread Mark A Christofferson
Hi,

 

I currently have a webserver running Apache 2.2.8 inside of a FreeBSD
7.0 jail.  It's running several virtualhosts, and it's doing great!  My
problem is that I need to run an SSL enabled virtual  host, and that
requires me to use an IP based virtual host.  Most documentation
indicates that jails do not support multiple addresses, and I've even
found a patch for FreeBSD 6.2.  Does a patch currently exist for 7.0, or
has this functionality been built in to the new version?

 

Thanks,  

 

Mark A. Christofferson

Network Administrator

LSU College of Agriculture

Phone:  (225)578-2767

E-Mail:  [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Multiple instances of BIND at startup

2008-05-21 Thread Matthew Seaman

Steve Bertrand wrote:

Hi everybody,

I am attempting to configure a BIND 9 name server that will be 
authoritative for certain domains which will listen exclusively on IPv6.


This same box will also be a caching server for a handful of networks 
(IPv6 and IPv4).


The way I have it set up is that the authoritative and caching services 
each run a single instance of BIND on it's own IP address, with both 
instances each doing exactly what they are supposed to do.


However, how can I make the FreeBSD (7.0) startup scripts load both 
instances of BIND, each with it's own configuration?


I've read through the Administrators handbook for BIND and numerous 
newsgroup postings about 'views', but I don't think this is what I want. 
It seems 'views' are more for split-DNS, segregating internal access and 
external access to the same service. That is not what I am after.


Any pointers much appreciated.


I did something very similar.  Run one of the bind instances in a jail --
especially with a little firewall rdr rules and similar trickery to redirect
traffic into the appropriate instance (which gets you past the lack of IPv6
support in jail(8)). Works beautifully.

Cheers,

Matthew


--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: resident memory limit

2008-05-21 Thread Brad Penoff
On Wed, May 21, 2008 at 6:09 AM, Bill Moran [EMAIL PROTECTED] wrote:
 In response to Brad Penoff [EMAIL PROTECTED]:

 On Tue, May 20, 2008 at 2:39 PM, Brad Penoff [EMAIL PROTECTED] wrote:
  On Tue, May 20, 2008 at 1:54 PM, Bill Moran [EMAIL PROTECTED] wrote:
  In response to Brad Penoff [EMAIL PROTECTED]:
 
  I have an application that runs on Linux or Mac OS X but seems to have
  a problem when I run on FreeBSD (6.3 or 7).  The issue is the memory
  footprint for the application (osubw_sctpclien below) is quite large;
  on Linux it can be as much as 950 MB in resident memory, according to
  top.  However, on FreeBSD I start to get ENOMEM always around the time
  my resident memory size is about 200 MB.
 
  I read a few posts and have seen people fixing their problems by
  adjusting kern.maxdsiz in /boot/loader.conf and/or by adding a swap
  file.  I've tried both and for my application, it still seems to be
  limited to 200 MB resident memory regardless of maxdsize and swap file
  setting.  I wrote a toy application (malloctest below) that calls
  malloc in a while(1) and breaks once it gets ENOMEM (doing another
  while(1) so it doesn't exit); this application's memory size in top
  always matches the kern.maxdsiz setting, however it has a very low
  resident memory number, according to top.
 
  Have a look at /etc/login.conf and the associated man pages.
 

 BTW, we've seen the exact behavior on FreeBSD 7 as well (6.3 was
 reported here).  We've tried on different hardware as well, and keep
 getting haunted by this resident memory limit that we don't know how
 to set.

 Any idea why, in the data I originally reported, I can allocate
 kern.maxdsiz + swap (see SIZE from top output) for malloc(1 MB) in a
 while loop, yet the top value for RES is always really low?

 How come, in contrast, my application starts to report ENOMEM when
 SIZE is 203 MB and RES is 201 MB?  This is why I titled the thread
 asking about an unknown (to me ;-) limit for resident memory...

 It's called memory overcommit.  If the OS thinks it _might_ be able
 to get you the memory, it will allow it.  You only actually use the
 memory when you start putting data in it (hence the difference between
 SIZE and RES)  Add a statement to fill up the malloc()ed memory with
 some sort of data in your loop, and you'll see different behaviour.

 As to what's limiting your application, I'm not sure.  What does the
 output of 'ulimit -a' say?


Thanks again for your time.


With the default loader.conf, my limit -a output is:

Resource limits (current):
  cputime  infinity secs
  filesize infinity kB
  datasize   524288 kB
  stacksize   65536 kB
  coredumpsize infinity kB
  memoryuseinfinity kB
  memorylocked infinity kB
  maxprocesses 5547
  openfiles   11095
  sbsize   infinity bytes
  vmemoryuse   infinity kB

My application starts getting ENOMEM when I have 201 MB of resident memory.



When I change my loader.conf to match the 2 GB of physical memory that I have:
kern.maxdsiz=2147483648
kern.maxssiz=2147483648
kern.dfldsiz=2147483648

...and reboot, then my limit -a output is:

Resource limits (current):
  cputime  infinity secs
  filesize infinity kB
  datasize  2097152 kB
  stacksize 2097152 kB
  coredumpsize infinity kB
  memoryuseinfinity kB
  memorylocked infinity kB
  maxprocesses 5547
  openfiles   11095
  sbsize   infinity bytes
  vmemoryuse   infinity kB


However, the application still seems to max out at 201 MB of resident memory.


People suggest to fix my login.conf but the memory related fields are
set to unlimited... Any ideas where this 201 MB limit of resident
memory comes from?


Thanks!
brad




 Any other suggestions?

 brad

 
  Thanks for the prompt reply.
 
  This system has the default settings for all users set to unlimited
  for more or less all login.conf categories.  I've pasted them below.
  My application uses a raw socket so I was running it as root, which
  also uses the default settings.
 
  It mentioned that setting memoryuse is the same as setting both -cur
  and -max ; any ideas why memoryuse is saying it's unlimited even
  though it is not?  I tried explicitly setting -cur to 1000M and it
  still started giving ENOMEM around 200 MB resident memory in top...
 
  brad
 
 
  default:\
 :passwd_format=md5:\
 :copyright=/etc/COPYRIGHT:\
 :welcome=/etc/motd:\
 :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
 :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
  /usr/local/bin /usr/X11R6/bin ~/bin:\
 :nologin=/var/run/nologin:\
 :cputime=unlimited:\
 :datasize=unlimited:\
 :stacksize=unlimited:\
 :memorylocked=unlimited:\
 :memoryuse=unlimited:\
 :filesize=unlimited:\
 :coredumpsize=unlimited:\
 :openfiles=unlimited:\
 

Re: resident memory limit

2008-05-21 Thread Bill Moran
In response to Brad Penoff [EMAIL PROTECTED]:
 On Wed, May 21, 2008 at 6:09 AM, Bill Moran [EMAIL PROTECTED] wrote:
  In response to Brad Penoff [EMAIL PROTECTED]:
 
  On Tue, May 20, 2008 at 2:39 PM, Brad Penoff [EMAIL PROTECTED] wrote:
   On Tue, May 20, 2008 at 1:54 PM, Bill Moran [EMAIL PROTECTED] wrote:
   In response to Brad Penoff [EMAIL PROTECTED]:
  
   I have an application that runs on Linux or Mac OS X but seems to have
   a problem when I run on FreeBSD (6.3 or 7).  The issue is the memory
   footprint for the application (osubw_sctpclien below) is quite large;
   on Linux it can be as much as 950 MB in resident memory, according to
   top.  However, on FreeBSD I start to get ENOMEM always around the time
   my resident memory size is about 200 MB.
  
   I read a few posts and have seen people fixing their problems by
   adjusting kern.maxdsiz in /boot/loader.conf and/or by adding a swap
   file.  I've tried both and for my application, it still seems to be
   limited to 200 MB resident memory regardless of maxdsize and swap file
   setting.  I wrote a toy application (malloctest below) that calls
   malloc in a while(1) and breaks once it gets ENOMEM (doing another
   while(1) so it doesn't exit); this application's memory size in top
   always matches the kern.maxdsiz setting, however it has a very low
   resident memory number, according to top.
  
   Have a look at /etc/login.conf and the associated man pages.
  
 
  BTW, we've seen the exact behavior on FreeBSD 7 as well (6.3 was
  reported here).  We've tried on different hardware as well, and keep
  getting haunted by this resident memory limit that we don't know how
  to set.
 
  Any idea why, in the data I originally reported, I can allocate
  kern.maxdsiz + swap (see SIZE from top output) for malloc(1 MB) in a
  while loop, yet the top value for RES is always really low?
 
  How come, in contrast, my application starts to report ENOMEM when
  SIZE is 203 MB and RES is 201 MB?  This is why I titled the thread
  asking about an unknown (to me ;-) limit for resident memory...
 
  It's called memory overcommit.  If the OS thinks it _might_ be able
  to get you the memory, it will allow it.  You only actually use the
  memory when you start putting data in it (hence the difference between
  SIZE and RES)  Add a statement to fill up the malloc()ed memory with
  some sort of data in your loop, and you'll see different behaviour.
 
  As to what's limiting your application, I'm not sure.  What does the
  output of 'ulimit -a' say?
 
 
 Thanks again for your time.
 
 
 With the default loader.conf, my limit -a output is:
 
 Resource limits (current):
   cputime  infinity secs
   filesize infinity kB
   datasize   524288 kB
   stacksize   65536 kB
   coredumpsize infinity kB
   memoryuseinfinity kB
   memorylocked infinity kB
   maxprocesses 5547
   openfiles   11095
   sbsize   infinity bytes
   vmemoryuse   infinity kB
 
 My application starts getting ENOMEM when I have 201 MB of resident memory.
 
 
 
 When I change my loader.conf to match the 2 GB of physical memory that I have:
 kern.maxdsiz=2147483648
 kern.maxssiz=2147483648
 kern.dfldsiz=2147483648
 
 ...and reboot, then my limit -a output is:
 
 Resource limits (current):
   cputime  infinity secs
   filesize infinity kB
   datasize  2097152 kB
   stacksize 2097152 kB
   coredumpsize infinity kB
   memoryuseinfinity kB
   memorylocked infinity kB
   maxprocesses 5547
   openfiles   11095
   sbsize   infinity bytes
   vmemoryuse   infinity kB
 
 
 However, the application still seems to max out at 201 MB of resident memory.
 
 
 People suggest to fix my login.conf but the memory related fields are
 set to unlimited... Any ideas where this 201 MB limit of resident
 memory comes from?

That's pretty strange.  If I had to guess, I would guess that there is no
201M limit, but that you're hitting some other limit that just happens to
predictably occur at 201M with that program.

I'm kind of grasping at straws here, so hopefully I won't lead you on a
wild goose chase, but I would look next at putting some debugging in
/etc/malloc.conf and seeing if you get any useful information from it
(see the malloc man page).  From there, possibly a ktrace of the process.
Hopefully you have source code for the program and can compile it with
debugging and run it under gdb.

-- 
Bill Moran
http://www.potentialtech.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


SOLVED: minimalist config, (was Lock down the all-staff email list? sendmail, alias, majordomo?)

2008-05-21 Thread brad davison


   What is the best way to have a list that only certain users are able to 
   send to?
  
  
  That sounds like you're getting into a full blown mailing0list package.  I 
  set up the minimalist port for a small list last year.  Small  very easy 
  to config.  I think it has the restriction you want.
  
-R
 
 The majordomo and mailman were a bit more than what I was looking for.  The 
 minimalist port does look like it does exactly what I'm looking for, but I'm 
 having an issue getting it configured.
 
 My minimalist port seems to have been installed in 
 '/usr/local/share/minimalist' and the config file appears to be in 
 '/usr/local/etc/minimalist.conf'.  All files are under the '/usr/local/share' 
 folder except the minimalist.conf in '/usr/local/etc'
 
 I have set the directory directive to '/usr/local/share/minimalist' in the 
 '/usr/local/etc/minimalist.conf' and created my list directories under there, 
 but I am not able to see it when I send 'info' message to '[EMAIL PROTECTED]'.
 
 reply from server for email with 'info' as subject:
 These are the mailing lists available at email.domain.com:
 
 -- 
 Sincerely, the Minimalist
 
 
 under /usr/local/share/minimalist:
 
 My list.lst file has:
 farmThe Farm mailing list.
 southMailing list for Southern area.
 
 I have the farm and south directories with a very short list file:
 list:
 [EMAIL PROTECTED]  
 [EMAIL PROTECTED]
 
 my /usr/local/etc/minimalist.conf (only non-commented lines)
 minimalist.conf
 directory = /usr/local/share/minimalist
 password = 12345
 admin = [EMAIL PROTECTED]
 auth = mailfrom [EMAIL PROTECTED]:@/usr/local/etc/mml.trusted
 
 
 Any ideas where I might be going wrong?  The mechanism seems to be working, 
 as I can send messages to 'minimalist' and get info, but its not seeing my 
 lists.
 
 Thanks
 
 

the problem was:
the auth = mailfrom  line was in the global config, and that needed to be 
in the directory for the list.
I commented the auth line out of the 'global config' 
/usr/local/etc/minimalist.conf and added it to the file 'config' under the 
'farm' directory.

yay it works now.
thanks rob for pointing me at minimalist.

_
Make every e-mail and IM count. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ 
MakeCount___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: resident memory limit

2008-05-21 Thread Joshua Isom


On May 21, 2008, at 12:36 PM, Bill Moran wrote:


In response to Brad Penoff [EMAIL PROTECTED]:
On Wed, May 21, 2008 at 6:09 AM, Bill Moran 
[EMAIL PROTECTED] wrote:

In response to Brad Penoff [EMAIL PROTECTED]:

On Tue, May 20, 2008 at 2:39 PM, Brad Penoff [EMAIL PROTECTED] 
wrote:
On Tue, May 20, 2008 at 1:54 PM, Bill Moran 
[EMAIL PROTECTED] wrote:

In response to Brad Penoff [EMAIL PROTECTED]:


I have an application that runs on Linux or Mac OS X but seems 
to have
a problem when I run on FreeBSD (6.3 or 7).  The issue is the 
memory
footprint for the application (osubw_sctpclien below) is quite 
large;
on Linux it can be as much as 950 MB in resident memory, 
according to
top.  However, on FreeBSD I start to get ENOMEM always around 
the time

my resident memory size is about 200 MB.

I read a few posts and have seen people fixing their problems by
adjusting kern.maxdsiz in /boot/loader.conf and/or by adding a 
swap
file.  I've tried both and for my application, it still seems to 
be
limited to 200 MB resident memory regardless of maxdsize and 
swap file

setting.  I wrote a toy application (malloctest below) that calls
malloc in a while(1) and breaks once it gets ENOMEM (doing 
another
while(1) so it doesn't exit); this application's memory size in 
top
always matches the kern.maxdsiz setting, however it has a very 
low

resident memory number, according to top.


Have a look at /etc/login.conf and the associated man pages.



BTW, we've seen the exact behavior on FreeBSD 7 as well (6.3 was
reported here).  We've tried on different hardware as well, and keep
getting haunted by this resident memory limit that we don't know how
to set.

Any idea why, in the data I originally reported, I can allocate
kern.maxdsiz + swap (see SIZE from top output) for malloc(1 MB) in a
while loop, yet the top value for RES is always really low?

How come, in contrast, my application starts to report ENOMEM when
SIZE is 203 MB and RES is 201 MB?  This is why I titled the thread
asking about an unknown (to me ;-) limit for resident memory...


It's called memory overcommit.  If the OS thinks it _might_ be able
to get you the memory, it will allow it.  You only actually use the
memory when you start putting data in it (hence the difference 
between

SIZE and RES)  Add a statement to fill up the malloc()ed memory with
some sort of data in your loop, and you'll see different behaviour.

As to what's limiting your application, I'm not sure.  What does the
output of 'ulimit -a' say?



Thanks again for your time.


With the default loader.conf, my limit -a output is:

Resource limits (current):
  cputime  infinity secs
  filesize infinity kB
  datasize   524288 kB
  stacksize   65536 kB
  coredumpsize infinity kB
  memoryuseinfinity kB
  memorylocked infinity kB
  maxprocesses 5547
  openfiles   11095
  sbsize   infinity bytes
  vmemoryuse   infinity kB

My application starts getting ENOMEM when I have 201 MB of resident 
memory.




When I change my loader.conf to match the 2 GB of physical memory 
that I have:

kern.maxdsiz=2147483648
kern.maxssiz=2147483648
kern.dfldsiz=2147483648

...and reboot, then my limit -a output is:

Resource limits (current):
  cputime  infinity secs
  filesize infinity kB
  datasize  2097152 kB
  stacksize 2097152 kB
  coredumpsize infinity kB
  memoryuseinfinity kB
  memorylocked infinity kB
  maxprocesses 5547
  openfiles   11095
  sbsize   infinity bytes
  vmemoryuse   infinity kB


However, the application still seems to max out at 201 MB of resident 
memory.



People suggest to fix my login.conf but the memory related fields are
set to unlimited... Any ideas where this 201 MB limit of resident
memory comes from?


That's pretty strange.  If I had to guess, I would guess that there is 
no
201M limit, but that you're hitting some other limit that just happens 
to

predictably occur at 201M with that program.

I'm kind of grasping at straws here, so hopefully I won't lead you on a
wild goose chase, but I would look next at putting some debugging in
/etc/malloc.conf and seeing if you get any useful information from it
(see the malloc man page).  From there, possibly a ktrace of the 
process.

Hopefully you have source code for the program and can compile it with
debugging and run it under gdb.

--
Bill Moran
http://www.potentialtech.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]





Here's a question I haven't seen asked yet.  How much memory is it 
trying to allocate?  If it can't get everything it's asking for it can 
fail.  Also, how is the application being started?  There could be some 
setting in the shell startup that's putting a limit.  Is it a native 
FreeBSD program or is it 

vi secure

2008-05-21 Thread William O. Yates
[sent the below message thru the freebsd-security list with no answers, hope 
for more from freebsd-questions]

Recently started using vi macros.

When attempting to use one which accessed the external shell, got the following 
message:

The ! command is not supported when the secure edit option is set.

When attempting to :set nosecure got:

set: the secure option may not be turned off.

When attempting to set nosecure in my .exrc file, got:

set nonumber
.exrc, 44: set: the secure option may not be turned off
.exrc, 44: Ex command failed: pending commands discarded

Looking through all the man pages, vi references, tutorials, and the the 
oreilly vi bible,
can't find anything...

Is set secure a compiled in setting?

From FreeBSD vi man page:

   -S Run  with  the secure edit option set, disallowing all access to
  external programs.
and
   secure [off]
  Turns off all access to external programs.

..william.o.yates...hackware.at.tru2life.net...tru2life.info...

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Instant reboot with FreeBSD 6.3 and 2GB RAM

2008-05-21 Thread Volker
On 12/23/-58 20:59, [EMAIL PROTECTED] wrote:
 Hello,
 
 some users of FreeNAS which is based on FreeBSD 6.3 reported instant reboots 
 on systems with  2GB RAM (most of them use 4GB). The reboot occurs right 
 after displaying the FreeBSD loader menu. Most of them told me that they can 
 boot if they reduce RAM to = 2GB.
 
 We are using the following kernel configuration which is based on GENERIC:
 http://freenas.svn.sourceforge.net/viewvc/freenas/branches/0.69/build/kernel-config/FREENAS-i386?revision=3291view=markup
 
 I found out another problem that causes a reboot on my 2GB machine. We are 
 using a image for the LiveCD which is 64MB great. If i change back mfs_root 
 size to 63MB all works well, but all above 64MB causes a reboot.
 Is there any limitation?
 
 Could someone help me out of this problem?
 
 Regards
 Volker

Hi Volker ;)

I'm not quite sure about your 2nd problem and your report is not quite
detailed but from your description it looks like loader is causing that.
As there's no filesystem available at that time, the loader has to read
itself through the filesystem structures.

Knowing that, PR misc/108215 comes to mind. I've not been able to check
if the issue and the patch to it is right but you may give it a try.
Probably somebody with loader and filesystem (ufs) knowledge may answer
that question quickly if the patch contained in the PR is right.

The report is about 6.2-R but at least I've checked loader code and 7.x
code is the same. I came across that report yesterday and was unable to
check the calculation.

If that is really the case, your problem may be related to that.

http://www.freebsd.org/cgi/query-pr.cgi?pr=108215

Assuming the problem report is right, it's about reading huge files by
loader reads in wrong sectors.

HTH

Volker
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ipw2200 freebsd 7 firmware problem

2008-05-21 Thread Fernando Apesteguía
On Wed, May 21, 2008 at 10:33 AM, Vince Hoffman [EMAIL PROTECTED] wrote:

 Fernando Apesteguía wrote:
 Hi all,

 I have an ipw2200 bg. I can't make it work under FreeBSD 7 on AMD64.

 This is the output of pciconf -lv

 [EMAIL PROTECTED]:0:5:0:   class=0x028000 card=0x27028086 chip=0x42208086
 rev=0x05 hdr=0x00
 vendor = 'Intel Corporation'
 device = 'MPCI3B  driverIntel PRO/Wireless 2200BG'
 class  = network

 dmesg shows the following:

 pci0: network at device 5.0 (no driver attached)

 I tried to instal the iwi-firmware from ports:


 Have you read the manpage for iwi?

No, I tried with iwi-firmware and iwicontrol and none of them existed.

 no ports are needed the firmware is now in the base system, Just add the
 entries as specified in this snippet from man iwi

So... shouldn't this port be removed?


  Alternatively, to load the driver as a module at boot time, place the
 following lines in loader.conf(5):

   if_iwi_load=YES
   wlan_load=YES
   firmware_load=YES

 In both cases, place the following lines in loader.conf(5) to load the
 firmware modules:

   iwi_bss_load=YES
   iwi_ibss_load=YES
   iwi_monitor_load=YES

 and

  This driver requires firmware to be loaded before it will work.  For
 the loaded firmware to work the license at
 /usr/share/doc/legal/intel_iwi/LICENSE must be agreed to and the
 follow-ing line be added to loader.conf(5):

   legal.intel_iwi.license_ack=1


I'll try it. But AFAIK, I have to recompile the kernel cause the
device iwi line is missing.

Am i right?

Thanks in advance



 regards,
 Vince
 ===  iwi-firmware-2.4_8 is configured with iwicontrol(8) which you
 don't need, use 'make rmconfig' and uncheck CONTROL.
 *** Error code 1

 Stop in /usr/ports/net/iwi-firmware.

 I tried the suggested workaround, but I got:

 === No user-specified options configured for iwi-firmware-2.4_8

 I tried with pkg_add -r iwi-firmware-2.4_8 and I got

 Error: FTP Unable to get
 ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.0-release/Latest/iwi-firmware-2.4_8.tbz:
 File unavailable (e.g., file not found, no access)
 pkg_add: unable to fetch
 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.0-release/Latest/iwi-firmware-2.4_8.tbz'
 by URL

 My ports are up to date (cvsup.de.FreeBSD.org)

 So... How can I make the wireless card work?

 Any help is appreciated. Thanks in advance.
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large filesystems help/ideas

2008-05-21 Thread Matias Surdi

David Robillard escribió:

Hi,
I'm implementing a backup solution at work.We've bought a x86 server
with two hardware raid 5 with for a total storage capacity of about 7Tb.

For the software we are using for backups, the ideal scenario would be
to have just one big disk so that no space problems would appear.

I've tried to install FreeBSD 7 with no success, as it seems... the
sysinstall tool doesn't support such big slices.

I've read about the Large Data Storage on FreeBSD but I'm still confused.

I've also thought on using slices of 1Tb, and join all them using vinum.
What do you think about this last option?

Thanks a lot for your help.


I would suggest to use different partitions for your OS and another
big one for your backup data. In fact, if you can use two smaller
disks in RAID 1 for the OS and leave your two RAID 5 for the backup
data alone, that would be even better.

This way you can both a) install the OS without any problem and b)
prevent a *very* long fsck in case the machine crashes and your 7TB
partition is broken beyond the background fsck process. Once you have
the OS installed on the smaller partitions, you can then use gpt(8) to
create your 2TB+ filesystems.  YMMV.

We use a scenario quite identical as what you're trying to do. We use
a few ports to do so, like sysutils/rsnapshot and shells/rssh with
rsync and OpenSSH along with an encrypted backup volume and OpenPGP to
encrypt the tapes. For VMWare images, we use sysutils/rdiff-backup. It
works very well for 100+ mixed FreeBSD, RedHat, Ubuntu and AIX hosts.
If you need any help with the backup setup and all, just ask, I'll
send you the howto.

Have fun,

DA+



Thanks a lot for your invaluable help guys, now I've a better idea about 
this.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ipw2200 freebsd 7 firmware problem

2008-05-21 Thread Vince Hoffman

Fernando Apesteguía wrote:

On Wed, May 21, 2008 at 10:33 AM, Vince Hoffman [EMAIL PROTECTED] wrote:

Fernando Apesteguía wrote:

Hi all,

I have an ipw2200 bg. I can't make it work under FreeBSD 7 on AMD64.

This is the output of pciconf -lv

[EMAIL PROTECTED]:0:5:0:   class=0x028000 card=0x27028086 chip=0x42208086
rev=0x05 hdr=0x00
vendor = 'Intel Corporation'
device = 'MPCI3B  driverIntel PRO/Wireless 2200BG'
class  = network

dmesg shows the following:

pci0: network at device 5.0 (no driver attached)

I tried to instal the iwi-firmware from ports:


Have you read the manpage for iwi?


No, I tried with iwi-firmware and iwicontrol and none of them existed.


no ports are needed the firmware is now in the base system, Just add the
entries as specified in this snippet from man iwi


So... shouldn't this port be removed?



I'm pretty sure that things changed between 6.x and 7.x, I'd imagine the 
port is needed for 7.x



 Alternatively, to load the driver as a module at boot time, place the
following lines in loader.conf(5):

  if_iwi_load=YES
  wlan_load=YES
  firmware_load=YES

In both cases, place the following lines in loader.conf(5) to load the
firmware modules:

  iwi_bss_load=YES
  iwi_ibss_load=YES
  iwi_monitor_load=YES

and

 This driver requires firmware to be loaded before it will work.  For
the loaded firmware to work the license at
/usr/share/doc/legal/intel_iwi/LICENSE must be agreed to and the
follow-ing line be added to loader.conf(5):

  legal.intel_iwi.license_ack=1



I'll try it. But AFAIK, I have to recompile the kernel cause the
device iwi line is missing.

Am i right?


I think they should all be loadable as modules if they arent in generic.

To try without rebooting I believe the commands you want are:
kenv legal.intel_iwi.license_ack=1
kldload if_iwi
kldload wlan
kldload firmware
kldload iwi_bss
kldload iwi_ibss
kldload iwi_monitor

However, I just had a look in my /boot/kernel for the if_iwi module and 
its not there so you may be correct. (I'm a touch supprised as the do 
exist on my i386 box)



regards,
Vince


Thanks in advance



regards,
Vince

===  iwi-firmware-2.4_8 is configured with iwicontrol(8) which you
don't need, use 'make rmconfig' and uncheck CONTROL.
*** Error code 1

Stop in /usr/ports/net/iwi-firmware.

I tried the suggested workaround, but I got:

=== No user-specified options configured for iwi-firmware-2.4_8

I tried with pkg_add -r iwi-firmware-2.4_8 and I got

Error: FTP Unable to get
ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.0-release/Latest/iwi-firmware-2.4_8.tbz:
File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch
'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.0-release/Latest/iwi-firmware-2.4_8.tbz'
by URL

My ports are up to date (cvsup.de.FreeBSD.org)

So... How can I make the wireless card work?

Any help is appreciated. Thanks in advance.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Multiple instances of BIND at startup

2008-05-21 Thread Steve Bertrand
However, how can I make the FreeBSD (7.0) startup scripts load both 
instances of BIND, each with it's own configuration?



I did something very similar.  Run one of the bind instances in a jail --
especially with a little firewall rdr rules and similar trickery to 
redirect

traffic into the appropriate instance (which gets you past the lack of IPv6
support in jail(8)). Works beautifully.


Thanks Matthew for the response.

In all honesty, I want to stay away from jails as much as possible.

Once testing is complete, I'll have numerous DNS servers to roll this 
out to, and I want the least amount of complexity as possible.


A few years ago I switched our entire infrastructure from BIND to DJBDNS 
(with VegaDNS as a web front-end), and now I'm looking to go back.


Again, I'd rather do this without jails if possible, and at the same 
time, be able to use the built in FBSD startup scripts if possible. If 
not, heres another question:


If I need to create my own custom script to do this sort of thing, where 
should it be loaded from? Some of my firewall rulesets rely on DNS to be 
up prior to them.


Regards,

Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Multiple instances of BIND at startup

2008-05-21 Thread Jonathan Chen
On Wed, May 21, 2008 at 06:52:36PM -0400, Steve Bertrand wrote:

 Again, I'd rather do this without jails if possible, and at the same 
 time, be able to use the built in FBSD startup scripts if possible.

Can you not make use of BIND 9's view features? Possibly each view
using a match-destinations block to map to either the authoritative
or the caching services.

Cheers.
-- 
Jonathan Chen [EMAIL PROTECTED]
---
I love deadlines. I like the whooshing sound they make as they fly by
- Douglas Adams
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Network interface detection order

2008-05-21 Thread Alexandre Biancalana
Hi list,

 I'm installing some new Dell PowerEdge Servers and I have a question,
this servers came with 2 internal nics and FreeBSD recognize the
interfaces in inversal order, the nic marked as 1 in chassis is bce1
in ifconfig and nic marked as 2 is bce0.

 Someone know why ? Do we have some way to change this or the better
is change interface name ?

Regards,

Alexandre
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Unusual use of ssh

2008-05-21 Thread Doug Hardie
I have an unusual situation that I suspect is not practical, but just  
in case...


I have a class C network with a T1 to the internet.  There are a  
number of hosts on that network.  Unfortunately the T1 line is just  
part of a path with several additional links before it gets to the  
upstream ISP.  Some of those links are relatively prone to outages.   
In the same facility, I have a number of WiFi access points that are  
connected through a router to a DSL connection to the internet.  That  
path is completely independent from the T1 and actually goes through a  
completely different set of central offices.


What I have tried to do is to link the DSL router to one of my hosts  
via a separate NIC and address that is on the LAN of the WiFi router.   
So far all is good.  I can ping any of the access points from that  
host just fine.  I have established a pass through port in the DSL  
router for SSH that sends the packets to that host.  Sure enough, ssh  
packets are received by the host.  The problem is that it does not  
respond on the right interface.  The routing table uses a default  
route through the T1.  Thats where the sshd responses are being sent.


Since I have no a priori knowledge what IPs I would have available  
when I need to use this back door, I can't pre-setup the routing  
table.  I need sshd to respond on the same interface it receives the  
packets from.  I don't believe that is possible using IPv4 routing.  I  
think that it is using IPv6 but none of the networks involved support  
that yet.  I don't find any option in sshd to force it to respond on  
the right interface either.  Is there something I have missed?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Multiple instances of BIND at startup

2008-05-21 Thread Steve Bertrand

Jonathan Chen wrote:

On Wed, May 21, 2008 at 06:52:36PM -0400, Steve Bertrand wrote:

Again, I'd rather do this without jails if possible, and at the same 
time, be able to use the built in FBSD startup scripts if possible.


Can you not make use of BIND 9's view features? Possibly each view
using a match-destinations block to map to either the authoritative
or the caching services.


Well, from what I read (I can't remember where), if I use views to do 
this with only a single instance running, the problem arises that even 
though the 'external' (requests for authoritative answers) clients can 
and will get responses from the caching side of the server if the result 
they are after is already cached.


I want the two services to be completely disparate, and more precise, 
I'd like to have the recursive instance to have to query the 
authoritative instance for a result from the same box.


I have this setup already working fine. I just can't get it to start 
properly with both instances :)


If I am missing something, and you have a config example, it would be 
appreciated.


Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Unusual use of ssh

2008-05-21 Thread Derek Ragona

At 06:35 PM 5/21/2008, Doug Hardie wrote:

I have an unusual situation that I suspect is not practical, but just
in case...

I have a class C network with a T1 to the internet.  There are a
number of hosts on that network.  Unfortunately the T1 line is just
part of a path with several additional links before it gets to the
upstream ISP.  Some of those links are relatively prone to outages.
In the same facility, I have a number of WiFi access points that are
connected through a router to a DSL connection to the internet.  That
path is completely independent from the T1 and actually goes through a
completely different set of central offices.

What I have tried to do is to link the DSL router to one of my hosts
via a separate NIC and address that is on the LAN of the WiFi router.
So far all is good.  I can ping any of the access points from that
host just fine.  I have established a pass through port in the DSL
router for SSH that sends the packets to that host.  Sure enough, ssh
packets are received by the host.  The problem is that it does not
respond on the right interface.  The routing table uses a default
route through the T1.  Thats where the sshd responses are being sent.

Since I have no a priori knowledge what IPs I would have available
when I need to use this back door, I can't pre-setup the routing
table.  I need sshd to respond on the same interface it receives the
packets from.  I don't believe that is possible using IPv4 routing.  I
think that it is using IPv6 but none of the networks involved support
that yet.  I don't find any option in sshd to force it to respond on
the right interface either.  Is there something I have missed?


You need to set the correct listen address in /etc/sshd_config then restart 
sshd.


Also you may need to provide a route for this interface if it cannot find 
it's own route.


-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Unusual use of ssh

2008-05-21 Thread Steve Bertrand
Sure enough, ssh packets are 
received by the host.  The problem is that it does not respond on the 
right interface.  The routing table uses a default route through the 
T1.  Thats where the sshd responses are being sent.


If I understand correctly, this is only one box you need a correction 
for. Read on.


Since I have no a priori knowledge what IPs I would have available when 
I need to use this back door, I can't pre-setup the routing table.  


Fair enough.

I 
need sshd to respond on the same interface it receives the packets 
from.  I don't believe that is possible using IPv4 routing.  


Not at the layer-3 level directly. To do this dynamically you will need 
to perform some sort of policy based routing.


I think 
that it is using IPv6 but none of the networks involved support that 
yet.


Well, that's a topic up for review. Technically, in IPv6, there is no 
correlation between how a host selects it's source address for an IP 
packet based on it's destination address. I've been trying to understand 
and follow the consequences of this for some time:


http://www.ietf.org/internet-drafts/draft-ietf-v6ops-addr-select-ps-06.txt

...or:

http://tinyurl.com/64l9pn

 I don't find any option in sshd to force it to respond on the 
right interface either.  Is there something I have missed?


Most likely, if this is a single machine you are speaking of, a script 
that will check for connectivity to a remote address periodically (eg 
every five minutes) and then dynamically change it's default gateway at 
kernel level (not userland level) prior to SSH incoming may fix your 
problem.


This is a little difficult to do without dynamic routing, but relatively 
simple if you can put up with manually changing back the route once the 
T1 comes back up.


A script that does:

- ping remote addr
- if fail, route delete default, route add default (ADSL gw)

There was a very good discussion on fbsd-net@ last week regarding 
progress with multiple routing tables. I didn't get right into it so I 
don't know if it will help, but your true three options are:


- dynamic routing (co-operation with ISP's)
- IPFW (or equivalent) policy based routing (source routing)
- periodic check via a script

Regards,

Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Unusual use of ssh

2008-05-21 Thread Dave Curry
On Wed, May 21, 2008 at 04:35:29PM -0700, Doug Hardie wrote:
 I have an unusual situation that I suspect is not practical, but just in 
 case...

 I have a class C network with a T1 to the internet.  There are a number of 
 hosts on that network.  Unfortunately the T1 line is just part of a path 
 with several additional links before it gets to the upstream ISP.  Some of 
 those links are relatively prone to outages.  In the same facility, I have 
 a number of WiFi access points that are connected through a router to a DSL 
 connection to the internet.  That path is completely independent from the 
 T1 and actually goes through a completely different set of central offices.

 What I have tried to do is to link the DSL router to one of my hosts via a 
 separate NIC and address that is on the LAN of the WiFi router.  So far all 
 is good.  I can ping any of the access points from that host just fine.  I 
 have established a pass through port in the DSL router for SSH that sends 
 the packets to that host.  Sure enough, ssh packets are received by the 
 host.  The problem is that it does not respond on the right interface.  The 
 routing table uses a default route through the T1.  Thats where the sshd 
 responses are being sent.

 Since I have no a priori knowledge what IPs I would have available when I 
 need to use this back door, I can't pre-setup the routing table.  I need 
 sshd to respond on the same interface it receives the packets from.  I 
 don't believe that is possible using IPv4 routing.  I think that it is 
 using IPv6 but none of the networks involved support that yet.  I don't 
 find any option in sshd to force it to respond on the right interface 
 either.  Is there something I have missed?
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 [EMAIL PROTECTED]

The easiest thing to do here will likely be setting up pf on the box with SSH 
with a pass rule and reply-to set to the correct interface to respond on.

--
pass in on interface to be used reply-to same interface proto tcp port 22 
keep state
--

-- 
David Michael Curry (Dave)
[EMAIL PROTECTED]

() ASCII Ribbon Campaign | Against HTML e-mail
/\  www.asciiribbon.org  | Against proprietary extensions

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Your suggestions about this Dell configuration?

2008-05-21 Thread Frank Shute
On Wed, May 21, 2008 at 08:49:51AM +0200, VeeJay wrote:

 Hello friends,
 
 My employer is buying this Dell server and I would like to have your opinion
 about the configuration.
 
 Requirements are:
 2 Websites with 3-4 million hits per month with video ads.

If it's 3-4 million hits per month as you've stated twice now, then
your hardware is complete overkill.

So I'll assume you mean 3-4 million hits a day for each site.

 
 Operating System:
 *FreeBSD AMD647-STABBLE*

I'd use 7.0-RELEASE.

 
 Database:
 *PHP+MySQL with Apache*

No problem. You should use Apache 2.*.

 
 
 Server Configuration:
 *PowerEdge? 6850 SCSI*
 
 Dual Core Intel(R) Xeon(R) Processor 7130M, 3.2GHz, 8MB L3 Cache, 800Mhz FSB
 1x Additional Dual Core Intel(R) Xeon(R) Processor 7130M, 3.2GHz, 8MB L3 
 Cache,
 800MHz FSB

Slow FSB. I suppose they hope you hit the cache. Shouldn't matter
because your server is more likely to be disk bound rather than bus
bound.

 
   16GB 400MHz Dual Rank DDR2 Memory (8X2GB)

Slow memory, to match the slow FSB :) But you've got 250MB per hit.
So use the excess to cache frequently accessed content.

  C5 Drives attached to embedded PERC4ei, RAID 10
 
   PERC 4/DC RAID controller (128MB cache) (1 intern and 1 extern Channel)
 (Should I use controller with Both Internal or Both External Channel? What
 they do?)

Supported according to a quick Google search.

 
 5 x 146GB SCSI Ultra320 (15000rpm) 1'' 80 pin harddrives

No name or a brand?

 
 Chassis with support for 3.5'' SCSI Hard Drives
 
 Dell Remote Access Card 4 SERVER MANAGEMENT CARD

Don't know if this will work. Most guys use a serial console/ssh for
management.

 
 (I will have hot swappable drives  chassis)
 
 Thank you in advance.

The performance of this hardware will depend on what *sort* of hits
you get. Are a lot of them just for the homepage? Then just cache it.

Is it static content? 

If you're getting lots of ad-hoc database queries and fetches/writes
from/to disk, then your disks could get a thrashing.

How big's your database? Being read from more than written to? How
precious is the data?

How many of these hits are reading video ads? All of them? How many
KBs are these awful ads?

What bandwidth do you have to these servers?

How you are going to get the best out of your hardware depends on
questions like these, so you have to analyse your Apache logs and tune
appropriately.

Tuning Apache, mysql and PHP are all subjects in their own right.

For FreeBSD, read tuning(7).

Are you running FreeBSD ATM? Then some numbers from iostat, top etc.
would be useful in analysing how your new server is going to cope and
how much spare capacity you'll have, but the numbers are dependent on
how you've tuned it (if at all).

Hope I've given you something to think about.

Regards,


-- 

 Frank 


 Contact info: http://www.shute.org.uk/misc/contact.html 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Multiple instances of BIND at startup

2008-05-21 Thread Jonathan Chen
On Wed, May 21, 2008 at 08:01:50PM -0400, Steve Bertrand wrote:
 Jonathan Chen wrote:
 On Wed, May 21, 2008 at 06:52:36PM -0400, Steve Bertrand wrote:
 
 Again, I'd rather do this without jails if possible, and at the same 
 time, be able to use the built in FBSD startup scripts if possible.
 
 Can you not make use of BIND 9's view features? Possibly each view
 using a match-destinations block to map to either the authoritative
 or the caching services.
 
 Well, from what I read (I can't remember where), if I use views to do 
 this with only a single instance running, the problem arises that even 
 though the 'external' (requests for authoritative answers) clients can 
 and will get responses from the caching side of the server if the result 
 they are after is already cached.

I didn't quite parse this, could you please elaborate?

 I want the two services to be completely disparate, and more precise, 
 I'd like to have the recursive instance to have to query the 
 authoritative instance for a result from the same box.

The same result can be achieved by using the same master zone file in
your caching and authoritative views. Not quite what you wanted, but the
end result should be the same.

Cheers.
-- 
Jonathan Chen [EMAIL PROTECTED]
--
 A person should be able to do a small bit of everything,
specialisation is for insects
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Multiple instances of BIND at startup

2008-05-21 Thread Steve Bertrand
Well, from what I read (I can't remember where), if I use views to do 
this with only a single instance running, the problem arises that even 
though the 'external' (requests for authoritative answers) clients can 
and will get responses from the caching side of the server if the result 
they are after is already cached.


I didn't quite parse this, could you please elaborate?

I want the two services to be completely disparate, and more precise, 
I'd like to have the recursive instance to have to query the 
authoritative instance for a result from the same box.


The same result can be achieved by using the same master zone file in
your caching and authoritative views. Not quite what you wanted, but the
end result should be the same.


I'm beginning to feel that I'm on a different page here.

I understand 'views' as far as BIND is concerned as thus (I may be 
misguided):


Internet
|
   external clients looking for resolution
|
|
|
external view
(accept from acl x.x.x.x)
|
BIND DNS Server
|
internal view
(accept from acl x.x.x.x)
|
|
|
internal clients looking for resolution
|
A private LAN perhaps


My authoritative name server (service, eventually cluster) will 
eventually house about 500 domains, which I want only recursive DNS 
servers that come from the root .tld down to see (no caching).


The caching name server (service, and eventually cluster) will see tens 
of thousands of our clients requests (we are an ISP) to use as their DNS 
lookup, which will perform recursive lookups that we are not 
authoritative for.


I'm sorry, I don't know how to put it into other words, other than I 
want complete separation from dns authoritative and dns caching services 
to be disparate.


The same thing I get when I run tinydns and dnscache on two separate 
IP's via ucspi. Again, example configs are welcome.


Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: vi secure

2008-05-21 Thread Frank Shute
On Wed, May 21, 2008 at 01:51:03PM -0700, William O. Yates wrote:

 [sent the below message thru the freebsd-security list with no
 answers, hope for more from freebsd-questions]
 
 Recently started using vi macros.

Show us the macro.

 
 When attempting to use one which accessed the external shell, got
 the following message:
 
 The ! command is not supported when the secure edit option is set.

What does:

:set

show you?

External commands work for me. Sure your vi isn't aliased? When
doesn't it work? As root or ordinary user or both?

What's your secure level?:

$ sysctl -a | grep secure

What does:

$ whereis vi

give you?

and:

$ uname -a

 
 When attempting to :set nosecure got:
 
 set: the secure option may not be turned off.
 
 When attempting to set nosecure in my .exrc file, got:
 
 set nonumber .exrc, 44: set: the secure option may not be turned off
 .exrc, 44: Ex command failed: pending commands discarded
 
 Looking through all the man pages, vi references, tutorials, and the
 the oreilly vi bible, can't find anything...
 
 Is set secure a compiled in setting?

No.

 
 From FreeBSD vi man page:
 
-S Run  with  the secure edit option set, disallowing all
access to external programs.  and secure [off] Turns off all
access to external programs.
 
 ..william.o.yates...hackware.at.tru2life.net...tru2life.info...

-- 

 Frank 


 Contact info: http://www.shute.org.uk/misc/contact.html 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Which version

2008-05-21 Thread Tim Judd

On Wed, 2008-05-21 at 10:32 +0200, Christian Zachariasen wrote:
 On Wed, May 21, 2008 at 10:01 AM, Russell Schoen [EMAIL PROTECTED] wrote:
 
  Hi,
  Do you have a version that will run with an AMD Sempron 3100+, 1.8Ghz, 32
  bit, X86 family processor?

 Please do some reading before asking questions on the mailing list. The
 FreeBSD Handbook (google it) is an excellent resource and will
 answer most of your questions about FreeBSD.
 
 
 But to answer this specific question: Yes, it's called FreeBSD. Just get the
 latest release (7.0) and install it.
 
 Christian Zachariasen

And your answer doesn't answer the OP's question.

I think the OP was asking which platform to use.

7.0 is the stable release
and you need the i386 platform.

something like 7.0-RELEASE-i386-disc1.iso is what you need -- burn this
image to CD and then boot off the CD.


The handbook is still an excellent resource.
http://www.freebsd.org/handbook


good luck, feel free to ask questions, after searching a bit.  It makes
us understand the question better and quicker response.

Enjoy!

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Multiple instances of BIND at startup

2008-05-21 Thread Jonathan Chen
On Wed, May 21, 2008 at 10:21:05PM -0400, Steve Bertrand wrote:

[...]
 My authoritative name server (service, eventually cluster) will 
 eventually house about 500 domains, which I want only recursive DNS 
 servers that come from the root .tld down to see (no caching).
 
 The caching name server (service, and eventually cluster) will see tens 
 of thousands of our clients requests (we are an ISP) to use as their DNS 
 lookup, which will perform recursive lookups that we are not 
 authoritative for.
 
 I'm sorry, I don't know how to put it into other words, other than I 
 want complete separation from dns authoritative and dns caching services 
 to be disparate.

Let's say your authoritative server is listening on IP-A, and your
caching server is listening on IP-B; both ip-addresses are on the same
host. We can have a named instance listening on both addresses, with
multiple views like:

/*
Used by root .tld.
 */
view authoritative
{
match-destination
{
IP-A;
};
recursion no;

zone my.authoritative.org
{
type master;
...
};

}

/*
Use by our client requests.
 */
view caching
{
match-destination
{
IP-B;
};
recursion yes;

zone my.authoritative.org
{
type master;
...
};

}

The match-destination inspects the DNS address used by the client to
query to determine which view to use. Would this suit your purpose?
-- 
Jonathan Chen [EMAIL PROTECTED]
--
 Nyuck, nyuck, nyuck - Curly
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Multiple instances of BIND at startup

2008-05-21 Thread Matthew Seaman

Jonathan Chen wrote:

On Wed, May 21, 2008 at 10:21:05PM -0400, Steve Bertrand wrote:

[...]
My authoritative name server (service, eventually cluster) will 
eventually house about 500 domains, which I want only recursive DNS 
servers that come from the root .tld down to see (no caching).


The caching name server (service, and eventually cluster) will see tens 
of thousands of our clients requests (we are an ISP) to use as their DNS 
lookup, which will perform recursive lookups that we are not 
authoritative for.


I'm sorry, I don't know how to put it into other words, other than I 
want complete separation from dns authoritative and dns caching services 
to be disparate.


Let's say your authoritative server is listening on IP-A, and your
caching server is listening on IP-B; both ip-addresses are on the same
host. We can have a named instance listening on both addresses, with
multiple views like:

/*
Used by root .tld.
 */
view authoritative
{
match-destination
{
IP-A;
};
recursion no;

zone my.authoritative.org
{
type master;
...
};

}

/*
Use by our client requests.
 */
view caching
{
match-destination
{
IP-B;
};
recursion yes;

zone my.authoritative.org
{
type master;
...
};

}

The match-destination inspects the DNS address used by the client to
query to determine which view to use. Would this suit your purpose?


I believe that the problem is this: even if configured to be an
authoritative server, BIND will respond to a query about zones
outside what it has authoritative data for with data from its cache
if that data is present.  As there is only one cache per instance of
BIND, enabling any sort of recursive capability on a server that is
otherwise meant to be entirely authoritative can lead to data leaking
between the authoritative and recursive parts.  This opens up the
possibility of tricking a server into caching false data and responding
with it as if it was authoritative.

In answer to the OPs original question -- yes you can start two instances
of BIND given the obvious requirement that they have distinct network 
addresses and ports, pid files etc.  You just have to copy the startup 
script to a new name and modify the variable prefix internally -- eg.  This 
chunk at the beginning of the script:



name=named
rcvar=named_enable

you'ld modify to say instead:

name=named1
rcvar=named1_enable

-- modifying all of the other instances of variable name prefixes in the 
file from named to named1 similarly.  Then you'ld put:


named1_enable=YES
named1_chroot=/var/named1
named1_pidfile=/var/run/named1/pid

etc. etc. into /etc/rc.conf.  You can put your modified named1.sh rc script 
into  /etc/rc.d/ or /usr/local/etc/rc.d/  -- the latter is probably more 
desirable as you won't get prompted to delete the file every time you run 
mergemaster -- and the rcorder stuff will cause it to be started at much 
the same stage in the boot process as the original named.


Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature