Re: sysctl with regex?

2010-02-10 Thread Oliver Fromme
Andrew Brampton wrote: Today I was writing a script to read all the dev.cpu.?.temperature sysctl OIDs. I was parsing them using a simple grep, but it occurred to me it might be better if sysctl supported some form of regexp. For example instead of typing: sysctl -a | grep

Re: sysctl with regex?

2010-02-10 Thread Dag-Erling Smørgrav
Garrett Cooper yanef...@gmail.com writes: C-shell globs as some programming languages referring to it as, i.e. perl (which this is a subset of the globs concept) allow for expansion via `*' to be `anything'. Regexp style globs for what you're looking for would be either .* (greedy) or .+

Re: System() returning ECHILD error on FreeBSD 7.2

2010-02-10 Thread Oliver Fromme
Naveen Gujje gujjenav...@gmail.com wrote: signal(SIGCHLD, SigChildHandler); void SigChildHandler(int sig) { pid_t pid; /* get status of all dead procs */ do { int procstat; pid = waitpid(-1, procstat, WNOHANG); if (pid 0) { if (errno == EINTR)

Re: sysctl with regex?

2010-02-10 Thread Roman Divacky
On Wed, Feb 10, 2010 at 12:24:57PM +0100, Dag-Erling Sm??rgrav wrote: Garrett Cooper yanef...@gmail.com writes: C-shell globs as some programming languages referring to it as, i.e. perl (which this is a subset of the globs concept) allow for expansion via `*' to be `anything'. Regexp style

Re: sysctl with regex?

2010-02-10 Thread Dag-Erling Smørgrav
Roman Divacky rdiva...@freebsd.org writes: Dag-Erling Smørgrav d...@des.no writes: Formally, a regular expression is a textual representation of a finite state machine that describes a context-free grammar. I dont think so regular expressions describe regular languages which are a

Re: sysctl with regex?

2010-02-10 Thread Joerg Sonnenberger
On Wed, Feb 10, 2010 at 01:14:01PM +0100, Roman Divacky wrote: Formally, a regular expression is a textual representation of a finite state machine that describes a context-free grammar. I dont think so regular expressions describe regular languages which are a strict subset of context

Re: our little daemon abused as symbol of the evil

2010-02-10 Thread Julian H. Stacey
KAYVEN RIESE wrote: Isn't what we are looking at here defamation of character?? Our beloved=20 Daemon is being accused of browser history stealing! Yes, an abuse. Interesting skimming the article though, if heavy on the math. Earlier, ref: From: Oliver Fromme o...@lurza.secnetix.de

Re: How can I force boot from alternate drive with boot.config?

2010-02-10 Thread John Baldwin
On Tuesday 09 February 2010 2:22:53 pm Peter Steele wrote: So, more precisely, if I wanted to boot from drive 1, I'd use this? 1:ad(1p3)/boot/loader Yes, unless there are more bugs hiding. :-) I fixed a few in August last year. Well, I'll give it a try and let you know if I find new

Re: Strange problem with 8-stable, VMWare vSphere 4 AMD CPUs (unexpected shutdowns)

2010-02-10 Thread Sean C. Farley
On Wed, 10 Feb 2010, Ivan Voras wrote: It looks like I've stumbled upon a bug in vSphere 4 (recent update) with FreeBSD/amd64 8.0/8-stable (but not 7.x) guests on Opteron(s). In this combination, everything works fine until a moderate load is started - a buildworld is enough. About five

Re: Strange problem with 8-stable, VMWare vSphere 4 AMD CPUs (unexpected shutdowns)

2010-02-10 Thread Andriy Gapon
on 10/02/2010 17:36 Ivan Voras said the following: It looks like I've stumbled upon a bug in vSphere 4 (recent update) with FreeBSD/amd64 8.0/8-stable (but not 7.x) guests on Opteron(s). In this combination, everything works fine until a moderate load is started - a buildworld is enough. About

Re: sysctl with regex?

2010-02-10 Thread Garrett Cooper
On Wed, Feb 10, 2010 at 2:51 AM, Oliver Fromme o...@lurza.secnetix.de wrote: Andrew Brampton wrote:   Today I was writing a script to read all the dev.cpu.?.temperature   sysctl OIDs. I was parsing them using a simple grep, but it occurred   to me it might be better if sysctl supported some

Re: Strange problem with 8-stable, VMWare vSphere 4 AMD CPUs (unexpected shutdowns)

2010-02-10 Thread Andriy Gapon
on 10/02/2010 19:05 Ivan Voras said the following: On 02/10/10 17:05, Andriy Gapon wrote: on 10/02/2010 17:36 Ivan Voras said the following: It looks like I've stumbled upon a bug in vSphere 4 (recent update) with FreeBSD/amd64 8.0/8-stable (but not 7.x) guests on Opteron(s). In this

Re: sysctl with regex?

2010-02-10 Thread Garrett Cooper
2010/2/10 Dag-Erling Smørgrav d...@des.no: Garrett Cooper yanef...@gmail.com writes: C-shell globs as some programming languages referring to it as, i.e. perl (which this is a subset of the globs concept) allow for expansion via `*' to be `anything'. Regexp style globs for what you're looking

Re: System() returning ECHILD error on FreeBSD 7.2

2010-02-10 Thread Naveen Gujje
Naveen Gujje gujjenaveen at gmail.com http://lists.freebsd.org/mailman/listinfo/freebsd-hackers wrote: signal(SIGCHLD, SigChildHandler); void SigChildHandler(int sig) { pid_t pid; /* get status of all dead procs */ do { int procstat; pid = waitpid(-1, procstat,

Re: System() returning ECHILD error on FreeBSD 7.2

2010-02-10 Thread Garrett Cooper
On Wed, Feb 10, 2010 at 9:25 AM, Naveen Gujje gujjenav...@gmail.com wrote: Naveen Gujje gujjenaveen at gmail.com http://lists.freebsd.org/mailman/listinfo/freebsd-hackers wrote:   signal(SIGCHLD, SigChildHandler);     void   SigChildHandler(int sig)   {     pid_t pid;       /* get

Re: System() returning ECHILD error on FreeBSD 7.2

2010-02-10 Thread Andriy Gapon
on 10/02/2010 19:52 Garrett Cooper said the following: Isn't this section of the system(3) libcall essentially doing what you want, s.t. you'll never be able to get the process status when you call waitpid(2)? do { pid = _wait4(savedpid, pstat, 0, (struct rusage *)0);

Re: Strange problem with 8-stable, VMWare vSphere 4 AMD CPUs (unexpected shutdowns)

2010-02-10 Thread Ivan Voras
On 10 February 2010 18:13, Andriy Gapon a...@icyb.net.ua wrote: on 10/02/2010 19:05 Ivan Voras said the following: On 02/10/10 17:05, Andriy Gapon wrote: Wild guess - try disabling superpages in the guests. It looks like your guess is perfectly correct :) The guest has been doing

NFS write corruption on 8.0-RELEASE

2010-02-10 Thread Dmitry Marakasov
Hi! I think I've reported that before, the I thought it's been fixed, however I still get data corruptions when writing on NFS volumes. Now I wonder - is nobody really using NFS, or do I have that much of uncommon setup, or this is some kind of local problem? Client: 8.0-RELEASE i386 Server:

Re: Strange problem with 8-stable, VMWare vSphere 4 AMD CPUs (unexpected shutdowns)

2010-02-10 Thread Andriy Gapon
on 10/02/2010 20:03 Ivan Voras said the following: When you say very unique is it in the it is not Linux or Windows sense or do we do something nonstandard? The former - neither Linux, Windows or OpenSolaris seem to have what we have. So we might be the first testers for certain processor

Re: Strange problem with 8-stable, VMWare vSphere 4 AMD CPUs (unexpected shutdowns)

2010-02-10 Thread Ivan Voras
On 10 February 2010 19:10, Andriy Gapon a...@icyb.net.ua wrote: on 10/02/2010 20:03 Ivan Voras said the following: When you say very unique is it in the it is not Linux or Windows sense or do we do something nonstandard? The former - neither Linux, Windows or OpenSolaris seem to have what we

Re: Strange problem with 8-stable, VMWare vSphere 4 AMD CPUs (unexpected shutdowns)

2010-02-10 Thread Ivan Voras
On 10 February 2010 19:26, Ivan Voras ivo...@freebsd.org wrote: On 10 February 2010 19:10, Andriy Gapon a...@icyb.net.ua wrote: on 10/02/2010 20:03 Ivan Voras said the following: When you say very unique is it in the it is not Linux or Windows sense or do we do something nonstandard? The

Re: Strange problem with 8-stable, VMWare vSphere 4 AMD CPUs (unexpected shutdowns)

2010-02-10 Thread Andriy Gapon
on 10/02/2010 20:26 Ivan Voras said the following: On 10 February 2010 19:10, Andriy Gapon a...@icyb.net.ua wrote: on 10/02/2010 20:03 Ivan Voras said the following: When you say very unique is it in the it is not Linux or Windows sense or do we do something nonstandard? The former - neither

Re: Strange problem with 8-stable, VMWare vSphere 4 AMD CPUs (unexpected shutdowns)

2010-02-10 Thread Ivan Voras
On 10 February 2010 19:35, Andriy Gapon a...@icyb.net.ua wrote: on 10/02/2010 20:26 Ivan Voras said the following: On 10 February 2010 19:10, Andriy Gapon a...@icyb.net.ua wrote: on 10/02/2010 20:03 Ivan Voras said the following: When you say very unique is it in the it is not Linux or Windows

Re: sysctl with regex?

2010-02-10 Thread Dag-Erling Smørgrav
Garrett Cooper yanef...@gmail.com writes: Dag-Erling Smørgrav d...@des.no writes: A glob pattern can be trivially translated to a regular expression, but not the other way around.  Basically, * in a glob pattern corresponds to [^/]*, ? corresponds to ., and [abcd] and [^abcd] have the same

Re: System() returning ECHILD error on FreeBSD 7.2

2010-02-10 Thread Naveen Gujje
On Wed, Feb 10, 2010 at 11:28 PM, Andriy Gapon a...@icyb.net.ua wrote: on 10/02/2010 19:52 Garrett Cooper said the following: Isn't this section of the system(3) libcall essentially doing what you want, s.t. you'll never be able to get the process status when you call waitpid(2)?

Re: NFS write corruption on 8.0-RELEASE

2010-02-10 Thread Oliver Fromme
Dmitry Marakasov amd...@amdmi3.ru wrote: I think I've reported that before, the I thought it's been fixed, however I still get data corruptions when writing on NFS volumes. Now I wonder - is nobody really using NFS, or do I have that much of uncommon setup, or this is some kind of local

Re: System() returning ECHILD error on FreeBSD 7.2

2010-02-10 Thread Jilles Tjoelker
On Wed, Feb 10, 2010 at 12:44:57PM +0530, Naveen Gujje wrote: [SIGCHLD handler that calls waitpid()] And, in some other part of the code, we call system() to add an ethernet interface. This system() call is returning -1 with errno set to ECHILD, though the passed command is executed

Re: sysctl with regex?

2010-02-10 Thread Garrett Cooper
On Feb 10, 2010, at 10:42 AM, Dag-Erling Smørgrav wrote: Garrett Cooper yanef...@gmail.com writes: Dag-Erling Smørgrav d...@des.no writes: A glob pattern can be trivially translated to a regular expression, but not the other way around. Basically, * in a glob pattern corresponds to [^/]*, ?

KLD hello.ko: depends on kernel - not available or version mismatch

2010-02-10 Thread james toy
Hello Hackers, I am working on learning to write FreeBSD drivers; however, I have some practice writing IOKit drivers for MacOSX (they are entirely different I know!). The code I am working with can be found here: http://pastebin.com/m2bbb393c and I am getting the error: dontpanic#

Re: KLD hello.ko: depends on kernel - not available or version mismatch

2010-02-10 Thread Andrey V. Elsukov
On 11.02.2010 5:25, james toy wrote: any information pointing me to being able to load this driver would be greatly appreciated. Probably you have source code with different __FreeBSD_version. Check output of these commands: grep __FreeBSD_version /usr/src/sys/param.h sysctl kern.osreldate

Re: How can I force boot from alternate drive with boot.config?

2010-02-10 Thread Julian Elischer
John Baldwin wrote: I think the unit number is largely ignored now. The kernel used to believe it for finding /, but the loader now reads /etc/fstab and sets a variable in kenv to tell the kernel where to find /. One of the most annoying improvements for the decade from my perspective..

Re: KLD hello.ko: depends on kernel - not available or version mismatch

2010-02-10 Thread Julian Elischer
james toy wrote: Hello Hackers, I am working on learning to write FreeBSD drivers; however, I have some practice writing IOKit drivers for MacOSX (they are entirely different I know!). The code I am working with can be found here: http://pastebin.com/m2bbb393c and I am getting the error: