High performance IO (sendfile(), caching, and libev(ent))
Hello, I'm trying to learn about writing high performance servers, and I have a few questions not clearly answered by any documentation I can find. I'm comfortable with select(), poll(), and kqueue(), but that only goes so far. I'm currently looking into how to send static files (over a network) with the least amount of overhead. There was a post [1] on misc@ asking about the status of a sendfile() call, but nobody replied (and it seems that splice(2) and tee(2) are just GNUisms). It appears that there's been some work on socket splicing (see sosplice() in [2]), but there's still no sendfile (or if it's there, I must not be looking in the right place [3]). If I want to serve a bunch of files often, is it fine to rely on the kernel's filesystem caching? or should I mmap() them into my address space and madvise() them to not be swapped out? Is it reasonable to stat() the file each time it is served (from my cached copy) to compare the file's modification time to the time it was cached? Would this actually hit the disk each time? or does the kernel keep that cached? It seems obvious to me that it should be be cached, but I can't actually find the relevant code. I spent a while digging through the kernel, but I don't really know where to look, and I'm not sure I'd recognize what I'm looking for if I found it anyway. The closest thing I found to something I think might be relevant was some cryptic vfs stuff. :( I'm no kernel dev, I don't pretend to understand OpenBSD internals nearly as well as I'd like to. Lastly, What's the OpenBSD community's current opinion on libevent / libev. Are they secure / stable enough that they should be considered for new code in base? Are they worth using instead of just using select/poll/kqueue/event(3) directly? [1] http://marc.info/?l=openbsd-miscm=112690025715479w=2 [2] http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/uipc_socket.c [3] http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.c Many thanks for any and all advice, Jean-Philippe Ouellet
Re: High performance IO (sendfile(), caching, and libev(ent))
On 12/20/12 3:53 AM, Jean-Philippe Ouellet wrote: and madvise() them to not be swapped out? Oops, I think I might have misinterpreted the meaning of MADV_WILLNEED. I think I meant mlock().
Re: High performance IO (sendfile(), caching, and libev(ent))
On Thu, Dec 20, 2012 at 04:06:52AM -0500, Jean-Philippe Ouellet wrote: On 12/20/12 3:53 AM, Jean-Philippe Ouellet wrote: and madvise() them to not be swapped out? Oops, I think I might have misinterpreted the meaning of MADV_WILLNEED. I think I meant mlock(). Why trying to be smarter than the kernel? Mlocking pages will kill you if there's memory shortage. The kernel will try to keep much used pages in mem anyway. -Otto
Re: High performance IO (sendfile(), caching, and libev(ent))
On Thu, Dec 20, 2012 at 03:53:44AM -0500, Jean-Philippe Ouellet wrote: Hello, I'm trying to learn about writing high performance servers, and I have a few questions not clearly answered by any documentation I can find. I'm comfortable with select(), poll(), and kqueue(), but that only goes so far. I'm currently looking into how to send static files (over a network) with the least amount of overhead. There was a post [1] on misc@ asking about the status of a sendfile() call, but nobody replied (and it seems that splice(2) and tee(2) are just GNUisms). It appears that there's been some work on socket splicing (see sosplice() in [2]), but there's still no sendfile (or if it's there, I must not be looking in the right place [3]). I do not know of any effort to introduce sendfile(2). If I want to serve a bunch of files often, is it fine to rely on the kernel's filesystem caching? or should I mmap() them into my address space and madvise() them to not be swapped out? Is it reasonable to stat() the file each time it is served (from my cached copy) to compare the file's modification time to the time it was cached? Would this actually hit the disk each time? or does the kernel keep that cached? Filesystem caching should be fine, a lot of effort went into this lately. File metadata is cached by the kernel vfs layer. -Otto It seems obvious to me that it should be be cached, but I can't actually find the relevant code. I spent a while digging through the kernel, but I don't really know where to look, and I'm not sure I'd recognize what I'm looking for if I found it anyway. The closest thing I found to something I think might be relevant was some cryptic vfs stuff. :( I'm no kernel dev, I don't pretend to understand OpenBSD internals nearly as well as I'd like to. Lastly, What's the OpenBSD community's current opinion on libevent / libev. Are they secure / stable enough that they should be considered for new code in base? Are they worth using instead of just using select/poll/kqueue/event(3) directly? [1] http://marc.info/?l=openbsd-miscm=112690025715479w=2 [2] http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/uipc_socket.c [3] http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.c Many thanks for any and all advice, Jean-Philippe Ouellet
Re: High performance IO (sendfile(), caching, and libev(ent))
On 12/20/12 4:20 AM, Otto Moerbeek wrote: On Thu, Dec 20, 2012 at 04:06:52AM -0500, Jean-Philippe Ouellet wrote: On 12/20/12 3:53 AM, Jean-Philippe Ouellet wrote: and madvise() them to not be swapped out? Oops, I think I might have misinterpreted the meaning of MADV_WILLNEED. I think I meant mlock(). Why trying to be smarter than the kernel? Mlocking pages will kill you if there's memory shortage. The kernel will try to keep much used pages in mem anyway. -Otto Okay, yeah. That's a terrible idea. But still, the question of direct file-to-socket sending vs. keeping copies in my address space and write()ing those to the socket still remains. Normally I would just write both and profile them, but I can't figure out how to do the first on OpenBSD.
Re: High performance IO (sendfile(), caching, and libev(ent))
On Thu, Dec 20, 2012 at 4:23 AM, Jean-Philippe Ouellet jean-phili...@ouellet.biz wrote: Hello, I'm trying to learn about writing high performance servers, and I have a few questions not clearly answered by any documentation I can find. I'm comfortable with select(), poll(), and kqueue(), but that only goes so far. I'm currently looking into how to send static files (over a network) with the least amount of overhead. rest assured this is not the right avenue a few moons ago there was a discussion involving a converse client issue certain people did not understand why firefox opens so many sockets since select() and cousins are used in situations where concurrent socket io is desirable (if only because of inadequacies of http), you want to go to a place where they write high throughput servers. you won't find that in openbsd outside of non-tcp servers and contribs like nginx
kernel panic with /etc/daily and ntfs mount
hello guys, don't know if this is a real bug, a misconfiguration of my /etc/fstab, or already solved in -current. when i have my /win (windows 7) ntfs mount and run daily(8), the kernel panics. if i unmount /win, daily(8) exits normally. i didn't set up my mail(1)/smtpd(8) properly, so sendbug(1) didn't work, yet. but i made a copy of it at the bottom of this mail. it took me a while to figure out, why X just freezes every day at 0:30 am, and my first try was to apply the bgpd patch. I even succeeded in recompiling the kernel thanks to your great documentation and noticed afterwards, that i didn't have to and bgpd has nothing to do with it :) in the console i finally saw the panic and the ntfs line. so the problem was obvious. but to get out of the debugger was again a little struggle to a simple man like me. perhaps a line to the crash(8) manpage and the command `boot dump` would be nice. the problem is solved for me, but i want to let you know. hope you guys can do something with the infos i provide. thanks for your great work, sebastian. Synopsis: i got a kernel panic each time i run /etc/daily and have my ntfs parition mounted. Category: kernel Environment: System : OpenBSD 5.2 Details : OpenBSD 5.2 (GENERIC.MP) #0: Wed Dec 19 15:55:31 CET 2012 phancy@sqrt2.Speedport_W_504V_Typ_A:/home/phancy/src/sys/arch/i386/compile/GENERIC.MP Architecture: OpenBSD.i386 Machine : i386 Description: kernel panics when i run the /etc/daily script and my windows partition is mounted. i have following /etc/fstab line: 3d7d414f73ffa075.j /win ntfs ro,nodev,nosuid 0 0 when i unmount /win and run then the daily script it exits normal. i rebuilt the kernel with the bgpd patch to narrow down the problem why my X just freezed everyday at 0:30 am. so don't be confused with the built time, i didn't change any kernel parameters but followed -stable as described in the faqs. the problem was before and after the new kernel. How-To-Repeat: mount_ntfs /dev/sd0j /win ksh /etc/daily Fix: umount /win ksh /etc/daily and don't have /win mount at 0:30 am. ometric Coprocessor rev 1.01/0.02 addr 2 ugen1 at uhub3 port 2 Lenovo Computer Corp ThinkPad Bluetooth with Enhanced Data Rate II rev 2.00/3.99 addr 3 vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets root on sd0a (3d7d414f73ffa075.a) swap on sd0b dump on sd0b WARNING: / was not properly unmounted panic: malloc: out of space in kmem_map Stopped at Debugger+0x4: popl%ebp RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC! IF RUNNING SMP, USE 'mach ddbcpu #' AND 'trace' ON OTHER PROCESSORS, TOO. DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION! ddb{0} Debugger(d08e8d26,f5e3bbb8,d08c4bf0,f5e3bbb8,d73aac80) at Debugger+0x4 panic(d08c4bf0,0,1000,0,0) at panic+0x5d malloc(1000,7f,1,d08cb172,0) at malloc+0x5d7 ntfs_ntlookupfile(d46a3000,f6399400,f5e3bed0,f5e3bebc,d9cc6e8c) at ntfs_ntlookupfile+0x100 ntfs_vgetex(f5e3bd40,d9cc6e8c,d9cc6e8c,f6399400,f5e3bebc) at ntfs_vgetex+0x10a5 VOP_LOOKUP(f6399400,f5e3bebc,f5e3bed0,f5e3bebc,20) at VOP_LOOKUP+0x2f vfs_lookup(f5e3bea8,d9f14c00,400,f5e3bec4,f62a2708) at vfs_lookup+0x27b namei(f5e3bea8,1,d9f77a50,d9cc6e8c,318) at namei+0x221 dofstatat(d9cc6e8c,ff9c,7fc78e00,25a3b920,2) at dofstatat+0x5d sys_lstat(d9cc6e8c,f5e3bf64,f5e3bf84,d03eb0d3,d09cfcfc) at sys_lstat+0x38 syscall() at syscall+0x12c --- syscall (number 0) --- 0x2: ddb{0}PID PPID PGRPUID S FLAGS WAIT COMMAND * 6983 15569 15569 0 7 0perl 15569 19636 15569 0 30x88 pause ksh 19636 29665 19636 0 30x88 pause ksh 15932 1 15932 1000 30x80 selectssh-agent 18095 9297 9297 67 30x80 netconhttpd 17839 9297 9297 67 30x80 netconhttpd 20327 9297 9297 67 30x80 netconhttpd 31794 9297 9297 67 30x80 netconhttpd 26614 9297 9297 67 30x80 netconhttpd 15673 1 15673 0 30x80 ttyin getty 13886 1 13886 0 30x80 ttyin getty 18645 1 18645 0 30x80 ttyin getty 28430 1 28430 0 30x80 ttyin getty 29665 1 29665 1000 30x88 pause ksh 24255 1 24255 0 30x80 selectcron 23303 1 23303 0 30x80 kqreadapmd 13012 1 13012 99 30x80 poll sndiod 15767 1 15767 0 30x80 selectinetd
Re: no BIOS memory map supplied
On Nov 18 12:04:46, h...@stare.cz wrote: On Nov 14 08:39:22, h...@stare.cz wrote: On Nov 14 08:35:37, h...@stare.cz wrote: With today's i386 snapshot (Nov 14th) and the previous (Nov 11th), the booting bsd goes straight to ddb prompt saying panic: no BIOS memory map supplied This is on a Thinkpad T40. Is anyone else seeing this? Forgot to add: here is an older snapshot that worked fine: The current/i386 snapshot (Nov 17th) is working fine again. And the last one and the previous again don't. Can anyone please give a clue to what's happening? Below is the last current/i386 that worked for me on this laptop. (Some of my other machines work with the later currents too, and 5.2. works fine everywhere.) Jan OpenBSD 5.2-current (GENERIC) #87: Sat Nov 17 13:27:31 MST 2012 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel(R) Pentium(R) M processor 1500MHz (GenuineIntel 686-class) 1.50 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,TM,PBE,EST,TM2,PERF real mem = 267317248 (254MB) avail mem = 251985920 (240MB) mainbus0 at root bios0 at mainbus0: AT/286+ BIOS, date 06/18/07, BIOS32 rev. 0 @ 0xfd750, SMBIOS rev. 2.33 @ 0xe0010 (61 entries) bios0: vendor IBM version 1RETDRWW (3.23 ) date 06/18/2007 bios0: IBM 237382G apm0 at bios0: Power Management spec V1.2 acpi at bios0 function 0x0 not configured pcibios0 at bios0: rev 2.1 @ 0xfd6e0/0x920 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdea0/272 (15 entries) pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82371FB ISA rev 0x00) pcibios0: PCI bus #6 is the last bus bios0: ROM list: 0xc/0x1 0xd/0x1000 0xd1000/0x1000 0xdc000/0x4000! 0xe/0x1 cpu0 at mainbus0: (uniprocessor) cpu0: Enhanced SpeedStep 1496 MHz: speeds: 1500, 1400, 1200, 1000, 800, 600 MHz pci0 at mainbus0 bus 0: configuration mode 1 (bios) 0:31:1: io address conflict 0x5800/0x8 0:31:1: io address conflict 0x5808/0x4 0:31:1: io address conflict 0x5810/0x8 0:31:1: io address conflict 0x580c/0x4 pchb0 at pci0 dev 0 function 0 Intel 82855PM Host rev 0x03 intelagp0 at pchb0 agp0 at intelagp0: aperture at 0xd000, size 0x1000 ppb0 at pci0 dev 1 function 0 Intel 82855PM AGP rev 0x03 pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 ATI Radeon Mobility M7 rev 0x00 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) radeondrm0 at vga1: irq 11 drm0 at radeondrm0 uhci0 at pci0 dev 29 function 0 Intel 82801DB USB rev 0x01: irq 11 uhci1 at pci0 dev 29 function 1 Intel 82801DB USB rev 0x01: irq 11 uhci2 at pci0 dev 29 function 2 Intel 82801DB USB rev 0x01: irq 11 ehci0 at pci0 dev 29 function 7 Intel 82801DB USB rev 0x01: irq 11 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1 ppb1 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0x81 pci2 at ppb1 bus 2 2:0:0: mem address conflict 0xb000/0x1000 2:0:1: mem address conflict 0xb100/0x1000 cbb0 at pci2 dev 0 function 0 TI PCI1520 CardBus rev 0x01: irq 11 cbb1 at pci2 dev 0 function 1 TI PCI1520 CardBus rev 0x01: irq 11 em0 at pci2 dev 1 function 0 Intel PRO/1000MT (82540EP) rev 0x03: irq 11, address 00:0d:60:7f:83:fa ipw0 at pci2 dev 2 function 0 Intel PRO/Wireless 2100 rev 0x04: irq 11, address 00:0c:f1:16:9b:b8 cardslot0 at cbb0 slot 0 flags 0 cardbus0 at cardslot0: bus 3 device 0 cacheline 0x8, lattimer 0xb0 pcmcia0 at cardslot0 cardslot1 at cbb1 slot 1 flags 0 cardbus1 at cardslot1: bus 6 device 0 cacheline 0x8, lattimer 0xb0 pcmcia1 at cardslot1 ichpcib0 at pci0 dev 31 function 0 Intel 82801DBM LPC rev 0x01: 24-bit timer at 3579545Hz pciide0 at pci0 dev 31 function 1 Intel 82801DBM IDE rev 0x01: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility wd0 at pciide0 channel 0 drive 0: HTS548040M9AT00 wd0: 16-sector PIO, LBA, 35087MB, 71859186 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 atapiscsi0 at pciide0 channel 1 drive 0 scsibus0 at atapiscsi0: 2 targets cd0 at scsibus0 targ 0 lun 0: HL-DT-ST, DVD-ROM GDR8083N, 0K03 ATAPI 5/cdrom removable cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 ichiic0 at pci0 dev 31 function 3 Intel 82801DB SMBus rev 0x01: irq 11 iic0 at ichiic0 spdmem0 at iic0 addr 0x50: 256MB DDR SDRAM non-parity PC2700CL2.5 auich0 at pci0 dev 31 function 5 Intel 82801DB AC97 rev 0x01: irq 11, ICH4 AC97 ac97: codec id 0x41445374 (Analog Devices AD1981B) ac97: codec features headphone, 20 bit DAC, No 3D Stereo audio0 at auich0 Intel 82801DB Modem rev 0x01 at pci0 dev 31 function 6 not configured usb1 at uhci0: USB revision 1.0 uhub1 at usb1 Intel UHCI root hub rev 1.00/1.00 addr 1 usb2 at uhci1: USB revision 1.0 uhub2 at usb2 Intel UHCI root hub rev 1.00/1.00 addr 1 usb3 at uhci2: USB revision 1.0 uhub3 at usb3 Intel UHCI root hub rev 1.00/1.00 addr 1 isa0 at ichpcib0 isadma0 at isa0 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte
Re: ospf Linkstate unknown
Hello Giannis, i reported a similar problem, with snmp on emX devices on 3.12.2012 (Subject line: ifOperStatus of em(4) devices always unknown when link is up) Seems to happen only with em based devices, until now, no fix available. Cheers, Carsten Am 19.12.2012 17:24, schrieb Kapetanakis Giannis: Hi, I'd like to ask why I get Linkstate unknown on interfaces em0/em1: # ospfctl s i Interface AddressState HelloTimer LinkstateUptime nc ac gre0 zz.zz.zz.zz/32 P2P00:00:02 active04:34:441 1 em1xx.xx.xx.xx/24 DR 00:00:04 unknown 00:06:311 1 em0yy.yy.yy.yy/29 DR 00:00:01 unknown03w5d22h1 1 # ospfctl s n zz.zz.zz.zz1 FULL/P2P 00:00:32 zz.zz.zz.zz gre0 04:53:13 xx.xx.xx.xx1 FULL/BCKUP 00:00:35 xx.xx.xx.xx em1 00:25:00 yy.yy.yy.yy1 FULL/BCKUP 00:00:31 yy.yy.yy.yy em0 03w1d06h em0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 lladdr 52:54:00:25:e7:a8 description: External priority: 0 groups: egress media: Ethernet autoselect (1000baseT full-duplex) status: active inet xx.xx.xx.x1 netmask 0xfff8 broadcast xx.xx.xx.xx inet6 fe80::5054:ff:fe25:e7a8%em0 prefixlen 64 scopeid 0x1 inet xx.xx.xx.x2 netmask 0x em1: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 lladdr 52:54:00:62:d4:cc description: other VLAN24 priority: 0 media: Ethernet autoselect (1000baseT full-duplex) status: active inet yy.yy.yy.yy netmask 0xff00 broadcast yy.yy.yy.yy inet6 fe80::5054:ff:fe62:d4cc%em1 prefixlen 64 scopeid 0x2 ospfd.conf: router-id xx.xx.xx.x1 fib-update yes stub router no spf-delay 1 spf-holdtime 5 hello-interval 10 metric 1 retransmit-interval 5 router-dead-time 40 router-priority 1 transmit-delay 1 redistribute static redistribute connected ...+ passwords # CORE area 0.0.0.0 { interface em0 { auth-type crypt auth-md $HER_core_id $core_pass auth-md-keyid $core_id } } # OTHER AREA area 0.0.0.1 { stub interface em1 { auth-type crypt auth-md $HER_other_id $other_pass auth-md-keyid $other_id } } ... other areas regards, Giannis
Re: Xfce4 and ctrl:swapcaps not working
On Wed, Dec 19, 2012 at 02:49:12PM -0800, Raymond Lillard wrote: Hello Misc, I am running -current (amd64) on a Lenovo w500. I start Xfce4 from the command line with startx. I have added: exec /usr/local/bin/startxfce4 to ~/.xinitrc. Everything comes up nicely, but I cannot swap the Control_L and CAPS_LOCK automatically at startup. I can swap them from an xterm command line using setxkbmap -option ctrl:swapcaps and xmodmap ~/.Xmodmap Both of these methods do work, but I want it to happen automatically when I launch X. Add the setxkbmap command to .xinitrc above startxfce4. Also, remove the settings related to the layout of your keyboard in the settings of xfce4. I have gone to the Session and Startup dialog and created an entry for the setxkbmap command method. The command executes and returns 0. I have added: XKBOPTIONS=ctrl:swapcaps to /etc/default/keyboard. This doesn't work either. I have instrumented /etc/xdg/xfce4/xinitrc to verify that # load local modmap test -r $HOME/.Xmodmap xmodmap $HOME/.Xmodmap in that file is executed and returns 0 Googling finds the solutions described above. These aren't working for me. At this point I am out of ideas. I am resisting writing an xorg.conf file. Am I down to that? Clue sticks gladly accepted. Thanks to all, Ray -- Juan Francisco Cantero Hurtado http://juanfra.info
Re: High performance IO (sendfile(), caching, and libev(ent))
On Thu, Dec 20, 2012 at 04:26:48AM -0500, Jean-Philippe Ouellet wrote: On 12/20/12 4:20 AM, Otto Moerbeek wrote: On Thu, Dec 20, 2012 at 04:06:52AM -0500, Jean-Philippe Ouellet wrote: On 12/20/12 3:53 AM, Jean-Philippe Ouellet wrote: and madvise() them to not be swapped out? Oops, I think I might have misinterpreted the meaning of MADV_WILLNEED. I think I meant mlock(). Why trying to be smarter than the kernel? Mlocking pages will kill you if there's memory shortage. The kernel will try to keep much used pages in mem anyway. -Otto Okay, yeah. That's a terrible idea. But still, the question of direct file-to-socket sending vs. keeping copies in my address space and write()ing those to the socket still remains. The file will be in the buffer cache. While it still takes a few in-memory copies (which is what sendfile saves you), this should be fast enough for most cases. If you keep the data in your address space, you save one m-to-m copy, but ignore all the benefits that the bc has compared to you (namely knowing how much free memory really is available at runtime, not forcing buffers into swap and more). You will probably end up shooting yourself in the leg for a speed gain that probably can't be realized because the network is the real bottleneck Taking memory away from the kernel to duplicate functionality in user-space is almost never a good idea. Normally I would just write both and profile them, but I can't figure out how to do the first on OpenBSD.
Re: High performance IO (sendfile(), caching, and libev(ent))
On Thu, Dec 20, 2012 at 6:06 AM, Tobias Ulmer tobi...@tmux.org wrote: The file will be in the buffer cache. While it still takes a few in-memory copies (which is what sendfile saves you), this should be fast enough for most cases. If you keep the data in your address space, you save one m-to-m copy, but ignore all the benefits that the bc has compared to you (namely knowing how much free memory really is available at runtime, not forcing buffers into swap and more). this is called optimizing for the worst case of resource starvation over disk usage. clearly a question of priorities 1. the kernel file buffer cache having knowledge about free mem alone is irrelevant because sendfile() has the capability of returning ENOMEM 2. if you are hitting swap, buy more memory or stop sending so many/as big files You will probably end up shooting yourself in the leg for a speed gain that probably can't be realized because the network is the real bottleneck Taking memory away from the kernel to duplicate functionality in user-space is almost never a good idea. Normally I would just write both and profile them, but I can't figure out how to do the first on OpenBSD.
Crash while loading pf.conf (quick in a load balance rule)
Hello, I encountered a issue loading a pf.conf file The syntax is correct but the loading crashed the system. It happened in production via a network connection. The issue is reproducible and I join a simplified pf.conf that still causes the crash. The system is now offline, I can play with it for several days in case you're interested to debug the issue, by giving me directives or patches. I'm not skilled enough to fix it myself in the source code. No problem if you're not interested to debug it, may be it's already fixed in current release. May be the rule itself is silly but it shouldn't cause a crash. Thanks in advance. The kernel is the default one from a 5.2 install on i386 # uname -mrsv OpenBSD 5.2 GENERIC#278 i386 The output from the console via serial port is: root:~ 1# uvm_fault(0xd0a36200, 0xa64a000, 0, 1) - e kernel: page fault trap, code=0 Stopped at pf_test_rule+0x82a: movl0(%edx),%eax ddb I'm not sure what I can safely do with this ddb prompt. It looks like the crash comes from the quick of the load balance rule pass in quick log on $int_if1 from $lan_if1 route-to ... Here is the complete pf.conf that causes the crash: cat /etc/pf.conf_both_up_bad # $OpenBSD: pf.conf_both_up,v 1.2 2012/11/29 15:47:27 root Exp $ ext_if1=em3 ext_if2=em2 ext_gw1=192.168.103.1 ext_gw2=192.168.102.1 int_if1=em0 lan_if1=192.168.100.0/24 set skip on { lo em1 } pass log # Masquerading pass out quick log on $ext_if1 proto { tcp udp icmp } from $lan_if1 to any nat-to ($ext_if1) modulate state (if-bound) pass out quick log on $ext_if2 proto { tcp udp icmp } from $lan_if1 to any nat-to ($ext_if2) modulate state (if-bound) # load balance outgoing traffic from internal network. pass in quick log on $int_if1 from $lan_if1 route-to { ($ext_if1 $ext_gw1), ($ext_if2 $ext_gw2) } round-robin sticky-address # route packets from any IPs on $ext_if1 to $ext_gw1 and the same for $ext_if2 and $ext_gw2 pass out log quick on $ext_if1 from $ext_if2 route-to ($ext_if2 $ext_gw2) pass out log quick on $ext_if2 from $ext_if1 route-to ($ext_if1 $ext_gw1) pass out quick log # end -- Au revoir, 09 51 84 42 42 Gilles Lamiral. France, Baulon (35580) 06 20 79 76 06
Re: issue tracker
On Wed, Dec 19, 2012 at 09:43:18PM +, sickm...@lavabit.com wrote: Hi, I have been using OpenBSD for quite a long time, and find it awesome. I've got some spare time lately and decided to hunt some bugs, but I don't really know where to start. Any suggestions? P.S. Yeah, I know about openbsd-bugs, but I suppose that's not all there is. I could provide a list of things that need doing in locales/wireless/IPv6 if any of those areas are of interest to you.
Re: kernel panic with /etc/daily and ntfs mount
On 12/20/2012 11:36 AM, Sebastian Neuper wrote: it took me a while to figure out, why X just freezes every day at 0:30 am, and my first try was to apply the bgpd patch. I even succeeded in recompiling the kernel thanks to your great documentation and noticed afterwards, that i didn't have to and bgpd has nothing to do with it :) You don't have to rebuild the kernel for that patch. You have to rebuild and install bgpd, which is part of userland.
Help with the board H77-D3H
I try to install OpenBSD 5.2 i386 to a box with this board. It has an Intel G645 Pentium processor with 4GB of ram and a 500G of Sata3 hard drive. It has an onboard AR8151 ethernet which I understand is not supported by the generic kernel. There is a web page about a diff workaround which dont I dont bother now because I plan to use other nics in the worst case. So my problem is not currently with this nic now. I hardly installed 5.2 generic (it took 5-6 hours, because the cdrom was too slow) and now it cant boot. I mean, when booting it comes to this line in dmesg root on wd0a . swap on wd0b dump on wd0b and the error occurs init : cannot stat /etc/login.conf No such file or directory sh: /etc/rc No such file or directory init: /etc/pwd.db No such file Enter pathname of shell . I guess the /etc/ filesystem is not mounted or there is no such filesystem. I try to change some bios settings without success. Even I tried disable acpi option when booting but this leads to debugger menu from where I dont know how to report the dump etc. So any help would be appreciated. Here is the board manifacture's web page http://www.gigabyte.com/products/product-page.aspx?pid=4141
Re: Help with the board H77-D3H
On Thu, Dec 20, 2012 at 06:01:44PM +0200, What you get is Not what you see wrote: I try to install OpenBSD 5.2 i386 to a box with this board. It has an Intel G645 Pentium processor with 4GB of ram and a 500G of Sata3 hard drive. It has an onboard AR8151 ethernet which I understand is not supported by the generic kernel. There is a web page about a diff workaround which dont I dont bother now because I plan to use other nics in the worst case. So my problem is not currently with this nic now. I hardly installed 5.2 generic (it took 5-6 hours, because the cdrom was too slow) and now it cant boot. I mean, when booting it comes to this line in dmesg root on wd0a . swap on wd0b dump on wd0b and the error occurs init : cannot stat /etc/login.conf No such file or directory sh: /etc/rc No such file or directory init: /etc/pwd.db No such file Enter pathname of shell . I guess the /etc/ filesystem is not mounted or there is no such filesystem. I try to change some bios settings without success. Even I tried disable acpi option when booting but this leads to debugger menu from where I dont know how to report the dump etc. So any help would be appreciated. Here is the board manifacture's web page http://www.gigabyte.com/products/product-page.aspx?pid=4141 a dmesg, my kingdom for a dmesg! See http://www.openbsd.org/report.html -Otto
Re: Help with the board H77-D3H
On 12/20/2012 11:01 AM, What you get is Not what you see wrote: I try to install OpenBSD 5.2 i386 to a box with this board. It has an Intel G645 Pentium processor with 4GB of ram and a 500G of Sata3 hard drive. It has an onboard AR8151 ethernet which I understand is not supported by the generic kernel. There is a web page about a diff workaround which dont I dont bother now because I plan to use other nics in the worst case. So my problem is not currently with this nic now. I hardly installed 5.2 generic (it took 5-6 hours, because the cdrom was too slow) and now it cant boot. clue! I mean, when booting it comes to this line in dmesg root on wd0a . swap on wd0b dump on wd0b wd?? another clue! and the error occurs init : cannot stat /etc/login.conf No such file or directory sh: /etc/rc No such file or directory init: /etc/pwd.db No such file Enter pathname of shell . I guess the /etc/ filesystem is not mounted or there is no such filesystem. I try to change some bios settings without success. Even I tried disable acpi option when booting but this leads to debugger menu from where I dont know how to report the dump etc. So any help would be appreciated. Here is the board manifacture's web page http://www.gigabyte.com/products/product-page.aspx?pid=4141 and no dmesg. that's the missing clue, of course. serial console collection would be nice. I'm guessing, as it sounds fairly new-ish, that you have an option to run the SATA ports in AHCI mode, and obviously, you are not. I've found at least some AHCI controllers in compatibility mode are between glacial and unusable. Yours sounds like it was glacial during install and unusable after boot. Dig through your BIOS for options to change the mode of the SATA ports to AHCI (enhanced good non-sucky no idea what they'll call it). You will know you are in AHCI mode if your disks come up as sd rather than wd devices. Nick.
NGINX wordpress error 5.2
Hello all, I've configured a wordpress site on NGINX/OpenBSD 5.2/php_fpm. It works fine but I seem to have problems installing plugins and getting information from RSS feeds because the wordpress API can't seem to resolve hostnames. I suspect it has something to do with the fact NGINX is chrooted so I tried to move the resolv.conf over but nothing. Is there anything I need to move over to the /var/www directory to get name resolution working correctly with my web apps?
Re: NGINX wordpress error 5.2
On Thu, Dec 20, 2012 at 1:45 PM, Bentley, Dain dbent...@nas.edu wrote: Hello all, I've configured a wordpress site on NGINX/OpenBSD 5.2/php_fpm. It works fine but I seem to have problems installing plugins and getting information from RSS feeds because the wordpress API can't seem to resolve hostnames. I suspect it has something to do with the fact NGINX is chrooted so I tried to move the resolv.conf over but nothing. Is there anything I need to move over to the /var/www directory to get name resolution working correctly with my web apps? Copying /etc/resolv.conf to /var/www/etc/resolv.conf should be all that is required.
Re: NGINX wordpress error 5.2
Hello Aaron, I thought so too. Here is the error's I'm getting: WP HTTP Error: 0: php_network_getaddresses: getaddrinfo failed: temporary failure in name resolution It seems to be an issue with PHP unable to open a network connection? -Original Message- From: Aaron [mailto:def...@gmail.com] Sent: Thursday, December 20, 2012 3:48 PM To: Bentley, Dain Cc: misc@openbsd.org Subject: Re: NGINX wordpress error 5.2 On Thu, Dec 20, 2012 at 1:45 PM, Bentley, Dain dbent...@nas.edu wrote: Hello all, I've configured a wordpress site on NGINX/OpenBSD 5.2/php_fpm. It works fine but I seem to have problems installing plugins and getting information from RSS feeds because the wordpress API can't seem to resolve hostnames. I suspect it has something to do with the fact NGINX is chrooted so I tried to move the resolv.conf over but nothing. Is there anything I need to move over to the /var/www directory to get name resolution working correctly with my web apps? Copying /etc/resolv.conf to /var/www/etc/resolv.conf should be all that is required.
Re: NGINX wordpress error 5.2
On Thu, Dec 20, 2012 at 1:49 PM, Bentley, Dain dbent...@nas.edu wrote: Hello Aaron, I thought so too. Here is the error's I'm getting: WP HTTP Error: 0: php_network_getaddresses: getaddrinfo failed: temporary failure in name resolution AFAIK, php-fpm will use your resolv.conf in /etc, as it isn't bound by the chroot that nginx is. Perhaps the issue is there? It seems to be an issue with PHP unable to open a network connection? -Original Message- From: Aaron [mailto:def...@gmail.com] Sent: Thursday, December 20, 2012 3:48 PM To: Bentley, Dain Cc: misc@openbsd.org Subject: Re: NGINX wordpress error 5.2 On Thu, Dec 20, 2012 at 1:45 PM, Bentley, Dain dbent...@nas.edu wrote: Hello all, I've configured a wordpress site on NGINX/OpenBSD 5.2/php_fpm. It works fine but I seem to have problems installing plugins and getting information from RSS feeds because the wordpress API can't seem to resolve hostnames. I suspect it has something to do with the fact NGINX is chrooted so I tried to move the resolv.conf over but nothing. Is there anything I need to move over to the /var/www directory to get name resolution working correctly with my web apps? Copying /etc/resolv.conf to /var/www/etc/resolv.conf should be all that is required.
Re: NGINX wordpress error 5.2
PHP_FPm is running as the www user, but the permissions on resolv.conf is readable to everyone. Perhaps I missed installing PHP extension required? -Original Message- From: Aaron [mailto:def...@gmail.com] Sent: Thursday, December 20, 2012 3:53 PM To: Bentley, Dain Cc: misc@openbsd.org Subject: Re: NGINX wordpress error 5.2 On Thu, Dec 20, 2012 at 1:49 PM, Bentley, Dain dbent...@nas.edu wrote: Hello Aaron, I thought so too. Here is the error's I'm getting: WP HTTP Error: 0: php_network_getaddresses: getaddrinfo failed: temporary failure in name resolution AFAIK, php-fpm will use your resolv.conf in /etc, as it isn't bound by the chroot that nginx is. Perhaps the issue is there? It seems to be an issue with PHP unable to open a network connection? -Original Message- From: Aaron [mailto:def...@gmail.com] Sent: Thursday, December 20, 2012 3:48 PM To: Bentley, Dain Cc: misc@openbsd.org Subject: Re: NGINX wordpress error 5.2 On Thu, Dec 20, 2012 at 1:45 PM, Bentley, Dain dbent...@nas.edu wrote: Hello all, I've configured a wordpress site on NGINX/OpenBSD 5.2/php_fpm. It works fine but I seem to have problems installing plugins and getting information from RSS feeds because the wordpress API can't seem to resolve hostnames. I suspect it has something to do with the fact NGINX is chrooted so I tried to move the resolv.conf over but nothing. Is there anything I need to move over to the /var/www directory to get name resolution working correctly with my web apps? Copying /etc/resolv.conf to /var/www/etc/resolv.conf should be all that is required.
Re: kernel panic with /etc/daily and ntfs mount
On 2012-12-20, Dustin Fechner d...@hush.com wrote: On 12/20/2012 11:36 AM, Sebastian Neuper wrote: it took me a while to figure out, why X just freezes every day at 0:30 am, and my first try was to apply the bgpd patch. I even succeeded in recompiling the kernel thanks to your great documentation and noticed afterwards, that i didn't have to and bgpd has nothing to do with it :) You don't have to rebuild the kernel for that patch. You have to rebuild and install bgpd, which is part of userland. ..and you don't have to do it at all unless you're running bgpd. If you are running it, you will know.
Re: ospf Linkstate unknown
On 2012-12-19, Kapetanakis Giannis bil...@edu.physics.uoc.gr wrote: em0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 lladdr 52:54:00:25:e7:a8 hang on, that is not a real em(4).
Re: High performance IO (sendfile(), caching, and libev(ent))
On Thu, Dec 20, 2012 at 03:53:44AM -0500, Jean-Philippe Ouellet wrote: Hello, I'm trying to learn about writing high performance servers, and I have a few questions not clearly answered by any documentation I can find. I'm comfortable with select(), poll(), and kqueue(), but that only goes so far. I'm currently looking into how to send static files (over a network) with the least amount of overhead. If you want the least amount of overheard conceivably possible, take a look at this project: http://info.iet.unipi.it/~luigi/netmap/ It's FreeBSD and Linux only, however. There was a post [1] on misc@ asking about the status of a sendfile() call, but nobody replied (and it seems that splice(2) and tee(2) are just GNUisms). It appears that there's been some work on socket splicing (see sosplice() in [2]), but there's still no sendfile (or if it's there, I must not be looking in the right place [3]). AFAIK only FreeBSD, Solaris, Linux, and OS X implement sendfile, albeit slightly differently in some cases. There is no sendfile on OpenBSD, or NetBSD for that matter. On Linux few-to-none use splice, because it requires an intermediate pipe. You can't move directly between sockets, or between a socket and file, which is an enormous PITA. Also note that sendfile--all implementions--cannot do non-blocking I/O on the file side. If your files won't fit in memory, you need to utilize multiple threads or processes if you want low latency and high concurrency. If I want to serve a bunch of files often, is it fine to rely on the kernel's filesystem caching? or should I mmap() them into my address space and madvise() them to not be swapped out? Is it reasonable to stat() the file each time it is served (from my cached copy) to compare the file's modification time to the time it was cached? Would this actually hit the disk each time? or does the kernel keep that cached? It seems obvious to me that it should be be cached, but I can't actually find the relevant code. I spent a while digging through the kernel, but I don't really know where to look, and I'm not sure I'd recognize what I'm looking for if I found it anyway. The closest thing I found to something I think might be relevant was some cryptic vfs stuff. :( I'm no kernel dev, I don't pretend to understand OpenBSD internals nearly as well as I'd like to. If you want to know which methodology is preferable, test, test, test. Reading the implementation and forming conjectures isn't going to get you very far. And results will vary, so it's best to design a small module or library to abstract the details and implement your preferable interface given the constraints. Here's where people might suggest just using libevent 2.x or Boost or whatever. The problem there is that the first, second, and even third iterations of such implementations usually suck. And if you're trying to be an external library you're stuck with the leaky interface, which limits how much you can hack on the implementation. Lastly, What's the OpenBSD community's current opinion on libevent / libev. Are they secure / stable enough that they should be considered for new code in base? Are they worth using instead of just using select/poll/kqueue/event(3) directly? event(3) is the original libevent, basically libevent 1.4.x. If you're trying to write something portable, or if you would benefit from the timer functionality, then go ahead and use it. Otherwise, it's superfluous. FWIW, you can write a tiny wrapper around kqueue/epoll/ports(Solaris) in a small amount of code. It's really the timer functionality that takes effort, and both libevent and libev have good timer functionality, if a little complicated after accumulating years of patches. One piece of advice: avoid callback interfaces. They're of course necessary with an event loop, but when other modules--buffered I/O, DNS, HTTP, etc--also utilize callbacks, things become horrendously complicated and difficult to debug. They're the modern incarnation of goto, spaghetti code hell. The alternatives, ironically, often rely on using goto in small state machines ;)
Re: Xfce4 and ctrl:swapcaps not working (ugly WORK-AROUND)
On 12/20/2012 02:33 AM, Juan Francisco Cantero Hurtado wrote: On Wed, Dec 19, 2012 at 02:49:12PM -0800, Raymond Lillard wrote: Hello Misc, I am running -current (amd64) on a Lenovo w500. I start Xfce4 from the command line with startx. I have added: exec /usr/local/bin/startxfce4 to ~/.xinitrc. Everything comes up nicely, but I cannot swap the Control_L and CAPS_LOCK automatically at startup. I can swap them from an xterm command line using setxkbmap -option ctrl:swapcaps and xmodmap ~/.Xmodmap Both of these methods do work, but I want it to happen automatically when I launch X. Add the setxkbmap command to .xinitrc above startxfce4. Also, remove the settings related to the layout of your keyboard in the settings of xfce4. I have gone to the Session and Startup dialog and created an entry for the setxkbmap command method. The command executes and returns 0. I have added: XKBOPTIONS=ctrl:swapcaps to /etc/default/keyboard. This doesn't work either. I have instrumented /etc/xdg/xfce4/xinitrc to verify that # load local modmap test -r $HOME/.Xmodmap xmodmap $HOME/.Xmodmap in that file is executed and returns 0 Googling finds the solutions described above. These aren't working for me. At this point I am out of ideas. I am resisting writing an xorg.conf file. Am I down to that? Clue sticks gladly accepted. Juan, Thank you for taking the time to reply. I tried your advice but it had no effect. I have spent more time digging into this and found that any X options set prior to launching xfce4-session will be reset to whatever value xfce4-session wants and it clearly wants ctrl:swapcaps unset. I added the following line (sleep 10; setxkbmap -option ctrl:swapcaps) to /etc/xdg/xfce4/xinit just prior to the launch of xfce4-session. The 10 second sleep holds off my option change until xfce4-session (or a child process) has wrecked its havoc. This seems to be the only way I can get the final word on the matter. This also suggests that adding setxkbmap to the Session and Startup - Application Autostart is the right approach, but there seems to be no way (short of a sleep) to force an ordering of started apps. So my final workaround is to restore /etc/xdg/xfce4/xinit to its original content and create the following shell script in my ~/bin directory. This method will survive a package update of Xfce4. cat bin/swap_caps.sh #!/bin/sh (sleep 10; /usr/X11R6/bin/setxkbmap -option 'ctrl:swapcaps') I have added a launcher for this script to the Session and Startup - Application Autostart dialog. Since this doesn't seem to be an OpenBSD issue. I guess I need to take it upstream. For the time being, I will use this rather ugly work-around. Thanks Ray
Re: NGINX wordpress error 5.2
hmm, on Thu, Dec 20, 2012 at 03:58:53PM -0500, Bentley, Dain said that PHP_FPm is running as the www user, but the permissions on resolv.conf is readable to everyone. Perhaps I missed installing PHP extension required? php_fpm when installed from the ports is also running chroot by default IIRC. -f -Original Message- From: Aaron [mailto:def...@gmail.com] Sent: Thursday, December 20, 2012 3:53 PM To: Bentley, Dain Cc: misc@openbsd.org Subject: Re: NGINX wordpress error 5.2 On Thu, Dec 20, 2012 at 1:49 PM, Bentley, Dain dbent...@nas.edu wrote: Hello Aaron, I thought so too. Here is the error's I'm getting: WP HTTP Error: 0: php_network_getaddresses: getaddrinfo failed: temporary failure in name resolution AFAIK, php-fpm will use your resolv.conf in /etc, as it isn't bound by the chroot that nginx is. Perhaps the issue is there? It seems to be an issue with PHP unable to open a network connection? -Original Message- From: Aaron [mailto:def...@gmail.com] Sent: Thursday, December 20, 2012 3:48 PM To: Bentley, Dain Cc: misc@openbsd.org Subject: Re: NGINX wordpress error 5.2 On Thu, Dec 20, 2012 at 1:45 PM, Bentley, Dain dbent...@nas.edu wrote: Hello all, I've configured a wordpress site on NGINX/OpenBSD 5.2/php_fpm. It works fine but I seem to have problems installing plugins and getting information from RSS feeds because the wordpress API can't seem to resolve hostnames. I suspect it has something to do with the fact NGINX is chrooted so I tried to move the resolv.conf over but nothing. Is there anything I need to move over to the /var/www directory to get name resolution working correctly with my web apps? Copying /etc/resolv.conf to /var/www/etc/resolv.conf should be all that is required. -- how much can i get away with and still go to heaven?
How to list available all hard disks in OpenBSD
HI, I would like to know How to list available all hard disks in OpenBSD ? If I run below 2 commands, it will give an output. dmesg |grep wd0 fdisk wd0 If I install a new Hard Disk, How to get to know whether it is wd1 or anything eles? In Linux, Fdisk -l show all the available hard disks. In OpenBSD what's the command for it? -- Thank you Indunil Jayasooriya
Re: NGINX wordpress error 5.2
You're correct, it is. The php-fpm.conf points to /var/www. From: owner-m...@openbsd.org [owner-m...@openbsd.org] On Behalf Of frantisek holop [min...@obiit.org] Sent: Thursday, December 20, 2012 9:19 PM To: misc@openbsd.org Subject: Re: NGINX wordpress error 5.2 hmm, on Thu, Dec 20, 2012 at 03:58:53PM -0500, Bentley, Dain said that PHP_FPm is running as the www user, but the permissions on resolv.conf is readable to everyone. Perhaps I missed installing PHP extension required? php_fpm when installed from the ports is also running chroot by default IIRC. -f -Original Message- From: Aaron [mailto:def...@gmail.com] Sent: Thursday, December 20, 2012 3:53 PM To: Bentley, Dain Cc: misc@openbsd.org Subject: Re: NGINX wordpress error 5.2 On Thu, Dec 20, 2012 at 1:49 PM, Bentley, Dain dbent...@nas.edu wrote: Hello Aaron, I thought so too. Here is the error's I'm getting: WP HTTP Error: 0: php_network_getaddresses: getaddrinfo failed: temporary failure in name resolution AFAIK, php-fpm will use your resolv.conf in /etc, as it isn't bound by the chroot that nginx is. Perhaps the issue is there? It seems to be an issue with PHP unable to open a network connection? -Original Message- From: Aaron [mailto:def...@gmail.com] Sent: Thursday, December 20, 2012 3:48 PM To: Bentley, Dain Cc: misc@openbsd.org Subject: Re: NGINX wordpress error 5.2 On Thu, Dec 20, 2012 at 1:45 PM, Bentley, Dain dbent...@nas.edu wrote: Hello all, I've configured a wordpress site on NGINX/OpenBSD 5.2/php_fpm. It works fine but I seem to have problems installing plugins and getting information from RSS feeds because the wordpress API can't seem to resolve hostnames. I suspect it has something to do with the fact NGINX is chrooted so I tried to move the resolv.conf over but nothing. Is there anything I need to move over to the /var/www directory to get name resolution working correctly with my web apps? Copying /etc/resolv.conf to /var/www/etc/resolv.conf should be all that is required. -- how much can i get away with and still go to heaven?
Re: How to list available all hard disks in OpenBSD
On 12/20/12 22:17, Indunil Jayasooriya wrote: HI, I would like to know How to list available all hard disks in OpenBSD ? If I run below 2 commands, it will give an output. dmesg |grep wd0 fdisk wd0 If you want USEFUL, you might use: dmesg |grep ^[sw]d if you care about floppies and/or cdrom drives, add a cf in there, too. actually, if you want to script it, you will want to lock it down a lot further...but that gives a nice view for humans to read. If I install a new Hard Disk, How to get to know whether it is wd1 or anything eles? well, the numbers aren't picked randomly -- see start of http://www.openbsd.org/faq/faq14.html If you know your computer (and read that article a few times with no preconceptions), you can predict what the next hard disk name will be. In Linux, Fdisk -l show all the available hard disks. In OpenBSD what's the command for it? One of linux's many non-charming displays. Try this: $ sysctl hw.diskcount hw.diskcount=9 $ sysctl hw.disknames hw.disknames=sd0:4b8432d7819c0c85,cd0:,sd1:954c43c63da1e128,sd2:d9f3f58824ed9e20,sd3:4b8432d7819c0c85,sd4:ef8be159ad6b717f,sd5:eb3971fada5612b9,sd6:e4fc87e6abfa5e45,sd7:e92e54806f9e4124 In case you are wondering...that's a six physical disks and a couple softraid disks on a sun e250. (do a sysctl hw on your machine...in many cases, you will be amazed) Or use duids, and don't worry 'bout names. Keep reading in the above link. :) Nick.
Re: How to list available all hard disks in OpenBSD
Hi, you can try this : /usr/sbin/sysctl hw.disknames Cheers, Wesley Le 2012-12-21 7:17, Indunil Jayasooriya a écrit : HI, I would like to know How to list available all hard disks in OpenBSD ? If I run below 2 commands, it will give an output. dmesg |grep wd0 fdisk wd0 If I install a new Hard Disk, How to get to know whether it is wd1 or anything eles? In Linux, Fdisk -l show all the available hard disks. In OpenBSD what's the command for it?
Re: How to list available all hard disks in OpenBSD
Hi misc Thanks a lot On Fri, Dec 21, 2012 at 10:07 AM, Wesley open...@e-solutions.re wrote: Hi, you can try this : /usr/sbin/sysctl hw.disknames Cheers, Wesley Le 2012-12-21 7:17, Indunil Jayasooriya a écrit : HI, I would like to know How to list available all hard disks in OpenBSD ? If I run below 2 commands, it will give an output. dmesg |grep wd0 fdisk wd0 If I install a new Hard Disk, How to get to know whether it is wd1 or anything eles? In Linux, Fdisk -l show all the available hard disks. In OpenBSD what's the command for it? -- Thank you Indunil Jayasooriya
Re: How to list available all hard disks in OpenBSD
Hi, Sometimes I just can't let well enough alone ;-) Add this to your .profile Fdisk-l () { sysctl hw.disknames | sed -e 's/[,=]/\ /g' ; } From my laptop command line: ryl@smag {~} Fdisk-l hw.disknames sd0:f07ccfaba910bc8e cd0: sd1:21a268bf64300a23 ryl@smag {~} vi .profile just to feel at home ;-) BTW, I've never seen the command Fdisk -l and the fdisk -l I know requires a device name to list the device's partition table. Knowing Linux though, it wouldn't surprise me to hear that some distro has a Fdisk command that behaves as you describe. Best, Ray On 12/20/2012 08:46 PM, Indunil Jayasooriya wrote: Hi misc Thanks a lot On Fri, Dec 21, 2012 at 10:07 AM, Wesley open...@e-solutions.re wrote: Hi, you can try this : /usr/sbin/sysctl hw.disknames Cheers, Wesley Le 2012-12-21 7:17, Indunil Jayasooriya a écrit : HI, I would like to know How to list available all hard disks in OpenBSD ? If I run below 2 commands, it will give an output. dmesg |grep wd0 fdisk wd0 If I install a new Hard Disk, How to get to know whether it is wd1 or anything eles? In Linux, Fdisk -l show all the available hard disks. In OpenBSD what's the command for it? -- Thank you Indunil Jayasooriya
Re: Plausible deniable encryption
On 12/19/12 23:23, Ted Unangst wrote: On Tue, Dec 18, 2012 at 21:50, Robert Connolly wrote: Assuming you have read what is out there, I have a technigur When you are locked in a room with men determined to beat you until they get what they want, you will reconsider the wisdom of being unable to prove you don't have what they want. I want to hide a system in the primary swap partition. This depends on the swap space not being written to, either during boot or after boot. I plan to try it out during the holidays. Perhaps there are boot parameters that would be helpful, like swap=1024M at the boot prompt, to avoid areas when I have a 12G swap partition.
Re: How to list available all hard disks in OpenBSD
On 12/21/12 04:17, Indunil Jayasooriya wrote: HI, I would like to know How to list available all hard disks in OpenBSD ? If I run below 2 commands, it will give an output. dmesg |grep wd0 fdisk wd0 If I install a new Hard Disk, How to get to know whether it is wd1 or anything eles? In Linux, Fdisk -l show all the available hard disks. In OpenBSD what's the command for it? $ sysctl -n hw.disknames cd0:,sd0:3ae78cd65d4ba8f8 $ sysctl -n hw.disknames | sed 's/:[^,]*//g;s/,/ /' cd0 sd0 and also see hotplugd(8) /Alexander