Re: network settings
On Sun, 18 Sep 2005, eoghan wrote: Hello Im pretty new the freeBSD. Im working with 5.3. Each time I start up the computer I have to go to /usr/sbin/sysintall and configure it to use my network. I plugged directly in and Im not sure why I have to set this up each time. Also, when I go to configure - networking - interfaces it shows my network card (3COM) but gives an error about not finding the dhcpclient (but it still works). Wondering if theres a way to make it save my changes? Or is the issue related to the dhcp client? Thanks Eoghan See man rc.conf There is a file /etc/rc.conf that controls pretty much every boot configuration option. You may have some bad entries in that file or you may have to set it up correctly. Read that man page, please. There is also an awesome handbook at freebsd.org. I hope that helps. -Zera Holladay ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: upload speed test problem
On Thu, 12 May 2005, Ganbold wrote: return showSpeed(starttime1,endtime1,Upload,buffer_len); What does showSpeed() look like? -Zera Holladay ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: kernel programming
On Wed, 20 Apr 2005 [EMAIL PROTECTED] wrote: yeah thanks for that, i figured the code was a good start. Now that I know the docs i know where to go, cheers for that --neuro On Wed, 20 Apr 2005, Joseph Koshy wrote: where's a good place for kernel programming documentation ? In no particular order: 1. The FreeBSD Developer's Handbook. 2. The FreeBSD Architecture Handbook. 3. The book 'The Design and Implementation of the FreeBSD Operating System', by Kirk McKusick and George Neville-Neil. 3. The section 9 manual pages. 4. The source code :). I like these too (the above is a good list): man 7 development gives a nice model and tutorial to setup an environment. man 7 build documents some of the /usr/src/ targets for make. Good luck, Zera Holladay ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
make for bootable ISOs
Hi, I'm attempting to make a bootable ISO for i386 architecture on 4.11-STABLE. I am using: %make buildworld %make buildkernel %make hierarchy DESTDIR=/... %make installworld DESTDIR=/... %make installkernel DESTDIR=/... And then modifying etc so that /dev/acd0a is the root directory. Is this the correct sequence and are these the correct targets? Since this is such a time consuming task, I figured that I would ask for help. Thank you, Zera ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Causing a process switch to test a theory.
If you post the section(s) of code in question, then you'll probably elicit some responses. PIPE_BUF is a POSIX defined minimum, so you might grep for sections of code that contain fpathconf(*, _PC_PIPE_BUF) to determine if the programmers took this into consideration. At least you'll be able to follow the logical flow of the program from fpathconf() forward. Further, if you do some fancy programming (like preempting a process unnaturally) to determine if there is an error in this particular aspect of Apache, then you'll also have to show that you have not inflicted the error too, which will probably be harder than what you set out to solve or figure out. Good luck, Zera Holladay ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: threads question
On Tue, 15 Mar 2005, Michael C. Shultz wrote: [cut] The answer is probably something like what you just said, scope being lost when making the call to a shared library. Why is it ok going to a static library but not a shared though? There is probably a race condition, so your code will work *some* of the time unless you prevent the race condition. I don't have an answer to your question, but I don't think it is a valid question. The scope of *priority can remain valid or invalid for random reasons and thus may work some of the time, but the only way to guarantee that it works all the time is to eliminate the race condition by making sure that *property is valid though the life of the thread. -Zera ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Error in my C programming
On Mon, 21 Feb 2005, Kathy Quinlan wrote: Hi Guys, Here is a section of my code: *** Wtrend_Drivers.c *** unsigned char Length , Network , Receiver , Node , Command = 0x00; //Some Variables These are some of the errors I get in pairs for each of the above variables: Wtrend_Drivers.c:15: conflicting types for `Receiver' Wtrend_Drivers.h:9: previous declaration of `Receiver' Try giving Receiver a different identifier. Also, if you are trying to limit the scope of Length, Network, Receiver, Node and Command to Wtrend_Drivers.*, then give line 9 of Wtrend_Driver.h the static qualifier. Hope this helps, Zera Holladay p.s. Watch the parameters in your function definitions too, you may get them mixed-up. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: kernel vm question
On Thu, 27 Jan 2005, Jacques Fourie wrote: Hi, I have a kernel module with the following entry point : static int test_modevent(module_t mod, int type, void *unused) { int s; unsigned char *p = NULL; unsigned char v = 0x55; switch (type) { case MOD_LOAD: p = (unsigned char *)ip_output; What is ip_output? Do you believe it is a function or variable? It might help if you just state to yourself in your native language what you want to do here. s = splhigh(); v = p[0]; /* Page fault without this line */ p[0] = v; The above makes no sense. Why would you assign v to p[0] and then set p[0] to the value of v? What is the error message you get? Also, it might help to compile with -Wall since it help to catch some subtle errors. Good luck, -Zera ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Kernel mode programming
On Tue, 18 Jan 2005, Bruce M Simpson wrote: On Tue, Jan 18, 2005 at 11:45:05AM +0100, - Felix - wrote: Doing lot of syscalls interrupts in a soft seems to take quite a long time, and seriously slow performances. As far as you can't reduce the syscall amount, is there any way to run apps in kernel mode, in order to call sysfonctions directly ? Perhaps by re-writing softs in kernel modules ? For 95% of applications syscall overhead shouldn't have a major impact on performance. It's difficult to offer any real advice here because you haven't said what the application is, or shown any profiling figures. Even if the application were run as a kernel module, how much of a performance benefit could there be when making system calls? I suspect that the module would get a higher scheduling priority but realistically wouldn't the module still have to make system calls in the same manner that a regular user process does? I really don't know, so would some kind soul tell me please? -Zera Holladay ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Kernel mode programming
On Tue, 18 Jan 2005, Ryan Sommers wrote: Zera William Holladay said: Even if the application were run as a kernel module, how much of a performance benefit could there be when making system calls? I suspect that the module would get a higher scheduling priority but realistically wouldn't the module still have to make system calls in the same manner that a regular user process does? I really don't know, so would some kind soul tell me please? -Zera Holladay The kernel is already running in privileged mode on the CPU so there is no need for a system call. Technically the kernel never has to make a system call. A system call is just a well defined method of transitioning between user and supervisor code. Since the kernel is already supervisor code there is no need to make a system call. Whenever a program makes a system call it has to generate an interrupt, this is the extra savings he is talking about. By already executing in the kernel his code does not have to suffer the overhead of an interrupt handler and can just make a jump to the syscall handler. My understanding is that when a system call is made from a user process, there is a trap into the kernel, the state of the user process is saved and the address of the system call is determined by a looking up the address of the system call in vector table. I assume that a kernel module would at least have to push the parameters of the system call, push some of its registers, jump to the address space of the system call and return. Further I assume, the kernel would have to copy the parameters of the system call to another address, since it is possible for the call to be interrupted and some of the parameters to be corrupted. I am really asking a question out of blind ignorance in an attempt to learn more about what goes on with the kernel. What is the difference between a system call made from the kernel and a system call made from user code? Thanks, Zera ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Kernel mode programming
On Tue, 18 Jan 2005, Kamal R. Prasad wrote: --- Zera William Holladay [EMAIL PROTECTED] wrote: [snip] My understanding is that when a system call is made from a user process, there is a trap into the kernel, the state of the user process is saved and the address of the system call is determined by a looking up the address of the system call in vector table. Not exactly. When you execute a system call on the kernel side, you execute it in the context of the process. There is a per-process kernel stack -so you don't save a copy of the process to execute the sys call. I assume that a kernel module would at least have to push the parameters of the system call, push some of its registers, jump to the address space of the system call and return. Further I assume, When you call another function from within the kernel, it is like calling another function within userspace. The args get pushed onto stack and there is space for retval etc. the kernel would have to copy the parameters of the system call to another address, since it is possible for the call to be interrupted and some of If the syscall is interrupted, it won't affect the params as they will essentially be local variables in the syscall. An interrupt handler won't corrupt the args to the syscall for sure. the parameters to be corrupted. It is possible that the userspace may pass a pointer which gets freed before the kernel is finished with accessing it. That is why, a system call implementation does a copyin() on entry and when it wants to reflect the data to userspace, it does a copyout(). I am really asking a question out of blind ignorance in an attempt to learn more about what goes on with the kernel. What is the difference between a system call made from the kernel and a system call made from user code? The differece is that in one, you do a context switch in one and in another you don't. The function names change eg:- open() is syscall name, and underlying function in kernel would be sys_open() -so from within kernel, you call sys_open() instead of open() as in userspace. regards -kamal Thanks, that makes sense. -Zera ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: getting mount points in kernel
On Fri, 14 Jan 2005, Siddharth Aggarwal wrote: Hi all, Is there a system call to get all the mount points? In a user app, I guess I would probably parse the /etc/fstab, but how do I do it in the kernel? Is are you looking for man 2 getfsstat? Entries in /etc/fstab are not nessarily mounted, like a CDROM. -zh ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Picture CDs ?
On Mon, 10 Jan 2005, Pedro F. Giffuni wrote: It's odd but I couldn't mount a Picture CD on FreeBSD 5.2.1. This is pretty weird as Windows reports it is just CDFS and some jpeg files plus some windows software that let's you view it. I don't know... how can I get it wrong: mount /cdrom right? http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/creating-cds.html or man mount -Zera ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: max data segment size problem (process can not allocate more then 1gb memory)
On Sat, 25 Dec 2004, freebsd wrote: hello all, i have problem, when process tryes to allocate more then 1gb memory it coredumps i have tryed options MAXDSIZ to 1.5gb but kernel panics when i put it in loader.conf with kern.maxdsiz kernel panics again this is my server memory configuration: vm.kvm_size: 1069543424 vm.kmem_size: 209715200 hw.machine: i386 hw.model: Intel(R) Xeon(TM) CPU 2.40GHz hw.ncpu: 2 hw.byteorder: 1234 hw.physmem: 2142654464 hw.usermem: 1622208512 hw.pagesize: 4096 can you tell me how can process allocate more then 1gb memory thanks in advance ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] If your writing code: Can I see that part of the code? Also, can MAXDSIZ be a non-integer type or do you mean 2^20 + 2^19? -Zera Holladay ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: max data segment size problem (process can not allocate more then 1gb memory)
On Sat, 25 Dec 2004, Zera William Holladay wrote: On Sat, 25 Dec 2004, freebsd wrote: hello all, i have problem, when process tryes to allocate more then 1gb memory it coredumps i have tryed options MAXDSIZ to 1.5gb but kernel panics when i put it in loader.conf with kern.maxdsiz kernel panics again this is my server memory configuration: vm.kvm_size: 1069543424 vm.kmem_size: 209715200 hw.machine: i386 hw.model: Intel(R) Xeon(TM) CPU 2.40GHz hw.ncpu: 2 hw.byteorder: 1234 hw.physmem: 2142654464 hw.usermem: 1622208512 hw.pagesize: 4096 can you tell me how can process allocate more then 1gb memory thanks in advance ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] If your writing code: Can I see that part of the code? Also, can MAXDSIZ be a non-integer type or do you mean 2^20 + 2^19? -Zera Holladay ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] Sorry, I mean 2^30 + 2^29. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]