Re: Intel EMT64 Xeon vs AMD Opteron

2005-02-07 Thread Chris Dillon
On Fri, 4 Feb 2005, Scott Long wrote:
With FreeBSD, it's a bit of a toss-up.  There is no strong affinity 
set or enforced between process memory and where the process is 
running. Having some notion of affinity (i.e. NUMA support) would be 
a good thing.  Oh, and the 4+2 configurations are typically pretty 
poor, regardless.
For non-NUMA-aware operating systems, you should turn on Node 
Interleaving for the memory system which will spread the memory 
accesses across all processors.  Hopefully all multi-processor Opteron 
system BIOSes will give you this option, my Tyan S2885 does.

--
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD 5.3 on Dual Opteron -- experiences?

2005-01-13 Thread Chris Dillon
On Wed, 12 Jan 2005, sp0ng3b0b wrote:
I am getting a quote for a new server.
I would like to get a box with 2x AMD Opterons and an Intel MF 1000 
fiber gigabit card.

Does anyone have any good/bad experiences with Opterons and FreeBSD 
5.3?
FreeBSD 5.3/i386 and 5.3/amd64 both work just fine on my Tyan S2885 
(Thunder K8W) with dual Opteron 244's and 2GB RAM.

--
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Is this a sign of memory going bad?

2004-12-02 Thread Chris Dillon
On Thu, 25 Nov 2004, Chuck Robey wrote:
I don't want to embarrass anyone here, but something needs to be 
said. Note this next sentence carefully: THERE IS NO SUCH THING AS A 
WORKING MEMORY TEST PROGRAM!!!

Anyone who tells you otherwise is no friend of yours, because they 
are making your life hard.  It's very alluring to assume that 
programs written to do a job actually do that job, and most 
especially in the case of memory test, one would *really* **REALLY** 
wish that Chuck here was lying, cause you honestly need a memory 
test program, but the truth is otherwise: memory test programs don't 
work.  At the very best, if they spend 30 minutes carefully 
exercising memory, you get a factor that is maybe 10% reliable, and 
90% wishful guessing.

With that in mind, sometimes, the very best memory test programs can 
give you better ideas that memory you thought was failing IS 
failing.  The opposite, proving that memory is good, is just 
totally, totally useless, you cannot take any data home at all about 
your memory being good.
The memory-test programs are not entirely worthless.  Just recently we 
had a lab of PCs where some of them would go wonky and randomly lock 
up hard.  This was happening for months and we couldn't put our finger 
on the problem.  We thought maybe it was something in our Windows 
build, so we tried booting Microsoft's stand-alone memory tester (yes, 
they have one, and I'm not sure where I got it, MSDN perhaps?), very 
similar to memtest86.  After a random number of test passes, sometimes 
100+ passes (many hours, overnight), some of the machines would lock 
up.  No errors indicated, they just froze.  Oops.  Definately NOT a 
software problem.  After fiddling around with some of the 
clock/voltage related BIOS settings, putting new thermal compound 
between the CPUs and heatsinks, reseating cards and memory, placing 
the PCs inside a hexagram drawn on the floor and dancing nak... 
nevermind... we got them to run the tests continuously through our 
entire 4-day Thanksgiving weekend without problems.  For the last 4 
days (including today), we haven't had any problems with them.

So, these memtest programs can at least be valuable stress-testing 
tools but be prepared to run them for hours or days at a time before 
they will catch something. :-)

--
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 16-character username limit in quotas?

2004-08-20 Thread Chris Dillon
On Thu, 19 Aug 2004, Dan Nelson wrote:
In the last episode (Aug 19), Chris Dillon said:
I've just run into a 16-character username limit in our quota
support, or at least in the edquota command itself (5-CURRENT):
edquota -u -e /afilesystem:614400:716800:4000:5000 areallylongusername
edquota: areallylongusern: no such user
Does anybody know what would it take to raise this limit to at least
32 characters?
Try bumping MAXLOGNAME in /usr/include/sys/param.h and UT_NAMESIZE in
/usr/include/utmp.h and rebuilding world.
Thank you, I'm building a new kernel+world right now.  For some reason 
I thought we had already bumped those particular limits up past 16 
characters so I didn't look at them.  I ran into this problem because 
I'm using Samba's winbindd with nsswitch, and the usernames are 
prepended with our Windows 2000 domain name, making them longer than 
usual.  Samba, chown, ls, etc. don't seem to have a problem with these 
long names (nsswitch is great!), so they must not pay any attention to 
MAXLOGNAME and UT_NAMESIZE and that's what made me think it was 
specific to quotas.  Is there any reason this couldn't be bumped up to 
32 characters (or more) by default for better compatability with 
alternate namespaces?

