Re: kqueue and filenames

2012-01-23 Thread Pieter de Goeje

On 23-1-2012 11:52, Info wrote:
I'm using kqueue for detecting file-events; for additional information 
I add a struct to udata, when registering an event with kevent.
When I delete an event, will be udata deleted too, or do I have to 
manage the memory for the structs with an own implementation?

It is up to you to free udata.

kevent is triggered when a file is renamed. How do I get the new name?
Is there an extra function? In the moment, I see only the possibility 
by searching the filesystem(folder) for a new name.
A good question to which I unfortunately do not have the answer to. I 
think in principle it is impossible to get the file name by file 
descriptor alone (it could have multiple names). In practice I would 
just treat NOTE_RENAME as a sequence of unlink/link. I believe tools 
like lsof use the system name cache to map fds to names, but that is not 
very reliable.


If you need more help with kqueue you might try the hackers@ mailing 
list, more technical people read that list.


Regards,
Pieter de Goeje

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


Re: postgresql-libpqxx

2011-08-17 Thread Pieter de Goeje
On Wednesday, August 10, 2011 09:03:19 PM Bruce Meier wrote:
 I have installed postgresql-libpqxx and included it in a test program
 and get the following error:
 main.cpp:1:21: error: pqxx/pqxx: No such file or directory.

Hi,

Did you add -I/usr/local/include to the compiler flags of the test program?
All ports install their headers there.

Regards,
Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How to sync a file on FreeBSD?

2011-07-22 Thread Pieter de Goeje
On Friday, July 22, 2011 08:44:00 AM Unga wrote:
 How to sync a file on FreeBSD (esp. on 8.1) to disk?
 
 I used fsync(2), but does not immediately flush to disk.
 
 I want my writing to a file (a log file) immediately available to other
 users to read.

A file doesn't need to be synced to disk for other users to read the latest 
data. The application just needs to call write(2) and the data is available. 
It will be written to and read from the operating system's file cache. If 
you're using stdio you can force a write(2) by calling fflush(3).

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Critical issues with WD green drives

2011-06-06 Thread Pieter de Goeje
On Thursday 02 June 2011 16:54:52 Bruce Cran wrote:
 On Thu, 02 Jun 2011 14:16:01 +0200
 
 Andrea Venturoli m...@netfence.it wrote:
  In a server of mine (7.3p4/i386) I replaced a 1TB Hitachi SATA drive
  (which worked perfectly), with two brand new Western Digital 2TB
  disks. Now I'm having critical problems, ranging from the disks
  getting stuck, to the box rebooting.
  Those are not the main disks in the box, so they are currently
  unmounted; I wasn't even able to run newfs on them, since every
  process that tries to use these disk will hang after a while (and
  can't be killed either).
 
 I'd guess this is probably due to their overly-aggressive power
 management. If you can, run wdidle3.exe from a Windows environment to
 turn off the default idle timer.

This is very important, because I've had 2 drives die (most likely) because 
they had over 220K load cycles. One was less than a year old.

You don't mention the exact models but there's a good chance these are the 
Advanced Format drives, in other words 4K sectors. If your filesystem(s) or 
partition(s) are not properly aligned that also severely hampers performance 
to the point it looks like a hang.

All in all I wouldn't recommend these drives for use in a server. The WD's 
Blue and Black series are OK though.

Your machine shouldn't reboot however, that points to another problem.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: File Listing

2011-01-11 Thread Pieter de Goeje
On Monday 10 January 2011 21:43:42 pe...@vfemail.net wrote:
 Is there one single-line command I can execute that will list every file in
 every directory on my FreeBSD box?  I've been fussing with the ls and du
 commands, but the output is never quite complete.

find /

Cheers, 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: do i need a dedicated ip address for https?

2010-12-22 Thread Pieter de Goeje
On Wednesday 22 December 2010 07:53:11 S Mathias wrote:
 is it an inescapable requirement to have a dedicated [not fix] ip address,
 when i want to use ssl on my domain?

It's only necessary if you want to use name based virtual hosts with a 
different SSL certificate for each virtual host. This is most likely the case 
on a shared hosting provider like godaddy.

The problem is that the clients set up the SSL connection before they send the 
HTTP request (which contains the name of the virtual host), so the server has 
no way of knowing which certificate it should present to the client.

 happy Christmas! :)
Happy Christmas indeed!

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: virtaullBox AMD64 32bit lib

2010-09-16 Thread Pieter de Goeje
On Wednesday 15 September 2010 15:59:29 Gholam Mostafa Faridi wrote:
 On 09/15/2010 13:00, Edho P Arief wrote:
  sh install.sh
 
 I download all file and go to download directory and run that command ,
 for first time I do not see error and do not see messages , but when I
 run that sh install.sh again I see this error
 
 mfaridipc# sh install.sh
 
 ./usr/lib32/libc.so.7: Could not unlink
 ./usr/lib32/libcrypt.so.5: Could not unlink
 ./usr/lib32/librt.so.1: Could not unlink
 ./usr/lib32/libthr.so.3: Could not unlink
 ./libexec/ld-elf32.so.1: Could not unlink
 tar: Error exit delayed from previous errors.
 
 and problem do not solve

These files have the schg flag set (see chflags(1)). This means the files are 
immutable. Try removing the schg flag first: 

# chflags noschg /usr/lib32/libc.so.7

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: IO fluctuation

2010-08-23 Thread Pieter de Goeje
On Saturday 21 August 2010 19:48:32 Steffen Neubauer wrote:
 I think I can exclude the ZFS implementation too, because I tried dd
 if=/dev/da0 of=/dev/null and executed killall -SIGINFO dd while it was
 copying and it looked like it stalled randomly too.

Not related your problem, but you can press ^T to send SIGINFO to the 
currently running process. Saves some typing :-)

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD, GPGPU and OpenCL/CUDA

2010-08-16 Thread Pieter de Goeje
On Monday 16 August 2010 15:47:13 emor...@xroff.net wrote:
 Ivan Klymenko fi...@ukr.net escribió:
  В Sat, 14 Aug 2010 11:53:10 +0200
  O. Hartmann ohart...@mail.zedat.fu-berlin.de пишет:
  
  I think that OpenCL can be activated in FreeBSD, if you add the
  necessary extensions for clang/llvm ...
  http://clang.llvm.org/docs/LanguageExtensions.html#vectors
 
 Yes, you can compile OpenCL but you can't execute the resulting app.
 
  and a few links on the topic ...
  http://www.khronos.org/message_boards/viewtopic.php?f=36t=2314
  http://llvm.org/Users.html
  
  Am I right?
 
 Yes, but again, freebsd has not nvidia/ati drivers that allows it.
 There were some improvements in 8.0 that allow use the new nvidia
 drivers, but for now there's no opencl/cuda for us.
 
 L

I think it might be worthwhile to contact nVidia directly about this. To raise 
awareness that there are people using FreeBSD for HPC and that they very much 
would like to see OpenCL/CUDA supported.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD, GPGPU and OpenCL/CUDA

2010-08-16 Thread Pieter de Goeje
On Monday 16 August 2010 16:50:01 Anton Shterenlikht wrote:
 On Mon, Aug 16, 2010 at 05:33:33PM +0300, Ivan Klymenko wrote:
   I think it might be worthwhile to contact nVidia directly about this.
   To raise awareness that there are people using FreeBSD for HPC and
   that they very much would like to see OpenCL/CUDA supported.

 how is this different from getting e.g. native Flash or Matlab on FBSD?
 We've been trying to raise awareness for years..

So did we for the nvidia driver on amd64.

I'm not saying that we will be successful, I'm just saying if they're not even 
aware of this need that it will never happen.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD, GPGPU and OpenCL/CUDA

2010-08-16 Thread Pieter de Goeje
On Monday 16 August 2010 23:00:52 Hartmann, O. wrote:
   On 08/16/10 21:13, Pieter de Goeje wrote:
  On Monday 16 August 2010 16:50:01 Anton Shterenlikht wrote:
  On Mon, Aug 16, 2010 at 05:33:33PM +0300, Ivan Klymenko wrote:
  I think it might be worthwhile to contact nVidia directly about this.
  To raise awareness that there are people using FreeBSD for HPC and
  that they very much would like to see OpenCL/CUDA supported.
 
  how is this different from getting e.g. native Flash or Matlab on FBSD?
  We've been trying to raise awareness for years..
 
  So did we for the nvidia driver on amd64.
 
  I'm not saying that we will be successful, I'm just saying if they're not
  even aware of this need that it will never happen.
 
  - Pieter

 I think they are aware, but the number of users is very, very low. Since
 modern 3D accerlerated and GPGPU capable drivers are developed
 dominantly under Linux, BSDs lack in modern
 architectures like KMS necessary running those modern drivers, so in
 case of the 64Bit video drivers it could be more a lack in the
 underlying technical infrastructure than the low number of users. But I
 do not know.

 Oliver

The amd64 driver was an illustration of something where raising awareness or 
whatever you might call it actually helped IMHO.

Unfortunately this is a chicken-and-egg problem. No HPC users means no demand 
means no incentive to do something about it means no HPC users ad infinitum. 
But I'm sure you're already knew that.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: SoundBlaster Problem with 8.1R

2010-08-09 Thread Pieter de Goeje
On Saturday 07 August 2010 13:30:20 Marwan Sultan wrote:
 Hello list,
 
  A strange sound problem with FreeBSD 8.1R
 
  sound card is : Creative Sound Blaster,  Audigy
 
   When pciconf output is follow
   no...@pci0:5:4:0:   class=0x040100 card=0x100a1102 chip=0x00071102
 rev=0x00 hdr=0x00 vendor = 'Creative Technology LTD.'
   device = 'Device ID same for both, but Subsystem ID = 0x1012 -
 Extreme Audio, 0x100A - Audigy SE 7.1   (C6SB0410515017656A)' class  =
 multimedia
   subclass   = audio
 
   Means recognizing the sound?
   cat /dev/sndstat
   FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
   Installed devices:
   #

No driver attached to your soundcard.

 
   rc.conf
   # Enable sound-support
   snddetect_enable=YES
   mixer_enable=YES
 
 /boot/loader.conf
 snd_emu10kx_load=YES
 sound_load=YES
 snd_uaudio_load=YES
 
 I tried to load all drivers. but same issue.
 its PCBSD system 8.1
 
  Please note sound was working with FreeBSD and PCBSD 7 with no problems.
  uname -a
 FreeBSD pcbsd-2738 8.1-RELEASE FreeBSD 8.1-RELEASE #1:
 
  Any ideas?
 
  Thanks
 -Marwan

There is no support for the Audigy ES in FreeBSD. See man snd_emu10kx. If you 
really need it to work you may try the 4front OSS drivers: 
http://www.opensound.com/
These drivers aren't integrated with FreeBSD as well as the normal sound 
drivers.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Installkernel Failure

2010-08-03 Thread Pieter de Goeje
On Tuesday 03 August 2010 12:33:04 David Allen wrote:
 I recently upgraded a system from 8.0 to 8.1.
 
 I'm now trying to install FreeBSD 8.1 to a second system by performing a
 minimal install, and then NFS mounting /usr/src and /usr/obj from the
 just-upgraded system.
 
 Simple enough, right?  Well, the installkernel target is bombing out with
 an error each time.  If I install from an 8.1 CD, I get 'ncp.ko not
 found'.  If I install from an 8.0 CD, I get the following:
 
   # cd /usr/src
   # make installkernel
   
   == mxge (install)
   === mxge/mxge (install)
   install -o root -g wheel -m 555   if_mxge.ko /boot/kernel
   === mxge/mxge_eth_z8e (install)
   install -o root -g wheel -m 555   mxge_eth_z8e.ko /boot/kernel
   === mxge/mxge_ethp_z8e (install)
   install -o root -g wheel -m 555   mxge_ethp_z8e.ko /boot/kernel
   === mxge/mxge_rss_eth_z8e (install)
   install -o root -g wheel -m 555   mxge_rss_eth_z8e.ko /boot/kernel
   === mxge/mxge_rss_ethp_z8e (install)
   install -o root -g wheel -m 555   mxge_rss_ethp_z8e.ko /boot/kernel
   === my (install)
   install -o root -g wheel -m 555   if_my.ko /boot/kernel
   === ncp (install)
   install -o root -g wheel -m 555   ncp.ko /boot/kernel
   *** Error code 71
 
   Stop in /usr/src/sys/modules/ncp.
   *** Error code 1
 
   Stop in /usr/src/sys/modules.
   *** Error code 1
 
   Stop in /usr/obj/usr/src/sys/NOTGENERIC.
   *** Error code 1
 
   Stop in /usr/src.
   *** Error code 1
 
   Stop in /usr/src.
   (END)
 
 There is no ncp.ko on the successfully upgraded system.

I suspect /etc/make.conf and/or /etc/src.conf are not identical on both 
machines. Probably you have WITHOUT_IPX only set on the build machine.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Unabel to download Java Patch from http://www.eyesbeyond.com/

2010-07-21 Thread Pieter de Goeje
On Wednesday 21 July 2010 10:37:54 Martin Schweizer wrote:
 Since some days I tried to download the latest Java patch from
 http://www.eyesbeyond.com/. But the site is not reachable. I tried it from
 a europe and from us server but no luck. Do you have any ideas?

I can recommend installing openjdk16 instead of jdk16. It is a much more 
recent version of Java.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Headphone output doesn't work with NVidia MCP78 High Definition Audio Controller

2010-07-12 Thread Pieter de Goeje
On Sunday 11 July 2010 15:14:30 001 wrote:
 I use a laptop with PC-BSD and couldn't get output over the headphone.
 The built-in speakers of the laptop work fine and keep working even
 when a headphone is plugged in (whereas on Windows they get muted). I
 tried every slider and switch in KMix, but nothing enables sound over
 the headphone.
 
 This is my dmesg output:
 pcm0: HDA Conexant CX20561 (Hermosa) PCM #0 Analog at cad 0 nid 1 on
 hdac0
 pcm1: HDA Conexant CX20561 (Hermosa) PCM #1 Analog at cad 0 nid 1 on
 hdac0
 pcm2: HDA NVidia MCP78 HDMI PCM #0 Digital at cad 3 nid 1 on hdac0

By default FreeBSD plays audio on the first pcm device. You can use a 
different device by setting the sysctl hw.snd.default_unit. If I wanted to 
play audio on pcm1 I could set sysctl hw.snd.default_unit=1. In your case I 
would try setting: hw.snd.default_unit=1

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sparse image

2010-06-23 Thread Pieter de Goeje
On Wednesday 23 June 2010 12:54:48 Vincent Hoffman wrote:
 On 23/06/2010 11:26, Aiza wrote:
  Is there an equivalent of the MAC sparseimage on FreeBSD?
 
 If you mean you would like to make a sparse file and attach it using
 mdconfg then
 dd if=/dev/zero of=/path/to/outfile bs=1M seek=1024 count=0
 This will give you a sparse file that reports a gig in size, but only
 uses whats actually in use.

Note that truncate -s 1G file will do the same with IMHO easier syntax.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: why does ps |grep sometimes not return itself?

2010-06-09 Thread Pieter de Goeje
On Wednesday 09 June 2010 09:34:40 Matthew Seaman wrote:
 On 09/06/2010 08:15:23, Eitan Adler wrote:
  Why do I sometimes see the grep in ps's output and sometimes not see it?
  [ei...@alphabeta ~ ]% ps aux|grep Me
  eitan 96325  0.0  0.0  1856   724   5  RL+  10:14AM   0:00.00 grep Me
  [ei...@alphabeta ~ ]% ps aux|grep Me
  [ei...@alphabeta ~ !1! ]%

 When you run that pipeline the OS doesn't start both programs exactly
 simultaneously. It starts ps(1) first, then grep(1) together with
 creating the pipeline by connecting ps's stdout to grep's stdin.
 Depending on system load and various other factors, this may allow ps(1)
 to grab the snapshot of the process table that it works on before
 grep(1) has started.  It's a race condition.

 Whether you see this effect or not will depend very much on system
 conformation and load.  I can't reproduce the effect on a lightly loaded
 dual processor machine, which always shows the grep process, whereas on
 a single processor virtual machine running under VirtualBox, I never see
 grep in the ps output unless I renice the ps(1) process.


I would like to add that you can avoid the issue entirely by using this 
command:
% ps aux -p `pgrep sh`
USERPID %CPU %MEM   VSZ   RSS  TT  STAT STARTED  TIME COMMAND
root   1326  0.0  0.1  6680  3664  ??  Is1:09AM   0:00.00 /usr/sbin/sshd
pyotr  1460  0.0  0.1  3972  2696  v0  I 1:09AM   0:00.02 -zsh (zsh)

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Continuing problem with NVIDIA Driver

2010-06-06 Thread Pieter de Goeje
On Sunday 06 June 2010 17:12:46 Jerry wrote:
 FreeBSD-8.0 STABLE / amd64

 After updating (gettext) the NVIDIA driver no longer worked in Xorg, nor
 was it being loaded at boot-up even thought it was in
 the /boot/loader.conf file and had worked correctly priviously. I am
 also unable to load it manually.

 kldload nvidia

 KLD nvidia.ko: depends on kernel - not available or version mismatch
 linker_load_file: Unsupported file type
 kldload: can't load nvidia: Exec format error

 kldstat

 Id Refs AddressSize Name
  1   12 0x8010 ddd800   kernel
  21 0x81022000 399f linprocfs.ko
  31 0x81026000 1c4e8linux.ko

 kldstat -v doesn't reveal anything interesting either.

 I have removed and reinstalled the NVIDIA driver
 (nvidia-driver-195.36.15) twice without any success.

 This only started after updating 'gettext'. Everything else appears to
 be working correctly.

Are your kernel sources in sync with the kernel you're running? Did you 
rebuild the driver? (i.e. make deinstall clean  make reinstall clean)
You need to have the exact version of the sources you used to build the 
kernel.

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 8.0 linux emulator kernel panic

2010-06-06 Thread Pieter de Goeje
On Sunday 06 June 2010 19:31:00 Bogdan Webb wrote:
 I'm having issues with the Fedora Core6 linux emulator on FreeBSD 8.0 it
 panics when i run HLDS, the same issue was addressed by Daniel Ballenger in
 http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/054646.html
