Re: kqueue oddity

2006-04-01 Thread Dan Nelson
In the last episode (Apr 01), Vclav Haisman said: > Dan Nelson wrote: > > It's a kqueue bug, but a minor one. The problem is that the same > > "flags" field is used to pass "actions" from the client, and return > > status from the kernel. When you

Re: kqueue oddity

2006-04-01 Thread Dan Nelson
>kn_kevent.flags &= ~EV_ADD; kn->kn_status = KN_INFLUX|KN_DETACHED; error = knote_attach(kn, kq); -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing li

Re: Creating real bool type for simulation in physics

2006-03-13 Thread Dan Nelson
Take a look at the "bitstring" functions, which let you allocate an array of "bits" and manipulate them individually. They're documented in the bitstring manpage. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-h

Re: Advice on the lightweight resolver, lwres.

2006-03-09 Thread Dan Nelson
eeds to be running, and I'm guessing it would listen on UDP port 921. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Naive implementation of strverscmp(3)

2006-02-15 Thread Dan Nelson
t the other way round, I could try implementing that > too. This looks a lot like strnatcmp, which is "natural sort" or "do what I mean" sort :) http://sourcefrog.net/projects/natsort/ Your function is simpler than the C implementation on that site, but falls over

Re: FreeBSD Real Mode interface

2006-01-30 Thread Dan Nelson
inside): > > http://kaya.nov.net/frol/patches/atitvout-0.4-bsd2.diff If this is anything like vm86 mode, check out the i386_vm86 manpage. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.free

Re: increasing dd disk to disk transfer rate

2006-01-12 Thread Dan Nelson
nd fix addresses the problem that with a single dd, you are either reading or writing. If you pipe the first dd into a second one, it'll let you run at the max speed of the slowest device. dd if=/dev/ad2 conv=noerror,sync bs=64k | dd of=/dev/ad3 bs=6

Re: using get_system_info() - obtaining system load averages

2006-01-09 Thread Dan Nelson
l to get the load average. A simpler way is to just call the getloadavg() function; see its manpage for more info. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/fre

Re: copy directory structure

2005-12-21 Thread Dan Nelson
. -type d | tar Tcfn - - | ( cd /otherpath ; tar xf - )" -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: (no subject)

2005-12-19 Thread Dan Nelson
erator" user has read access to the raw device files that filesystems are mounted on. That's how it can do backups with the dump command. It has no special access to mounted filesystems themselves. -- Dan Nelson [EMAIL PROTECTED] _

Re: Number of kevents registered in kqueue

2005-12-16 Thread Dan Nelson
r, and what the kernel thinks you're waiting for :) -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: easy question about kill command

2005-12-16 Thread Dan Nelson
still depends on what daemon you're talking about. syslogd, for example, re-reads /etc/syslog.conf and reloads its logfiles on SIGHUP. Luckily, most base daemons are started from their own /etc/rc.d/* scripts which know how that particular program works, so y

Re: Does tcpdump2xplot work?

2005-12-13 Thread Dan Nelson
I've traced down the issue: tcpdump now creates lines like: > > IP > ... > > And tcpdump2xplot doesn't want to see that 'IP' field. I'll try to get a > patch cobbled... You'll probably get better results using the tcptrace por

Re: sysctl, HW_PHYSMEM, and crippled gcc