--
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


16-character username limit in quotas?

2004-08-19 Thread Chris Dillon
I've just run into a 16-character username limit in our quota support, 
or at least in the edquota command itself (5-CURRENT):

edquota -u -e /afilesystem:614400:716800:4000:5000 areallylongusername
edquota: areallylongusern: no such user
Does anybody know what would it take to raise this limit to at least 
32 characters?

--
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Networking problem UPDATED

2004-03-05 Thread Chris Dillon
On Thu, 4 Mar 2004, Steve Ireland wrote:

 The two interfaces are on different subnets: 192.168.0.0/24 and
 192.168.10.0/24. You need to either add a static route between them
 or change their netmasks to at least a /21.

Huh?  They _must_ be on different subnets.  You can't route one subnet
across multiple network interfaces.  Besides, a router always knows
how to route packets between its own directly-attached networks, no
additional routes are necessary.

The problem here is that a route needs to be added for 192.168.10.0/24
- 192.168.0.100 in the upstream router(s), since the upstream
router(s) do not currently know to send any packets destined for
192.168.10.0/24 to 192.168.0.100 for delivery.  The upstream router is
currently sending these packets to its own default gateway, which is
likely even further upstream.  IP routers aren't mind-readers, you
have to tell them exactly where to send packets, but usually that is
very simple.

Running a routing protocol (such as RIP) on both the FreeBSD box in
question and the upstream router(s) would automatically add the same
route for you, but that is unnecessary in such a simple network
configuration.

-- 
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org

Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

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


Re: FreeBSD box as router adding latency

2004-02-27 Thread Chris Dillon
On Thu, 26 Feb 2004, Aloha Guy wrote:

 Already tried that and it did improve things a little. I tried
 setting the HZ to 1000 and it didn't make much of a difference.  Is
 there a larger number that actually works well?

You can try higher HZ numbers, but you might run into other problems.
Experiment and see.  Others have experimented with higher HZ numbers
so you might want to check the list archives.  Anyway, is a 1ms delay
really that bad?


-- 
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org

Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

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


Re: FreeBSD box as router adding latency

2004-02-26 Thread Chris Dillon
On Thu, 26 Feb 2004, Aloha Guy wrote:

  What do you have HZ set to (see sysctl kern.clockrate)? I think I
  remember your original message showing you using pipes and queues
  and the HZ setting can affect those. Also see if your latency
  improves if you remove all pipe and queue rules (other ipfw rules
  are OK).


 Here is the HZ setting:

 kern.clockrate: { hz = 100, tick = 1, profhz = 1024, stathz = 128 }

 I'm not sure how to remove the pipe since I don't think the pipe
 works until the queue is defined.  When I removed the queues that
 are configured for the pipe, the latency is back to normal though.

Like I said, remove both pipes and queues to test.  However, pipes
_can_ be used without queues, but that is irrelevant here.  Try
setting HZ to 1000 in your kernel config, recompile, reboot, and test
again.  You should see something between a slight improvement to a
ten-fold improvement.


-- 
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org

Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

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


Re: FreeBSD box as router adding latency

2004-02-26 Thread Chris Dillon
On Wed, 25 Feb 2004, Aloha Guy wrote:

 You're right that additional delay while adding a hop is to be
 expected, which is less than 0.1ms to the FreeBSD box but everything
 past the FreeBSD machine is adding atleast 5ms up to 300ms in the
 traceroutes when the normal is no more than 20ms for the same
 traceroute.  I've already checked the NICs and they are all
 configured at their full rated speeds and full duplex.  I even try
 using a Cardbus PCMCIA fxp0 Intel Pro/100S card on the FreeBSD box
 and it still had the same problem.  I am using a September 2003
 -CURRENT so I don't know if it's a issue with the current networking
 code back then or not.

What do you have HZ set to (see sysctl kern.clockrate)?  I think I
remember your original message showing you using pipes and queues and
the HZ setting can affect those.  Also see if your latency improves if
you remove all pipe and queue rules (other ipfw rules are OK).

-- 
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org

Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

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


Re: FreeBSD box as router adding latency

2004-02-25 Thread Chris Dillon
On Wed, 25 Feb 2004, Aloha Guy wrote:

 Any ideas what is causing this? Is it the xl0 driver because I've
 used FreeBSD machines as ethernet routers before with a similar
 setup except there was no NAT involved and used the fxp drivers and
 it never had this problem. Thanks for your help in advance!

Additional delay while adding a hop is to be expected, no matter how
fast your network or router is.  You only added about 1ms on average,
which is about right.  The lost packet in the second traceroute might
be due to a full/half-duplex mismatch between one of the NICs and the
switch.


-- 
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org

Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

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


Re: SCSI--LVD vs SE...

2003-12-07 Thread Chris Dillon
On Sun, 7 Dec 2003 [EMAIL PROTECTED] wrote:

 Am I understanding this right?...

 Concerning SCSI, are LVD and SE (single ended) mutually exclusive?

Yes, unless a SCSI bridge is used to separate the LVD and SE devices
on the same SCSI bus.  If any SE device is present on an LVD bus, the
entire bus will revert to SE.

 That is, if I have a system that supports LVD drives, I want to
 configure those drives for LVD and not SE which would yield a
 smaller bandwidth?  Like 1/2 at best, right?

Being configured as LVD should happen automatically as long as
everything you connect to the bus is LVD.  You can achieve 40MB/sec at
best with a Wide SE bus.  A Wide LVD bus allows speeds of 80MB/sec up
to 320MB/sec depending on the attached controller and devices.

 Finally, I have a Tyan S2468UNG motherboard with Ultra160 SCSI
 onboard (dual channel). I'm looking at pairing two Seagate 15K.3
 (ST336753LW)  drives with this board. Are these a good choice? Would
 I get better performance from having both drives on the same channel
 (and so, cable)? or would it be better to put one on channel A and
 the other on channel B (separate cables)?

I doubt you would see much difference putting just two drives on two
different Ultra160 channels, but if you have the channels and extra
SCSI cables to spare, go ahead and use them.

 In the future I would like to add a third LVD drive (probably the
 same model with larger capacity). Again, all on the same channel? or
 split to second channel? I'm guessing the dual channel approach
 would yield better performance when writing across separate physical
 disks.  Especially if three drives are involved.

Again, on an Ultra160 channel, three new and very fast drives will
come close but still will not fully use the available bandwidth.
Spreading the drives across two channels can help with contention
under very heavy loads, but depending on what you are using this for,
you may see no difference at all using two channels rather than one.
SCSI is far better at doing multiple devices per channel than IDE.

-- 
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, PC98, Alpha, and UltraSPARC architectures
 - x86-64, PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org

Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

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


Re: write behind caching

2003-09-20 Thread Chris Dillon
Moved to freebsd-questions, which is more appropriate...

On Thu, 18 Sep 2003, Mark Bojara wrote:

 One of our clients is running a FreeBSD 4.8 server with Samba for
 his Windows based financial system. He is having problems that the
 index files get corrupt. He phoned support for the financial system
 they told him he must disable Write behind caching on the server,
 However this is for a M$ server. Is there something equivilent for
 FreeBSD?

This is almost always due to an application programming error, but you
can't tell the developers that, and instead of fixing their problem,
the developers nearly always tell you to turn off write caching.
What they really mean to say is opportunistic locking.  Turn that
off in Samba and things will work smoothly, though much slower.  This
has _ABSOLUTELY NOTHING_ to do with any write caching performed by the
server OS or storage subsystem, nor with their sync behaviours.
This is entirely client-side caching (though server-orchestrated)
and has only to do with SMB file locking and a _client_ performing
write caching on a network file while other clients are performing
read caching on the same file, and the whole ballet of cache flushings
don't happen when they're supposed to.  Or something like that.

Before you turn off opportunistic locking, though, if the application
uses the Microsoft Data Access Components (MDAC) and/or Jet for its
database backend, download the latest MDAC and/or Jet release from
Microsoft's web site and install it on _every_ workstation.  That kind
of thing is ideal to put in a login script while using the silent
install option.  I believe the latest MDAC release is 2.8, and the
latest Jet is 4.0 SP7.  It will never hurt to install both, even if it
turns out your application uses neither.


-- 
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest and most stable server OS on the planet
 - Available for IA32, IA64, PC98, Alpha, and UltraSPARC architectures
 - x86-64, PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org

Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

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


Re: Ugly Huge BSD Monster

