Re: [9fans] Help for home user discovering Plan 9
I don't know if it's because of bashfulness or what that people aren't telling it to your face: Plan 9 is not intended for home or home office. It hasn't matured to that point and its age is already past when it had a chance to mature. From what I've read on this list it probably serves as the back-end so some useful SOHO (and embedded?) applications, in addition to research and probably industrial use, but I don't think it's the front-end to any. These people who use it--I don't--all are either very much interested in computer systems or simply students, professors, researchers, and/or employees in the field. You can try using Plan 9--I did and was dejected because learning about computers is for me only a pleasant aside to actual use of computers--but I don't think you can get much from it by way of productivity, unless you intend to get productive in software engineering and/or computer science. --On Tuesday, April 14, 2009 2:05 PM +0800 Jim Habegger jimhabeg...@gmail.com wrote: We have three Windows laptops in our family. I've been using free software systems off and on for years. Last week I learned about Plan 9 from Bell Labs, from someone in a Linux Questions forum. Now I have it installed on a partition on my laptop, along with XP, Ubuntu-on-NTFS, Debian, and Slackware. I've learned to access a fat partition, change the font size, and use Acme. Now I need to learn how to set up a wireless connection to the family router network, access my files on my wife's Vista laptop, and browse the Internet. My wireless card is not listed in Plan9.ini. Does that mean there's no way for me to connect with that card? I'd like to learn how much I can use Plan 9 for home office, multimedia and Internet socializing, then I'd like to experiment with distributing the system between computers. I've learned about as much as I can for now from the documentation on the Plan 9 site, except for how to connect to the network. I'm waiting to find out if it's even possible. Now I'm listing /bin, reading man pages, and practicing commands. After that I might have some questions. Meanwhile, does anyone have any suggestions about learning to use Plan 9 for home office, multimedia and Internet socializing, and then to learn more about networking and distributed systems?
[9fans] NAT implementation
Hello 9fans. I'm thinking of writing a NAT implementation for plan 9. I have searched the archives and I'm not quite sure how to get started. As I see it there could be three ways of approaching this: 1. User space implementation using ipmux 2. User space using pkt interfaces in ipifc. 3. Kernel using something like sources/dho/nfil Do you have any advices on how to capture packets and how to send them out again after replacing src/dst addr and port? Are there any ways of testing NAT in a virtual machine? Right now I'm using vmware and it would be nice to be able to test it without setting up a real machine with two Ethernet interfaces. -Patrick Kristiansen
Re: [9fans] NAT implementation
2009/4/15 Patrick Kristiansen patrick.kasse...@gmail.com: Hello 9fans. I'm thinking of writing a NAT implementation for plan 9. I have searched the archives and I'm not quite sure how to get started. Hi Patrick, As I see it there could be three ways of approaching this: 1. User space implementation using ipmux 2. User space using pkt interfaces in ipifc. 3. Kernel using something like sources/dho/nfil I think #2 would be an easily testable and maybe more `correct' way to do this in Plan 9. I think doing an implementation directly in the IP path is easier, overall, but that's where my experience lies anyway. nfil is horribly broken. I wrote it some years ago when I was first getting into Plan 9, Plan 9's C, and kernel stuff. Also, I wasn't horribly experienced with C at the time either; I think last time I looked at nfil, there were at least several memory leaks. Do you have any advices on how to capture packets and how to send them out again after replacing src/dst addr and port? It's not quite that simple. At the simplest, when the packet goes out, you have to keep a tab of the destination host / port and source host / port. When a packet comes in, you look up the source host / port in the hash table (hashed by dest host / port). You rewrite the packet. You have to regenerate the packet checksum after rewriting it. You send it back out. (If you're doing the rewriting in userland, you may be able to avoid doing a recalculation of the checksum, as the kernel may notice it's bad and re-write it, thinking it's trash). Are there any ways of testing NAT in a virtual machine? Right now I'm using vmware and it would be nice to be able to test it without setting up a real machine with two Ethernet interfaces. Sure, configure a couple VMs with hostonly networking and set up their IP addresses accordingly. -Patrick Kristiansen --dho
Re: [9fans] NAT implementation
Hello 9fans. I'm thinking of writing a NAT implementation for plan 9. I have searched the archives and I'm not quite sure how to get started. As I see it there could be three ways of approaching this: 1. User space implementation using ipmux 2. User space using pkt interfaces in ipifc. 3. Kernel using something like sources/dho/nfil one could simply extend ipmux. however, the primary drawback to that approach is that it would break most existing setups that use a public ip stack and a second private ip stack. one approach would be to provide a fakey-fakey ethernat ethernet device which could decide where the frames go. then the ip stacks could use the ethernat interfaces instead of the real ones. - erik
Re: [9fans] NAT implementation
2009/4/15 Devon H. O'Dell devon.od...@gmail.com I think #2 would be an easily testable and maybe more `correct' way to do this in Plan 9. I think doing an implementation directly in the IP path is easier, overall, but that's where my experience lies anyway. Thanks, I'll try that. Do you have any advices on how to capture packets and how to send them out again after replacing src/dst addr and port? It's not quite that simple. At the simplest, when the packet goes out, you have to keep a tab of the destination host / port and source host / port. When a packet comes in, you look up the source host / port in the hash table (hashed by dest host / port). You rewrite the packet. You have to regenerate the packet checksum after rewriting it. You send it back out. I know it's not that simple. But for the rewriting and keeping state stuff, I can look at the existing implementations of nat, i.e. natd for freebsd. The thing I need now is the stuff for capturing and sending packets using pkt interfaces. Are there any ways of testing NAT in a virtual machine? Right now I'm using vmware and it would be nice to be able to test it without setting up a real machine with two Ethernet interfaces. Sure, configure a couple VMs with hostonly networking and set up their IP addresses accordingly. Nice, thanks. -Patrick Kristiansen --dho
Re: [9fans] Help for home user discovering Plan 9
but I don't think you can get much from it by way of productivity, unless you intend to get productive in software engineering and/or computer science. If you phrased this slightly more gently, people may in fact agree with you. Although I find my workstation quite a useful mail agent, perhaps for all the wrong reasons (the best way to describe it: acme/Mail is *fast*!). But Plan 9 is a great environment to experiment in. Perhaps you ought to look upon it as the Petri dish for information technology: concepts grow a great deal faster in Plan 9 than they do elsewhere, for all the _right_ reasons. ++L
Re: [9fans] Help for home user discovering Plan 9
Now I need to decide whether to install qemu or kvm, and whether to install it in Ubuntu or in Debian, and then reorganize my partitions accordingly. QEMU would be the way to go. It seems most people here who run Plan 9 in a VM do it on QEMU on Linux; you'll have a better chance of getting answers if something goes wrong. I believe there won't be any need for changing your partition table as long as you don't want QEMU read/write from/to a raw partition. --On Wednesday, April 15, 2009 9:05 PM +0800 Jim Habegger jimhabeg...@gmail.com wrote: On Wed, Apr 15, 2009 at 4:26 PM, Eris Discordia eris.discor...@gmail.com wrote: Plan 9 is not intended for home or home office. Yes, I understood that from the responses to my questions. As soon as I read them, I gave up the idea of trying to switch to Plan 9. Now it's more about enriching my knowledge and experience. It might be good experience for me to see how far I can stretch Plan 9 for home computing. learning about computers is for me only a pleasant aside to actual use of computers It's more the other way around with me. Using them is only a pleasant aside to learning about them! Now I need to decide whether to install qemu or kvm, and whether to install it in Ubuntu or in Debian, and then reorganize my partitions accordingly.
Re: [9fans] Help for home user discovering Plan 9
On Wed, Apr 15, 2009 at 10:05 PM, Jim Habegger jimhabeg...@gmail.com wrote: Now I need to decide whether to install qemu or kvm, and whether to install it in Ubuntu or in Debian, and then reorganize my partitions accordingly. If you want to see Plan 9 run natively on hardware, then I recommend purchasing one or more inexpensive refurbished Dell GX250 desktops online. This model provides you the option to install Plan 9 via floppy or CD. And you do not need to be concerned about whether the hardware is supported.
Re: [9fans] Help for home user discovering Plan 9
If you phrased this slightly more gently, people may in fact agree with you. They'd be agreeing with the wrong formulation, then. But Plan 9 is a great environment to experiment in. Sure. So is every nascent or vestigial system. Anyhow, the thread's originator says he's interested in computer systems in a very autotelic way. So, applications don't matter a lot; he's going to dine on the contents of the Petri dish no matter what :-D --On Wednesday, April 15, 2009 3:52 PM +0200 lu...@proxima.alt.za wrote: but I don't think you can get much from it by way of productivity, unless you intend to get productive in software engineering and/or computer science. If you phrased this slightly more gently, people may in fact agree with you. Although I find my workstation quite a useful mail agent, perhaps for all the wrong reasons (the best way to describe it: acme/Mail is *fast*!). But Plan 9 is a great environment to experiment in. Perhaps you ought to look upon it as the Petri dish for information technology: concepts grow a great deal faster in Plan 9 than they do elsewhere, for all the _right_ reasons. ++L
Re: [9fans] Help for home user discovering Plan 9
Now I need to decide whether to install qemu or kvm, and whether to install it in Ubuntu or in Debian, and then reorganize my partitions accordingly. I am using 9vx for experimenting and learning a bit, and is good enough for me. Never mind that it crashes quite often (specially when you start to use more memory) but it is fast, faster than qemu. -- Hugo
[9fans] some measurements in plan 9
Hi, I want to compare the memory consumption of two versions of the same program. I think /proc it's the way to go and acid should give me the tools to do so, am I right? is there a better way to do so? Just asking before reading the acid papers. Also, I am interested in the speed of both versions, and I am planning to use the time command with some rc scripts. Am I in the right path? thanks and saludos -- Hugo
Re: [9fans] some measurements in plan 9
On Wed, Apr 15, 2009 at 7:53 AM, hugo rivera uai...@gmail.com wrote: Hi, I want to compare the memory consumption of two versions of the same program. I think /proc it's the way to go and acid should give me the tools to do so, am I right? is there a better way to do so? Just asking before reading the acid papers. seems reasonable to me, I assume you are looking at data consumption only? Also, I am interested in the speed of both versions, and I am planning to use the time command with some rc scripts. Am I in the right path? If they run for hours, time is fine. If they run for seconds, well, maybe not so fine. ron
Re: [9fans] some measurements in plan 9
seems reasonable to me, I assume you are looking at data consumption only? well, I am not really sure what you mean. Data consumption? ;-) If they run for hours, time is fine. If they run for seconds, well, maybe not so fine. OK, they just run for a few seconds, so, any suggestions are welcome (in fact needed) -- Hugo
Re: [9fans] some measurements in plan 9
On Wed, Apr 15, 2009 at 8:18 AM, hugo rivera uai...@gmail.com wrote: seems reasonable to me, I assume you are looking at data consumption only? well, I am not really sure what you mean. Data consumption? ;-) sorry. Memory data footprint. Not code + memory. This all depends on lots of factors, but for code remember that text is shared. OK, they just run for a few seconds, so, any suggestions are welcome (in fact needed) /dev/bintime ron
Re: [9fans] some measurements in plan 9
many thanks. 2009/4/15 ron minnich rminn...@gmail.com: On Wed, Apr 15, 2009 at 8:18 AM, hugo rivera uai...@gmail.com wrote: seems reasonable to me, I assume you are looking at data consumption only? well, I am not really sure what you mean. Data consumption? ;-) sorry. Memory data footprint. Not code + memory. This all depends on lots of factors, but for code remember that text is shared. OK, they just run for a few seconds, so, any suggestions are welcome (in fact needed) /dev/bintime ron -- Hugo
Re: [9fans] some measurements in plan 9
OK, they just run for a few seconds, so, any suggestions are welcome (in fact needed) /dev/bintime Wouldn't many rounds of running with different data sets (to minimize cache hits) and timing with time also serve the same purpose? Does time introduce some unavoidable minimum margin of error for short runs that will get multiplied by the number of times and drown the actual measurement? If time only introduces fluctuations they will cancel each other out in many runs but if there's an unavoidable minimum error then multiple runs won't help. --On Wednesday, April 15, 2009 8:22 AM -0700 ron minnich rminn...@gmail.com wrote: On Wed, Apr 15, 2009 at 8:18 AM, hugo rivera uai...@gmail.com wrote: seems reasonable to me, I assume you are looking at data consumption only? well, I am not really sure what you mean. Data consumption? ;-) sorry. Memory data footprint. Not code + memory. This all depends on lots of factors, but for code remember that text is shared. OK, they just run for a few seconds, so, any suggestions are welcome (in fact needed) /dev/bintime ron
Re: [9fans] some measurements in plan 9
actually i never use anything less than the processor cycle counter if I care. If I don't care as much bintime is good. time on plan 9 is great but for runs in the seconds I don't use it. ron
Re: [9fans] Help for home user discovering Plan 9
... hasn't matured to that point and its age is already past when it had a chance to mature. Methinks he doth protest too much. -Steve
Re: [9fans] NAT implementation
On Wed, Apr 15, 2009 at 02:03:35PM +0200, Patrick Kristiansen wrote: I'm thinking of writing a NAT implementation for plan 9. I would suggest instead that it might be easier to write an adaptor program for non-Plan 9 hosts which made their network stacks talk to a /net. That is, you'd want a program which spoke TAP/TUN out one end to the host kernel and out the other dialed and imported /net from the Plan 9 gateway. AFAIK TAP/TUN-like things exist on most OSes, and there's good example code in OpenVPN (for example). The program would have to know enough about the on-the-wire representation of TCP/IP and UDP/IP to do connection tracking etc. (much like NAT, I suppose) but the advantage is that it wouldn't impact the Plan 9 kernel. --nwf; P.S. This idea shamelessly stolen from vsrinivas, but he's mailing-list shy. pgp0uCnxzfLJK.pgp Description: PGP signature
Re: [9fans] Help for home user discovering Plan 9
On Wed, Apr 15, 2009 at 9:00 AM, Steve Simon st...@quintile.net wrote: ... hasn't matured to that point and its age is already past when it had a chance to mature. Methinks he doth protest too much. Yes. If you keep thinking of Plan 9 as a Unix variant, you're going to be continually upset. It doesn't fit that box. I think that's his problem. If you don't get it, you don't get it. I have some young friends who get it, and they run vx32 all the time. They love it. I showed one guy /net the other day. See, I can mount /net from elsewhere .. now I'm making sockets on that system. Once he got it, he was pretty excited. Linux is one kernel that doesn't ever quite seem to get it. They now have network namespaces, Woo hoo! But can you mount them? Of course not! how do you name the network stack? Talk about missing the concept ... ron
Re: [9fans] NAT implementation
the idea is interesting, but it's a compliment, not a replacement. there's plenty of situations where installing something on all your hosts is either impractical or undesirable; centralizing the work in network infrastructure is often a big win. doing what you describe hits a different set of use cases.
Re: [9fans] NAT implementation
2009/4/15 Anthony Sorace ano...@gmail.com: the idea is interesting, but it's a compliment, not a replacement. there's plenty of situations where installing something on all your hosts is either impractical or undesirable; centralizing the work in network infrastructure is often a big win. doing what you describe hits a different set of use cases. This is what I meant to say, expressed in a much nicer, and less asshole-ish fashion. --dho
Re: [9fans] some measurements in plan 9
On Wed Apr 15 10:55:34 EDT 2009, uai...@gmail.com wrote: Hi, I want to compare the memory consumption of two versions of the same program. I think /proc it's the way to go and acid should give me the tools to do so, am I right? is there a better way to do so? Just asking before reading the acid papers. Also, I am interested in the speed of both versions, and I am planning to use the time command with some rc scripts. Am I in the right path? thanks and saludos leak should give you a very detailed picture of memory allocation. ron's comments notwithstanding, i have found nsec() to be very helpful in tuning most user mode programs. i wasn't doing supercomputer applications, but the chances are you aren't either. - erik
Re: [9fans] NAT implementation
i think it's a *great* idea, but it doesn't give you the same things nat does and isn't useful in the same cases. but i'd love to be able to import my plan9 /net from my OS X box. It seems a pretty universal opinion that were other OSs capable of importing a Plan9 /net, their _functioning_ that way would be much more elegant than NAT. On the other hand, having to _implement_ that capability on every OS we might have on our internal networks and keeping them up to date as they evolve (for a suitable definition of evolve) would be much less elegant. Ideally, there would be one implementation of importing that would magically work everywhere. But in the absence of that, the most useful solution seems to be to implement NAT on Plan9 (or Inferno). Machines on the local network that can import /net will and those than can't will fall back on NAT. So I'd love to see an implementation of NAT on Plan9 or Inferno. I plan to make use of it on a gateway that lets me get to the outside world in either mode. BLS
Re: [9fans] some measurements in plan 9
leak should give you a very detailed picture of memory allocation. ron's comments notwithstanding, i have found nsec() to be very helpful in tuning most user mode programs. i wasn't doing supercomputer applications, but the chances are you aren't either. No, no supercomputers for me (maybe one day ;-) -- Hugo
[9fans] vgadb woes
I've got a laptop that I (for shits and giggles) decided to put Plan 9 on. Lo and behold, it worked fine (Compal EL80, Core 2 Duo, 2GB RAM, nVidia video). So, I'm running at 1280x1024x32 right now in VESA, which is reasonable, but I'd like to run at my maximum native resolution, which is 1680x1050 (I believe). After tooling around with Xorg configs, I've found a horiz/vert refresh rate that should work for me... ...except that I have no idea how to convert that into vgadb lingo. I've read all the comments in vgadb, and the manpage, which helpfully suggests that I purchase a rather dated book. I suppose it's at least available, but in the interest of ``I want it now,'' are there any hints on translating eg. Option DPMS HorizSync 28-84 VertRefresh 43-60 into vgadb(6) lingo? Only other bit of potentially relevant information I have is that Xorg reports the monitor as having a ``330.0 MHz pixel clock''. Thanks, --dho
Re: [9fans] vgadb woes
I've got a laptop that I (for shits and giggles) decided to put Plan 9 on. Lo and behold, it worked fine (Compal EL80, Core 2 Duo, 2GB RAM, nVidia video). So, I'm running at 1280x1024x32 right now in VESA, which is reasonable, but I'd like to run at my maximum native resolution, which is 1680x1050 (I believe). After tooling around with Xorg configs, I've found a horiz/vert refresh rate that should work for me... ...except that I have no idea how to convert that into vgadb lingo. I've read all the comments in vgadb, and the manpage, which helpfully suggests that I purchase a rather dated book. I suppose it's at least available, but in the interest of ``I want it now,'' are there any hints on translating eg. Option DPMS HorizSync 28-84 VertRefresh 43-60 into vgadb(6) lingo? Only other bit of potentially relevant information I have is that Xorg reports the monitor as having a ``330.0 MHz pixel clock''. Thanks, --dho I got something working for me, so I wrote a wiki page: http://www.plan9.bell-labs.com/wiki/plan9/Adding_a_monitor_to_vgadb/index.html Hope that helps; I've tried something similar with a different monitor and managed to get a setup that causes the screen to jiggle and hurt my eyes, so your mileage may vary. John
Re: [9fans] vgadb woes
I've got a laptop that I (for shits and giggles) decided to put Plan 9 on. Lo and behold, it worked fine (Compal EL80, Core 2 Duo, 2GB RAM, nVidia video). So, I'm running at 1280x1024x32 right now in VESA, which is reasonable, but I'd like to run at my maximum native resolution, which is 1680x1050 (I believe). After tooling around with Xorg configs, I've found a horiz/vert refresh rate that should work for me... In some of the little I've played with such things, it has appeared that the VESA report of available modes does not always include resolutions that are out of the ordinary, and without that, I doubt the VESA driver will be able to put it into that mode. Not to discourage you, but just be aware that your issue might go deeper than vgadb. BLS
Re: [9fans] vgadb woes
In some of the little I've played with such things, it has appeared that the VESA report of available modes does not always include resolutions that are out of the ordinary, and without that, I doubt the VESA driver will be able to put it into that mode. Not to discourage you, but just be aware that your issue might go deeper than vgadb. BLS to my suprise, vesa seemed to work well in 1600x1200x32 mode when i last tried it on integrated ati graphics a few weeks ago. however, the hw cursor didn't. since i had other plans for the machine, i didn't investigate further. the cursor worked in some other lower vesa modes. i get the feeling that some of the high bits in the vga registers might not be set correctly, especially register 13. i used this in the nvidia driver to get my obstreperous card (different machine) working + vga-crt[0x13] = (vga-virtx/8)*(mode-z/8);// magic to get cursor to work. that would set it to 0x20, not 0x00. as vga.c currently does. please don't ask me how i arrived at this magic. ☺ - erik
Re: [9fans] vgadb woes
Try generating a working modeline for your X.Org and then just put the numbers from modeline into vgadb. xvidtune should help with generating the modeline. A modeline looks like: Modeline mode_name_here 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync Numbers are from left to right, http://howto-pages.org/ModeLines/: 01. Clock (= pixel clock frequency, 'include' section 'clock') 02. HDisplay (= horizontal resolution) 03. HSyncStart (= 'include' section 'shb') 04. HSyncEnd (= 'include' section 'ehb') 05. HTotal (= 'include' section 'ht') 06. VDisplay (= vertical resolution) 07. VSyncStart (= 'include' section 'vrs') 08. VSyncEnd (= 'include' section 'vre') 09. VTotal (= 'include' section 'vt') 10. HSync (= 'include' section 'hsync', either '+' or '-') 11. VSync (= 'include' section 'vsync', either '+' or '-') There's almost one-to-one correspondence between these numbers and the cryptic numbers referred to in vgadb(6). Translations in parentheses :-) --On Wednesday, April 15, 2009 3:11 PM -0400 Devon H. O'Dell devon.od...@gmail.com wrote: I've got a laptop that I (for shits and giggles) decided to put Plan 9 on. Lo and behold, it worked fine (Compal EL80, Core 2 Duo, 2GB RAM, nVidia video). So, I'm running at 1280x1024x32 right now in VESA, which is reasonable, but I'd like to run at my maximum native resolution, which is 1680x1050 (I believe). After tooling around with Xorg configs, I've found a horiz/vert refresh rate that should work for me... ...except that I have no idea how to convert that into vgadb lingo. I've read all the comments in vgadb, and the manpage, which helpfully suggests that I purchase a rather dated book. I suppose it's at least available, but in the interest of ``I want it now,'' are there any hints on translating eg. Option DPMS HorizSync 28-84 VertRefresh 43-60 into vgadb(6) lingo? Only other bit of potentially relevant information I have is that Xorg reports the monitor as having a ``330.0 MHz pixel clock''. Thanks, --dho
Re: [9fans] vgadb woes
I thought russ posted a program that runs under X11 (on unix) and prints the video config for the current mode in vgadb form. I had a search but couldn't find it so perhaps it was wishful thinking, alternatively perhaps this wil jog somones elses memory. -Steve
Re: [9fans] vgadb woes
Thanks for all the tips, I'll see what I can get working (and perhaps flesh out the wiki once it's working well, if it ends up being different from what's already there). --dho
Re: [9fans] vgadb woes
Well, that ends up getting my screen to have a bunch of lines through it, staggered -- so I'm not much better off than I was before. I'm guessing that's an nVidia driver issue or something. If I had any idea about video devices, I'd try to fix it, but I don't. I'll just live with a bit low-res VESA for now (all of the VESA modes don't seem to work), unless someone has ideas. Thanks! --dho
Re: [9fans] vgadb woes
On Wed Apr 15 19:32:57 EDT 2009, devon.od...@gmail.com wrote: Well, that ends up getting my screen to have a bunch of lines through it, staggered -- so I'm not much better off than I was before. I'm guessing that's an nVidia driver issue or something. If I had any idea about video devices, I'd try to fix it, but I don't. I'll just live with a bit low-res VESA for now (all of the VESA modes don't seem to work), unless someone has ideas. Thanks! --dho i'll put my terrible, awful, reprehensible, reprobate, disgusting nvidia driver that sort-of works if you squint and set the mode incorrectly up on sources (/n/sources/contrib/quanstro/src/vga). you may need to have a monitor fairly resistant to misset frequencies. i had to hack my vgadb. the commented-out line is correct for my montior. clearly i don't have the frequency calculations right at all. 213t=1600x1200 # 60 Hz clock=150 # shb=1664 ehb=1856 ht=2160 shb=1664 ehb=1856 ht=2058 vrs=1201 vre=1204 vt=1250 hsync=+ vsync=+ i really need to write a driver for integratede modern intel or ati graphics. - erik
Re: [9fans] vgadb woes
i really need to write a driver for integratede modern intel or ati graphics. There is an ati radeon driver for the r100-r300 (at least) by Philippe Anel, iirc. It also builds against the Inferno native kernel, but there is no user program to drive it (set modes, etc) yet. -- vs