2005-12-09 Thread Dan Nelson
of physmem; > % 14 static int mib[] = { CTL_HW, HW_PHYSMEM }; > % 15 static size_t miblen = sizeof(mib) / sizeof(mib[0]); > % 16 > % 17 if (sysctl(mib, miblen, &physmem, &len, NULL, 0) != 0) > % 18 err(1, "sysctl

Re: sysctl, HW_PHYSMEM, and crippled gcc

2005-12-08 Thread Dan Nelson
ry. On all my FreeBSD boxes from 128MB to 1GB of RAM, I get the exact same heuristic values as you, so I'm not sure whether the code works at all. I seem to remember having the opposite problem on a memory-limited machine which insisted in allocating a relatively huge percentage of RAM for a

Re: [PATCH] nsswitch extensions + caching

2005-12-06 Thread Dan Nelson
> > It gives us the ability use modules to provide arbitrary backends for a > variety of interfaces to system databases. For instance getpw*(), > gethost*(), etc. Michael's patch itself adds caching to our nsswitch implementation, which dramatically improves performance o

Re: Filesystem monitoring question

2005-11-18 Thread Dan Nelson
is could be either timestamp based (file not modified in 60 seconds == done), or if you know the file format, you may be able to validate the contents (check for zipfile end-of-file marker, etc). -- Dan Nelson [EMAIL PROTECTED] ___ freebs

Re: CPU utilization

2005-11-09 Thread Dan Nelson
mpletely the wrong mailing list for this question, but take a look at the getrusage() function. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To uns

Re: rc scripts: how to start a process that doesn't daemonize itself?

2005-10-19 Thread Dan Nelson
;" in command_args; that way it'll only be used during startup. I do that in some of my homegrown rc.d scripts. A (probably cleaner) way is to set start_cmd="/usr/sbin/daemon /usr/local/bin/myprog" -- Dan Nelson [EMAIL PROTECTED]

Re: setsockopt 228K fails with ERR#55 'No buffer space available'

2005-09-10 Thread Dan Nelson
ugh I think that defaults to unlimited. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: ntpd and cmos clock update

2005-08-30 Thread Dan Nelson
uot;' >>/etc/rc.conf I think he meant shutdown instead of reboot. ntpd will step the clock itself on bootup if it needs to (although not as quickly at ntpdate certainly). Just calling resettodr during shutdown would be the easiest solution, I think. Or have a kernel timer

Re: [PATCH] caching daemon release and nsswitch patches

2005-08-29 Thread Dan Nelson
performing nss lookups. How do you ensure that one user can't poison the cache and cause problems for other users? Could cached do all nss operations itself (making it more like nscd in other OSes)? -- Dan Nelson [EMAIL PROTECTED] ___

Re: [PATCH] caching daemon release and nsswitch patches

2005-08-27 Thread Dan Nelson
r/src/usr.sbin/cached/cachelib/cachelib.c, line 34. You should probably convert cached's argument processing to use getopt, btw. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/

Re: hello world but not in 32bit x86 but in amd64 for amd64 platform

2005-08-17 Thread Dan Nelson
e same no matter what architecture you are using. Just use AMD64 assembly... You can also generate an assembly hello-world program yourself: $ cat << EOF > test.c int main(void) { write(1, "Hello world\n", 12); return 0; } EOF $ gcc -S te

Re: File create permissions, what am I missing?

2005-08-12 Thread Dan Nelson
1 diff -u -r1.271 ufs_vnops.c --- ufs_vnops.c 9 Jun 2005 20:20:31 - 1.271 +++ ufs_vnops.c 14 Jun 2005 18:22:01 - @@ -1336,6 +1336,8 @@ ip = VTOI(tvp); ip->i_gid = dp->i_gid; DIP_SET(ip, i_gid, dp->i_gid); + if (dp->i_mode & ISGID)

Re: Converting libfoo.so for linux to freebsd

2005-08-09 Thread Dan Nelson
D and it ran (it just calls printf, which is safe since it doesn't pass a FILE *). -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsub

Re: sed s///i

2005-08-08 Thread Dan Nelson
In the last episode (Aug 08), Brooks Davis said: > Are there any test cases out there for sed RE handling? If not, I'd > suggest this would be a good time to create some to help insure this > change maintains correctness. /usr/src/usr.bin/sed/TEST/sed.test has a lot of checks -

Re: Checking sysctl values from within the kernel.

2005-08-05 Thread Dan Nelson
er variables in the kernel, just check the variable directly. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: sendmail and clamav milter setting

2005-07-21 Thread Dan Nelson
since the sendmail-milter connection is more chatty (you may get a callback for each header, etc). > Or this is the correct one: > Sendmail SRV <-tcp-> clamav-milter <- tcp/domain socket -> clamd server > (server A) (server b) (server b) -- Dan Nelson [

Re: thread-safe popen

2005-07-07 Thread Dan Nelson
In the last episode (Jul 07), Dipjyoti Saikia said: > On 7/5/05, Dan Nelson <[EMAIL PROTECTED]> wrote: > > In the last episode (Jul 05), Dipjyoti Saikia said: > > > I am working on an OS derived for BSD 4.1 . I am trying to > > > backport a thread-safe

Re: thread-safe popen

2005-07-05 Thread Dan Nelson
the 4.* branch in rev 1.14.2.1 (2004/12/15). The PR is bin/50770 . Do you have a testcase that causes it to fail? -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-h

Re: problem handling POSIX thread on FreeBSD

2005-06-26 Thread Dan Nelson
pe(&attr, PTHREAD_SCOPE_SYSTEM); if (rv && rv != ENOTSUP) handle_error(); -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: kld problem

2005-06-22 Thread Dan Nelson
t; return EOPNOTSUPP; > return 0; > } In test_load, you can return a nonzero value on MOD_UNLOAD to abort an unload request. See the module(9) manpage for more details. You may need to increment a counter or hold a mutex while in the syscall to make it easy for test_loa

Re: unitialized memory is all zeros...why not garbage instead?

2005-06-10 Thread Dan Nelson
er prints anything but "0"'s. The kernel zeros out memory before handing it to processes. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd

Re: Opening raw disk while mounted in 5.x?

2005-05-25 Thread Dan Nelson
o 16. The kerenl shouldn't have stopped you from writing to slice 1 though. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Forcing static-linking on a port?

2005-05-23 Thread Dan Nelson
bugs in other OSes. Those options override -static. I can't think of a valid reason for them to be used in FreeBSD. Search for (and remove) any occurances of -Wl,-Bdynamic and -Wl,-Bstatic , and you should be set. -- Dan Nelson [EMAIL PROTECTED] ___

Re: which function

2005-05-22 Thread Dan Nelson
nel loads, you can disable it by putting "beastie_disable=yes" in /boot/loader.conf. The code that actually prints it is in /boot/beastie.4th . -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list htt

Re: Looking for ANSI/VT100 code replacement.

2005-05-20 Thread Dan Nelson
osleep syscalls, but Eterm/xterm still lags awfully. Plus the > cursor jumps forth and back. If you're worried about running time, adding sleeps is definitely not the right way to speed it up :) -- Dan Nelson [EMAIL PROTECTED] __

Re: Looking for ANSI/VT100 code replacement.

2005-05-20 Thread Dan Nelson
5D\e[Kabcde". I don't think that's your bottleneck. If it is, the usual solution is to not do a write on every iteration. You've got a (maximum) 100hz screen refresh rate anyhow, so doing more than 100 updates per second won't do you any good. E

Re: Console ASCII interpretation

2005-05-16 Thread Dan Nelson
the code in the keyboard driver that handles the ALT-nnn key combo sets ks_composed_char to zero at the beginning of a compose sequence, and if it's still zero at the end, it assumes that the user hasn't done anything. I'd say that's a bug, but a low-priority one, since you

Re: Console ASCII interpretation

2005-05-16 Thread Dan Nelson
u maybe forget to push the 3rd argument to write onto the stack before making the syscall? That's the number of bytes to write. If there happened to be a 4 on the stack, then write() would write 4 bytes starting at whatever buffer your 2nd argument points to. -- Dan Nelson [EMAIL

Re: Low HDD tranfer rate with FreeBSD 5.3-Release

2005-05-09 Thread Dan Nelson
compare read speeds. If you have the time (could take an hour or so), try "dd if=/dev/ad0 of=/dev/null bs=64k", run an "iostat 60" in another window, let the dd run through the entire disk, and compare the relative speeds from start t

Re: doubt: msgrcv not return EAGAIN?

2005-05-08 Thread Dan Nelson
lse{ > // here is an error occur > } > } > > but it sounds not works as my expected. It never return errno=EAGAIN, > however it return errno=ENOMSG instead, but msgrcv manual say its > should return EAGAIN. what's wrong? I think the manpage is incor

Re: clear/set/test_bit header ??

2005-04-13 Thread Dan Nelson
offset, int * flag); > int set_bit(int offset, int * flag); > int test_bit(int offset, int * flag); > > Any hints? Try the macros in ; see the bitstring manpage for usage. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd

Re: C programming question

2005-04-04 Thread Dan Nelson
ctl as pointer to function (pointer to struct ifnet, int, addr_t) returning int $ cdecl explain "int (*if_watchdog) (int)" declare if_watchdog as pointer to function (int) returning int -- Dan Nelson [EMAIL PROTECTED] __

Re: kqueue and ordinary files

2005-03-30 Thread Dan Nelson
ll returns 60, you're done. The current behaviour is useful for things like tail or syslog watchers, so that they get an EVFILT_READ event when the file grows. They may be better off registering an EVFILT_VNODE/NOTE_EXTEND event though, so you could make a case for returning EV_EOF on EV

Re: a Q on measuring system performance.

2005-03-25 Thread Dan Nelson
instead? so 0.01 ms/call > for related file operation is the result. or is there some other > better way to achieve this? Gprof is better suited for programs that run for minutes to hours. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Kernel documentation and specification

2005-03-24 Thread Dan Nelson
the kernel, due to the extra time it would take to save and restore the registers on every context switch (and kernel thread switch even), and the difficulty of trapping exceptions. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@

Re: running freebsd in qemu using the "-nographic" option ?

2005-03-23 Thread Dan Nelson
e serial port after the system has come up, edit /etc/ttys and change the ttyd0 line from "off" to "on". -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: mysql threads

2005-03-21 Thread Dan Nelson
ate processes in Apache (assuming 1.3 here) because it's a forking model, where each incoming request is handled by a separate process. Consider upgrading to FreeBSD 5.3 (or 5.4, to be released sometime next month), which has much better thread performance than 5.1 or 5.2.1.

Re: iSCSI initiator driver beta version, testers wanted

2005-03-15 Thread Dan Nelson
d guess that tags would be even more useful for iscsi than direct-attached scsi, due to the extra latency. The more the better. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Global / Cluster / Shared filesystem for FreeBSD?

2005-03-11 Thread Dan Nelson
. Note that none of the packages mentioned so far will give you a cluster filesystem; they are just a cheaper way of sharing block devices than a Fibre Channel SAN. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: partial memory dump

2005-03-08 Thread Dan Nelson
I also think you should be modifying /sys/i386/i386/dump_machdep.c instead of scsi_da.c; that would let your changes work with any disk backend. The low-level dadump() function shouldn't really have any knowledge of what it's writing. That's something to

Re: partial memory dump

2005-03-08 Thread Dan Nelson
very place dadump skipped a block. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Libc

2005-03-03 Thread Dan Nelson
doing a syscall(445), we can actually call it by name > like,sys_ash(); cd into /sys/kern, edit syscalls.master, then run "make init_sysent.c". That will regnerate a bunch of files, some of which are used to generate the syscall stubs in libc. --

Re: clock.h

2005-02-28 Thread Dan Nelson
com main.c DELAY is a kernel function. In user processes, just use sleep() or nanosleep(). When you directly #include headers from userland, the only useable things are structure definitions and macro constants (and even then it's recommended that you use a userland interface instead). You ca

Re: about the source of loader

2005-02-28 Thread Dan Nelson
:getrootmount() and /sys/kern/vfs_mount.c:vfs_mountroot() . -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: realplay and 4.11

2005-02-22 Thread Dan Nelson
x/lib/libgcc_s.so.1 | grep GCC_ A GCC_3.0 The SUSE-9.0 machines here at work do provide the GCC_3.3 symbol, so maybe try linux_base-suse-9.2, or linux_base-rh-9. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mail

Re: Kernel threads & libc

2005-02-22 Thread Dan Nelson
ibraries have to be built with it too. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Memory Accounting in Proc.h

2005-02-18 Thread Dan Nelson
rrent memory usage per process? Possibly the compilter has optimized 'a' away since you neither read from or write to it? Try memset'ing it to zero and see if your numbers change. -- Dan Nelson [EMAIL PROTECTED] ___ fre

Re: how to calculate CPU utilization?

2005-02-12 Thread Dan Nelson
o take two samples separated by some delay (1 or 5 seconds maybe), then take their difference and divide by the delay. That will give you the cpu usage over that period. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mail

Re: KVM Linking

2005-02-02 Thread Dan Nelson
y to include the lib/libkvm files and > directory without having to hack it through? Since you're already in the kernel, you can simply read the variables directly. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.o

Re: use loader to load kernel.gz and mfsroot.gz in an ext2 filesystem

2005-01-26 Thread Dan Nelson
r's IP and its kernel filename from. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: use loader to load kernel.gz and mfsroot.gz in an ext2 filesystem

2005-01-26 Thread Dan Nelson
ibstand to read ext2 and/or DOS file > systems. That's the first step... Libstand already supports both, and they are included into /boot/loader ( see the file_system[] array in /sys/boot/i386/loader/conf.c ), so it should be able to boot off of both filessytems just fine. --

Re: execl bug?

2004-12-29 Thread Dan Nelson
ero. See the code in /usr/src/lib/libc/stdio/fseek.c . Replacing your rewind() with an lseek(0,0,SEEK_SET) makes the program work. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailm

Re: counting total PIDs since the server been started

2004-12-14 Thread Dan Nelson
In the last episode (Dec 15), Vlad GALU said: > On Tue, 14 Dec 2004 09:23:46 -0600, Dan Nelson <[EMAIL PROTECTED]> wrote: > > Most Unixes provide these stats under the "vmstat -s" command also. > > It'd be nice if Linux had something like that. Howeve

Re: counting total PIDs since the server been started

2004-12-13 Thread Dan Nelson
t; OTTOMH without consulting any docs, are these any use: > > > > # sysctl -a | grep fork > > vm.stats.vm.v_forks: 4795379 > > vm.stats.vm.v_vforks: 1017309 > > vm.stats.vm.v_rforks: 0 > > Hehe, I never noticed tho

Re: My project wish-list for the next 12 months

2004-12-01 Thread Dan Nelson
server farms that need to share large files, or even lots of small files (webservers for example). -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: isp driver not 64 bit?

2004-11-29 Thread Dan Nelson
ng that they're close values. > However, with different things on the stack, the values changed. Even more interesting is their hex values: DEC0ADDF and DEC0ADDE, aka 0xDEADC0DE. Something's reading memory after the kernel freed it. -- Dan Nelson [EMAIL P

Re: Snapshot corruption.

2004-11-22 Thread Dan Nelson
er every write. db 2+ databases can do logging, but I don't know how many applications actually request it. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Access time on snapshots.

2004-11-17 Thread Dan Nelson
the parent filesystem? (note this only applies to the first write to a block; later writes don't affect the snapshot because it's already made a copy of the original data) > (also: why doesn't ls have a creation time option?) I think ls is running run out of option le

Re: tcsh is not csh

2004-11-11 Thread Dan Nelson
nstead of sh. You can install the shells/44bsd-csh port if you want the original csh. Read up on all the arguments for an against the switch in the thread starting at http://www.freebsd.org/cgi/[EMAIL PROTECTED] (sorry, best link I could find), but you're 4 years too late to affect the

Re: Hardware Serial Numbers under FreeBSD

2004-11-05 Thread Dan Nelson
uot;, but other boards might actually put a real value in there. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Pb seeking with less on file more size 2Go

2004-10-26 Thread Dan Nelson
I don't get any error, it only seeks to ~3.7GB into the file, so the version of less that comes with 4.10 probably uses an "unsigned int" someplace. The version you get when you build the ports/misc/less port does work correctly, though. If you install that, you should be ok

Re: malloc calls and ioctl calls to soundcard cause segfault

2004-10-13 Thread Dan Nelson
ally asked it to write sizeof(audio_buf_info) bytes to the location of the "arg" variable, which is... (drumroll) on the stack :) Create another variable "audio_buf_info info;" above main, and change that call to "if (ioctl(fd, SNDCTL_DSP_GETOSPACE, &info) < 0)"

Re: Bit field definition ?

2004-10-10 Thread Dan Nelson
uld have been 6 bytes total. > But > > struct { > u_int a:4, >b:4; > u_char d; > short c; > }; is 4 bytes in size; > a.c:21: warning: padding struct size to alignment boundary This last warning

Re: Bit field definition ?

2004-10-08 Thread Dan Nelson
offset */ The :4 after each variable means 4 bits long, so both fields together take up 8 bits = 1 byte. That's the whole purpose of bitfields :) -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://li

Re: please help with: warning: initialization makes integer from pointer

2004-10-08 Thread Dan Nelson
lization, but that's a C99 feature, and since you're initializing everything to zero anyway, memset is still better. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Dan Nelson
for known errno values, strerror() is thread-safe on FreeBSD. It just returns a pointer into sys_errlist[]. For invalid values it stuffs "Unknown error: ##" into a static buffer and returns a pointer to that. I'll update the PR to make syslog call strerror_r(). http://www.freeb

Re: syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Dan Nelson
In the last episode (Oct 06), Dan Nelson said: > > My question regarding thread-safeness of syslog(): On OpenBSD I > > used syslog_r() to do thread safe logging (the software in question > > is a sendmail milter, which runs multithreaded). FreeBSD does not > > have the

Re: syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Dan Nelson
afe on FreeBSD when compiling with > the -pthread switch? The only unsafe part is openlog(), so set that up before you start any threads and you'll be okay. Once the log fd is opened, the syslog() call looks to be thread-safe. Everything in there is done with local variables and atomic

Re: Sigmatel USB IrDA dongle

2004-10-01 Thread Dan Nelson
coding everything > myself. If you're a programmer, you might want to see if porting them yourself is an option. I think a lot of our USB support comes from NetBSD already. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mai

Re: FibreChannel support

2004-09-15 Thread Dan Nelson
;the SAN array ? Sure. If don't put any FDISK or disklabel partitions on the lun (i.e. you put the filesystem directly on /dev/da#), it's really easy. Dismount the volume, run "camcontrol rescan da#" to let the system detect the new size, run "growfs /mountpoin

Re: valgrind on 5.3BETA1

2004-08-23 Thread Dan Nelson
In the last episode (Aug 23), Dan Nelson said: > --- coregrind/vg_proxylwp.c~ Mon Aug 23 15:47:33 2004 > +++ coregrind/vg_proxylwp.c Mon Aug 23 15:48:42 2004 And of course I screwed up the patch. The first argument of each print call should be printing &px->mutex, not px-&g

Re: valgrind on 5.3BETA1

2004-08-23 Thread Dan Nelson
ne 0x187B9/0x187B9 ==14620== Locking#2 mutex 0x187B9/0x187B9 ( send SIGKILL from another vty here ) zsh: 14620 killed valgrind --skin=memcheck date There doesn't seem to be any docs on these umtx syscalls so I don't know what the expected behaviour is supposed to be. I printed the po

Re: actual boot device

2004-08-17 Thread Dan Nelson
s / embedded into kernel > so / mountpoint is /dev/md0 :-) What might work is reading the first 512 bytes of /dev/{da0,ad0,fd0,cd0} and see if any of them have your picobsd bootblock. Then you know where the filessytem holding /kernel is and can

Re: actual boot device

2004-08-17 Thread Dan Nelson
In the last episode (Aug 17), Sergey Lyubka said: > On Tue, Aug 17, 2004 at 11:15:16AM -0500, Dan Nelson wrote: > > In the last episode (Aug 17), Sergey Lyubka said: > > > How would one know the actual boot device after kernel > > > successfully booted ? > > >

Re: actual boot device

2004-08-17 Thread Dan Nelson
ev" to find out which device was actually used to read the file. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Fwd: How to read bad blocks error message & marking of same

2004-08-06 Thread Dan Nelson
atically substitute a spare block for > the one that went bad. SCSI drives, at least, may do automatic reallocation on both reads and writes ( camcontrol mode da0 -m 1, the ARRE and AWRE flags ). If the drive had to reread the block or had to use ECC to recover data, AND the entire block was recov

Re: regarding timeout/untimeout kernel functions

2004-07-22 Thread Dan Nelson
timer events in a single process. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Getting a fully-qualified path from a PID

2004-07-21 Thread Dan Nelson
() fails (say the orignal file has been unlinked, or the filename has expired from the kernel's cache). If you are examining another process, you can use the kvm_getargv() and kvm_getenvv() functions to fetch argv[0] and PATH out of the target process. -- Dan Nelson

Re: Article on Sun's DTrace

2004-07-07 Thread Dan Nelson
't support associative arrays for stat collecting like D does, but it's got just about everything else. If you just wanted to track syscalls, you could almost use Cerber as-is. http://cerber.sourceforge.net/ -- Dan Nelson [EMAIL PROTECTED] ___

Re: FreeBSD and MacOS

2004-06-29 Thread Dan Nelson
but since there's no-one being paid to do it, you get much less code going in that direction. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: using netgraph to connect 2 physical interfaces into one virtual interface

2004-06-24 Thread Dan Nelson
des, etc), how ng_fec needs just as much hardware support as one2many: the system at the other end must be able to handle port aggregation, and must be able to be manually configured. Both nodes do the same thing, in slightly different ways. -- Dan Nelson [EMAIL PROTECTED] ___

Re: pthread - fork - execv problem

2004-06-22 Thread Dan Nelson
libpthread to one of the other thread libraries for testing, since you'll get an undefined symbol error at runtime. Nikos Ntarmos also noticed that there's no pthread_atfork manpage. We could probably just use the Single Unix one. -- Dan Nelson [EMAIL PROTECTED] __

Re: pthread - fork - execv problem

2004-06-22 Thread Dan Nelson
In the last episode (Jun 22), Nikos Ntarmos said: > On Tue, Jun 22, 2004 at 09:56:33AM -0500, Dan Nelson wrote: > > It may be an application bug. After a fork both processes are > > independant. The child should not be able to affect the parent > > like this, unless the

Re: pthread - fork - execv problem

2004-06-22 Thread Dan Nelson
not be able to affect the parent like this, unless the parent does something like holding a mutex used by all the threads and calling wait(). -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/m

Re: libpthread problem

2004-06-16 Thread Dan Nelson
In the last episode (Jun 16), Liam Foy said: > On Wed, 16 Jun 2004 11:13:39 -0500 > Dan Nelson <[EMAIL PROTECTED]> wrote: > > In the last episode (Jun 16), Liam Foy said: > > > Hey guys, I seen to get this error on certain applications, such as > > > xmms and b

Re: libpthread problem

2004-06-16 Thread Dan Nelson
our binary, determine which file depends on libc_r, and rebuild the port providing that file. A workaround would be to add a libmap.conf entry remapping libc_r to libpthread globally. See the libmap.conf manpage for examples. -- Dan Nelson [EMAIL PROTECTED] _

Re: FreeBSD vs Linux cpu usage measurements

2004-06-03 Thread Dan Nelson
heduling interval and ramps up to 120 slowly. Both of FreeBSD's schedulers use a decaying average for their %CPU. What unixtop does for about 25% of the platforms it supports is dig into the rusage data for each process and remember the last value, which gives y

<    1   2   3   4   5   >