2003-09-01 Thread Chris Dillon
On Mon, 1 Sep 2003, Denis Troshin wrote:

 Almost every package I install requires a few other packages. This
 'idea of using dependent packages' turns FreeBSD (and other
 unix-systems) to an ugly monster.

At least the dependencies are taken care of for you automatically in
FreeBSD, unlike some systems which require you to download and install
each depedency manually.

 For example, I don't need Perl or Python but a few packages I
 install require them.

 Does exist a programming under unix without these dependencies?

 P.S.  Under Windows it is possible to write not bad applications
 which depend just on libraries (KERNEL32, USER32, GDI32).  And these
 libs exist on every base system!!!

I have to deal with creating internal distribution packages for all
kinds of Windows software just about every day, and the dependencies
for Windows software can be much worse, especially for Microsoft's own
software which seems to be among the worst.  Microsoft Office XP alone
depends on (when installed on a base Windows 98SE installation), no
less than Microsoft Installer 2.x (MSI), Internet Explorer 6, MDAC,
and several other non-Office bits and pieces that don't come to mind
right now.  Granted, they are included in the Office XP installer and
it will install all of this by itself if you don't have any of them
installed, but they are indeed separate depedencies.

I break as many depedencies as I possibly can out of a particular
piece of software into separate distribution packages with their own
dependency chains.  The FreeBSD ports/packages system just happens to
already do this to a high degree, because it is a good idea.

-- 
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest and most stable server OS on the planet
 - Available for IA32, IA64, PC98, Alpha, and UltraSPARC architectures
 - x86-64, PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org

No trees were harmed in the composition of this message, although some
electrons were mildly inconvenienced.

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


Re: which FreeBSD?

2003-07-01 Thread Chris Dillon
This belongs in -questions, not -smp.

On Tue, 1 Jul 2003, David Newman wrote:

 Greetings. For a small office (~10 users), I am planning to build a
 mail and DNS server using FreeBSD-SMP; details below. My
 requirements are availability and performance, in that order.

 Which FreeBSD is better suited for this -- 4.8 or 5.1?

4.8-RELEASE or 4.8-STABLE

 Hardware:
 Compaq Proliant 1850R 6/550 (2 x 550-MHz PIII), 1 Gbyte RAM, 2 x
 18-Gbyte SCSI drives

1000% overkill for only 10 users.  As an example, I (still) have a
66MHz 486 with 48MB RAM and a single 2GB SCSI drive handling over 300
users with sendmail and cyrus-imapd.  Focus on reliability foremost,
so mirror those two SCSI drives you have.  The Proliant 1850R doesn't
offer the ability to use redundant memory, but it at least does ECC.
You'll also have an extra processor already there if one happens to go
south, and you would never notice it was gone.

 Software:
 postfix, courier-imap, bind

Consider cyrus-imapd2 or cyrus-imapd22 instead of courier-imap.  Very
reliable, very fast, and offers you the ability to create a black
box mail appliance that does not require the use of local user
accounts, if you wish to go that route.

-- 
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest and most stable server OS on the planet
 - Available for IA32, IA64, PC98, Alpha, and UltraSPARC architectures
 - x86-64, PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org

No trees were harmed in the composition of this message, although some
electrons were mildly inconvenienced.

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


Re: tree-based quotas for UFS/UFS2?

2003-06-30 Thread Chris Dillon
On Thu, 26 Jun 2003, Ryan Dooley wrote:

 Has anybody done work on Tree-based quotas for UFS/UFS2?  As an
 administrator I'm finding more and more reasons that such a thing
 would be a good thing.

By tree-based you mean the ability to define this directory and
everything under it gets X amount of storage, regardless of owner?
If so, I also wish this ability existed, and I've talked with several
administrators of ISPs that sorely need that ability as well.  If it
is a monumental undertaking, maybe some hosting providers who use
FreeBSD and would greatly benefit from such a feature would be willing
to fund it.


--
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest and most stable server OS on the planet
 - Available for IA32, IA64, PC98, Alpha, and UltraSPARC architectures
 - x86-64, PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org

No trees were harmed in the composition of this message, although some
electrons were mildly inconvenienced.

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


Re: Apache not killing subprocesses, only on FreeBSD