but i did not get the fix. Giovanni Trematerra gave a response that it was
 fix in a r200768 now it is clear that i do not know that that code means
 (in my eyes it's a bsd build or smth) but i'm currently running the latest
 8.0-RELEASE-p3 available. Please advise on how to patch the kernel panic.

r200768 uniquely identifies a single change to the FreeBSD source code. In 
this case it identifies a bugfix to linux_signal.c.

You need to run 8-STABLE (currently it will show up as 8.1-PRERELEASE) to get 
the fix. I know it works because I also run multiple HLDS processes on 
FreeBSD.

To get 8-STABLE: cvsup/csup the sources to RELENG_8, then follow these 
instructions to upgrade:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html

Good luck!

--
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: What have I done?

2010-05-24 Thread Pieter de Goeje
On Monday 24 May 2010 22:02:44 Chip Camden wrote:
 On May 24 2010 12:21, William Vining wrote:
  I experienced a similar situation under different circumstances. It
  turned out that the sysctl
  variable hw.snd.default_unit was refering to the wrong sound card. Not
  sure if thats the
  problem, but it might be worth checking if you have multiple sound cards.
 
  -- WFV
  wfvin...@gmail.com
 
  On Mon, May 24, 2010 at 12:08 PM, Chip Camden
 
  sterl...@camdensoftware.com wrote:
   This question is going to make me sound pretty stupid, but I haven't
   been able to figure it out.
  
   I had mplayer (the console version) running in one urxvt, and I thought
   I had a different urxvt focused when I typed a command (I think it was
   'make install clean') -- but mplayer was actually focused instead.  The
   ENTER caused mplayer to close (I was listening to a stream URL), and
   because I had exec'd mplayer its terminal window closed as well.
  
   I cursed myself for losing focus on my focus, and attempted to restart
   mplayer.  It acts like it is playing the track, but no sound.  I've
   tried unmute, turning the volume all the way up, deleting my .mplayer
   files, still no joy.  I even shutdown and powered off and then
   rebooted.  Any other suggestions?
   --

 OK, there's more going on here than I realized.  My sound seems to be
 disabled if I load the driver in /boot/loader.conf, but works OK if I use
 kldload after booting instead.  Bizarre.  I've repeated the experiment
 several times with the same results, using either snd_driver or snd_hda.

 cat /dev/sndstat (when working):

 FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
 Installed devices:
 pcm0: HDA IDT 92HD81B1X PCM #0 Analog (play/rec) default
 pcm1: HDA IDT 92HD81B1X PCM #1 Analog (rec)
 pcm2: HDA Intel G45 HDMI PCM #0 DisplayPort (play)

The order of the the devices may change depending on wether you kldload the 
driver or use loader.conf. As suggested by William Vining, use the sysctl 
hw.snd.default_unit to select the correct default pcm device.

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: geom, glabel, and related terminology

2010-04-27 Thread Pieter de Goeje
On Tuesday 27 April 2010 13:49:02 Eitan Adler wrote:
 I'm a little bit confused about some of the file system terminology.
 
 What exactly is a GEOM label?  
A geom label is a name (hence label) for a GEOM provider. This label is 
interpreted/read by glabel(8). The source of the label can be the volume label 
or id of a filesystem, or a custom label created by glabel(8).

 What does it mean to have one or for
 one to be stopped?

The underlying provider was mounted which causes the label to disappear 
(become unavailable). For example if we have a filesystem labeled data on 
/dev/ad1p7 it shows up as /dev/label/data in addition to /dev/ad1p7. When the 
user mounts /dev/ad1p7 the label disappears.

 What is a GEOM provider?

A GEOM provider is a piece of software/hardware which implements the common 
GEOM provider interface: it manifests itself as a device which supports 
read/write operations and a number of other common operations and transforms. 
Because all GEOM providers implement the same interface, a file system for 
example only needs to support the GEOM interface to support all storage 
hardware supported by FreeBSD. Because some providers are also consumers, GEOM 
classes can be stacked together to create advanced storage architectures. For 
example, two disks, both GEOM providers, can be consumed by a mirror GEOM 
class (gmirror(8)), which itself is just another provider which can be 
consumed by a filesystem or another GEOM consumer .

 What is the difference between a bsd label and a geom label?
Bsdlabel is the name of FreeBSD's old school partitioning system and tool 
(superseeded by gpart(8)). It is a layer above DOS partitions (slices in 
FreeBSD lingo).  bsdlabel(8) supports 8 partitions per slice. A geom label is 
just another name for the underlying GEOM provider.

 
 If you could provide a high level overview the terminology it would
 help me immensely.

I hope this helps,

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 8 / amd64 / Xorg / nvidia GeForce 5200

2010-03-25 Thread Pieter de Goeje
On Thursday 25 March 2010 04:14:09 Tim Gustafson wrote:
 1. Is there any way to get the nvidia-driver-173 port to work with my amd64
  OS?
I'm afraid it's not possible.

 2. Is there any way to get the second head of the 5200 video card to work
  using the nv driver?  I tried adding a second device section to xorg.conf
  but the system errors out telling me that it tried to use conflicting
  hardware.  I've attached both my xorg.conf and my Xorg.0.log file to this
  message.

Did you try xrandr?  It should report multiple heads (run the command without 
arguments). You can then enable the second monitor using something like:
xrandr --output DVI1 --auto

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: API to find the memory usage of a process.

2010-03-20 Thread Pieter de Goeje
On Thursday 18 March 2010 18:28:48 Jayadev Kumar wrote:
 Hi,

 I  need to find the memory usage of a process, from inside the process.
 Is there any system call
 do this ? I was trying to find it from 'top' utility source code. I
 couldn't find the port which it is coming
 from yet.

 Thanks,
 Jayadev.

Check out getrusage(2).

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Still unable to update kdelibs3

2010-03-17 Thread Pieter de Goeje
On Saturday 13 March 2010 16:31:38 Carmel wrote:
 I have tried everything in the UPDATING file; however, I am still
 unable to get 'kdelibs3' updated. It always ends with this error
 message:
 
 Making all in dnssd
 gmake[2]: Entering directory
  `/usr/ports/x11/kdelibs3/work/kdelibs-3.5.10/dnssd'
  ../kdecore/kconfig_compiler/kconfig_compiler ./kcm_kdnssd.kcfg
  ./settings.kcfgc; ret=$?; \ if test $ret != 0; then rm -f settings.h ;
  exit $ret ;  fi
 /libexec/ld-elf.so.1: Shared object libjpeg.so.10 not found, required by
  libkdefx.so.6 gmake[2]: *** [settings.h] Error 1
 gmake[2]: Leaving directory
  `/usr/ports/x11/kdelibs3/work/kdelibs-3.5.10/dnssd' gmake[1]: ***
  [all-recursive] Error 1
 gmake[1]: Leaving directory `/usr/ports/x11/kdelibs3/work/kdelibs-3.5.10'
 gmake: *** [all] Error 2
 *** Error code 1
 
 Other than deleting everything and starting over, I have no idea how to
 proceed.

The error says that it cannot find libjpeg.so.10. libjpeg.so.11 is provided by 
graphics/jpeg. I would try reinstalling graphics/jpeg, then try reinstalling 
kdelibs.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gvinum RAID1+0

2010-02-23 Thread Pieter de Goeje
On Tuesday 23 February 2010 23:11:37 Andrew Klaassen wrote:
 From the lack of response, am I correct to conclude that Gvinum can't do
  RAID1+0 (as opposed to RAID0+1)?

I'll bite.

Is there a particular reason why you want to use gvinum instead of a 
combination of gmirror and gstripe?

I don't have any experience with vinum and can only come to the same 
conclusion as you have after reading the docs. It seems vinum does mirrored 
stripes by design.

- Pieter


 Thanks.

 Andrew

 --- On Mon, 2/22/10, Andrew Klaassen claws...@yahoo.com wrote:
  Hi.
 
  Newbie question:  I'm trying to figure out how to
  create a stripe-over-mirrors, aka RAID1+0, with
  Gvinum.  The manual gives an example for a
  mirror-over-stripes, aka RAID0+1, but I can't for the life
  of me figure out from that example or others I've feebly
  Googled how to do a RAID1+0.  I'm using 112 drives, so
  I'd much rather have RAID1+0 than RAID0+1.
 
  Does anyone have an example kicking around they could
  kindly send me?
 
  Thanks.
 
  Andrew
 
 
 
 
       
  __
  Ask a question on any topic and get answers from real
  people. Go to Yahoo! Answers and share what you know at
  http://ca.answers.yahoo.com
 
  ___
  freebsd-questions@freebsd.org
  mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to
  freebsd-questions-unsubscr...@freebsd.org

   __
 Be smarter than spam. See how smart SpamGuard is at giving junk email the
 boot with the All-new Yahoo! Mail.  Click on Options in Mail and switch to
 New Mail today or register for free at http://mail.yahoo.ca

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


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


Re: unabe to install linux compatibility on freebsd 8.0-R

2010-02-20 Thread Pieter de Goeje
On Sunday 21 February 2010 00:54:54 John wrote:
 Hello list,

 I'm following the instructions at
 http://www.freebsd.org/doc/handbook/linuxemu-lbc-install.html

 I tried to kldload the module:

 # kldload linux
 kldload: can't load /boot/kernel/linux.ko: Exec format error

 # kldstat
 Id Refs AddressSize Name
  1   22 0x8010 846698   kernel
  21 0x80947000 74a8 geom_concat.ko
  31 0x8094f000 8308 ng_ubt.ko
  43 0x80958000 154a0netgraph.ko
  52 0x8096e000 12ff8ng_hci.ko
  62 0x80981000 2d40 ng_bluetooth.ko
  71 0x80a22000 a24  pflog.ko
  81 0x80a23000 2bd2dpf.ko
  91 0x80a4f000 a8ca fuse.ko
  101 0x80a5a000 7d6  accf_http.ko
  111 0x80a5b000 1ce  accf_data.ko

 If I try to install the linux port:

 # cd /usr/ports/emulators/linux_base-f10
 # make
 ===  linux_base-f10-10_2 linuxulator is not (kld)loaded.
 *** Error code 1

 Stop in /usr/ports/emulators/linux_base-f10.

 Finally, if I try to install compatibility in the kernel, I get the error
 unknown option COMPAT_LINUX
 at the config phase.

 Can anyone help me please?

 # uname -p -r
 8.0-RELEASE-p2 amd64
 The system was built today.

Somehow your linux.ko is broken, do you perhaps have WITHOUT_LINUX= 
in /etc/src.conf or /etc/make.conf? 
Check the last modification date of /boot/kernel/linux.ko, does it correspond 
(roughly) to the one from /boot/kernel/kernel?

About the kernel option, try COMPAT_LINUX32. It's a documentation bug.

--
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD's UFS vs Ext4

2010-02-08 Thread Pieter de Goeje
On Monday 08 February 2010 05:46:07 alex wrote:
 Pieter de Goeje wrote:
  The fact that the limit is 86MB/sec (which is very low for a raid0 array)
  makes me think the box suffers from sub optimal network performance
  during a simple stream test like yours. This could be due to FreeBSD
  having a poor network driver for your particular NIC or could be due to
  insufficient tuning of the TCP parameters for this particular test.
 
 Hi Pieter.
 
 You are right about there being a number of possibilities, however:
 
 *The same machine, which over the years has had a number of revisions of
 freebsd on it (have buildworlded the thing from 7- 7.1 - 7.2 - 8),
 the performance was always roughly the same amongst the versions, I dont
 agree with the possibility of the ftp server being 'slow' as I am the
 only person who copies data to that machine, and the machine is always
 under a very low (almost non existent) load.
That's no reason to rule out inefficient design in the FTP server. I could 
write 
a program that sends 1b/sec over the network which serves one user and uses no 
cpu.
 
 * Network card is an Intel Pro 1000, on the server. This is a PCI card
 (not pci-e), so I believe PCI bus bandwidth limitations may be
 responsible for me not being able to achieve the maximum 100MB/s network
 rate (as you mention that 86MB/s is slow for raid0)
 
 * The intel network card driver on freebsd and linux are both fairly
 rock solid and well written. I dont see it being an issue with NIC
 drivers (they are not vastly different).
Solid does not mean high performance. For example, to get maximum performance 
out of my em nics I have to increase the number of tx and rx descriptors from 
256 (default on FreeBSD) to 4096.
 
 * Both OS's were stock standard installs, no jumbo frames enabled, no
 fiddling with sysctl network values.
So you haven't tried to improve the performance. Nor have you tried to find out 
why performance is sub optimal.
 
 I am happy with 86MB/s anyway, It's a huge improvement of the 60MB/s
 barrier I could never get past when that machine was running FreeBSD. 
 To get the rest of the speed, I'd probably have to install a pci-e card on
 the server.
 
 I do suspect personally that the ext4 filesystem is the reason for the
 difference here, since ext4 has a number of features such as deferred
 disk writes etc. 
Ok, what did you actually test? File upload? Download? How big was the 
testfile? Was the file in cache?.

 Even deleting a large file off that raid array I can
 see a difference, prior to reformatting, i deleted a 190GB file off the
 raid, under UFS the delete took quite some time (well over 10 seconds),
 under ext4 the deletion of the same size file took about 3 seconds.
File deletion speed is relevant how? 
 
 But what I said with ext4 being faster then the aging UFS still rings
 true in my mind, look at the recent Phoronix benchmarks for yourself and
 see (10 pages of benchmarks).
 
 http://www.phoronix.com/scan.php?page=articleitem=freebsd8_benchmarksnum=
 1 (skip to page 7 of the benchmarks if you want to see the I/O stuff
  relating to disk performance)
The phoronix disk benchmarks are of little value in this case. I'll be happy 
to explain why if you're interested.

Further discussion is useless unless you go back and redo the tests, this time 
trying to isolate the cause instead of making baseless assumptions about the 
performance of various FreeBSD subsystems.

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD's UFS vs Ext4

2010-02-08 Thread Pieter de Goeje
On Monday 08 February 2010 21:19:01 Mihai Donțu wrote:
 On Monday 08 February 2010 12:54:26 Pieter de Goeje wrote:
   Even deleting a large file off that raid array I can
   see a difference, prior to reformatting, i deleted a 190GB file off the
   raid, under UFS the delete took quite some time (well over 10 seconds),
   under ext4 the deletion of the same size file took about 3 seconds.
 
  File deletion speed is relevant how?

 It can be, depending on the workload. I (as a Linux user) moved from ext3
 to xfs, ignoring the warnings about file deletion [being slow]. Now I _kind
 of_ regret it. Seems I have more than one program on my laptop that deletes
 files (kmail's email-expiration thing comes to mind). I also work on a
 project that creates large log files an deletes them (periodically). When
 all these programs meet, I go for a coffee. :)

I agree that file deletion speed can be important in normal usage scenarios. 
However my question was asked in the context of an FTP up or download, which 
does not involve deleting files. :-)

--
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD's UFS vs Ext4

2010-02-07 Thread Pieter de Goeje
On Sunday 07 February 2010 15:41:29 alex wrote:
 Hi Guys,

 Today I reformatted a machine (network server) thats run FreeBSD nonstop
 for at least the last 3 years and installed linux on it. I have a raid 0
 setup with 2 hard disks in the very same machine.

 Previously, the maximum I could get across my gigabit enabled network
 was 60MB/s (megabytes) per second sustained transfer rate.

 Now that the same machine's raid is formatted with ext4, i am easily
 sustaining 86MB/s.

Too many variables. The difference in performance could be due to:
1) Slow filesystem.
2) Slow network (nic).
3) Slow FTP server.

The fact that the limit is 86MB/sec (which is very low for a raid0 array) 
makes me think the box suffers from sub optimal network performance during a 
simple stream test like yours. This could be due to FreeBSD having a poor 
network driver for your particular NIC or could be due to insufficient tuning 
of the TCP parameters for this particular test.

You haven't given any details about the hardware, network tuning done, how you 
configured the filesystem, raw filesystem performance, raw network 
performance. If you want a meaningful response based on more than guesswork, 
please gather more data. 

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: What is easiest way to build a BSD 8 binary on a BSD 7 box?

2010-02-07 Thread Pieter de Goeje
On Monday 08 February 2010 01:51:37 Peter Steele wrote:
 The easiest way would probably be the following.
 
 # SOMEDIR=/path/to/fbsd8buildenv
 # mkdir -p ${SOMEDIR}
 # cd /path/to/FreeBSD-8.0/src
 # make buildworld
 # make installworld DESTDIR=${SOMEDIR}
 
 Then adding --sysroot=${SOMEDIR} to all invocations of gcc/ld and/or
  liberal use of -I and -L gcc options should do the trick.
 
 For example:
 # export CFLAGS=-I${SOMEDIR}/usr/include -L${SOMEDIR}/lib
  -L${SOMEDIR}/usr/lib # make

 I've done this and it's clearly working, at least in the sense I can tell
 the libraries are coming from my BSD 8 repository. My makefile is
 generating gcc commands that look like this:

 gcc -m64 -DHAVE_INT64_T --sysroot=/usr/local/buildrepo/bsd/v8/obj
 -L/usr/local/buildrepo/bsd/v8/obj/usr/lib ...

 I know it's working because if I rename the directory pointed to by sysroot
 the link fails. My tool is still failing though in exactly the same way in
 a call to kvm_read. The same call works fine when the tool is built on a
 BSD 8 box. Is there anything else I need to do to make sure the BSD 7 built
 binary is a fully complaint BSD 8 binary?

You could check that the tool is actually linked to the correct libraries with 
ldd(1). If all else fails, you could try building a full FreeBSD 8 jail or 
chroot. However running FBSD 8 userland on a 7 kernel is unsupported so I 
have no idea if that will actually work well enough to build software...

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: What is easiest way to build a BSD 8 binary on a BSD 7 box?

2010-02-06 Thread Pieter de Goeje
On Saturday 06 February 2010 20:22:13 Peter Steele wrote:
 I have a BSD 7 system with the full BSD 8 sources loaded on it, and we use
 this box to build our custom BSD 8 kernel and tools. We do not install the
 custom code on the BSD 7 box but simply collect the artifacts as a basis
 for our custom BSD 8 image. I have a standalone tool that has previously
 been built on this same BSD 7 system, but it just uses gcc and links
 against the normal BSD 7 libraries that are located on this box.

 When we run this tool on a BSD 7 box it works fine. However, we've
 discovered one function it performs doesn't work properly. It uses kvm_read
 to collect network statistics and apparently applications that use this
 function have to be linked against the libraries of the actual target OS.
 One easy solution of course is to build our tool on a BSD 8 box, and in the
 long run we'll likely go that route as we move away from BSD 7. Right now
 though our build server is BSD 7 and we need to build this tool against BSD
 8 libraries. This obviously can be done since make world does exactly
 that-it builds everything against 8.0 objects even if the build is done on
 a BSD 7 box.

 Without dissecting the magic going on in make world, can any explain how
 I could do the same thing with my standalone tool? Specifically, build it
 on a BSD 7 box but link it against BSD 8 libraries.

The easiest way would probably be the following.

# SOMEDIR=/path/to/fbsd8buildenv
# mkdir -p ${SOMEDIR}
# cd /path/to/FreeBSD-8.0/src
# make buildworld
# make installworld DESTDIR=${SOMEDIR}

Then adding --sysroot=${SOMEDIR} to all invocations of gcc/ld and/or liberal use
of -I and -L gcc options should do the trick.

For example:
# export CFLAGS=-I${SOMEDIR}/usr/include -L${SOMEDIR}/lib -L${SOMEDIR}/usr/lib
# make

Regards,

Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Howto run privileged commands on login/logout

2010-02-06 Thread Pieter de Goeje
On Sunday 07 February 2010 01:55:02 Erik Norgaard wrote:
 I'm playing around with diskless operation. I'd like to be able to run
 privileged commands when a user logins or logs out:

 - on login, nfs mount the user's home directory (ok, not critical, I can
 mount /home)

This can be done using amd(8). Check out the example section in amd.conf(5).

 - on logout a system reboot to clean up any temporary files left from
 the session.

Not sure why you would want to reboot the entire system but simply 
doing chmod +s /sbin/shutdown should give all users access to the 
shutdown(8) command.


 Is this possible, without messing arround with sudo or adding users to
 wheel or operator groups?

--
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: can't make an 'a' slice except with auto-defaults

2010-02-03 Thread Pieter de Goeje
On Wednesday 03 February 2010 03:59:15 Steve Franks wrote:
 On a running system.  I mean, I know I should quit being a %^# and
 read the manpage for bsdlabel, but sysintall really does have a nice
 tui. 

sade(8) is the standalone version of sysinstall's partitioning subroutine. 
Also, if you're running a reasonably recent version of FreeBSD, you might want 
to take a look at gpart(8) which can do slicing and labeling (and a whole 
bunch of other disk partitioning related stuff).

Regards,

Pieter

 'C'reate slice goes straight to 'd', even on a 'fresh' disk.
 I see in the handbook, this is alluded to, but some intermediate level
 between begginer and expert (bsdlabel just strikes me as way too easy
 to trash the disk I'm running off of while trying to make a backup),
 would be nice...512M just won't fit the kernel+symbols.
 
 fuming, reading man bsdlabel ;) 
 
 Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Is there a driver for memory sticks?

2010-01-29 Thread Pieter de Goeje
On Friday 29 January 2010 23:14:06 Steven Friedrich wrote:
 I'd like to access the digital media slots on my laptop.

 Specifically, I want to read Sony Memory Sticks.

 pciconf -lv shows the devices:

 no...@pci0:11:0:3:class=0x018000 card=0x3082103c chip=0x8033104c rev=0x00
 hdr=0x00
 vendor = 'Texas Instruments (TI)'
 device = 'PCIxx11/21 Integrated FlashMedia Controller'
 class  = mass storage
 no...@pci0:11:0:4:class=0x080500 card=0x3082103c chip=0x8034104c rev=0x00
 hdr=0x00
 vendor = 'Texas Instruments (TI)'
 device = 'SDA Standard Compliant SD Host Controller (10981734)'
 class  = base peripheral
 subclass   = SD host controller

Probably supported by sdhci(4).



 Also, is there one for high definition audio?

 no...@pci0:0:30:3:class=0x070300 card=0x3082103c chip=0x266d8086 rev=0x03
 hdr=0x00
 vendor = 'Intel Corporation'
 device = 'Intel 82801GB ICH7 - High Definition Audio Controller
 [A-1] (82801I)'
 class  = simple comms
 subclass   = generic modem

 I guess this is my built in modem, but could it also be used as a sound
 device?

Try snd_hda(4).

Good luck!

--
Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Weird build errors only on 3rd core of quad core CPU

2010-01-27 Thread Pieter de Goeje
I am suspecting a broken CPU, but am not sure.

These commands:
cd /usr/ports/sysutils/hal
cpuset -c -l 2 make

Will always result in errors, for example this one:

gmake: *** No rule to make target `...@maintainer_mode_true@', needed by 
`config.h.in'.  Stop.
*** Error code 1

Sometimes the error occurs in a different place. When I check the input files, 
they are indeed broken. Gcc stops because of syntax errors for example.

The configure process always completes, but apparently it creates broken 
files. When I run make on any other core, it always completes successfully:
cpuset -c -l 0,1,3 make

I've checked with script that the output of the build process is exactly the 
same, up until the error occurs. I've also tried to run cpuburn on that core, 
but it didn't find any problem. It's really weird that system is otherwise 
very stable.

What do you guys think the problem is?

CPU is AMD Athlon II X4 620. Running FreeBSD 8-STABLE/amd64. I've also 
tried -CURRENT, but it didn't help.

Thanks!

--
Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Weird build errors only on 3rd core of quad core CPU

2010-01-27 Thread Pieter de Goeje
On Thursday 28 January 2010 01:54:01 Erich Dollansky wrote:
 Hi,

 On 28 January 2010 am 06:54:13 Pieter de Goeje wrote:
  I am suspecting a broken CPU, but am not sure.

 it really looks like.

 Are you sure it is a quad core and not just a triple core?

It definitely identifies itself as a quadcore in dmesg (the text matches what 
it said on the box): AMD Athlon(tm) II X4 620. I don't think the hacks which 
activate the 4th core on a triple core can alter that information.

CPU: AMD Athlon(tm) II X4 620 Processor (2600.02-MHz K8-class CPU)
  Origin = AuthenticAMD  Id = 0x100f52  Stepping = 2
 Features=0x178bfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,
CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT
  Features2=0x802009SSE3,MON,CX16,POPCNT
  AMD Features=0xee500800SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,
3DNow!+,3DNow!
  AMD Features2=0x37ffLAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,
OSVW,IBS,SKINIT,WDT
  TSC: P-state invariant
real memory  = 2147483648 (2048 MB)
avail memory = 1795858432 (1712 MB)
ACPI APIC Table: 120909 APIC1901
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  2
 cpu3 (AP): APIC ID:  3



 As already mentioned, you should check the stepping the software
 tells you but also what is actually written onto the CPU itself.

 Try to get the CPU exchanged and see what happens then.

I suppose that's the only way... hopefully I can convince the shop I bought it 
from that it is broken.


 Erich

  These commands:
  cd /usr/ports/sysutils/hal
  cpuset -c -l 2 make
 
  Will always result in errors, for example this one:
 
  gmake: *** No rule to make target `...@maintainer_mode_true@',
  needed by `config.h.in'.  Stop.
  *** Error code 1
 
  Sometimes the error occurs in a different place. When I check
  the input files, they are indeed broken. Gcc stops because of
  syntax errors for example.
 
  The configure process always completes, but apparently it
  creates broken files. When I run make on any other core, it
  always completes successfully: cpuset -c -l 0,1,3 make
 
  I've checked with script that the output of the build process
  is exactly the same, up until the error occurs. I've also tried
  to run cpuburn on that core, but it didn't find any problem.
  It's really weird that system is otherwise very stable.
 
  What do you guys think the problem is?
 
  CPU is AMD Athlon II X4 620. Running FreeBSD 8-STABLE/amd64.
  I've also tried -CURRENT, but it didn't help.
 
  Thanks!
 
  --
  Pieter
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to
  freebsd-questions-unsubscr...@freebsd.org


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


Re: Unique id of a process (not pid)

2010-01-21 Thread Pieter de Goeje
On Thursday 21 January 2010 18:02:39 cronfy wrote:
 Hello,

 Is there any unique identifier of a process in FreeBSD (not PID)?

 I am trying to get list of processes and watch for changes
 with kvm_getprocs(). I want to catch every process start and exit (except
 those processes that were started and finished between calls to
 kvm_getprocs()).

 But between calls to this function one process may exit and be replaced
 with another process with the same pid and same command name. The only
 difference is a start time of processes. Looks like this is a solution, but
 process start time may change if system time was shifted (i. e. with
 ntpdate). I can track these shifts too, but it looks to be too complex.

 Is there any simpler way to identify a process? Thanks in advance.

I honestly don't know if there is such a unique identifier, but lacking that, 
perhaps you can achieve your goal using kqueue(2)'s EVFILT_PROC. It should do 
what you want and a lot more.

You could also try asking freebsd-hack...@.

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Newbie gmirror questions

2010-01-16 Thread Pieter de Goeje
On Saturday 16 January 2010 00:34:52 Mike Clarke wrote:
 I'm about to upgrade to more disk space and I'm tempted use this as an
 opportunity to get two disks and implement gmirror. Before I go ahead
 there's a few aspects of mirroring I'm not sure about and would
 appreciate some advice.

 I'm using grub for multi booting. Does this introduce any problems if I
 want to boot into Windows or Linux on one of the other partitions?

Gmirror stores the metadata at the last sector of each disk. So this shouldn't 
be a problem. But other operating systems might overwrite this data if you're 
not careful during the paritioning.


 The gmirror manpage describes the procedure for handling kernel dumps
 using the prefer balance algorithm in the early stages of booting and
 then switching to round-robin in the /etc/rc.local script. It then goes
 on to say that If on the next boot a component with a higher priority
 will be available, the prefer algorithm will choose to read from it and
 savecore(8) will find nothing. Does this only arise if I've made some
 change to the configuration of the mirror between the dump and the
 reboot or is there some instances when the priority automatically
 changes?

Priority never changes automatically.


 Some of the articles I've read about gmirror suggest setting the balance
 to round-robin while others just leave this at the default setting of
 split. Am I right in assuming that round-robin would give better
 performance, and does it make much noticeable difference in real terms.
 In particular am I likely to see a reduction in performance using
 gmirror compared with what I would get with just a normal single disk.

Assuming you have two or more regular HDDs, I can recommend updating to 
8-STABLE and using the load algorithm. It has had some major improvements 
lately, and is now the default. It should give equal or better read 
performance in comparison to a single disk in all cases. The performance 
of split and round-robin is very dependent on the access patterns and 
stripe size (for split).


 Finally, recent articles say to set kern.geom.debugflags to 17 when
 creating a mirror on a mounted drive while older articles say to set it
 to 16. Although I'll probably be creating the mirror on my disks before
 copying my system onto them so I don't really need to worry about
 setting this flag but I'm curious to know the difference between using
 the two values.

The sysctl is a bitfield, so 17 (0x11) enables some extra stuff compared to 16 
(0x10). See geom(4), section DIAGNOSTICS for more details.

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Sound (micro-)interrupts with 8.0 stable/snd_hda/mplayer/vlc

2010-01-16 Thread Pieter de Goeje
On Saturday 16 January 2010 19:17:18 Thomas Hummel wrote:
 Hello,

 I'm not really sure what the right list is since I cannot isolate the part
 of
 the system which cause the problem :

 I could use a little help on a weird sound issue I'm struggling with :

 1. Description :
 

   When playing audio files, the sound has from few to many
 micro-interrupts
   (less than 1/4 of a second), randomly but frequently (so this is not hard
 to
   reproduce). This seem to occur :

 . with any file (I can pick a random audio file to experience it)
 . with either mp3 or flaac encoded files
 . with mplayer (from the ports collection or hand compiled from svn),
   either with oss or sdl audio output (although sdl seems to have less
 interrupts)
 . with vlc

  but

 . not with ffplay
 . apparently not with xine
 . apparently not with amarok

Amarok uses xine. All of the above ultimately use OSS to output the sound.


 - so I doubt this may be a harware or a driver issue.

 and on a almost idle 4GB RAM machine running only KDE-4 and firefox-3

 no hints  shows in /var/log/messages

 2. Config :
 

 I'm running :

   . 8.0-STABLE FreeBSD amd64

   . full zfs (no ufs) (files are on a slow disk pool (5400 rpm) but
 moving them to the fast system disk (7200 rpm) doesn't change anything

   . on a (bios up to date) P5Q3 ASUS motherboard

   . with snd_hda sound driver

[snip]

Try increasing the hw.snd.latency sysctl:

 hw.snd.latency
 Configure the buffering latency.  Only affects applications that
 do not explicitly request blocksize / fragments.  This tunable
 provides finer granularity than the hw.snd.latency_profile tun-
 able.  Possible values range between 0 (lowest latency) and 10
 (highest latency).

Just thinking out loud here, but maybe you have some non-standard HZ 
configured or powerd configured to clock the CPU back by an extreme amount, 
both could theoretically cause buffer underruns.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: need a Mencoder expert

2010-01-16 Thread Pieter de Goeje
On Saturday 16 January 2010 20:13:34 Neil Short wrote:
 I have a VOB file that I need to convert to something playable on a Sony
 Walkman NWZ-E344.

 The walkman wants an ASF container, resolution of 320x240 (or less), wmv9
 codec, wma 2 codec, 30 frames per second, video bitrate of less than or
 equal to 768k.

If it only accepts WMV3 (Windows Media Video 9) then you're out of luck. 
FFmpeg, and by extension, mencoder, do not support WMV3 encoding. There 
appears to be a patch floating around on the internet which adds WMV3 
encoding support to ffmpeg, but it is at least 2 years old... 

You can try WMV2 or even WMV1 (Windows Media Video 8 and 7 respectively). Both 
are supported by ffmpeg:

ffmpeg -i somevideo -vcodec wmv2 -acodec wmav2 -b 768k -s qvga test.asf

- Pieter


 I cannot seem to get a mencoder (nor ffmpeg) encoding line to work.

 Here's some data on a video that works:
 $ ffmpeg -i Butterfly.wmv
 
 [wmv3 @ 0x29707c10]Extra data: 8 bits left, value: 0

 Seems stream 1 codec frame rate differs from container frame rate: 1000.00
 (1000/1) - 29.97 (3/1001) Input #0, asf, from 'Butterfly.wmv':
   Duration: 00:00:08.21, start: 5.00, bitrate: 1126 kb/s
 Stream #0.0: Audio: wmav2, 44100 Hz, stereo, s16, 96 kb/s
 Stream #0.1: Video: wmv3, yuv420p, 320x208, 768 kb/s, 29.97 tbr, 1k
 tbn, 1k tbc

 mplayer -identify Butterfly.wmv
 
 Playing Butterfly.wmv.
 ASF file format detected.
 ID_AUDIO_ID=1
 [asfheader] Audio stream found, -aid 1
 ID_VIDEO_ID=2
 [asfheader] Video stream found, -vid 2
 VIDEO:  [WMV3]  320x208  24bpp  1000.000 fps  768.0 kbps (93.8 kbyte/s)
 ID_FILENAME=Butterfly.wmv
 ID_DEMUXER=asf
 ID_VIDEO_FORMAT=WMV3
 ID_VIDEO_BITRATE=768000
 ID_VIDEO_WIDTH=320
 ID_VIDEO_HEIGHT=208
 ID_VIDEO_FPS=1000.000
 ID_VIDEO_ASPECT=0.
 ID_AUDIO_FORMAT=353
 ID_AUDIO_BITRATE=0
 ID_AUDIO_RATE=0
 ID_AUDIO_NCH=0
 ID_LENGTH=15.00
 Opening video filter: [screenshot=yes]
 ==
 Requested video codec family [wmv9dmo] (vfm=dmo) not available.
 Enable it at compilation.
 Requested video codec family [wmvdmo] (vfm=dmo) not available.
 Enable it at compilation.
 Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
 [wmv3 @ 0x882b6f0]Extra data: 8 bits left, value: 0
 Selected video codec: [ffwmv3] vfm: ffmpeg (FFmpeg M$ WMV3/WMV9)
 ==
 ID_VIDEO_CODEC=ffwmv3
 ==
 Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
 AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.81% (ratio: 12005-176400)
 ID_AUDIO_BITRATE=96040
 ID_AUDIO_RATE=44100
 ID_AUDIO_NCH=2
 Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
 ==
 AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
 ID_AUDIO_CODEC=ffwmav2
 Starting playback...
 VDec: vo config request - 320 x 208 (preferred colorspace: Planar YV12)
 VDec: using Planar YV12 as output csp (no 0)
 Movie-Aspect is undefined - no prescaling applied.
 [swscaler @ 0x8827710]SwScaler: using unscaled yuv420p - bgr24 special
 converter VO: [xv] 320x208 = 320x208 Planar YV12
 New_Face failed. Maybe the font path is wrong.
 Please supply the text font file (~/.mplayer/subfont.ttf).
 subtitle font: load_sub_face failed.
 


 ==

  What did you do? the man holding the flashlight asked.

  I put down a spider, he said, wondering why the man didn't see; in the
 beam of yellow light the spider bloated up larger than life. So it could
 get away.




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


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


Re: Accessing Computer

2010-01-08 Thread Pieter de Goeje
On Friday 08 January 2010 13:50:10 Carmel wrote:
 Assume three computers.
 
 Computer 1 runs Windows with Putty installed
 Computer 2  3 run FreeBSD
 
 Computer 1 runs Putty and creates a key that is installed on computer 2.
 Computer 2 has a key that is installed on computer 3.
 
 If someone were to use computer 1 via Putty to access computer 2, would
 they then be able to access computer 3? If so, how could I prevent it
 from happening?
 
 I am not good at explaining things, so I hope you understand what I am
  referring to.
 
You might want to take a look at ssh-agent. I think PuTTY has an equivalent. 
It lets you do remote logins without putting your key(s) everywhere. I've not 
yet tried this myself, but I plan on testing it sometime.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ports/devel/protobuf: Segmentation fault in mmap in some applications

2010-01-07 Thread Pieter de Goeje
On Thursday 07 January 2010 10:02:36 O. Hartmann wrote:
 On 01/07/10 01:41, Pieter de Goeje wrote:
  On Wednesday 06 January 2010 14:14:28 O. Hartmann wrote:
  Dear Sirs,
  We use a software package for scientific imagery processing from USGS,
  ISIS3 (http://isis.astrogeology.usgs.gov/). The most recent version is
  3.1.21 and since this version, the software intensively uses
  libprotobuf.so.
 
  While we can use ISIS 3.1.20 very well under FreeBSD 8.0/amd64, it is
  impossible to use the software with version no. 3.1.21, which seems to
  have some issues wih libprotobuf.so. Every client out of this ISIS3
  package crashes with a segmentation fault and as far as I can judge the
  situation, there is a problem with libprotobuf.so, against which all
  clients out of ISIS 3.1.21 are linked.
 
  Perhaps the ISIS package was developed using a different (older?) version
  of Google's protocol buffers. Compiling protobuf from source is quite
  easy on FreeBSD. You can find the source here:
  http://code.google.com/p/protobuf/downloads/list
  I would start by trying version 2.1.0 and 2.2.0a.
 
  I searched for help on the ISIS3-support forum and realised that some
  Apple OS X guys have had similar problems, but those threads where
  closed immediately or got relative senseless response.
 
  In our case, we compile every necessary library and prerequisite
  software package (mostly Qt4 libs) from ports. This works great with
  some tweaks for FreeBSD in make/config.freebsd (which I derived from
  some linux and/or OS X config files).
 
  Now I'm floating like a dead man i the water. Below I provide q gdb
  output of the qview-client (the same is with all other clients, like
  photrim etc. for those familiar with the software package).
 
  A backtrace ('bt' at the gdb prompt) might contain more useful
  information.
 
  Additionaly, I provide a truss-output, that stops at mmap issues.
 
  Well, if someone could provide me with some advance debugging hints I
  would appreaciate them. I'm pretty sure he problem is located within the
  libprotobuf library or the way it is treated, but this is a guess of a
  non-developer.
 
  Thanks very much in advance.
  Please reply also to this email address, since I'm not subscriber of the
  list I post to.
 
  Oliver
 
  - Pieter

 Hello Pieter,

 ISIS3 utilises the very same revision of libprotobuf as FreeBSD has in
 the ports repositorium (libprotobuf.so.4.0.0, aka protobuf-2.2.0). The
 backtrace follows, it is a little bit lengthy ...

Ok, I can reproduce this locally. The cause is incorrect compiler flags. 
Basically one must use `pkg-config --cflags protobuf` to get the correct 
CFLAGS and `pkg-config --libs protobuf` for the correct libraries.

Most likely one or both of the following were missing during the 
compilation/linking of ISIS: -D_THREAD_SAFE -pthread

Regards,

Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ports/devel/protobuf: Segmentation fault in mmap in some applications

2010-01-06 Thread Pieter de Goeje
On Wednesday 06 January 2010 14:14:28 O. Hartmann wrote:
 Dear Sirs,
 We use a software package for scientific imagery processing from USGS,
 ISIS3 (http://isis.astrogeology.usgs.gov/). The most recent version is
 3.1.21 and since this version, the software intensively uses
 libprotobuf.so.

 While we can use ISIS 3.1.20 very well under FreeBSD 8.0/amd64, it is
 impossible to use the software with version no. 3.1.21, which seems to
 have some issues wih libprotobuf.so. Every client out of this ISIS3
 package crashes with a segmentation fault and as far as I can judge the
 situation, there is a problem with libprotobuf.so, against which all
 clients out of ISIS 3.1.21 are linked.

Perhaps the ISIS package was developed using a different (older?) version of 
Google's protocol buffers. Compiling protobuf from source is quite easy on 
FreeBSD. You can find the source here: 
http://code.google.com/p/protobuf/downloads/list
I would start by trying version 2.1.0 and 2.2.0a.


 I searched for help on the ISIS3-support forum and realised that some
 Apple OS X guys have had similar problems, but those threads where
 closed immediately or got relative senseless response.

 In our case, we compile every necessary library and prerequisite
 software package (mostly Qt4 libs) from ports. This works great with
 some tweaks for FreeBSD in make/config.freebsd (which I derived from
 some linux and/or OS X config files).

 Now I'm floating like a dead man i the water. Below I provide q gdb
 output of the qview-client (the same is with all other clients, like
 photrim etc. for those familiar with the software package).

A backtrace ('bt' at the gdb prompt) might contain more useful information.


 Additionaly, I provide a truss-output, that stops at mmap issues.

 Well, if someone could provide me with some advance debugging hints I
 would appreaciate them. I'm pretty sure he problem is located within the
 libprotobuf library or the way it is treated, but this is a guess of a
 non-developer.

 Thanks very much in advance.
 Please reply also to this email address, since I'm not subscriber of the
 list I post to.

 Oliver

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Need help configuring upsd, sound and logo saver on freebsd 8.0

2010-01-02 Thread Pieter de Goeje
On Saturday 02 January 2010 19:37:23 Manish Jain wrote:
 On 01/01/10 20:26, Matthew Seaman wrote:
  Manish Jain wrote:
  3) For my console saver ('logo'), I get the following error message at
  boot-time :
 
  module_register_init: MOD_LOAD (logo_saver, 0x81044010, 0)
  error 19
 
  Seems to be a long standing bug on amd64 systems: graphics based console
  screen savers don't work. Any of the text based screen savers will
  function correctly, although they don't look as nice.
 
  Cheers,
 
  Matthew

 Hello Matthew,

 Thanks for your reply. The only point that remains to be made is that I
 find the 'Cheers' at the end of your message quite ironic.

 Being the owner of 2 kittens, I must dutifully assert that there is
 nothing to cheer about under the current situation. For the three of us,
 it has been a long-standing favourite pastime to watch Chuck in action.
 We would miss football (for some reason called soccer in the US) games /
 cricket games / movies / all other forms of entertainment, just to wait
 and watch for Chuck to show up. My kittens never managed to grab him,
 despite numerous valiant efforts. But this never undermined the
 fascination all three of us shared for Chuck.

 If ever the FreeBSD operating system or AMD processors had a bug, this
 would be it. Above all, even to someone not in love with cats, having a
 genial and smiling mouse would be infinitely preferable to having such a
 nasty bug.


 Cheers

 Manish Jain
 invalid.poin...@gmail.com

I can report that logo_saver works great on FreeBSD-CURRENT/amd64 with vesa 
loaded and options SC_PIXEL_MODE in the kernel configuration. Vesa support 
for amd64 systems was introduced after FreeBSD 8 was branched. 

Regards,

Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: snd_hda peculiarities

2009-12-30 Thread Pieter de Goeje
On Wednesday 30 December 2009 15:45:50 Richard L. Mace wrote:
 I recently installed FreeBSD 8.0 (amd64) on my laptop (HP 8510w) and most
 things are working. However, a minor annoyance is that I only get sound if
  I manually load snd_hda via:
 
 # kldload snd_hda
 
 i.e., after booting. If I place the following in /boot/loader.conf
 
 snd_hda_load=YES
 
 I get no sound, even though the driver seems to load and cat /dev/sndstat
 gives

Try setting hw.snd.default_unit=1 in sysctl.conf. Most likely the order of the 
devices has changed.

 ---
 --- FreeBSD Audio Driver (newpcm:
  64bit 2009061500/amd64)
 Installed devices:
 pcm0: HDA Analog Devices AD1981HD PCM #0 Analog at cad 0 nid 1 on hdac0
  kld snd_hda [MPSAFE] (1p:1v/1r:1v channels duplex default)
 pcm1: HDA Analog Devices AD1981HD PCM #1 Digital at cad 0 nid 1 on hdac0
  kld snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex)
 ---
 -

This looks like the output from the working configuration. Note that the first 
device is the analog output, the second is a digital output. When you load 
snd_hda using loader.conf, the order is likely different on your machine and 
the digital output is listed first. hw.snd.default_unit=1 would then direct the 
sound to the proper (analog) output.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: New user - small file server questions and quick GUI question

2009-12-28 Thread Pieter de Goeje
On Monday 28 December 2009 22:49:31 Kaya Saman wrote:
 Hi guys,

 first up I hope I am in the right place as my questions are of a generic
 nature about FreeBSD as I consider myself a new user not having much
 mileage with the OS as of yet!

 Secondly I just wanted to wish everyone a happy Christmas and New Year
 also since we are in that period :-)

 I will start with my GUI question as I believe that it is something simple:

 I attempted an install of 7.2 stable on my laptop and subsequently
 installed X11also. Now I didn't have any Xorg.conf file but each time I
 tried to start X from the CLI using the normal startx command (read the
 documentation through fully beforehand) but I didn't manage to get the
 mouse or keyboard to even work let alone starting the Gnome2 interface.

The most common cause is that either hald (sysutils/hal) or dbus (devel/dbus) 
isn't running. Xorg needs them both to detect mouse and keyboard. Add 
dbus_enable=YES and hald_enable=YES to rc.conf to get them to start 
automatically.


 Now I don't have that particular machine with me now as it's in another
 country but just wanted to know a few possible causes for the issue. I
 am guessing it's probably tied into not having the xorg.conf file but I
 will install a VM of it soon and be more specific with logs etc as I
 am used to Linux and Sun Solaris I know this is really ad-hoc and
 frowned upon way of asking which will probably earn me minus brownie
 points but just wanted a quick idea of what maybe so when the time comes
 I can investigate further!

 The second and main question that I wish to ask is more to do with
 peoples opinions or experienced BSD users advice:

 I am looking to setup a small file server which I will use as DNS and
 NTP server also. The reason for selecting FreeBSD is that the system I
 about to install onto doesn't have much memory (not sure how much but
 probably in the region of 300-500MB perhaps) and although Linux would
 definitely suite this kind of system as Solaris needs round 2GB or so
 for OpenSolaris, I am quite interested to learn FreeBSD but also take
 advantage of the ZFS file system which is standard now in version 8.

I agree with Adam Vande More's opinion that UFS2 is the way to go on such a 
low memory system. UFS2 also works well with large disks (1+ TB) if you tune 
the newfs parameters a bit (mainly to shorten the fsck time). With geom(8) 
you can do all kinds of mirroring/striping if you're into RAID. With regards 
to stability, UFS2 was before the import of ZFS the only filesystem widely 
used. It is very well tested, and in my opinion, very stable. In fact, I 
can't remember ever having a UFS2 filesystem go bad to the point I couldn't 
repair it anymore. If you're expecting lots of power outages, it may be 
worthwile to set up journaling using gjournal(8), which will reduce fsck 
times considerably, at the cost of reduced streaming write speed (which will 
halve unless a dedicated journal disk is used).


 I won't be installing a GUI on this machine since it is going to be a
 server so I would like to know if BSD has a small footprint memory and
 CPU wise for me to run on the machine in question which is a PIV?

That won't be a problem. To illustrate, FreeBSD on a 256MB (i386) machine has 
about 211MB memory free just after startup. To be safe you could configure a 
large swap, so the system won't kill the memory hogs as soon as it runs out 
of memory.


 Also just to make sure: NFS, Samba, NTPd, and ISC's Bind are all
 supported on FreeBSD aren't they?? I know this is a bit of an RTFM issue
 here but for example the Solaris implementation of NTP and even SNMP are
 slightly different from the GNU or GPL based ones in Linux so therefor I
 have to ask :-)

NFS, BIND, SNMP (bsnmpd) and NTP come with the OS and are installed by 
default. Samba can be installed from ports.


 Many thanks for any responses

 Best regards,

 Kaya
Good luck!

Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Help building/running SDL/OpenGL code

2009-12-23 Thread Pieter de Goeje
On Wednesday 23 December 2009 04:42:28 Richard Mace wrote:
 Incidentally, if there is anyone out there with newer hardware who is
 interested in building the code I am talking about you can find it at:

 http://physics.ukzn.ac.za/~richm/courses/phys110/lennard-jones-3d.html

 You'll need to change the following lines in the Makefile to get it to
 successfully build under FreeBSD:
 ==
 CFLAGS = -Wall -Wextra -pthread -I/usr/local/include
 -I/usr/local/include/SDL -O3 -march=native

 LFLAGS = -Wall -L/usr/local/lib

 lennardjones : $(OBJS)
         $(CC) $(LFLAGS) -o lennardjones $(OBJS) -lSDL -lSDL_gfx -lGLU
 ==

 It would be interesting to hear feedback. (Basic controls are: up-arrow add
 heat to crystal; down-arrow cool down gas/crystal. There are a bunch of
 others -- look in main.c). You are welcome to do whatever you wish with my
 code.

Arrr. Same problem here at startup: segfault in glXGetFBConfigAttribSGIX. A 
simple test case is the following:

py...@nox:~% cat test.c
int main() {}
py...@nox:~% cc -o test test.c -L/usr/local/lib -lSDL -lGL
py...@nox:~% ./test
zsh: segmentation fault (core dumped)  ./test

Then I attempted to switch the arguments around...

py...@nox:~% cc -o test test.c -L/usr/local/lib -lGL -lSDL
py...@nox:~% ./test
py...@nox:~%

Voila! (Admittedly much to my surprise ;))

So then I changed the Makefile to use these libraries: -lGLU -lSDL -lSDL_gfx. 
Result: a perfectly working ./lennardjones. The only minor issue is that it 
presented me with exactly one option:

py...@nox:~/temp/lennard-jones-gas-3d% ./lennardjones
Current pixel depth: 32
Available Modes
0 =  3840 x 1200
Select your preferred video mode:

So apparently I prefer mode 0 :D. It run fine (and smooth) though.

It is clear something goes wrong during the runtime linking process, which 
this library order works around. The actual problem is still a mystery to me. 
It might be worthwhile to post a bugreport on the nvnews.net FreeBSD forum.

Best regards,

Pieter de Goeje

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


Re: What happened to /home?

2009-12-23 Thread Pieter de Goeje
On Thursday 24 December 2009 00:01:11 Rem P Roberti wrote:
 Today I booted my laptop and discovered that /home was gone.  Well...not
 exactly..but for all intents and purposes.  The system isn't seeing it
 although I can see it when I cd to /.  But if I try and cd to /home from
 there the system tells me home:Not a directory.  What happened, and
 what can I do about it?

 Rem

Usually /home is a symlink to /usr/home. Perhaps the symlink is busted? What 
it the output of `ls -ld /home' ? If you can still login as a regular user, 
what does `pwd -P' say just after you are logged in?

- Pieter



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


Re: Help building/running SDL/OpenGL code

2009-12-22 Thread Pieter de Goeje
On Tuesday 22 December 2009 22:00:51 Roland Smith wrote:
 On Tue, Dec 22, 2009 at 09:57:57PM +0200, Richard Mace wrote:
  In the end, as a last resort, I de-installed the nvidia driver and
  started X with an empty /etc/X11/xorg.conf (which presumably loads the
  nv driver). I re-built my code and it runs, albeit without the
  smoothest of graphics.

 On a recent core2 duo or quad, even software rendering isn't that bad.
True, until you press the full screen(s) button of your program running on 
your dual 1920x1200 monitor setup like I do ;-) Suddenly you're watching a 
slideshow...

  I guess that that proves that the problem lies with the NVIDIA driver and
  its inter-relationship with the Mesa libraries, which one has to use if
  one builds one's own OpenGL programs.

 Yes.
Agreed. It's quite annoying that the nvidia drivers replace the existing mesa 
GL libs, which breaks OpenGL when you switch back to mesa rendering. However, 
because the library is implemented by nvidia for their hardware, it is also 
blazingly fast.

  It is a pity that FreeBSD has not sorted that out, but I hasten to add
  that I'm new to FBSD and it could be my error.

 It was nvidia's decision to drop support for older cards from their recent
 drivers. Nothing that the FreeBSD project can do about that.
The oldest cards that the new drivers support are the GeForce 6xxx series, 
which are over 5 years old. I'm not saying that I approve dropping support 
but frankly I don't really care for 3D acceleration on graphics cards that 
old. 

The latest nvidia drivers are actually built using a more recent version of 
FreeBSD so you won't have that linking problem. Which is indeed the most 
likely cause of the problem. I don't understand why glxgears does run and 
your simulation does not though... I would've expected both too fail or work.

  It does beg the question, though, how one would develop OpenGL apps on
  FBSD? I'll revisit this soon, after some careful googling.

Personally I use a recent nvidia card with the latest nvidia drivers. This has 
worked well for me, but I don't use SDL. My programs tend to use the simple 
GLUT/GLU/GL combo or wxGTK/GLU/GL if I need more controls. Loading textures 
is done using DevIL. Unfortunately my old GeForce 4 is broken so I can't test 
the legacy drivers any more.


 Get a card that is well-supported by the drivers in the FreeBSD kernel and
 Xorg/Mesa. Currently that means Intel's on-board graphics or boards with
If you're going with intel you might as well use software rendering :-)

 ATI/AMD radeon chips, except for the latest chips. AMD released docs for
 those chips some months ago, and the drivers for accellerated 3D are still
 evolving.

Yes, AMD's efforts are very commendable.

 Accellerated 3D works fine on my Radeon X1650 equipped card with the
 xf86-video-ati driver and the drm.ko and radeon.ko kernel modules.

 Roland

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Any chance ZFS becoming default?

2009-12-19 Thread Pieter de Goeje
On Saturday 19 December 2009 19:49:17 Reko Turja wrote:
  under Other Kernel:
  ZFS as default

 So anyone running 32bit or under 2Gb of memory don't need to bother
 with FreeBSD anymore after 9.0 RELEASE?

Don't spread FUD please. If you had read the WIKI you would know it talks 
about sysinstall support for ZFS, not about removing UFS.

- Pieter de Goeje

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


Re: how to set locale to French language on mail server ?

2009-12-18 Thread Pieter de Goeje
On Friday 18 December 2009 10:13:53 Frank Bonnet wrote:
 Hello
 
 I am a bit confuse on how to set locale to French language on our mail
 server , all our users user French keymap and actually the server
 is NOT well configured
 
 mail# locale
 LANG=
 LC_CTYPE=C
 LC_COLLATE=C
 LC_TIME=C
 LC_NUMERIC=C
 LC_MONETARY=C
 LC_MESSAGES=C
 LC_ALL=
 
 I want to configure at server level for all users which file do I have
 to setup FR as locale ?
 
 I've the doc but it is a bit unclear to me ...
 
 Thanks a lot.
See login.conf(5). There are some examples in /etc/login.conf.

Regards,
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: broken tmux

2009-12-18 Thread Pieter de Goeje
On Friday 18 December 2009 19:34:18 Chad Perrin wrote:
 When I tried asking this before, it was evidently during a period that
 the mailing list was down, so I'll try again:

 After updating software on a FreeBSD 6.1 system, tmux appears to be
 broken.  I still have a persistent tmux session running on the system,
 but I cannot access it with `tmux att`.  I also cannot start new tmux
 sessions.

 As a non-root user:
  tmux att

 can't create socket: Not a directory

  tmux

 can't create socket: Not a directory

What happens if you do tmux -S /some/path/tmuxsocket, detach, and 
then tmux -S /some/path/tmuxsocket a? If that works then there is some 
problem with the default socket path (/tmp/tmux-). I would check the 
permissions on /tmp and remove any /tmp/tmux* directories.

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Joining multiple Multicast Streams

2009-12-17 Thread Pieter de Goeje
On Thursday 17 December 2009 19:45:24 Dex Nada wrote:
 Hi:

 I am writing an application that joins a multicast stream on a specific UDP
 port. But when I run more than one instance of the same application, the
 second instance complains that the port is already in use. For example if I
 join stream 229.10.10.133:2000 on one instance and 229.10.10..134:2000 on
 another instance, the second one fails to join - I can however join it if I
 kill the first instance. I have compiled that application with SOCKET_REUSE
 option, but I wonder if I need to enable/recompile-with any special
 multicast kernel option for this to work. I do not have this problem when I
 run this code on Linux (Ubuntu 9.10) but I really want to get this working
 on FreeBSD.

 Thanks in advance.

 -DxN

Try SO_REUSEPORT. The manpage (getsockopt(2)) specifically mentions multiple 
listeners for the same multicast stream. The following pseudo C seems to work 
fine:

int reuseport = 1;

memset(addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr.sin_port = htons(port);

mreq.imr_multiaddr.s_addr = maddr;
mreq.imr_interface.s_addr = INADDR_ANY;

int fd = socket(AF_INET, SOCK_DGRAM, 0);
setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, reuseport, sizeof(reuseport));
bind(fd, (struct sockaddr *)addr, sizeof(addr));
setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, mreq, sizeof(mreq));
recvfrom(fd, );

Good luck,

Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: question about xorg 7.4

2009-12-16 Thread Pieter de Goeje
On Wednesday 16 December 2009 07:15:58 doug wrote:
 I have a IBM thinkpad T42p. xorg 7.4 is pretty much a disaster for me.
 First I wonder if anyone has gotten 7.4 to work on this or similar
 hardware. The system is 3+ years old when it was still IBM.

 I have done this a time or two starting with the first version of KDE and
 FreeBSD 4.something. I believe I have tried all of the options in the
 handbook plus a couple of various from this list and google. So I was not
 going to add xdm and Xorg output, at first anyway.

 The one thing I have not done is upgrade the BIOS and am not sure that
 matters. I was/am afraid of breaking an otherwise great system. It runs
 xorg 7.3 and KDE 3 or 4 fine. I go to this point because I broke things
 trying to install firefox3 and got all tangled up in upgrading ports and
 thought I would give xorg 7.4 a try.

 I am running FreeBSD 7.2. Xorg was installed using pkg_add on a system
 without any ports. Upon hitting the xdm trap, I also installed that
 package.

 All variations give me a black screen with the keyboard locked. startx, xdm
 and xorg all do the same. I assume this is a hardware issue and hope
 someone found a way around it.

 Thank you for any thoughts, tips, ideas, etc.

Xorg defaults to a black screen instead of a checkerboard pattern these days. 
Keyboard and mouse input is handled by hald(8), so don't forget to enable and 
start it before starting Xorg. hald depends on dbus so that also needs to be 
enabled and started. Add the following to rc.conf:
hald_enable=YES
dbus_enable=YES

Good luck,
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: SMB shares vs. FreeBSD8

2009-12-12 Thread Pieter de Goeje
On Saturday 12 December 2009 01:28:59 Steven Friedrich wrote:
 My SMB share, a 320GB WD NetCenter, fails to mount because the rl ethernet
 isn't up yet.  I dual-boot 7.2 and 8.0.

Try changing ifconfig_xxx=DHCP to SYNCDHCP, or add 
synchronous_dhclient=YES to /etc/rc.conf.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: A question about yell on a laptop

2009-12-11 Thread Pieter de Goeje
On Friday 11 December 2009 18:13:04 Polytropon wrote:
 On Fri, 11 Dec 2009 15:20:42 +0100, Leslie Jensen les...@eskk.nu wrote:
  I have sound working but PC-speaker doesn't seem to be present.

 Do you have device SPEAKER in your kernel config,
 or have you loaded the appropriate kernel module?

 You can alway check it with something like

   # echo cdefg  /dev/speaker
Must not... can't resist...

echo cdec cdec efg~ efg~ L8gagfL4ec L8gagfL4ec cgc~ cgc~  /dev/speaker

:-)

Warning: do not add this to your .(z|ba|c)shrc.

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Gnome Terminal

2009-11-27 Thread Pieter de Goeje
On Friday 27 November 2009 05:11:41 Rem P Roberti wrote:
 There was a time when I ran gnome-terminal from within Fluxbox. On my
 new 7.2 installation I have installed gnome-terminal, but can't get it
 to work. When I try to bring it up from the command line from within
 Fluxbox I get this error message: Failed to contact the GConf daemon;
 exiting
 
 As usual, all help much appreciated.
 
 Rem

You can try adding gnome-settings-daemon to .xinitrc / .xsession. It should 
start the gconf daemon. I believe dbus is also required to work.

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: NO_PROFILE versus WITHOUT_PROFILING

2009-11-27 Thread Pieter de Goeje
On Friday 27 November 2009 12:45:54 Frank Staals wrote:
 When I was setting up my system for a complete rebuild I came across
 something unclear to me; I always used NO_PROFILE in my make.conf,
 however from what  I've read specific make options to build the
 kernel/base system should be in /etc/src.config. The manpage of src.conf
 specifies the option WITHOUT_PROFILING, which seemed to be the flag that
 I was looking for. Just to be certain I always keep the 'Rebuilding
 World' chapter of the handbook close, however that still specifies to
 use NO_PROFILE in make.conf.
 
 So now my question: What is the desired way of turning of profiling:
 NO_PROFILE in make.conf or WITHOUT_PROFILING in src.conf ?
 
 Thanks in advance
 
WITHOUT_PROFILING in src.conf. The NO_xxx options are obsolete and should not 
be used.

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: freebsd-update with MYKERNEL kernel configuration

2009-11-26 Thread Pieter de Goeje
On Thursday 26 November 2009 14:32:01 S4mmael wrote:
 Hi all!
 
 I've got a problem while upgrading FreeBSD 7.2-RELEASE-p3 - FreeBSD
 8.0-RELESE with freebsd-update(8).
 
 First of all I made a copy of the most configuration files. Then I made:
 # freebsd-update -r 8.0-RELEASE upgrade
 All went good, except the message, that because of MYKERNEL kernel
 configuration I should upgrade my kernel before freebsd-upgrade
 install. 

That message should probably be more strongly worded. It is absolutely 
*imperative* that the custom kernel is upgraded before continuing with 
freebsd-upgrade install.

For more information about how to upgrade to freebsd 8 see
http://www.freebsd.org/doc/en/books/handbook/updating-upgrading-
freebsdupdate.html

 Then I was looking for the way of kernel upgrade, but found
 nothing. How could I build 8.0 kernel in FreeBSD 7.2? Of course, there
 were 7.2 sources in /usr/src and I didn't find any sources in
 /var/db/freebsd-update/. It's the first my question.

Use csup(1) to upgrade the sources to RELENG_8_0.

 
 Thus I decided to upgrade all except the kernel and then rebuild the
 kernel (that worked good while upgrading 7.1 - 7.2). 

As you found out, you should never do that. Always make sure the kernel is the 
same or newer as world (userland) especially when upgrading to a new major 
version.

 I made as
 mentioned in hanbook:
 # freebsd-upgrade install
 # shutdown -r now
 # freebsd-upgrade install

At this point most userland utilities (because they all use libc.so) depend on 
features only available in the 8.0 kernel, while the installed kernel is still 
at 7.1. Essentially the system is bricked.

 There were many errors bad sistem call on th last command. After all
 I discovered that much files from / were lost (I didn't find any grep,
 bzcat and so on). On boot kernel can't find fsck_ufs, so automatic
 mounting fails. If mounted by hand, there is no way to login because
 of some init error. Single user mode works. freebsd-update roolback
 can't find any backup. Shell scripts can't find test (it really
 doesn't exists in /bin/[ ) and fails.
 
 How can I restore the system? I've FreeBSD 7.1 CD.

You can try reinstalling 7.1 taking care not to repartition the HDD. If all 
went well the system runs a GENERIC kernel, which is upgradeable by freebsd-
upgrade. You can then retry the upgrade process. This process (the reinstall 
from cdrom) will revert any changes to /etc, so you will need to restore that 
from backup. Perhaps others know a better/easier way.

 
 Thank's in advance for your help.

Good luck!

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 7.2-STABLE to 8-R

2009-11-24 Thread Pieter de Goeje
On Tuesday 24 November 2009 16:45:14 John wrote:
 Hello list
 
 I've looked high and low for a howto/link showing how to update to 8, to
 no avail. Is it just a case of the regular buildworld process or are
 there gotchas because we are crossing major version numbers.
 

You got it right. Just the regular upgrade procedure as documented in 
/usr/src/UPDATING.

The gotcha is that you need to rebuild all ports. If you don't do that you can 
run in to trouble when you later build a port.

I found that usually it is fastest to just take note of which ports you need, 
delete all existing ports, then after the upgrade reinstall the required 
ports.

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Glassfish v3 server: Admin port in use

2009-11-23 Thread Pieter de Goeje
On Monday 23 November 2009 20:24:08 Frank Staals wrote:
 Pieter de Goeje wrote:
  On Saturday 21 November 2009 15:01:55 Frank Staals wrote:
 
  snip
  Perhaps this is an error specific to glassfish 3.
  I used to have Glassfish 2.1.1 working on FreeBSD/head (i386). I don't
  know what your requirements are but maybe that version will suffice? I
  used the Linux installer if I remember correctly.
 
  You can also try asking freebsd-j...@freebsd.org.
 
  Good luck,
 
  Pieter de Goeje
 
 Hmm Thanks for the tip, I installed the latest glassfish v2 server,
 which runs fine, however I use some cutting-edge JSF2 stuff which realy
 requires glassfish v3 it seems :(
 
I've tested glassfish v3 preview and it does seem to work, apart from the 
admin console. It barfs on some missing UI classes. asadmin works fine though. 
The internet tells me it really needs a newer version of the sun JDK :( 

There was some development on OpenJDK6 lately, maybe that works...

- Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Glassfish v3 server: Admin port in use

2009-11-21 Thread Pieter de Goeje
On Saturday 21 November 2009 15:01:55 Frank Staals wrote:
 Hey everyone,

 I'm trying to deploy a Glassfish v3 server on my workstation since I
 need to do some jsf-developement. However when I try to start the server
 it keeps telling me the admin port I'm trying to use is allready in use
 by an other process, no matter what port I use. However I'm 100% certain
 there is nothing running on the port it should use (sockstat confirms
 that). Has anyone seen this type of behaviour and/or knows how to fix it
 ? I'm running FreeBSD 8.0-RC1 with jdk16 installed from ports. Full log
 is here: http://fstaals.net/junk/glassfish.txt

Perhaps this is an error specific to glassfish 3.
I used to have Glassfish 2.1.1 working on FreeBSD/head (i386). I don't know 
what your requirements are but maybe that version will suffice? I used 
the Linux installer if I remember correctly.

You can also try asking freebsd-j...@freebsd.org.

Good luck,

Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: how to build from ports without downloading ports

2009-10-20 Thread Pieter de Goeje
On Tuesday 20 October 2009 22:35:54 Noah wrote:
 I have a server with minimal disk space.  is there a way to build from
 ports without downloading ports or only downloading what is needed for
 the build and then it is removed?

That is technically possible but it's usually a lot easier to mount the ports 
tree from an NFS server. If you share the ports tree between a number of 
servers make sure WRKDIRPREFIX is set to a local path before you start 
building ports or you might run into concurrency issues when multiple servers 
build a port at the same time.

Regards,

Pieter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: POSIX Message queues

2009-10-18 Thread Pieter de Goeje
On Sunday 18 October 2009 10:25:41 Ross wrote:
 I have a program that works with POSIX message queues, i.e. calls
 mq_open, mq_send, etc. These calls fail with Bad system call
 message.
 I googled that in order to get POSIX semaphores work on FreeBSD you
 should kldload sem. What should I load to make message queues work?

kldload mqueuefs

See mqueuefs(5) for more information. It probably should've been referenced 
from mq_open(2).

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Polling and kern.hz

2009-09-20 Thread Pieter de Goeje
On Saturday 19 September 2009, Agus wrote:
 Hi guys...

 Im reading ant playing with polling and kernel. I read that
 polling increase net performance and i plan on using it... Now the
 question that arises is.. is polling and performance in general
 affected by the value of kern.hz? i have put in /boot.loader.con
 kern.hz=50 and was wondering if this number affects the number i
 choose for the polling options

 I wanna recompile kernel using

 options DEVICE_POLLING
  options HZ=1000

 So that 1000hz how affects the system? if it affects it at all

 thanks for anyone who can give me a hint

 Cheers,
 A

To quote polling(4):
Device polling disables interrupts by polling devices at appropriate
times, i.e., on clock interrupts and within the idle loop.  This way, the
context switch overhead is removed.  Furthermore, the operating system
can control accurately how much work to spend in handling device events,
and thus prevent livelock by reserving some amount of CPU to other tasks.

HZ affects how often the device is polled. For high bandwidth situations, it 
is important that the latency is kept as low as possible. That means that you 
must poll the device as often as possible. So generally people use very high 
HZ values for polling, for example 1. HZ=50 leads to latencies of about 
20ms, way too high for normal network I/O.

Note that you can change HZ without recompiling by specifying kern.hz=### in 
loader.conf.

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: what is the best way to remove a program?

2009-06-14 Thread Pieter de Goeje
On Sunday 14 June 2009 14:58:46 Mark Hartkemeyer wrote:
 I was installing the mysql51-server port and I had a message that the
 install could not proceed, because mysql50-client was already
 installed.  I simply ran a cd and then a make deinstall in the
 mysql50-client directory.  Is this is the best way to remove a
 program?  Does it depend on how the program was added (compiled versus
 prebuilt binary added with pkg_add -r)?  I've tried pkg_delete in the
 past, but it seems to always complain about dependencies and not
 actually remove the program.

 Thanks,
 Mark Hartkemeyer

make deinstall is a good way to remove a program, but it ignores 
dependencies as you discovered. Some other program on your system requires 
mysql50-client to function and might now be broken.
pkg_delete -f does basically the same. pkg_deinstall (which comes with 
portupgrade) also does the trick.

Before doing a make deinstall you can check which installed packages require 
it by:
pkg_info -Rx mysql-client

If you want to upgrade mysql-client from 5.0 to 5.1, use portupgrade:
portupgrade -rf -o databases/mysql51-client mysql-client

This will replace mysql50-client with mysql51-client and reinstall all ports 
depending on mysql50-client (-rf), so they will use the new version. In this 
case the last step probably isn't necessary because the libraries are (mostly 
I think) compatible, but in general it is recommended.

For more information, see man ports and man portupgrade.

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sponsoring ZFS development on FreeBSD

2009-06-06 Thread Pieter de Goeje
On Saturday 06 June 2009 13:47:57 Neal Hogan wrote:
 On Sat, Jun 6, 2009 at 4:04 AM, Wojciech Puchar 

 woj...@wojtek.tensor.gdynia.pl wrote:
  My question is concerning sponsoring the FreeBSD project and ZFS
 
  development in particular. I know I am just a relatively poor person
  so I can't contribute much (maybe on the order of 20-30 euro a month),
 
  donati...@freebsd.org
 
  and of course you may sponsor it too by improving ZFS code, or maybe -
  making some better FS.
 
   but I keep seeing FreeBSD core team members keep mentioning we value
 
  donations of all sizes, so what the hell :) Anyways, in the past I
  have directed my donations to The FreeBSD Foundation, if I want to
  ensure that as much of my money as possible goes directly to benefit
  the development of ZFS support on FreeBSD, should I continue donating
 
  just tell them about it.

 hahahahaha

I'm not sure why you are laughing, because you _can_ tell the FreeBSD 
Foundation how you would like them to spent your money. If you click on 
Donate there's a box where you can enter the project(s) you'd like to see 
funded. 
Although ZFS isn't currently listed as a project, I'm sure there's enough 
interest from the community.

-- 
Pieter de Goeje

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


Re: character sets for file names on ufs?

2009-05-29 Thread Pieter de Goeje
On Friday 29 May 2009 10:20:15 per...@pluto.rain.com wrote:
 Pieter de Goeje pie...@degoeje.nl wrote:
 
  % touch ??? ? ??  ?? ??? 
  % ls
  ??? ? ??  ?? ???
  % rm ???\ ?\ ??\ \ ??\ ???\
  %
 
  (I don't have a clue what that means btw)
 
 Here it looks like a string of question marks and a few spaces.
 
 I have a suspicion that something in the path between your keyboard
 and my xterm is not 8-bit clean :(
 

I think xterm cannot display the (braille) characters. I used konsole for this. 
The text was copied from UTF-8-Demo.txt [1].

-- 
Pieter de Goeje

1. http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: character sets for file names on ufs?

2009-05-28 Thread Pieter de Goeje
On Thursday 28 May 2009 19:51:45 Tom Worster wrote:
 what character set/encoding is used for file names in freebsd when i have a
 default ufs fs?

 tom

None.

UFS is 8 bit clean, so you can basically use it with any 8bit character set. 
No encoding is enforced and no conversion is ever applied to file names on 
UFS.

If you set your locale to UTF-8, you can use unicode characters in filenames.

For instance:

% touch ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ 
% ls
⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁
% rm ⡍⠜⠇⠑⠹\ ⠺⠁⠎\ ⠁⠎\ ⠙⠑⠁⠙\ ⠁⠎\ ⠁\
%

(I don't have a clue what that means btw)

-- 
Pieter de Goeje

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

Re: Streaming server

2009-05-25 Thread Pieter de Goeje
On Monday 25 May 2009 15:41:04 Jos Chrispijn wrote:
 I have some short movies (a la YouTube) that I would like to show as
 video streams. Presenting them by download is messing up my bandwidth
 (...). Can someone tell me if there is a simple solution installing such a
 stream service/server into FreeBDS 7.2?

Generally you can't reduce bandwidth unless you use multicast, which will 
(obviously) only work for live streams.

The easiest solution is to imitate youtube: encode your movies to flash video 
(ffmpeg can do that), then use a flash movie player on your website to stream. 
This basically streams the movie over HTTP. Some (non-flash) players (like 
VLC) can also stream over HTTP.

The hard way is to install DarwinStreamingServer, encode your movies to a 
format you want (it should fit in an mpeg4 container), add hinting tracks 
(using MP4Box) and let your users play the movies through mplayer/vlc or an 
embedded movie object on your website. You can even stream to most handsets 
this way. This method uses RTSP/RTP over UDP to deliver the content.

Using modern codecs which deliver a high compression ratio w/ good quality 
(for example H264 video and AAC audio) will go a long way in reducing 
bandwidth.

-- 
Pieter de Goeje

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


Re: will Soundblaster Audigy 2 ZS PCMCIA ever be supported?

2009-05-21 Thread Pieter de Goeje
On Thursday 21 May 2009 12:11:27 Scott Bennett wrote:
  Looking at the release notes for 7.2-RELEASE, I still don't see any
 mention of support for the Soundblaster Audigy 2 ZS PCMCIA card.  Do any
 of the developers know whether there is any plan ever to support this card?
 I've been waiting and hoping for over three years already, but haven't seen
 any news other than No, there's no driver support for in in FreeBSD
 [67].x. Thanks in advance for any information on this matter.

I assume you've tried both the snd_emu10k1 and the snd_emu10kx drivers.
You should be able to get your sound card working by installing 4Front's OSS 
driver:
http://www.opensound.com/oss.html

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 8.0: how to exchange order of recognized HDA devices?

2009-05-13 Thread Pieter de Goeje
On Wednesday 13 May 2009 09:34:56 O. Hartmann wrote:
 The problem occured after the installation of an ATI HD4670 graphics 
 board, on which one can find an additional HDA device found by the 
 kernel before the on-board HDA device is found.
 So many clients, like vlc, mplayer etc. do have problems - they either 
 play no sound through the usual pathways (via on-board soundcard/chip 
 and the attached speakerset and/or headphones).
 I see 4 mixer-devices: mixer0 through mixer3. mixer0 seems to be 
 attached to the graphics-card, mixer1 shows the usual devices I 
 recognize and mixer 2 and 3 are unknown to me, they show up only 2 
 facilities.
 
 To make things simple: is there a way to change order of the found HDA 
 controller?
sysctl hw.snd.default_unit=x 
where x should probably be 1 in your case.

Regards,
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: kern.maxfiles limit exceeded by uid 1003? what to do?

2009-04-14 Thread Pieter de Goeje
On Tuesday 14 April 2009 14:11:02 VeeJay wrote:
 Hi there
 
 I am keep getting this error on the screen. I have tried to solve this
 problem by myself but still no luck. Could anyone guide what to do to
 increase the limit and avoid this error?
 
 kern.maxfiles limit exceeded by uid 1003, please see tuning(7)
 kern.maxfiles limit exceeded by uid 1003, please see tuning(7)
 kern.maxfiles limit exceeded by uid 1003, please see tuning(7)
 kern.maxfiles limit exceeded by uid 1003, please see tuning(7)
 Apr 14 11:08:08 server2 postfix/pickup[25022] : fatal : kqueue : Too many
 files open in the system
 Apr 14 11:08:08 server2 postfix/pickup[25023] : fatal : kqueue : Too many
 files open in the system
 kern.maxfiles limit exceeded by uid 1003, please see tuning(7)
 kern.maxfiles limit exceeded by uid 1003, please see tuning(7)
 kern.maxfiles limit exceeded by uid 1003, please see tuning(7)
 kern.maxfiles limit exceeded by uid 1003, please see tuning(7)
 
 When this happens, I am unable to login on the server by consol or ssh. what
 to do? And I have to restart the server manually by on/off switch...

Check kern.openfiles sysctl to see if it is close to kern.maxfiles. Tune 
kern.maxfiles and kern.maxfilesperproc (use bigger numbers).

kern.maxfiles: Maximum number of files
kern.maxfilesperproc: Maximum files allowed open per process
kern.openfiles: System-wide number of open files

HTH,
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: the 'make' command in the ports tree

2009-04-12 Thread Pieter de Goeje
On Sunday 12 April 2009, dede wrote:
 I search a command that list all availables variables that afect program
 installation, and all arguments I can give to the /usr/port/Makefile  (I
 know about 'make search key= and name=' is there another?).

 Could anyone give me some cool addresses to learn on the subject?

Check out the ports(7) manual.

Regards,
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Linux binary wants GLIBC_2.4, GLIBCXX_3.4.9

2009-03-02 Thread Pieter de Goeje
On Monday 02 March 2009, Edward Ruggeri wrote:
 Thanks very much!  Will this actually change behavior of the Linux
 kernel module, or is it just supposed to trick new versions of
 linux_base to build?

Yes, it changes behaviour. It enables a couple of features new in the Linux 
2.6 kernel. Glibc expects these features based on the advertised version of 
the compatibility layer.

- Pieter



 -- Ned Ruggeri

 On Sun, Mar 1, 2009 at 7:35 PM, Pieter de Goeje pie...@degoeje.nl wrote:
  On Monday 02 March 2009, Edward Ruggeri wrote:
  I am using FreeBSD 7.0 Stable.  I want to run the Linguistica project
  Linux binary.  However, after loading the Linux kernel module, when I
  try to run the binary the system replies:
 
  ./lxa-ubuntu-325: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not
  found (required by ./lxa-ubuntu-325)
  ./lxa-ubuntu-325: /usr/lib/obsolete/linuxthreads/libc.so.6: version
  `GLIBC_2.4' not found (required by ./lxa-ubuntu-325)
 
  Besides asking the Linguistica developers whether they actually must
  require such recent versions of the GNU C, C++ libraries, I tried to
  install a more recent linux_base.  However, everything beyond
  linux_base-fc4 does not support Linux kernel 2.4.2.
 
  Is there a module for a newer version of the linux kernel that I can
  build so as to install a newer linux_base?  Or is there a way to use
  the same 2.4.2 module but use more recent GNU C libraries?  I am not
  an expert in this area; is there something I haven't thought of?
 
  You can upgrade the linux compatibility layer by setting the sysctl:
 
   compat.linux.osrelease=2.6.18
 
  For example in /etc/sysctl.conf. Then you should be able to install a
  newer version of linux_base.
 
  --
  Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Linux binary wants GLIBC_2.4, GLIBCXX_3.4.9

2009-03-01 Thread Pieter de Goeje
On Monday 02 March 2009, Edward Ruggeri wrote:
 I am using FreeBSD 7.0 Stable.  I want to run the Linguistica project
 Linux binary.  However, after loading the Linux kernel module, when I
 try to run the binary the system replies:

 ./lxa-ubuntu-325: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not
 found (required by ./lxa-ubuntu-325)
 ./lxa-ubuntu-325: /usr/lib/obsolete/linuxthreads/libc.so.6: version
 `GLIBC_2.4' not found (required by ./lxa-ubuntu-325)

 Besides asking the Linguistica developers whether they actually must
 require such recent versions of the GNU C, C++ libraries, I tried to
 install a more recent linux_base.  However, everything beyond
 linux_base-fc4 does not support Linux kernel 2.4.2.

 Is there a module for a newer version of the linux kernel that I can
 build so as to install a newer linux_base?  Or is there a way to use
 the same 2.4.2 module but use more recent GNU C libraries?  I am not
 an expert in this area; is there something I haven't thought of?

You can upgrade the linux compatibility layer by setting the sysctl:

  compat.linux.osrelease=2.6.18

For example in /etc/sysctl.conf. Then you should be able to install a newer 
version of linux_base.

-- 
Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: read() vs fread()

2009-02-20 Thread Pieter de Goeje
On Friday 20 February 2009 21:07:57 Junsuk Shin wrote:
 Hi BSD guys,

 While I was doing simple file read test, I found that there is a huge
 difference in file read performance between read() and fread(). I'm
 wondering if I'm doing something wrong or if someone has experienced
 similar things.

 Here is what I did,

 For the specific application, I need to bypass cache (I read only
 once, and that's all)
 The test file is 700Mbytes dummy file.
 Test app just reads the whole file.

 Test is done on FreeBSD 7.1 amd 64, Celeron E1200, WD Caviar SE16 SATA 7200
 RPM

 For test 1,

 fd = open(name, O_RDONLY | O_DIRECT);
 while(...) {
   cnt = read();
   
 }

 for test 2,

 fd = open(name, O_RDONLY | O_DIRECT);
 file = fdopen(fd,r);
 while(...) {
   cnt = fread();
   
 }

 test 1 takes about 11.64 seconds (63 MBytes/s), and test 2 takes about
 51.53 seconds (14 MBytes/s)

 If I use the pair of fopen() and fread(), it will have cache effect,
 so the result doesn't say much of hdd performance.

 Personally, I don't think the overhead of fread() (wrapper in libc) is
 that huge. What would be the reason for this?

The reason is that by default a FILE has a really small internal buffer. Take 
a look at gstat(8) while running the test: you can clearly see an insane 
amount of I/O requests being done (almost 5000 reads per second on my HDD). 
To solve this call setvbuf(3):

setvbuf(file, buf, _IOFBF, bufsize);

A bufsize of 16k or bigger should help a lot. After this modification, I see 
about 900 reads per second (using bufsize = 64k) and the read speed is equal 
to the read(2) case.

Regards,

Pieter de Goeje
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Blocking very many (tens of thousands) ip addresses in ipfw

2009-01-15 Thread Pieter de Goeje
On Wednesday 14 January 2009 18:13:06 Steve Bertrand wrote:
 Pieter de Goeje wrote:
  On Wednesday 14 January 2009 17:23:25 Artem Kuchin wrote:
  I need to block around 15 ip addreses from acccess the server at all
  at any port.  The addesses are random, they are not nets.
  These are the spammer i want to block for 24 hours.
  The list is dynamically generated and regenerated every hour or so.
  What is the most efficient way to do it?
  At first i thought doing ipfw rules using 5 ips per rule, that would
  result in 3 rules! This will be too slow!
  I need to something really quick and smart. Like matching the first
  number from ip (195 from 192.1.2.3),
  if it does not match - skip, if it does - compare the next one
  and so on.
 
  Quoting ipfw(8):
  LOOKUP TABLES
   Lookup tables are useful to handle large sparse address sets,
  typically from a hundred to several thousands of entries.  There may be
  up to 128 different lookup tables, numbered 0 to 127.
 
  net.inet.ip.fw.dyn_buckets should probably also be increased to
  efficiently handle 150k IPs.

 Please correct me if I'm wrong, but if the OP is going to drop all
 traffic immediately from the 150k IPs, then dyn_buckets shouldn't come
 into play, as there is no dynamic rule generated.

 Steve

Ah nevermind then, I misread the manpage. I thought it also applied to normal 
tables.

-- 
Pieter de Goeje

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


Re: Blocking very many (tens of thousands) ip addresses in ipfw

2009-01-14 Thread Pieter de Goeje
On Wednesday 14 January 2009 17:23:25 Artem Kuchin wrote:
 I need to block around 15 ip addreses from acccess the server at all
 at any port.  The addesses are random, they are not nets.
 These are the spammer i want to block for 24 hours.
 The list is dynamically generated and regenerated every hour or so.
 What is the most efficient way to do it?
 At first i thought doing ipfw rules using 5 ips per rule, that would
 result in 3 rules! This will be too slow!
 I need to something really quick and smart. Like matching the first
 number from ip (195 from 192.1.2.3),
 if it does not match - skip, if it does - compare the next one
 and so on.

Quoting ipfw(8):
LOOKUP TABLES
 Lookup tables are useful to handle large sparse address sets, typically
 from a hundred to several thousands of entries.  There may be up to 128
 different lookup tables, numbered 0 to 127.

net.inet.ip.fw.dyn_buckets should probably also be increased to efficiently 
handle 150k IPs.

-- 
Pieter de Goeje

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


Re: Do UDP broadcasts work in FreeBSD?

2009-01-08 Thread Pieter de Goeje
On Tuesday 06 January 2009 17:49:49 Peter Steele wrote:
 Our efforts so far indicate the answer is no, which baffles us. We want
 to send a limited broadcast to 255.255.255.255 but the message never
 arrives. The same code works fine under Linux. Is there a trick for
 doing this kind of thing under FreeBSD?

Did you enable SO_BROADCAST and IP_ONESBCAST on the socket? I remember needing 
this on FreeBSD but not on Linux. I know UDP broadcasting works fine, but is 
somewhat more involved:

addr.sin_family = AF_INET;
addr.sin_addr.s_addr = inet_addr(130.89.191.255);
addr.sin_port = htons(UDP_PORT_ET);

optval = 1;
if(setsockopt(sock, SOL_SOCKET, SO_BROADCAST, optval, sizeof optval) == -1)
err(1, setsockopt);

optval = 1;
if(setsockopt(sock, IPPROTO_IP, IP_ONESBCAST, optval, sizeof optval) == -1)
err(1, setsockopt);

const char data[] = report;

if(sendto(sock, data, sizeof data, 0, (struct sockaddr*)addr, addrlen) == -1)
warn(sendto);


This code will send a packet with destination address 255.255.255.255, on the 
interface with broadcast address 130.89.191.255. netintro(4) talks about how 
to discover these addresses. SO_ONESBCAST is documented in ip(4), SO_BROADCAST 
in getsockopt(4).

-- 
Pieter de Goeje

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


Re: FreeBSD 7.1, nvidia-driver, GeForce 8500 GT

2009-01-08 Thread Pieter de Goeje
  How much memory do you have?  Freebsd/Nvidia doesn't work with 4Gigs
  of memory OR PAE enabled kernels.  Nvidia's forums have lots more
  information
  regarding this.
 
  I'm not sure of the internals exactly, but the amount of onboard memory
  plus the memory that comes with the card can't exceed 4G.  (I could be
  wrong, but I think this is accurate).  In this case, assuming you have a
  512M card or similar then 3 Gigs of memory should work.  I have seen
  reports of 2Gigs of memory working (i386) and am sure that works without
  problems. amd64 doesn't work at all, as you have already stated.
 
  If you have a requirement to use the nvidia based graphics driver, then
  you really don't have an alternative at this time, then to remove system
  memory from your main board.
 
  ~Paul

Putting hw.physmem=3G in /boot/loader.conf might also work.

-- 
Pieter de Goeje

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


Re: RTL8168/8111 Not Being Assigned to Interface

2008-11-22 Thread Pieter de Goeje
On Friday 21 November 2008, hamtilla wrote:
 I'm running 7.0-RELEASE-i386 on Jetway's NC92-N230 mainboard. The board has
 one integrated RTL8168/8111 gigabit NIC as well as an expansion board with
 three RTL8168/8111 NICs.

 [EMAIL PROTECTED]:1:0:0:   class=0x02 card=0x816810ec chip=0x816810ec
 rev=0x02 hdr=0x00
 vendor = 'Realtek Semiconductor'
 device = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC'
 class  = network
 subclass   = ethernet

This NIC requires FreeBSD 7-STABLE or -CURRENT. 

You can probably copy the if_re driver from -STABLE to your source tree and 
recompile the kernel, or simply update to 7-STABLE.

Hope this helps,

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


Re: Running X without a videocard

2008-11-19 Thread Pieter de Goeje
On Wednesday 19 November 2008, Gary Hartl wrote:
 Whoa this is way beyond me I think...can you direct me to a howto or the
 like.

 X11 over SSH good lordi'm out of touch with *NIX..
 Am i to understand that i could run a pretty nice (not gnome or kde) but
 one of the less intense interfaces over ssh (this is on an internal network
 so connection speed isn't an issue.

 6 years, and I have admin alzheimers'

 Thanks

X11 over ssh is as simple as:

workstation-with-X ssh -Y headlessbox
headlessbox xterm

Or even shorter:
ssh -Y headlessbox xterm

To enable X11 over SSH you need to at least have xauth installed on the 
headless box (and ofcourse the X program you're trying to run, in my example 
xterm).

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


Re: FBSD 7.1 kern.maxdsiz

2008-11-19 Thread Pieter de Goeje
On Wednesday 19 November 2008, Drew Tomlinson wrote:
 I installed FBSD 7.1-PRERELEASE amd64 version on an Intel Core2Duo box
 with 4 GB of RAM.  The main purpose of this box is to run the Urchin web
 analysis software from Google.  The Urchin installation docs
 (https://secure.urchin.com/helpwiki/en/Urchin_Installation_Guide_(FreeBSD_a
nd_Linux)) contain a note for FreeBSD users waring of a hard coded process
 datasiz limit of 500 MB and instruct on to set kern.maxdsiz=1073741824
 in /boot/loader.conf.  However FBSD 7.1 doesn't appear to have this
 sysctl.  How can I do the equivalent of this in FBSD 7.1?

 Thanks,

 Drew

I don't think you need to increase the datasize on 64bit FreeBSD. It seems 
that the default datasize is really large: 32GB

You can check using the 'limits' command.

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


Re: GRUB: Filesystem type unknown (ufs2)

2008-11-14 Thread Pieter de Goeje
On Thursday 13 November 2008, Unga wrote:
 --- On Thu, 11/13/08, Pieter de Goeje [EMAIL PROTECTED] wrote:
  I've used GRUB in the past to boot FreeBSD. The GRUB
  boot directory was
  located on the FreeBSD root partition, so it can work. I
  did use the port
  though.

 Now the issue is the root partition itself cannot access. Were your
 partitions ufs2? Which version of GRUB you used? Any possibility to give it
 a try again?

Yes, the root was UFS2. I don't know which version I used at the time. When I 
get home from work, I'll give it a try.

-- 
Pieter de Goeje

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


Re: GRUB: Filesystem type unknown (ufs2)

2008-11-13 Thread Pieter de Goeje
On Thursday 13 November 2008, Unga wrote:
 --- On Thu, 11/13/08, Jeremy Chadwick [EMAIL PROTECTED] wrote:
  From: Jeremy Chadwick [EMAIL PROTECTED]
  Subject: Re: GRUB: Filesystem type unknown (ufs2)
  To: Unga [EMAIL PROTECTED]
  Cc: freebsd-questions@freebsd.org
  Date: Thursday, November 13, 2008, 7:21 PM
 
  On Thu, Nov 13, 2008 at 03:16:40AM -0800, Unga wrote:
   --- On Thu, 11/13/08, Jeremy Chadwick
 
  [EMAIL PROTECTED] wrote:
How about asking the GNU GRUB folks if GRUB 0.97
 
  supports
 
UFS2?
  
   It seems some old version of GRUB on a old version of
 
  FreeBSD has worked:
  http://lists.freebsd.org/pipermail/freebsd-hackers/2004-May/006944.html
 
Also, GRUB is up to 1.96, and does work with
 
  amd64.  The
 
port is
horribly outdated.
  
   I don't mind try GRUB 1.96. The problem is I have
 
  never used GRUB2 and I have no idea how to configure it. Is
  there a good notes/documentation on how to use  GRUB2? What
  I need basically is where to put files (eg. stage1, stage2
  and *_stage1_5 of GRUB1 in /boot/grub/.) and a sample
  configuration file. Anyway meanwhile I'll try to find
  some documentation.
 
ftp://alpha.gnu.org/gnu/grub/
  
   I got my file from above location.
 
  I think these kinds of questions should probably go to the
  GNU GRUB
  folks though, don't you think?  I don't mean to
  sound like I'm stepping
  on your efforts, but the sysutils/grub port has very little
  to it
  (meaning, issues/problems of this type should very likely
  be issues with
  GRUB itself and not with the port or FreeBSD).

 Well, I thought FreeBSD guys use GRUB. Its easy to communicate with those
 who use FreeBSD rather than those who use Linux and discuss mostly on a
 theoretical basis.

 I mostly wanted to know does GRUB works for other FreeBSD users. If so, I
 could investigate what went wrong on mine.

 Btw, I did not use the port, its straight away compiled from sources. That
 I mentioned as the first line in my original post.

 Regards
 Unga

I've used GRUB in the past to boot FreeBSD. The GRUB boot directory was 
located on the FreeBSD root partition, so it can work. I did use the port 
though.

-- 
Pieter de Goeje

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


Re: tool to recover fat partition

2008-11-13 Thread Pieter de Goeje
On Wednesday 12 November 2008, Gonzalo Nemmi wrote:
 So ...

 newfs_msdos /dev/insert_typo_in_here

 .. new filesystem succesfully created ... lost partition on the wrong
 drive ...

 Is there a tool to recover the files on said partition in FreeBSD (7
 release)?

 Thanks for you help :)

 Regards

If the destroyed parition is an UFS partition, you could try fsck_ffs'ing it. 
Hopefully some superblock backups are still intact. Just to be extra safe, 
copy the entire partition to a file, create an md device from it and fsck the 
md device.

-- 
Pieter de Goeje

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


Re: tool to recover fat partition

2008-11-13 Thread Pieter de Goeje
On Thursday 13 November 2008, Pieter de Goeje wrote:
 On Wednesday 12 November 2008, Gonzalo Nemmi wrote:
  So ...
 
  newfs_msdos /dev/insert_typo_in_here
 
  .. new filesystem succesfully created ... lost partition on the wrong
  drive ...
 
  Is there a tool to recover the files on said partition in FreeBSD (7
  release)?
 
  Thanks for you help :)
 
  Regards

 If the destroyed parition is an UFS partition, you could try fsck_ffs'ing
 it. Hopefully some superblock backups are still intact. Just to be extra
 safe, copy the entire partition to a file, create an md device from it and
 fsck the md device.

Nevermind, didn't read the subject ;-). 
On topic, sysutils/fatback seems promising.

-- 
Pieter de Goeje

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


Re: what is your programming language on freebsd?

2008-11-07 Thread Pieter de Goeje
On Thursday 06 November 2008, Jerry McAllister wrote:
 On Fri, Nov 07, 2008 at 12:10:41AM +0800, Foo JH wrote:
  Hi there,
 
  Earlier I was asking for some help getting XSP/ mod_mono on FreeBSD. I
  may be asking in the wrong mailing list, but my impression is that mono
  on FreeBSD is generally not a popular idea.
 
  To pose my questions to the developers in the FreeBSD community:
  1. What programming language(s) do you deploy on FreeBSD?
  2. Is FreeBSD more optimised in performance for any particular language?
  3. Is FreeBSD even a popular choice as a development platform, or is it
  better suited as a special-purpose OS (eg. mail server, DNS server)?

 FreeBSD suppports just about any programming language that has
 been created. If you go to /usr/ports/lang/   you will see
 a large list of them that you can install.

 As for the most common, well, C and C++, Shells such as SH, CSH/TCSH
 and Perl are very common, plus in conjunction with web servers such
 as Apache, PHP, Python, Ruby and a number of others are common.
 If you are doing number crunching, you can use FORTRAN and if you
 are in to historical business environments, there is even Cobol.

 As for being optimized for a language, it is more likely the other
 way around.  Are there any languages that have good optimization
 for running on FreeBSD.   Maybe.   Someone else may know more about
 that, than I do.

 jerry

And don't forget Java. Eclipse-devel + jdk16 make an excellent development 
environment on FreeBSD.

-- 
Pieter de Goeje

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


Re: fastest raw device copy?

2008-10-31 Thread Pieter de Goeje
On Friday 31 October 2008, Christoph Kukulies wrote:
 Ivan Voras schrieb:
  Jeremy Chadwick wrote:
  On Fri, Oct 31, 2008 at 09:48:16AM +0100, Christoph Kukulies wrote:
  What would be the fastest way to do that sector by sector copy? I'm
  using dd right now,
 
  dd if=/dev/ad0 of=/dev/da0 bs=1000
 
  On the flip side, your blocksize (bs) there is quite high for no good
  reason.  I'd pick something more like bs=64k or bs=128k.  The default
  (512) is too small for what you want, but 10MBytes is silly.
 
  Not only that, but 1000 isn't even correct - it needs to be a
  multiple of sector size. Generally, using suffixes will do the right
  thing:
 
  dd if=/dev/ad0 of=/dev/da0 bs=1m

 OK, I understand that 1000 isn't good, I just thought it wouldn't
 harm. But if it is a transfer rate killer then I'd better think of
 typing ^C now. The command is running for 6 hours now.

 An idea how I can check the current amount of transfered byed alongside
 the running dd command? Or watch the current i/o rate?

Press ^T. It will show you progress and I/O speed.

-- 
Pieter de Goeje

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


Re: Any way to play www.last.fm on FreeBSD?

2008-09-24 Thread Pieter de Goeje
On Tuesday 23 September 2008, Gary Kline wrote:
  Amarok has built-in support for Last.fm.

   Hm. I can't seem to get it to work.  At least if I click on the
   last.fm drop-down menu,  ...Zip.

   I built last.fm; it lives in /usr/local/bin.  Now, in Konqueror,
   do I add this whole path to the Plug In section?  I didn't
   excpect the last.fm binary to be a stand-alone, and I'm not sure
   it is because sometimes in calls Konq.  Then things hang.

   Clues much appreciated!

Go to Settings - last.fm. Enter your login and check any boxes of your 
choice :-). You can then listen to last.fm radio using Playlist - Add 
last.fm stream.

Good luck!

-- 
Pieter de Goeje

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


Re: Any way to play www.last.fm on FreeBSD?

2008-09-24 Thread Pieter de Goeje
On Wednesday 24 September 2008, Gary Kline wrote:
 On Wed, Sep 24, 2008 at 10:19:01AM +0200, Pieter de Goeje wrote:
  On Tuesday 23 September 2008, Gary Kline wrote:
Amarok has built-in support for Last.fm.
  
 Hm. I can't seem to get it to work.  At least if I click on the
 last.fm drop-down menu,  ...Zip.
  
 I built last.fm; it lives in /usr/local/bin.  Now, in Konqueror,
 do I add this whole path to the Plug In section?  I didn't
 excpect the last.fm binary to be a stand-alone, and I'm not sure
 it is because sometimes in calls Konq.  Then things hang.
  
 Clues much appreciated!
 
  Go to Settings - last.fm. Enter your login and check any boxes of your
  choice :-). You can then listen to last.fm radio using Playlist - Add
  last.fm stream.
 
  Good luck!

   Are you refering to KDE4?  I'm using KDE3, the lastest upgrades,
   and my Konq settings has no - last.fm ``Configuration''.
   I can login to www.last/fm and will look for Playlist.

   gary

   PS:  these guys have a *lot* of music, :-)

Amarok is able to stream lastfm radio on it's own. The settings I referred to, 
are Amarok's settings, not Konqueror's.

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


Re: Any way to play www.last.fm on FreeBSD?

2008-09-22 Thread Pieter de Goeje
On Monday 22 September 2008, Gary Kline wrote:
   I can't listen to last.fm with firefox2 or firefox3--and parts of
   ff3 don't get loaded.  With the KDE3 browser, same thing; it
   won't recognize last.fm.  Nutshell: what do I need to do to
   play songs from last.fm here [FBSD]?

   tia.

Amarok has built-in support for Last.fm.

-- 
Pieter de Goeje

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


Re: branches, updates, buildworld

2008-09-10 Thread Pieter de Goeje
On Wednesday 10 September 2008, [EMAIL PROTECTED] wrote:
 4) Will make buildworld fail with a make.conf like this:

 
 PERL_VER=5.8.8
 PERL_VERSION=5.8.8
 BDECFLAGS=-march=pentium2 -mmmx -pipe -O3 -fomit-frame-pointer \
 -combine -fno-strict-aliasing

 CFLAGS+=${BDECFLAGS}
 CXXFLAGS=${CFLAGS}
 COPTFLAGS=-march=pentium2 -mmmx -pipe -O3 -fomit-frame-pointer \
 -combine -fno-strict-aliasing

Setting COPTFLAGS is discouraged, because you risk breaking the kernel. In 
particular, the kernel can not use any floating point operations including 
simd operations, which you explicitly enable above. May I suggest that you 
first try to rebuild the base system without any CFLAGS set but simply 

CPUTYPE?=pentium2

Note that by default the system is build with -O2 -fno-strict-aliasing -pipe. 

-- 
Pieter de Goeje

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


Re: Removing a port its dependencies /

2008-08-10 Thread Pieter de Goeje
On Sunday 10 August 2008, ervin wrote:
 hi,

 I installed a port  with make install and it worked including
 installation of dependencies

 Removing the port:

 Do I use pkg_delete or  ?
 I want the dependencies to me removed as well  the make deinstall
 deinstall the primary port but not the dependencies.

You can use pkg_rmleaves or pkg_cutleaves (both in ports/ports-mgmt).

-- 
Pieter de Goeje

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


Re: 64-bit Linux Binary Compatibility (for Matlab)

2008-08-07 Thread Pieter de Goeje
On Thursday 07 August 2008, David Gurvich wrote:
 If you are looking for batch processing, octave may be an option.  The
 objective was to be as compatible with Matlab as possible.  There
 wasn't any gui available when I last looked at this program.

There's math/koctave, which is a GUI for some definition of G.


 As a side note, I found the following from the Matlab site hilarious :
 FreeBSD distributions of Linux are not compatible with MATLAB 6.0 (R12).

 Makes me wonder how good the Linux version of Matlab is.

Indeed :-)

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


Re: Questions about healthd and mprime

2008-08-07 Thread Pieter de Goeje
On Thursday 07 August 2008, Ronald F. Guilmette wrote:
 Problem is: documentation of healthd's output is almost non-existant.
 OK, so when it prints those three temperature numbers, which one stands
 for what?  And if, as I surmize, the last (and highest) one is CPU
 temp, then why doesn't it seem to change at all?  I'm guessing that
 I just need to create some artificial load, yes?

Try sysutils/k8temp. When run with -n, it only prints the CPU's temperature. 
Together with rrdtool it makes a nice graph:
http://lux.student.utwente.nl/~pyotr/stats/graphs/temperature-all-168.png

For Intel Core CPU's there's coretemp(4).


 OK, so _now_ I've looked around and found out that a lot of folks
 these days heat up their CPUs by running the mprime thingy.  Swell.
 But I don't know diddly poo about this program.  So can somebody please
 tell me the set of best command line options for the thing if your
 only goal is to stress your CPU?

I don't know about mprime, but running make -j4 buildworld in /usr/src will 
make your CPU sweat.


 Thanks in advance.


 Regards,
 rfg

-- 
Pieter de Goeje

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


Re: Port Management on a larger scale

2008-07-24 Thread Pieter de Goeje
On Thursday 24 July 2008, Peter Boosten wrote:
 Roland Smith wrote:
  On Tue, Jul 22, 2008 at 12:41:46AM -0400, Derek Belrose wrote:
  What is the recommended way of doing port management?
 
  Alternatively you could use one server to build packages which are then
  stored on a shared filesystem to install on all others, but that sounds
  like more work to me.

 It would be a great feature to actually being able to build packages
 without having to install them. Or did I miss that feature in the
 man-pages?

 Peter

It is technically impossible to create a package without first installing it's 
dependencies, so people usually a create chroot for that purpose.

-- 
Pieter de Goeje

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


Re: first pre-emptive raid

2008-06-28 Thread Pieter de Goeje
On Saturday 28 June 2008, prad wrote:
 3. it seems that geom just does striping and mirroring, but vinum
 offers more configurability and is really the preferred choice?

Geom also does raid 3 and disk concatenation (JBOD) (see the geom(8) manpage). 
I think geom is preferred because it is better tested (in later versions of 
FreeBSD) and easier to setup.


 4.1 with 4 18G drives one thought is to do a raid1, but we really
 don't  want 3 identical copies. is the only way to have 2 36G mirrors,
 by using raid0+1 or raid1+0?

If you want one logical disk you could also mirror both pairs and use 
gconcat to add their sizes together.


 4.2 another possibility is to do raid0, but is that ever wise unless
 you desperately need the space since in our situation you run a 1/4
 chance of going down completely?

Indeed, the chances have quadrupled.


 4.3 is striping or mirroring faster as far as i/o goes (or does the
 difference really matter)? i would have thought the former, but the
 handbook says Striping requires somewhat more effort to locate the
 data, and it can cause additional I/O load where a transfer is spread
 over multiple disks #20.3

Both are faster when reading data. Raid 0 is faster when writing. When data 
blocks are spread over N disks, it is possible to achieve sequential read 
speeds N times faster than a simple JBOD configuration would do. However, the 
system also needs N times more bandwith to the disks to achieve this. If the 
disks are on a limited speed shared bus, one could imagine that the overhead 
of the extra I/O commands needed to do raid0 actually impairs performance.


 4.4 vinum introduces raid5 with striping and data integrity, but
 exactly what are the parity blocks? furthermore, since the data is
 striped, how can the parity blocks rebuild anything from a hard drive
 that has crashed? surely, the data from each drive can't be duplicated
 somehow over all the drives though #20.5.2 Redundant Data Storage has
 me scratching my head! if there is complete mirroring, wouldn't the
 disk space be cut in half as with raid1?

Parity is calculated using the following formula: 

parity = data0 XOR data1 XOR data2

Where data0..2 are datablocks striped over the disks, thus we need four disks 
to hold our data (3 for data 1 for parity).

Now the disk with datablock 0 dies. To get the data back we simply need to 
solve the previous formula for data0:

data0 = parity XOR data1 XOR data2

and for data1, 2 (in case the other disks die):

data1 = parity XOR data0 XOR data2
data2 = parity XOR data0 XOR data1

This scales easily with bigger numbers of disks. Another use of parity data is 
to check data integrity. If for some reason the calculated parity of 
a stripe is no longer matching the on-disk parity data, then there must be 
an error.

Note that is is easy to see the similarity of raid0 and raid5; basically raid5 
is raid0 plus extra parity data for redundancy, resulting in being able to 
recover from 1 disk failure.

-- 
Pieter de Goeje

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


Re: 7-STABLE Watchdog Timeout

2008-06-03 Thread Pieter de Goeje
On Tuesday 03 June 2008, Jeremy Karlson wrote:
 I'm still looking into my watchdog timeout with me re card.  I'm
 starting to wonder if my problem is in any way related to the
 discussion back in September 2006 starting with this post:

 6.2 SHOWSTOPPER - em completely unusable on 6.2
 http://lists.freebsd.org/pipermail/freebsd-stable/2006-September/028792.htm
l

 It seems that under certain conditions and loads, a network interface
 with a shared interrupt would stop responding until the watchdog
 resets it.  This seems to be very similar to what I see.  At the time,
 they seemed mostly concerned about fixing the em driver; I'm using re.

 Unfortunately though, I can't seem to find what the resolution to this
 was, and if it could be related to the failure I'm seeing.  Does
 anyone know what happened with that problem?

 -- Jeremy

If I remember correctly, there were two problems: 1) there was a race in the 
interrupt handler (this affected all interrupt handlers), 2) em used the now 
obsolete if_timer to implement it's watchdog timeout. This timer is 
unreliable. Both items have been fixed, so this shouldn't be related to your 
problem. #2 wasn't fixed in all drivers, but if you are affected you should 
see a warning on startup stating the use of the obsolete timer. I believe 
if_re was converted some time ago.

Note that in theory watchdog timeouts could also mean broken hardware, bad 
connection to PCI bus or other intermittent hw failure. I would try reseating 
the card in another slot.

-- 
Pieter de Goeje

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


  1   2   3   >