Re: Setting the mss for socket
Luiz Otavio O Souza lists...@gmail.com wrote: Is there a way to set the mss for a socket ? Like you can do in linux with setsockopt(TCP_MAXSEG) ? So i can set the maximum size of packets (or sort of) from a simple userland program. Depending on exactly what you need to accomplish, you may find something useful in this thread from last August in freebsd-questions@ setting the other end's TCP segment size ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: watchdog: hw+sw?
Quoting Doug Ambrisko ambri...@ambrisko.com (from Thu, 2 Apr 2009 16:16:34 -0700 (PDT)): This worked well for us so I think it is a good idea. Also some HW watchdogs can be told to generate an NMI which can also produce a kernel dump/ddb prompt. I've also implemented some rough code to put an simplified back-trace into the IPMI event log in-case a disk or disk I/O sub-system died. Somewhat related... I have 2 32bit systems with zfs which lock up after a while. The lockup is strictly related to the disks. I can still ping the system just fine, and the HW watchdog seems to still work as intended (or it does not work at all anymore, as there's not automatic reset), but as soon as I want to do something which involves disks (access a webpage located on the zfs disks), I'm lost. The only way to get some useful work done again is to reset manually. Your paragraph above implies that the WD notices that there's a problem with disks. While I know how to teach our watchdogd how to detect this (-e option), we do not have support for this in the basesystem yet. Do you have a patch for /etc/rc.d/watchdogd which allows to specify commands to run via rc.conf or some patch which tells watchdogd to check a file? Bye, Alexander. -- Whatever you want to do, you have to do something else first. http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: Setting the mss for socket
Is there a way to set the mss for a socket ? Like you can do in linux with setsockopt(TCP_MAXSEG) ? So i can set the maximum size of packets (or sort of) from a simple userland program. Depending on exactly what you need to accomplish, you may find something useful in this thread from last August in freebsd-questions@ setting the other end's TCP segment size Very informative thread, thanks. This thread show me that TCP_MAXSEG is implemented in freebsd but don't work. You can set the setsockopt(IPPROTO_TCP, TCP_MAXSEG), wich will set the tp-t_maxseg, but this value is recalculated at tcp_input, so in short, you cannot set the max segment size for a socket. I've posted a completly wrong patch (from style point-of-view - and using SOL_SOCKET instead of IPPROTO_TCP), but with that patch i'm able to set the mss in iperf. Many thanks, Luiz ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
some questions about 32 bit / 64 bit
Hello everybody, I have a laptop with a Centrino 2 Duo processor with 4GB of RAM and a dual VGA (one integrated in the mobo and an ATI Radeon). Now it uses the ATI Radeon, but if I set it to use the integrated VGA, the total free RAM drops to 3.X GB. I understand that this is due to sharing memory with the VGA. My first issue is, I'm currently working with Linux and I'm planning to switch to FreeBSD 7.1, but I don't know if switch to 32 or 64 bit (i.e., i386 or amd64). If I switch to the 32 bit version, which is the memory limit of a single user process? Will the entire system (kernel + user processes) be able to use the whole 4GB (or 3.XGB, if I switch to the integrated VGA)? Please note, avoid a war between 32bit vs 64bit benefits/cons. The second issue is about ports, if I install the 64 bit version I would need some libraries in 32 bit mode too. Is the ports system adapted to control these two different ABIs? If not, how do you manage this? Maybe installing FreeBSD twice (one for x86 and another for amd64)? Thank you. -- _ Empty your memory, with a free()... like a pointer! If you cast a pointer to an integer, it becomes an integer, if you cast a pointer to a struct, it becomes a struct. The pointer can crash..., and can overflow. Be a pointer my friend... ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: some questions about 32 bit / 64 bit
Harald Servat wrote: My first issue is, I'm currently working with Linux and I'm planning to switch to FreeBSD 7.1, but I don't know if switch to 32 or 64 bit (i.e., i386 or amd64). If I switch to the 32 bit version, which is the memory limit On a server, switch to 64 bit. On a desktop machime, go with 32-bit. You will only be able to address slightly over 3 GB no matter which graphics card you use but on the other hand you'll have better supported drivers and 3rd party software. signature.asc Description: OpenPGP digital signature
Re: some questions about 32 bit / 64 bit
Hi again, 2009/4/3 Ivan Voras ivo...@freebsd.org Harald Servat wrote: My first issue is, I'm currently working with Linux and I'm planning to switch to FreeBSD 7.1, but I don't know if switch to 32 or 64 bit (i.e., i386 or amd64). If I switch to the 32 bit version, which is the memory limit On a server, switch to 64 bit. On a desktop machime, go with 32-bit. You will only be able to address slightly over 3 GB no matter which graphics card you use but on the other hand you'll have better supported drivers and 3rd party software. I've just seen this topic also being mentioned in http://www.freebsd.org/doc/en/books/faq/compatibility-memory.html And what about the second issue? Thank you very much. -- _ Empty your memory, with a free()... like a pointer! If you cast a pointer to an integer, it becomes an integer, if you cast a pointer to a struct, it becomes a struct. The pointer can crash..., and can overflow. Be a pointer my friend... ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: watchdog: hw+sw?
Alexander Leidinger writes: | Quoting Doug Ambrisko ambri...@ambrisko.com (from Thu, 2 Apr 2009 | 16:16:34 -0700 (PDT)): | | This worked well for us so I think it is a good idea. Also some HW | watchdogs can be told to generate an NMI which can also produce a kernel | dump/ddb prompt. I've also implemented some rough code to put an | simplified back-trace into the IPMI event log in-case a disk or disk | I/O sub-system died. | | Somewhat related... I have 2 32bit systems with zfs which lock up | after a while. The lockup is strictly related to the disks. I can | still ping the system just fine, and the HW watchdog seems to still | work as intended (or it does not work at all anymore, as there's not | automatic reset), but as soon as I want to do something which involves | disks (access a webpage located on the zfs disks), I'm lost. The only | way to get some useful work done again is to reset manually. Your | paragraph above implies that the WD notices that there's a problem | with disks. Yep, isn't that fun :-( | While I know how to teach our watchdogd how to detect this (-e | option), we do not have support for this in the basesystem yet. Do you | have a patch for /etc/rc.d/watchdogd which allows to specify commands | to run via rc.conf or some patch which tells watchdogd to check a file? We start watchdogd manually with our own rc.d script mainly since I noticed Dell pe2650's do false triggers :-( Also I wanted to check that our app. is functioning so we'd need to start after that. It would be good to add flags option to the stock start-up scripts. Just having watchdogd running without checking on anything real tends to be useless since it is usually swapped in and can run just fine without depending on much of the system. Doug A. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: some questions about 32 bit / 64 bit
On Fri, 3 Apr 2009 15:27:53 +0200 Harald Servat redcr...@gmail.com wrote: Hi again, 2009/4/3 Ivan Voras ivo...@freebsd.org Harald Servat wrote: My first issue is, I'm currently working with Linux and I'm planning to switch to FreeBSD 7.1, but I don't know if switch to 32 or 64 bit (i.e., i386 or amd64). If I switch to the 32 bit version, which is the memory limit On a server, switch to 64 bit. On a desktop machime, go with 32-bit. You will only be able to address slightly over 3 GB no matter which graphics card you use but on the other hand you'll have better supported drivers and 3rd party software. I've just seen this topic also being mentioned in http://www.freebsd.org/doc/en/books/faq/compatibility-memory.html And what about the second issue? Thank you very much. All I can say is that I've been using 64-bit FreeBSD as my desktop for years and never had any real problems. Of course, this is _not_ a laptop, so YMMV. But several people have reported in various MLs that they're using their laptops in 64-bit mode with success. Try it in 64-bit mode. If you have problems, then consider 32-bit mode. --- Gary Jennejohn ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: some questions about 32 bit / 64 bit
On Fri, 2009-04-03 at 14:45 +0200, Ivan Voras wrote: Harald Servat wrote: My first issue is, I'm currently working with Linux and I'm planning to switch to FreeBSD 7.1, but I don't know if switch to 32 or 64 bit (i.e., i386 or amd64). If I switch to the 32 bit version, which is the memory limit On a server, switch to 64 bit. On a desktop machime, go with 32-bit. You will only be able to address slightly over 3 GB no matter which graphics card you use but on the other hand you'll have better supported drivers and 3rd party software. All of our drm drivers are safe on amd64. The only thing you get from 32bit is the ability to run the Nvidia blob. If you are trying to do emmulated things like play linux/windows games, then 32bit might be needed, but for normal use graphics isn't a reason not to use amd64. FreeBSD balrog.2hip.net 8.0-CURRENT FreeBSD 8.0-CURRENT #13 r190402M: Tue Mar 24 22:41:47 CDT 2009 rnol...@balrog.2hip.net:/usr/obj/usr/src/sys/BALROG amd64 robert. -- Robert Noland rnol...@freebsd.org FreeBSD signature.asc Description: This is a digitally signed message part
Re: some questions about 32 bit / 64 bit
On Fri, Apr 03, 2009 at 12:07:05PM -0500, Robert Noland wrote: On Fri, 2009-04-03 at 14:45 +0200, Ivan Voras wrote: Harald Servat wrote: My first issue is, I'm currently working with Linux and I'm planning to switch to FreeBSD 7.1, but I don't know if switch to 32 or 64 bit (i.e., i386 or amd64). If I switch to the 32 bit version, which is the memory limit On a server, switch to 64 bit. On a desktop machime, go with 32-bit. You will only be able to address slightly over 3 GB no matter which graphics card you use but on the other hand you'll have better supported drivers and 3rd party software. All of our drm drivers are safe on amd64. The only thing you get from 32bit is the ability to run the Nvidia blob. If you are trying to do emmulated things like play linux/windows games, then 32bit might be needed, but for normal use graphics isn't a reason not to use amd64. In fact, I committed the missed bits required for wine/i386 on amd64, several days ago. We did tested that wine and mplayer+win32 codecs work. FreeBSD balrog.2hip.net 8.0-CURRENT FreeBSD 8.0-CURRENT #13 r190402M: Tue Mar 24 22:41:47 CDT 2009 rnol...@balrog.2hip.net:/usr/obj/usr/src/sys/BALROG amd64 robert. -- Robert Noland rnol...@freebsd.org FreeBSD pgp8wfHdGwzlo.pgp Description: PGP signature
Is international support broken is msdosfs file system driver?
I have a FAT disk written in Windows that has Chinese characters in file names. When I mount this disk without any special options I see question marks in place of Chinese characters. When I mount with options -D=CP950,-L=zh_TW.Big5 there are still some question marks and garbage characters. When I mount with options -D=CP936,-L=zh_CN.GBK there are also some question marks and garbage characters in place of Chinese. I read the contents with 'ls' command from x-terminal in kde4. Normally Chinese characters are shown ok this way. My question is how to read proper file names from FAT disk in FreeBSD? Also the concept of even having the options like -D=CP950,-L=zh_TW.Big5 seems questionable. What if there are files with names in many encodings are on the same FS? Which options should be used? Shouldn't msdosfs driver just show international characters without any special options like ufs driver normally does? Yuri ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: bin/113860: sh(1): shell is still running when using `sh -c'
I think this can be improved. Given that I've been digging in /bin/sh already... Note first that sh already has some of this functionality: % sh -c '{ echo a; sleep 10;}'; sleep 1; ps T a PID TT STAT TIME COMMAND 94682 p9 Ss 0:00.07 zsh 94702 p9 S 0:00.00 sleep 10 94704 p9 R+ 0:00.00 ps T % This is the EV_EXIT flag to evaltree() and friends, in eval.c. To make this work for '-c', evalstring() needs some flag like EV_EXIT, and parsecmd() needs to tell evalstring() that the command it read is the last (currently, parsecmd() only reports that there is no command anymore; due to the stack-like memory management it is not really possible to read ahead a command). Putting {\n and \n} around the string could be an alternative for the latter, as any valid string would consist of one (compound) command only. The new mode for evalstring() would only be used for '-c' commands when '-s' is not given. Apart from bash, ksh93 and Solaris /usr/xpg4/bin/sh (which is basically ksh88) also treat simple commands in '-c' this way. So I think the idea is ok. I'm also slightly annoyed by seeing silly 'sh -c blah' processes hanging around, and it is not always possible or desirable to add 'exec'. On another note, the EV_EXIT mode is erroneously still used if a trap on EXIT has been set (or, maybe, any trap at all; particularly if -T is in effect). This means that such traps may not be executed. Most other shells seem to do this right. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org