2002-11-25 Thread Chris Dillon
On Sun, 24 Nov 2002, Lee Nelson wrote:

   myprogram.pl reads a few parameters from STDIN, and then
 forks to work in the background:

 my $pid = fork;
 exit if $pid;
 die ($pn couldn't fork $!\n) unless defined $pid;
 POSIX::setsid()
   or die ($pn can't start a new session: $!\n);

   Any clues or suggestions welcome.

The following method to daemonize a PERL process works for me in
FreeBSD (I don't remember why I fork  exit twice, so don't ask):

require 'sys/syscall.ph';

fork  exit;
syscall(SYS_setsid) || die Can't call setsid(): $!;
chdir(/);
open(STDIN, /dev/null) || die Can't redirect stdin: $!;
open(STDOUT, /dev/null) || die Can't redirect stdout: $!;
open(STDERR, /dev/null) || die Can't redirect stderr: $!;
fork  exit;


--
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest and most stable server OS on the planet
 - Available for IA32 (Intel x86) and Alpha architectures
 - IA64, PowerPC, UltraSPARC, ARM, and S/390 under development
 - http://www.freebsd.org

No trees were harmed in the composition of this message, although some
electrons were mildly inconvenienced.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Is there such a thing like a TCP proxy|relay?

2002-11-22 Thread Chris Dillon
On Thu, 21 Nov 2002, Carlos Carnero wrote:

 ok, this is another wacky question. I have connected two subnetworks
 to my FreeBSD router to the internet. By design they shouln't be
 able to communicate between them--which I have done with IP Filter.

 What I'd like to do now is to make a TCP proxy/relay on my
 firewall/router. For instance, opening port 3389 on the firewall
 (from the inside, machine A) would open port 3389 of machine B that
 sits on the other network.

 Is there a port that can handle that?

Yes.  ports/net/bsdproxy.  I like it because it uses kqueue()/kevent()
to do its thing rather than poll()/select().

--
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest and most stable server OS on the planet
 - Available for IA32 (Intel x86) and Alpha architectures
 - IA64, PowerPC, UltraSPARC, ARM, and S/390 under development
 - http://www.freebsd.org

No trees were harmed in the composition of this message, although some
electrons were mildly inconvenienced.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Boot stuck at F1 after swapping drives

2002-11-21 Thread Chris Dillon
On Wed, 20 Nov 2002, Andrew Y Ng wrote:

 Hi all, I shutdown FreeBSD and changed my harddrive and booted up
 Win2K this morning (needed Windoze for something real quick). I put
 the FreeBSD harddrive back and it wouldn't boot, it got stuck at the
 F1 boot0 prompt.  Like it couldn't find the MBR or something. How do
 I get it to boot again?

 This is weird. Maybe I didn't shut it down correctly this morning.

I encountered the same kind of weirdness when I was trying to build a
FreeBSD-based firewall for somebody and un-plugged my normal drive(s)
which have Windows XP and FreeBSD installed on them and then proceeded
to do a fresh FreeBSD 4.7 installation on a new lone disk.  Once
finished, it wouldn't boot.  I would get Operating system missing
with the standard boot sector installed, and with the boot manager
installed, it would hang after F1.  Using the install CD boot-loader,
I could unload the CD kernel and load /kernel off of the newly
installed drive and start to boot it, but it would hang immediately
after issuing 'boot'.  So, I try a completely different hard drive (a
little bigger and newer, but only a 10GB drive), do a 4.7 installation
on it, and it worked.  Then I re-installed on the same drive, and it
DIDN'T work.  Nothing changed in the BIOS or hardware, just a
re-install.  I tried re-installing over and over again with different
boot options and different ways of partitioning it.  I tried with both
4.6 and 4.7 releases, thinking maybe there was some kind of bootloader
breakage in 4.7.  No go.

What type of IDE controller are you using?  I was using a Promise 133
TX2 add-on card.  I tried the on-board ATA33 (PIIX4) controller on my
system, and encountered the same problem, though I never actually
completely removed the add-on card.  It is possible the Promise BIOS
was causing problems even though it claimed it didn't load since I
didn't have any devices attached to the card.  I racked my brain with
that problem for hours and finally gave up.  Luckily when I plugged my
regular drives back in XP and FreeBSD booted up just fine on those.

One thing I probably should have tried was to dd a bunch of zeroes
over the first few MB of the drive so that I'd be starting with a
fresh drive before installation.

--
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest and most stable server OS on the planet
 - Available for IA32 (Intel x86) and Alpha architectures
 - IA64, PowerPC, UltraSPARC, ARM, and S/390 under development
 - http://www.freebsd.org

No trees were harmed in the composition of this message, although some
electrons were mildly inconvenienced.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message