Question on more concise httpd.conf setup for subdomain + https redirects

2017-12-21 Thread Ryan Flannery
Hi, I'm curious if there's a more concise/preferred way to accomplish the
below. I'm hosting a number of sites that want to prefer https over http
and strip any www subdomain from urls.

E.g.
www.foo.com/* -> https://foo.com/*
https://www.foo.com/* -> https://foo.com/*

I have this working (used acme-client to setup ssl - that was a breeze!)
using the following setup, but I'm curious if there's a more
concise/preferred way. I'll need to configure this for a number of sites,
and would probably script the config.

The first two server blocks setup the redirects, and the third is for the
actual site.

server "foo.net" {
   alias "www.foo.net"
   listen on * port 80
   block return 301 "https://foo.net$REQUEST_URI;
}
server "www.foo.net" {
   listen on * tls port 443
   tls certificate "/etc/ssl/foo.net.fullchain.pem"
   tls key "/etc/ssl/private/foo.net.key"
   block return 301 "https://foo.net$REQUEST_URI;
}
server "foo.net" {
   listen on * tls port 443
   tls certificate "/etc/ssl/foo.net.fullchain.pem"
   tls key "/etc/ssl/private/foo.net.key"
   root "/htdocs/foo.net"
}

Cheers,
-Ryan


Re: Dynamic DNS Client for EasyDNS

2017-08-02 Thread Ryan Flannery
On Wed, Aug 2, 2017 at 8:31 PM, Predrag Punosevac 
wrote:
>
> One of my clients is insisting on using her current ISP with dynamic IP.
> On the another hand we decided to use EasyDNS as our managed DNS
> provider due to my past experiences with them. She bought  DNS pro plan
> which does include among other things Dynamic DNS services. However I
> see that only ez-ipupdate is listed as Dynamic DNS client. Apart of the
> fact that it is not in OpenBSD port tree I see that it is written in C
> (I was hoping for a simple Perl script)
>
> https://sourceforge.net/projects/ez-ipupdate/
>
> and officially untested on anything else besides Linux. I see FreeBSD
> port
>
>
https://www.freebsd.org/cgi/ports.cgi?query=ez-ipupdate=all=all
>
> Short of me convincing the client to buy statis IP or porting
> ez-ipupdate to OpenBSD does anyone see any other alternatives?
>
> Best,
> Predrag
>

According to EasyDNS's documentation, you can update it using a GET request
and a token you generate for your EasyDNS account.
Using that, you could write a simple script (few lines) to do the job and
run it through cron periodically.

See their documentation at the bottom of:
https://fusion.easydns.com/Knowledgebase/Article/View/102/7/dynamic-dns

Basics of the script would just be:

ip=`curl -s ipinfo.io/ip`
curl -s "
https://username:dynamicto...@api.cp.easydns.com/dyn/generic.php?hostname=example.com=${ip}
"

Cheers,
-ryan


Re: route flush and sh /etc/netstart not enough?

2011-01-25 Thread Ryan Flannery
On Tue, Jan 25, 2011 at 9:01 PM, Neal Hogan nealho...@gmail.com wrote:
 Hello misc@,

 I'm having an issue with my wifi AP after I reconnect to my ISP. That
 is, when my internet connection is broken, for whatever reason, and
 then reconnected, my wireless machines see that the AP is available,
 but fail to connect to it. My hard connection works just fine.

Do you still have a dynamic IP?  If so, is it set to something
different when you reconnect?

If so, the nat in your pf is probably causing the problem.


 I flush all the routes (ie., # route flush) and then sh /etc/netstart,
 but that does not work.

Have you also tried restarting pf at this point?

 At this point, rebooting the AP machine is the
 only thing that I've been able to do to rectify the situation. From
 the research that I've done, it doesn't look as though I should have
 to reboot. Any suggestions?

 Thanks!
 -Neal



Re: 4.8 arrival!

2010-10-28 Thread Ryan Flannery
On Thu, Oct 28, 2010 at 9:58 PM,  bsdmas...@hushmail.com wrote:
 Hello,

 Would you please consider uploading an iso image of your OpenBSD
 4.8 to some public tracker such as thepiratebay.org?

 If you are unfamiliar with the process of making an iso-image out
 of a CD, or if you need help with the generation and upload of the
 torrent file, I may be of some help. Just ask.

 Thanks alot, this will be of great use for poor folks like me who
 cannot afford the expensive license fees. Yes, I said it, 50CDN$ is
 very expensive. Maybe the OpenBSD Company could setup something
 like MSDNAA, for stuents to get access to the software for free?

 Anyway, I'm getting off topic.

 PS: please people, stop bottom-posting. It forces me to scroll down
 to read the latest message, and I don't like that. Show some common
 sense!



Please, please continue these!

If there are enough, I will make a calendar of them...and enjoy them every day.



Re: Some apps kill/hang X when using scrotwm(1) as wm

2010-08-18 Thread Ryan Flannery
On Wed, Aug 18, 2010 at 8:18 PM, ropers rop...@gmail.com wrote:
 On 19 August 2010 01:07, Nick Holland n...@holland-consulting.net wrote:
 On 08/18/10 14:02, Owain Ainsworth wrote:
 ...
 As a note, scotwm really needs it own mailing list, scrotwm bugs are not
 really topical for misc.

 and a graphic!  don't forget a graphi...

 Here you go:
 http://i.imgur.com/Bns7H.png

nd I now have coffee all over my laptop.

many thanks for that.



Question about suspend+resume X11-application buggy-ness

2010-08-01 Thread Ryan Flannery
Hello misc,

I have a small X application I use on my laptop that behaves buggy
after some suspend+resumes.  Detailed description below, but first...

HOLY HELL thank you to all the devs who made suspend+resume work!  I
had almost forgotten what it was like to suspend+walk-to-work+resume
and be on my way.  Thank you again.

The application is a small, horizontal stats display-er.   After most
suspend+resume's it continues to work fine.  It always works fine
after the first resume.  After 3-5 resume's, there's a ~50% chance the
display goes buggy (details below).  In trying to resolve the
problem, I am curious about the following:

1. Initially, I tried to catch a resume thinking a SIGCONT would be
issued, and manually clear the display and re-draw.  This doesn't
appear to happen.  Out of curiosity, on a resume is any signal issued
to each process?   man'ing and Googling haven't helped.  Digging
through src/sys/kern/* is rewarding, but so far no help.  It seemed
like a SIGCONT would be appropriate, but am I correct in that this is
not the case?

2. Should my application have to do anything specific on a resume?  Of
course this depends on the application, but regarding the X display,
it doesn't immediately appear to me that my application should have to
do anything.

My app is using rudimentary double-buffering: backbuffer is a Pixmap
that's painted black on each call (XFillRectangle), the graphics are
drawn, and then XCopyArea'd to the window.  When it goes buggy, it
appears some of the backbuffer isn't being cleared, or it's being
copied at an offset into the window.

The normal display looks like this:
http://ryanflannery.net/hacking/xstatbar/barshot.png

The buggy display looks like this:
http://ryanflannery.net/hacking/xstatbar/xstatbar-bad.png

The current code is here, if curious:
http://ryanflannery.net/hacking/xstatbar/files/xstatbar-current.tar.gz

You can see where the CPU graphs are duplicated, and the green
overflows the display.

Thanks in advance for any help, and thanks to the devs again for suspend+resume!
-Ryan

dmesg follows:

OpenBSD 4.7-current (GENERIC.MP) #97: Thu Jul  8 16:21:40 MDT 2010
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3193634816 (3045MB)
avail mem = 3094781952 (2951MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (73 entries)
bios0: vendor LENOVO version 7LETC1WW (2.21 ) date 07/01/2008
bios0: LENOVO 7658CTO
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT ASF!
SSDT SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) LURT(S3) DURT(S3) IGBE(S4)
EXP0(S4) EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) PCI1(S4) USB0(S3)
USB1(S3) USB2(S3) USB3(S3) USB4(S3) EHC0(S3) EHC1(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz, 2494.19 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,NXE,LONG
cpu0: 6MB 64b/line 16-way L2 cache
cpu0: apic clock running at 199MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz, 2493.75 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,NXE,LONG
cpu1: 6MB 64b/line 16-way L2 cache
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpihpet0 at acpi0: 14318179 Hz
\\_SB_.PCI0 post-crs: 0
\\_SB_.PCI0 post-bbn: 0, 0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus 4 (EXP2)
acpiprt5 at acpi0: bus 5 (EXP3)
acpiprt6 at acpi0: bus 13 (EXP4)
acpiprt7 at acpi0: bus 21 (PCI1)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpipwrres0 at acpi0: PUBS
acpitz0 at acpi0: critical temperature 127 degC
acpitz1 at acpi0: critical temperature 100 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model 42T4573 serial  2285 type LION oem SONY
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
cpu0: Enhanced SpeedStep 2493 MHz: speeds: 2501, 2500, 2000, 1600, 1200, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel GM965 Host rev 0x0c
vga1 at pci0 dev 2 function 0 Intel GM965 Video rev 0x0c
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xe000, size 0x1000
inteldrm0 at vga1: apic 1 int 16 (irq 10)
drm0 at inteldrm0
Intel GM965 Video rev 0x0c at pci0 dev 2 function 1 not configured
em0 at 

Re: OpenBSD culture?

2010-04-14 Thread Ryan Flannery
On Wed, Apr 14, 2010 at 8:43 PM, Zachary Uram net...@gmail.com wrote:
 You get lost. You seem to think the project exists as an end unto
 itself.

And why can't it?  Seriously, please explain this.

 Develop the most wonderful kernel and userspace in the world
 but if no one uses it what is the point?

The point is to keep hacking on something you love and enjoy.
Honestly, do you think the point is to acquire a large user base?
Do you think the developers invest their time and effort hoping to
kick-up the numbers reported by people like netcraft?

They spend their time and effort doing what they love, and kindly make
it freely available for others.

I've created and maintained a few (very) small open source
applications, and I can honestly say that I only created them for me.
I needed/wanted something that either didn't exist, or did but had
lousy documentation.  I don't track the number of downloads each get.
I could care less.  I'm not interested in that.  I just put them
online in case anyone else was interested.  To help out any such
interested people, I took the time to create some documentation that
at least tries to be adequate for a non-developer.

...and when I get an email from a new user asking a question that's
clearly answered in the documentation (or could be easily answered by
just *trying* some small test/experiment), I don't even bother
responding.  Why should I?  So I can hold their hand for a few days?
So I can increase my precious user base???  I didn't create the
programs for them.

OpenBSD, as an OS, is huge... there are *tons* of questions people
could ask.  The dev's would rather hack than hold hands, and most
(serious) users would rather they do that too.  I like new features,
new hardware support, and fewer bugs... I could care less if you get
help with a question that you could easily answer yourself.

And the devs really have invested tons-o-effort in good, useful
documentation.  It's actively maintained along with the code, not as
an after-thought or when they get around to it.  They take it
seriously, and that's rare.

 Since your attitude to new
 users is get lost that reflects very poorly on yourself and
 indirectly OpenBSD.

No, Stas's attitude wasn't towards new users.  It was towards new
users who cannot help themselves.  There's a huge difference, and that
seems to be what you're missing.

-Ryan



Re: xterm + tmux 256 colors

2010-02-17 Thread Ryan Flannery
On Wed, Feb 17, 2010 at 5:58 PM, Ted Unangst ted.unan...@gmail.com wrote:
 On Wed, Feb 17, 2010 at 5:38 PM, frantisek holop min...@obiit.org wrote:
 i am trying to make tmux use 256 colors.

 i have found this:
 http://www.mail-archive.com/debian-bugs-d...@lists.debian.org/msg707066.html

 i have done step 2:

 $ xterm
 $ echo TERM
 $ TERM=xterm-256color

 It's probably worth noting at this point that the xterm shipped with
 OpenBSD doesn't support 256 colors.

Really?  I was hoping in light of the following, OpenBSD now supported it:
http://marc.info/?l=openbsd-cvsm=126339496810703w=2

After seeing that I was hoping to play around with this eventually.

-Ryan



Re: xterm + tmux 256 colors

2010-02-17 Thread Ryan Flannery
On Wed, Feb 17, 2010 at 6:17 PM, Ted Unangst ted.unan...@gmail.com wrote:
 Nice catch, I missed that.


I know getting 256 color support working requires touching a few things.
I don't know if that commit says it now works or simply it's one step closer

So ya, I was really asking.  :)



Re: Voice Chat over IP?

2010-02-15 Thread Ryan Flannery
On Mon, Feb 15, 2010 at 9:48 PM, Chris Bennett
ch...@bennettconstruction.biz wrote:
 On Mon, Feb 15, 2010 at 07:51:42AM -0600, Chris Bennett wrote:

 [snip]

 Yes, that's the thread. Nice to know there is a page written up for it.
 The problem I see is how to make a connection in the first place.
 On the end in the US, all incoming packets are blocked unless initiated from
 inside.

 I am going to travel to Guatemala and set-up the internet connection there
 myself.
 Right now, I don't know whether there will be any blocking on that end yet.

 Either way, I would still like to know if I can route this through a third
 server that both can freely access.
 It seems likely to me, but I've never done anything like that.

Have you looked at reverse-port-forwarding with ssh?
i.e. from your machine in the US that can't be directly accessed, ssh
to your Guatemala machine (or a third party machine) via something
like:

$ ssh -R 1234:localhost:22 u...@third-party
Make sure sshd at third-party has the GatewayPorts option enabled in
its sshd_config

After that is setup, anyone could then ssh to port 1234 of third-party
and the connection will go to the US machine.
e.g.
$ ssh -p 1234 u...@third-party
would, in fact, ssh to the US computer.

The ssh and sshd_config man pages have pretty much everything you need.

Also, to keep the ssh session alive, you might want to look into
something like autossh also (in ports).

Good Luck,
-Ryan



Re: What does your environment look like?

2010-01-06 Thread Ryan Flannery
On Wed, Jan 6, 2010 at 12:31 PM, Marco Peereboom sl...@peereboom.us wrote:
 ryan needs to send me a patch to add to the code base...


egads, i had completely forgotten about that... apologies



Re: What does your environment look like?

2010-01-06 Thread Ryan Flannery
On Wed, Jan 6, 2010 at 12:52 PM, Marco Peereboom sl...@peereboom.us wrote:
 :-)

 you academic types are always busy, eh?

hah, only when the end-o-term is upon me, and suddenly students are so
very interested in their low, low grades...

it's more the getting-married-soon types are busy.  :)



Re: What does your environment look like?

2010-01-03 Thread Ryan Flannery
On Sun, Jan 3, 2010 at 7:20 PM, Marco Peereboom sl...@peereboom.us wrote:
 On Jan 3, 2010, at 8:23, Chris Bennett ch...@bennettconstruction.biz
 Josh Rickmar wrote:
[snip]
 This may have changed in more recent version of scrotwm, but back when I
 last tried it, the statusbar also was not able to show you which
 workspaces currently had windows on them, so I ended up quiting scrotwm
 and X when I still had windows open... not fun.
[snip]
 I agree, I don't like having to tab through 10 windows before shutting
 down.

The M+left and M+right keybindings may be useful for you then.
They cycle through the workspaces with windows in them (skipping those
that are empty).
Just FYI.

-Ryan



Re: OT: Python (was Re: vi in /bin)

2009-12-20 Thread Ryan Flannery
On Sat, Dec 19, 2009 at 7:00 PM, Marco Peereboom sl...@peereboom.us wrote:
 On Sat, Dec 19, 2009 at 03:18:55PM -0500, Ryan Flannery wrote:
 On Sat, Dec 19, 2009 at 2:51 PM, Nick Guenther kou...@gmail.com wrote:
  Python is about thinking about what you're doing. It's one of those
  languages that forces you to work on a higher level (not that there
  aren't lots of places where python is used as a scripting
  language--that code tends to come out badly, but that's because it's
  written just to get the job done).
 
  Ideal code is abstracted code, what possible use does repeating
  yourself in the tree have? I know drivers have to declare a common set
  of globals and make some macro calls and various entry-points are
  found by sticking to a naming scheme, but that's trivia, hardly enough
  to justify valid uses for copied code. Anytime I find myself wanting
  to copy some code it's always meant I've stumbled over an abstraction
  I haven't made yet, so what in the world is src/ doing that -requires-
  copied code?

 I must disagree here... there's nothing about *any* programming
 language [1] that forces one to work on a higher level.  That's up to
 the programmer.  I've seen even the simplest tasks, or ones that
 scream for a nice, simple abstraction, done horribly (if at all) in
 any language, including python.  My experience grading countless
 programs from freshman-senior students, which are increasingly written
 in python, show it's not the programming language... it's the
 programmer.

 There is no limit to shit code produced by amateurs and professionals.

 Python suffers from the same lib catastrophe that java has.


 Good design + good coding practices + tons-o-work  forces one to think
 more and come up with a better design, not the language.

 -ryan

 [1] except of course for Haskell, the ONE TRUE GOD of proper programming
:P

 Really?  then why do you use scrotwm?

Because 1) that was a joke/jab at the Haskell folks, who often make
similar claims about Haskell, and 2) William Boshuck already put it
best.



Re: OT: Python (was Re: vi in /bin)

2009-12-19 Thread Ryan Flannery
On Sat, Dec 19, 2009 at 2:51 PM, Nick Guenther kou...@gmail.com wrote:
 Python is about thinking about what you're doing. It's one of those
 languages that forces you to work on a higher level (not that there
 aren't lots of places where python is used as a scripting
 language--that code tends to come out badly, but that's because it's
 written just to get the job done).

 Ideal code is abstracted code, what possible use does repeating
 yourself in the tree have? I know drivers have to declare a common set
 of globals and make some macro calls and various entry-points are
 found by sticking to a naming scheme, but that's trivia, hardly enough
 to justify valid uses for copied code. Anytime I find myself wanting
 to copy some code it's always meant I've stumbled over an abstraction
 I haven't made yet, so what in the world is src/ doing that -requires-
 copied code?

I must disagree here... there's nothing about *any* programming
language [1] that forces one to work on a higher level.  That's up to
the programmer.  I've seen even the simplest tasks, or ones that
scream for a nice, simple abstraction, done horribly (if at all) in
any language, including python.  My experience grading countless
programs from freshman-senior students, which are increasingly written
in python, show it's not the programming language... it's the
programmer.

Good design + good coding practices + tons-o-work  forces one to think
more and come up with a better design, not the language.

-ryan

[1] except of course for Haskell, the ONE TRUE GOD of proper programming :P



Re: strange (?) ssh user

2009-08-20 Thread Ryan Flannery
On Fri, Aug 21, 2009 at 1:19 AM, Uwe Dippeludip...@uniten.edu.my wrote:
 Recently, I noticed an ssh user on one of my machines, who never logged on,
 is not visible with 'last', seems to have no terminal active, and is back
 immediately after a reboot.
 Hmm.
 root 13415  0.0  0.9  3280  2420 ??  Ss12:04PM0:00.08 sshd:
 isuser
 isuser   702  0.0  0.7  3280  1824 ??  S 12:04PM0:00.00 sshd:
isuser
 Whatever I do with finger, w, last, no trace of any activity; not even a
 login.

Just to be clear here, do you see anything in /var/log/authlog?



Re: Voice-chat on OpenBSD with nothing more than aucat and ssh

2009-06-06 Thread Ryan Flannery
On Sat, Jun 6, 2009 at 3:18 PM, Alexandre Ratchova...@caoua.org wrote:
 On Fri, Jun 05, 2009 at 06:02:01PM -0400, Ryan Flannery wrote:
 With the recent work done to the audio system on OpenBSD, a buddy of
 mine and I figured it should be easy to setup two-way voice-chat
 between two OpenBSD clients using nothing more than aucat(1) and
 ssh(1).  As we found out, it is both very easy and very usable!  We
 have telephone-quality chatting working with a = 1 second delay in
 the audio (after a few minutes of chatting, this is unnoticeable).

 First, a hearty thanks to Jacob Meuser and the other OpenBSD
 developers who have worked hard on this recently.  Your efforts are
 both noticed and greatly appreciated.

 Second, I have a couple of questions...

 1. We, the two users chatting (users neal and ryan) have ssh accounts
 on each other's machines.  To voice-chat with each other, what we did
 boils down to the following:

 ryan# aucat -l
 ryan# aucat -o - | ssh r...@neals-machine aucat -i -

 User neal would do the same, only to my (ryan's) machine.
 When aucat is run in server-mode ('aucat -l') it creates a socket in
 /tmp/aucat-USERID/default where USERID is the uid of the user who
 ran the command (aucat -l).  For another user (neal) to bind to this
 socket, we had to make this socket available to the other user, namely

 ryan# grep ryan /etc/passwd
(find ryan's uid, call it RYANSID)
 ryan# grep neal /etc/passwd
(find neal's uid, call it NEALSID)
 ryan# aucat -l
 ryan# cd /tmp/
 ryan# chmod 755 aucat-RYANSID
 ryan# ln -s aucat-RYANSIDaucat-NEALSID


 if you use hard links instead of soft links, you can
 ``share'' your socket with another user without changing the
 socket directory permissions (so you avoid giving it to all
 users).

A much better idea, thanks!

 Neal would do the same on his machine, only reversed.
 Question: is it possible to run aucat(1) in such a way that the socket
 it creates in 'global', such that other users can connect to it?
 A quick perusing of the man/archives and the source says no... but I
 may be missing something.


 no, there's no way for that. Even if we start supporting
 ``shared sockets'' (i hope so), they will not be usable
 simultaneously by multiple users (to avoid evesdropping).
 Fine grained access control might solve this problem, but is
 too complicated and outside the scope of aucat.

 2. After doing the above, we would both simply do the following...

 ryan# aucat -b 1 -r 11000 -o - | ssh r...@neals-machine aucat -b 1 -r 11000
-i -

 With the above -b and -r flags, the audio was not choppy at all, quite
 high-quality (equal to telephone quality), and overall very nice.  We
 had about a ~1 second delay in the audio, however (neal's in Chicago,
 I'm in Cincinnati... we expected this), but could any of the
 developers familiar with the audio system see a way to perhaps
 decrease this delay?  We played with other rates (-r values), but
 below 11000 the delay was about the same, and the audio became
 deeper and more muted.  Any other options, to aucat or perhaps
 audioctl, that one could play with to reduce this?


 AFAIU the delay cannot be reduced this way (even with a
 small -b). Delays are caused by buffering, and ssh(1), as
 all the network software (and hardware, eg. your switch) in
 the chain use buffers. AFAIK there's no way to set these
 buffer sizes (especially the ones in the hardware of your
 internet provider :).

 aucat(1) has a latency control mechanism to solve similar
 problems. To use it you could try to proxy the remote aucat
 socket locally, ie to create a local /tmp/aucat-uid/xxx
 socket that's forwarded on the remote machine (don't know if
 nc(1) can do that). Then you can write a trivial program to
 transfer data between your local device and the remote
 ``xxx'' device.


I had forgot to mention the following in my original post...
Obviously, when piping the aucat output through ssh, ssh itself is
going to introduce some delay.  However, just trying the following...

aucat -l
aucat -o - | aucat -i -

There is still a ~1 second delay, so it seems that the bulk of the
delay was from aucat.
Using

aucat -b 1 -r 11000 -o - | aucat -b 1 -r 11000 -i -

Reduced this somewhat, but not significantly.
Following Hannah Schroeter's advice, reducing the buffer size on the
server instances of aucat reduces the delay dramatically.   There is
only a very, very small delay (even through ssh!)

i.e.
aucat -b 1 -l
aucat -b 1 -r 11000 -o - | aucat -b 1 -r 11000 -i -

Works beautifully.  Thanks for all the tips.

-Ryan



Re: Voice-chat on OpenBSD with nothing more than aucat and ssh

2009-06-06 Thread Ryan Flannery
On Sat, Jun 6, 2009 at 4:43 PM, Jacob Meuserjake...@sdf.lonestar.org wrote:
 On Sat, Jun 06, 2009 at 03:34:08PM -0400, Ryan Flannery wrote:

 aucat -b 1 -l

 this '-b 1' bugs me.  you're telling aucat to process each frame
 individually ... sort of.

 it really means as small as possible.  in server mode, you'll
 get the smallest buffer that the hardware supports, so the results
 may be inconsistent on different hardware.


I had thought that we both might have to specify a format/encoding for
aucat to work correctly between our two machines, but never considered
the buffer size.  From our dmesg's, it appears we may both have the
same audio hardware:

my machine (lenovo T61):
azalia0 at pci0 dev 27 function 0 Intel 82801H HD Audio rev 0x03:
apic 1 int 17 (irq 11)
azalia0: RIRB time out
azalia0: codecs: Analog Devices AD1984, Conexant/0x2bfa, using Analog
Devices AD1984
audio0 at azalia0


buddy's machine (lenovo T400... I think):
azalia0 at pci0 dev 27 function 0 Intel 82801I HD Audio rev 0x03:
apic 1 int 17 (irq 11)
azalia0: codecs: Conexant CX20561
audio0 at azalia0

Could that be why -b 1 is working?

Also, with -b 1024, the delay is around a half-second... not too bad.

-ryan



Voice-chat on OpenBSD with nothing more than aucat and ssh

2009-06-05 Thread Ryan Flannery
With the recent work done to the audio system on OpenBSD, a buddy of
mine and I figured it should be easy to setup two-way voice-chat
between two OpenBSD clients using nothing more than aucat(1) and
ssh(1).  As we found out, it is both very easy and very usable!  We
have telephone-quality chatting working with a = 1 second delay in
the audio (after a few minutes of chatting, this is unnoticeable).

First, a hearty thanks to Jacob Meuser and the other OpenBSD
developers who have worked hard on this recently.  Your efforts are
both noticed and greatly appreciated.

Second, I have a couple of questions...

1. We, the two users chatting (users neal and ryan) have ssh accounts
on each other's machines.  To voice-chat with each other, what we did
boils down to the following:

ryan# aucat -l
ryan# aucat -o - | ssh r...@neals-machine aucat -i -

User neal would do the same, only to my (ryan's) machine.
When aucat is run in server-mode ('aucat -l') it creates a socket in
/tmp/aucat-USERID/default where USERID is the uid of the user who
ran the command (aucat -l).  For another user (neal) to bind to this
socket, we had to make this socket available to the other user, namely

ryan# grep ryan /etc/passwd
   (find ryan's uid, call it RYANSID)
ryan# grep neal /etc/passwd
   (find neal's uid, call it NEALSID)
ryan# aucat -l
ryan# cd /tmp/
ryan# chmod 755 aucat-RYANSID
ryan# ln -s aucat-RYANSIDaucat-NEALSID

Neal would do the same on his machine, only reversed.
Question: is it possible to run aucat(1) in such a way that the socket
it creates in 'global', such that other users can connect to it?
A quick perusing of the man/archives and the source says no... but I
may be missing something.


2. After doing the above, we would both simply do the following...

ryan# aucat -b 1 -r 11000 -o - | ssh r...@neals-machine aucat -b 1 -r 11000 -i -

With the above -b and -r flags, the audio was not choppy at all, quite
high-quality (equal to telephone quality), and overall very nice.  We
had about a ~1 second delay in the audio, however (neal's in Chicago,
I'm in Cincinnati... we expected this), but could any of the
developers familiar with the audio system see a way to perhaps
decrease this delay?  We played with other rates (-r values), but
below 11000 the delay was about the same, and the audio became
deeper and more muted.  Any other options, to aucat or perhaps
audioctl, that one could play with to reduce this?


Many thanks to the devs again... this rocks.   and it's in base.

-ryan



Re: Voice-chat on OpenBSD with nothing more than aucat and ssh

2009-06-05 Thread Ryan Flannery
Well, if you'd like to test with a fellow openbsd user and play around
with some of the settings, feel free to hit me up.

ps - I'm loving smtpd... your efforts there are also greatly appreciated.

On Fri, Jun 5, 2009 at 6:05 PM, Gilles Chehadegil...@openbsd.org wrote:
 Wow, that's an interesting use of using aucat and ssh, you
 made me curious and i'm going to try it :-)

 Gilles

 On Fri, Jun 05, 2009 at 06:02:01PM -0400, Ryan Flannery wrote:
 With the recent work done to the audio system on OpenBSD, a buddy of
 mine and I figured it should be easy to setup two-way voice-chat
 between two OpenBSD clients using nothing more than aucat(1) and
 ssh(1).  As we found out, it is both very easy and very usable!  We
 have telephone-quality chatting working with a = 1 second delay in
 the audio (after a few minutes of chatting, this is unnoticeable).

 First, a hearty thanks to Jacob Meuser and the other OpenBSD
 developers who have worked hard on this recently.  Your efforts are
 both noticed and greatly appreciated.

 Second, I have a couple of questions...

 1. We, the two users chatting (users neal and ryan) have ssh accounts
 on each other's machines.  To voice-chat with each other, what we did
 boils down to the following:

 ryan# aucat -l
 ryan# aucat -o - | ssh r...@neals-machine aucat -i -

 User neal would do the same, only to my (ryan's) machine.
 When aucat is run in server-mode ('aucat -l') it creates a socket in
 /tmp/aucat-USERID/default where USERID is the uid of the user who
 ran the command (aucat -l).  For another user (neal) to bind to this
 socket, we had to make this socket available to the other user, namely

 ryan# grep ryan /etc/passwd
(find ryan's uid, call it RYANSID)
 ryan# grep neal /etc/passwd
(find neal's uid, call it NEALSID)
 ryan# aucat -l
 ryan# cd /tmp/
 ryan# chmod 755 aucat-RYANSID
 ryan# ln -s aucat-RYANSIDaucat-NEALSID

 Neal would do the same on his machine, only reversed.
 Question: is it possible to run aucat(1) in such a way that the socket
 it creates in 'global', such that other users can connect to it?
 A quick perusing of the man/archives and the source says no... but I
 may be missing something.


 2. After doing the above, we would both simply do the following...

 ryan# aucat -b 1 -r 11000 -o - | ssh r...@neals-machine aucat -b 1 -r 11000
-i -

 With the above -b and -r flags, the audio was not choppy at all, quite
 high-quality (equal to telephone quality), and overall very nice.  We
 had about a ~1 second delay in the audio, however (neal's in Chicago,
 I'm in Cincinnati... we expected this), but could any of the
 developers familiar with the audio system see a way to perhaps
 decrease this delay?  We played with other rates (-r values), but
 below 11000 the delay was about the same, and the audio became
 deeper and more muted.  Any other options, to aucat or perhaps
 audioctl, that one could play with to reduce this?


 Many thanks to the devs again... this rocks.   and it's in base.

 -ryan



removing a pesky file

2009-05-14 Thread Ryan Flannery
I've been in similar situations countless times, but this one is
throwing me a for a loop.

I have a file that I'm trying to remove with non-printable characters
in the name.  Additionally, some of the characters appear to be
backspace/delete/etc.

All my normal tricks with rm(1) fail.
Using vim on the directory to try and delete the entry fails.

I can get the inode of the file with ls(1), and used that to write the
following program which I thought would help, but sadly it too fails.

#include stdio.h
#include sys/types.h
#include dirent.h
#include err.h
#include unistd.h

int main(void)
{

   /* open directory */
   DIR *usr;
   if ((usr = opendir(/usr)) == NULL)
  err(1, failed to opendir);


   /* read through until we find the evil one... */
   struct dirent *entry;
   while ((entry = readdir(usr)) != NULL)
   {
  /* check against known evil inode */
  if (entry-d_fileno == 1065344)
  {
 /* got it */
 printf(found file...name length is: %d\n, entry-d_namlen);

 /* build filename as a char* */
 uint8_t i;
 for (i = 0; i  entry-d_namlen; i++)
printf(%d , entry-d_name[i]);


 /* cross fingers */
 printf(\n\nattempting to unlink...\n);
 if (unlink(entry-d_name)  0)
err(1, failure, crack 'nother beer);
  }
   }

   closedir(usr);

   return 0;
}


the program outputs the following:

found file...name length is: 194
-104 38 13 40 -22 101 -13 -4 -68 -107 69 86 49 -92 69 37 -90 -95 -52
20 27 -104 -24 -60 82 -49 46 -50 79 -70 23 -30 66 -29 56 89 29 -100
-127 59 83 -115 28 26 -121 30 81 -45 67 -53 -100 -76 103 15 109 -88 17
95 69 -102 87 -35 -41 -83 -13 -18 9 62 76 44 -52 99 33 -5 39 79 -100
49 -111 6 -64 -94 -97 19 -10 34 104 -87 100 28 125 4 -52 -101 84 -85
85 92 13 -2 -84 -11 63 125 -1 119 -67 82 27 96 -113 -79 -1 84 -87 -43
55 -14 -1 53 -124 69 -29 -65 74 27 96 -113 -71 -1 -111 75 -91 -51 -8
-81 33 -120 -58 127 85 54 -64 30 115 -1 83 44 -41 55 -25 -65 53 -124
-51 -3 -49 -41 29 -60 -12 -65 26 27 96 -39 -9 63 114 66 -2 91 -86 -105
54 -12 -65 -122 -80 104 -4 55 60 -31 -21 8 66 -6 95 -111 13 -80 44 -6

attempting to unlink...
a.out: failure, crack 'nother beer: No such file or directory


Questions:
1.  Any whacks of a clue-stick would be greatly appreciated.
2.  When I printf dirent struct's d_namlen field, is says 302...
grep'ing /usr/include, isn't this 255?  How can this happen?
3.  Passing the d_name field directly to unlink(2)... this should
work, correct?  (I tried this with a sample setup elsewhere and it
did).  Any thoughts why this would fail?

To those who are curious, the file was created when I went to unpack a
ports.tar.gz and forgot the 'z' switch... d'oh.

Anyway, I could try deleting the parent directory, but it's /usr.

-Ryan



Re: removing a pesky file

2009-05-14 Thread Ryan Flannery
On Thu, May 14, 2009 at 9:10 PM, Philip Guenther guent...@gmail.com wrote:
 On Thu, May 14, 2009 at 5:47 PM, Ryan Flannery ryan.flann...@gmail.com
wrote:
 ...
 I can get the inode of the file with ls(1), and used that to write the
 following program which I thought would help, but sadly it too fails.
 ...
   /* open directory */
   DIR *usr;
   if ((usr = opendir(/usr)) == NULL)
  err(1, failed to opendir);
 ...
 /* cross fingers */
 printf(\n\nattempting to unlink...\n);
 if (unlink(entry-d_name)  0)
err(1, failure, crack 'nother beer);
 ...
 Questions:
 1.  Any whacks of a clue-stick would be greatly appreciated.

 So you listed /usr and found the problem name and then you try to
 remove that file from your current directory.  Is your current
 directory /usr ?

Gah!  That was it.
This is what happens when you decide to drink till ya fix it

Many Thanks
-Ryan



Re: removing a pesky file

2009-05-14 Thread Ryan Flannery
On Thu, May 14, 2009 at 9:28 PM, Matthew Clarke cla...@telus.net wrote:
 Thu, May 14, 2009 at 08:47:46PM -0400, Ryan Flannery may have written:

 I've been in similar situations countless times, but this one is
 throwing me a for a loop.

 I have a file that I'm trying to remove with non-printable characters
 in the name.  Additionally, some of the characters appear to be
 backspace/delete/etc.

 All my normal tricks with rm(1) fail.

 [ snip ]

 Even

# pwd
/usr
# rm -i -- ??*

 followed by very careful use of the y, n and Enter keys?


Nope.  Tried that, it failed too.



Re: removing a pesky file

2009-05-14 Thread Ryan Flannery
On Thu, May 14, 2009 at 9:48 PM, Ryan Flannery ryan.flann...@gmail.com
wrote:
 On Thu, May 14, 2009 at 9:28 PM, Matthew Clarke cla...@telus.net wrote:
 Thu, May 14, 2009 at 08:47:46PM -0400, Ryan Flannery may have written:

 I've been in similar situations countless times, but this one is
 throwing me a for a loop.

 I have a file that I'm trying to remove with non-printable characters
 in the name.  Additionally, some of the characters appear to be
 backspace/delete/etc.

 All my normal tricks with rm(1) fail.

 [ snip ]

 Even

# pwd
/usr
# rm -i -- ??*

 followed by very careful use of the y, n and Enter keys?


 Nope.  Tried that, it failed too.

Sorry, I meant to expand upon this further...
with `rm -i`, when it came to the appropriate file, the output was
horribly mucked-up (see below), and even hitting 'y + Enter' for it
failed.

r...@tarski rm -ri /usr/*
remove usr/X11R6? n
remove usr/bin? n
remove usr/games? n
remove usr/include? n
remove usr/lib? n
remove usr/libdata? n
remove usr/libexec? n
remove usr/lkm? n
remove usr/local? n
remove usr/mdec? n
remove usr/obj? n
remove usr/ports? n
remove usr/ports.tar.gz? n
remove usr/sbin? n
remove usr/share? n
~,u?}w=R1T)U7r5  +U\
remove usr/xobj? nEc?J9K%Mx/!...@ss,W7g?5Lc!{'O1@
0,z? ^[[?1;2cy M}OWDt?Yw?rB~[*6t?0h|7aBz_


the 'y' I entered is on that last line, before the big 'white space'
and the rest of the text.

the full output of `ls` in /usr/ was
r...@tarski ls usr/
X11R6
bin
games
include
lib
libdata
libexec
lkm
local
mdec
obj
ports
ports-old
ports-old2
ports.tar.gz
sbin
share
src
xobj
??(jes|?EV1$E%!L???hDRO.NO:?bBc8Y???;S?QSCK?4g?m(?_E?W]W-sn?L,Lc!{'O?
1??@??vh)d?}?L?T+U\?~,u?}?w=R?`?1?T)U7r?5?Ec?J?`?9??K%Mx/!?f...@?s?s,W7g?5?
M}OW?Dt???`Yw?rB~[*?6t??0h|7ak?Bz_??0,z



Re: removing a pesky file

2009-05-14 Thread Ryan Flannery
On Thu, May 14, 2009 at 10:53 PM, Jordi Beltran Creix
jbcreix.m...@gmail.com wrote:
 rm `ls | grep E` would delete that file leaving others alone.

 Regards,


Just for the list...
I had tried that incantation, and others involving grep, and they all failed.

Output (I just reproduced the file) from your example is:

tarski wget ftp://rt.fm/pub/OpenBSD/snapshots/ports.tar.gz
...(wget output)...
tarski  tar xf ports.tar.gz
...(tar output, lots-o-errors, obviously)...

now the file exists with the mucked-up name (see previous post for how
ls(1) displays it)
and here's what happens when I use the rm `ls | grep E` you
suggested (and I tried earlier... again with many variations)

tarski rm `ls | grep E`
~,u?}w=R1T)U7r5\4gm(_EW]W-sn^[[?1;2c: No such file or directory
  Ec?J9K%Mx/!...@ss,W7g?5
0,z: No such file or directory M}OWDt?Yw?rB~[*6t?0h|7aBz_
tarski



Re: removing a pesky file

2009-05-14 Thread Ryan Flannery
On Thu, May 14, 2009 at 11:42 PM, Tony Abernethy t...@servacorp.com wrote:
 Ryan Flannery wrote:
 On Thu, May 14, 2009 at 10:53 PM, Jordi Beltran Creix
 jbcreix.m...@gmail.com wrote:
  rm `ls | grep E` would delete that file leaving others alone.
 
  Regards,
 

 Just for the list...
 I had tried that incantation, and others involving grep, and
 they all failed.

 Output (I just reproduced the file) from your example is:

 tarski wget ftp://rt.fm/pub/OpenBSD/snapshots/ports.tar.gz
 ...(wget output)...
 tarski  tar xf ports.tar.gz
 ...(tar output, lots-o-errors, obviously)...

 now the file exists with the mucked-up name (see previous post for how
 ls(1) displays it)
 and here's what happens when I use the rm `ls | grep E` you
 suggested (and I tried earlier... again with many variations)

 tarski rm `ls | grep E`
 ~,u?} w=R1 T)U7r 5\4gm(_EW]W-sn^[[?1;2c: No such file or directory
   Ec?J9 K%Mx/!...@s S,W7g?5
 0,z: No such file or directory M}OWDt?Yw?rB~[*6t?0h|7aBz_
 tarski


 You might try something like
 mkdir /usr-new
 mv /usr/[a-z0-9A-Z]* /usr-new
 ls -l /usr

 AFTER EVERYTHING mentionaable has been moved
 rm -rf /usr
 mv /usr-new /usr

I thought about this... moving everything out of /usr so I could just
delete the mischievous file's parent directory, which would certainly
have worked.

The /usr slice is quite hefty, and the time to move everything to a
new partition would have been a while... I kept trying to find another
way around this (which probably took way longer than it would have to
just copy everything out of /usr to a new partition  :)



Re: removing a pesky file

2009-05-14 Thread Ryan Flannery
On Fri, May 15, 2009 at 12:07 AM, Chris Kuethe chris.kue...@gmail.com wrote:
 cd /usr
 mkdir .save
 mv [A-Za-z]* .save
 rm *
 mv .save/* .



Son of a #...@!^%

Yes, that would have been *far* simpler/easier/quicker, and would have worked.
*That's* the clue-stick I was looking for.

Many Thanks



Re: Audio problems on Lenovo Thinkpad T61 with 4.5

2009-05-13 Thread Ryan Flannery
On Wed, May 13, 2009 at 7:04 AM, Samuel Baldwin shardz4...@gmail.com wrote:
 For some reason, I can play audio through the speakers, but not
 through my headphones. If my headphones are plugged in, no sound comes
 out the speakers (but I think this is handled at the hardware level),
 which is the proper behaviour.

 I've tried unmuting everything with mixerctl (although nothing was
 muted by default), to no avail. I've got the sound up all the way on
 my headphones, but nothing comes out.

 Here's my dmesg and mixerctl:


I have a Lenovo T61 also, and experienced this problem some time ago.
I see from your mixerctl output you have
 inputs.sel6_source=dac2

Jacob suggested I try setting the following:
 mixerctl inputs.sel6_source=dac

and with that the headphones/speakers work as expected.

Hope it helps.



Re: symux/rrdtool problem on 4.4-snap

2008-11-12 Thread Ryan Flannery
On Wed, Nov 12, 2008 at 6:54 AM, Stuart Henderson [EMAIL PROTECTED] wrote:
 In gmane.os.openbsd.misc, you wrote:
 On 2008-11-12, Ryan Flannery [EMAIL PROTECTED] wrote:
 I'm having some strange problems with the symon (mon+mux) and rrdtool
 packages after recently upgrading to a 4.4 snapshot (fresh install).

 Seems like your Perl packages are not in-sync with the base perl.
 Make sure they are all up-to-date and you fetch from a mirror which
 isn't lagging.



 s/are not/may not be/, but that is the first thing to check anyway..



Ah, I missed that.  Many thanks for the clue-stick.

After upgrading and re-building the rrd's, everything works fine.

Thanks again,
-ryan



symux/rrdtool problem on 4.4-snap

2008-11-12 Thread Ryan Flannery
Hello misc@,

I'm having some strange problems with the symon (mon+mux) and rrdtool
packages after recently upgrading to a 4.4 snapshot (fresh install).

Previously I was running 4.3 with symon  symux installed, and would
cron a script that created rrdtool graphs from some of the symux rrd
files, similar to what syweb does (only from cron).

After the upgrade, any attempt to fetch info from some of the rrd
files (even. via a rrdtool fetch rrdname CF) created  updated by
symux results in either a segfault or the following error from
rrdtool:
 ERROR: fetching cdp from rra

Same if I try to graph any of those files.

The only rrds that I can fetch info from, and graph, are the mbuf,
mem, and pf rrds.

I've re-created the rrds a dozen times, always from the provided
c_smrrds.sh script.  Symux reports no errors while running, and seems
to be updating all of the rrds.  On all of them, I can run
   rrdtool last rrdname
without error, and see that it was updated within the last 5 seconds.

I've been trying to track down the error, but so far have had no luck.

Any ideas or a clue-stick-smacks would be greatly appreciated.

Many Thanks,
-ryan


OpenBSD 4.4-current (GENERIC.MP) #1959: Mon Nov  3 12:17:11 MST 2008
[EMAIL PROTECTED]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2133671936 (2034MB)
avail mem = 2071810048 (1975MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0x7ffbc000 (62 entries)
bios0: vendor Dell Inc. version 1.2.0 date 10/18/2006
bios0: Dell Inc. PowerEdge 2900
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC SPCR HPET MCFG
acpi0: wakeup devices PCI0(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU 5130 @ 2.00GHz, 1995.25 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,TM2,CX16,xTPR,NXE,LONG
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: apic clock running at 332MHz
cpu1 at mainbus0: apid 6 (application processor)
cpu1: Intel(R) Xeon(R) CPU 5130 @ 2.00GHz, 1995.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,TM2,CX16,xTPR,NXE,LONG
cpu1: 4MB 64b/line 16-way L2 cache
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Xeon(R) CPU 5130 @ 2.00GHz, 1995.00 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,TM2,CX16,xTPR,NXE,LONG
cpu2: 4MB 64b/line 16-way L2 cache
cpu3 at mainbus0: apid 7 (application processor)
cpu3: Intel(R) Xeon(R) CPU 5130 @ 2.00GHz, 1995.00 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,TM2,CX16,xTPR,NXE,LONG
cpu3: 4MB 64b/line 16-way L2 cache
ioapic0 at mainbus0 apid 8 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 8
ioapic1 at mainbus0 apid 9 pa 0xfec8, version 20, 24 pins
ioapic1: misconfigured as apic 0, remapped to apid 9
ioapic2 at mainbus0 apid 10 pa 0xfec83000, version 20, 24 pins
ioapic2: misconfigured as apic 0, remapped to apid 10
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 6 (PEX2)
acpiprt2 at acpi0: bus 7 (UPST)
acpiprt3 at acpi0: bus 8 (DWN1)
acpiprt4 at acpi0: bus 10 (DWN2)
acpiprt5 at acpi0: bus 11 (PE2X)
acpiprt6 at acpi0: bus 12 (PEX3)
acpiprt7 at acpi0: bus 13 (PEX4)
acpiprt8 at acpi0: bus 1 (PEX5)
acpiprt9 at acpi0: bus 2 (PE2P)
acpiprt10 at acpi0: bus 14 (PEX6)
acpiprt11 at acpi0: bus 4 (SBEX)
acpiprt12 at acpi0: bus 16 (COMP)
acpicpu0 at acpi0
acpicpu1 at acpi0
acpicpu2 at acpi0
acpicpu3 at acpi0
ipmi at mainbus0 not configured
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 Intel 5000X Host rev 0x12
ppb0 at pci0 dev 2 function 0 Intel 5000 PCIE rev 0x12
pci1 at ppb0 bus 6
ppb1 at pci1 dev 0 function 0 Intel 6321ESB PCIE rev 0x01
pci2 at ppb1 bus 7
ppb2 at pci2 dev 0 function 0 Intel 6321ESB PCIE rev 0x01
pci3 at ppb2 bus 8
ppb3 at pci3 dev 0 function 0 ServerWorks PCIE-PCIX rev 0xc2
pci4 at ppb3 bus 9
bnx0 at pci4 dev 0 function 0 Broadcom BCM5708 rev 0x11: apic 8 int 16 (irq 5)
ppb4 at pci2 dev 1 function 0 Intel 6321ESB PCIE rev 0x01: apic 8
int 16 (irq 0)
pci5 at ppb4 bus 10
ppb5 at pci1 dev 0 function 3 Intel 6321ESB PCIE-PCIX rev 0x01
pci6 at ppb5 bus 11
em0 at pci6 dev 1 function 0 Intel PRO/1000GT (82541GI) rev 0x05:
apic 9 int 0 (irq 5), address 00:1b:21:0a:06:41
ral0 at pci6 dev 2 function 0 Ralink RT2561S rev 0x00: apic 9 int 4
(irq 5), address 00:0e:2e:8d:26:66
ral0: MAC/BBP RT2561C, RF RT2527
ppb6 at pci0 dev 3 function 0 Intel 5000 PCIE rev 0x12: apic 8 int 16 (irq 0)
pci7 at ppb6 bus 12
ppb7 at pci0 dev 4 function 0 Intel 5000 PCIE rev 0x12: apic 8 int 16 (irq 0)
pci8 at ppb7 

Re: Limiting CPU to a process or process group?

2008-01-14 Thread Ryan Flannery
On Jan 14, 2008 9:27 AM, Andreas Kahari [EMAIL PROTECTED] wrote:
 It is not quite the same because a process, even running at niceness
 level 20, will grab as much CPU as it can (unless it has to wait for
 data).

 What I mean is what I wrote in my first email: For example, I would
 want the build of the qt4 port to use a maximum of 25% of the
 available CPU, leaving the CPU 75% idle if nothing else is happening
 on the machine.


This is impossible in OpenBSD, and afaik it's also impossible in any other *nix.
Just curious: why would you want the cpu to stay 75% idle when nothing
else is running?

What you're specifically asking for is impossible, but I believe what
you want is possible (and quite common).

 Again, maybe no-one has these kind of requirements in real life?

Some of us have some very similar requirements, but we accomplish them
differently.
For example, to keep firefox from bringing my box to a crawl, I'll
usually run it with a priority (nice) much lower than normal.  When
I'm not doing anything else, firefox still uses nearly 100% of the
cpu, but that's only because *nothing* else is running.  When I
alt-tab over to an xterm and kick-off a large compile (or something of
the sort), the build job will then eat up most of the cpu and firefox
will be reduced to only a few percent.  Bottom line: firefox doesn't
slow anything else down (at least not too much), since it has a lower
scheduling priority.

Good use of nice(1) and renice(8) are what allows one to run processes
that do not interfere (too much) with other processes, which is what I
believe you are wanting.

Apologies if I misunderstood you.

-ryan



Re: Play Nice - Real men don't attack straw men (Theo)

2007-12-15 Thread Ryan Flannery
On Dec 15, 2007 3:08 PM, L [EMAIL PROTECTED] wrote:
 Jack J. Woehr wrote:
  Well, no, you may. The problem is when two people sling poop on each
  other,
  sooner or later it ends, and then all you've got is two guys standing
  there looking
  sheepish, all covered with poop.
 
 
  How is this my fault?
 
  It's not your fault. You're still standing there waiting for more poop to
  be flung on you though.
  Richard slagged our efforts.  In the public space.
 
  Over the 1/4 century of flamefests I've seen online, the truth of the
  proposition under debate was obvious from the first few lines. The
  rest is gratuitous verbal violence.
 

 Flamewars do have benefits.. they get slashdot/kerneltrap publicity and
 developers can be attracted to the operating system if they see things
 in the flamewars that define where the projects are headed. OpenBSD is
 headed for open code. GNU is headed for fighting for freedom. People can
 see this from the flamewar and choose an OS that suits them.


Amen.  Despite how others may say this brings an overly negative look
to the group, I find it refreshing and absolutely needed.  I've loved
the honesty of this group for ages.  Although the flame wars can get
brutal, they are so very appropriate for the times.
Oh, this guy Stallman and his words should be respected, no matter
how odd they seem... he's done *soo* much for the open/free
movement!!  Give me a break.  Stallman speaks.  Theo and this group
*do*.
Since '98 I've been using various Linux and BSD distro's both for work
and in private.  For the past few years, I've noticed that the only
real community who shuts-up and produces is OpenBSD.  They may move
slow in some areas, the progress may be brutal/ruthless on the mailing
lists, and some may leave for nicer more friendly communities...
but damn these people produce.  And they don't produce crap.
Everything original from this group has been nothing less than
top-notch software with excellent documentation.

I can rarely afford to donate (honestly), but this flame has done
nothing but re-affirm my belief that the OpenBSD community is FAR more
than a net positive for good, quality, free software... they don't
just preach, THEY PRODUCE.
As such, my ass (no matter how poor...and in all honestly, not *that*
poor... I just like good beer :)
got out of my chair and donated.

I encourage the rest of you who support obsd to do the same.

 True, flamewars can also detract developers who are sensitive and weak
 and cannot accept a little beating.

 (p.s. I submitted the flamewar to slashdot a day ago. Go to firehose.pl
 script and vote it in if you want. So far it has been ignored, yet it
 made it to kernaltrap already.. hmm.)

 For about 5 years now I've been looking for an operating system that
 doesn't have the whole freedom of speech attached to it, since I don't
 fall for that. This recent flamewar simply helped confirm my instinct
 that openbsd is not about some idealistic freedom of speech. So the
 flamewar has positive points, because I confirmed that it's the
 operating system I am installing on a few servers of mine that host over
 5 million pages.

 On the other hand, wimps can say 'blah, OpenBSD people are mean, I'd
 never use that OS (The OpenBSD Cliche).

 I will repeat some previous quotes I brought up once:

 A philosopher who did not hurt anyone's feelings was not doing his job.
 --Plato (source: Wikipedia)

An appropriate quote.
For someone who's not that old, and only been involved in free
software since I was 18, I constantly find myself attacked for being
too young to appreciate what others have done.
Basically, I'm told to respect my elders no matter what they say now.
OK - I haven't followed Stallman et alia since their inception, so I
can't really speak for what happened before my time (at least not with
the first-hand 'authority' that others seem to demand).
...But since I have been working in the community, this group has
PRODUCED while others have only SPOKEN.


 A programmer who did not hurt anyone's feelings was not doing his job.
 --L505 (source: Z505)

 One has to speak up and stick up for his programming/philosophy
 practices sometimes, otherwise he won't be heard. The guy who spoke up
 about earth not being flat was ridiculed, flamed, and arrested.

 If you just give in and back down in a flamewar, you may not refresh and
 define your true goals in a project. You may not attract more developers
 who have similar beliefs. You may not gain publicity. Bad publicity can
 be good publicity.

 ALL PROGRAMMERS are aggressive online. Every time you fix a bug, you are
 being aggressive to the computer. All security experts are aggressive
 online.. how do you think we aggressively find exploits and bugs? That
 doesn't mean they are bad people in person and as a whole. Every time
 you make a sign with the word ENEMY OF YOUR FREEDOM on it you are being
 unfriendly too. Blah, who cares. Judge an operating system by its open
 code and open attitude.. not some 

Re: upgraded to current - need bnx firmware?

2006-12-26 Thread Ryan Flannery

On 12/26/06, George C [EMAIL PROTECTED] wrote:

Hello misc,
I just upgraded my 4.0 system to -current (GENERIC.MP), and when I
reboot, the two bnx devices could not find firmware in /etc/firmware.  It
appears to be looking for /etc/firmware/bnx, but that file is not present.


try the following:
# cd /usr/src/sys/dev/microcode/bnx
# make

that should produce a file named 'bnx' in that directory.  copy it to
/etc/firmware and reboot.



I can reboot the old kernel just fine (so it appears the old bnx driver did
not require it).  Curious how/where the new firmware for bnx is located
at, and where I can obtain a copy.

Is there some step I missed in the upgrade procedure that builds/adds
these firmware files?  or is this simply done separately?  I followed the
FAQ.  Also I've google'ed the archives/web for any answer to these
questions... unfortunately the web  mail archives are full of references
to the iwi firmware licensing issue, and little else.


-GeorgeC




Re: Negative temp sensor readings?

2006-12-20 Thread Ryan Flannery

I have the exact same thing here.  Just installed 4.0 GENERIC.MP on a
new Dell PowerEdge 2900 (my dmesg looks almost identical to yours),
and I have similar readings for the first two temperatures (picked up
on sensors.{0,1}).

-Ryan




On 12/20/06, Will H. Backman [EMAIL PROTECTED] wrote:

Has anyone else seen negative temperature sensor readings through
sysctl?

hw.sensors.0=ipmi0, Temp, -54.00 degC, OK
hw.sensors.1=ipmi0, Temp, -51.00 degC, OK
hw.sensors.2=ipmi0, Temp, 40.00 degC, WARNING

OpenBSD 4.0 (GENERIC.MP) #967: Sat Sep 16 20:38:15 MDT 2006
[EMAIL PROTECTED]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2146729984 (2096416K)
avail mem = 1834881024 (1791876K)
using 22937 buffers containing 214880256 bytes (209844K) of memory
mainbus0 (root) bios0 at mainbus0: SMBIOS rev. 2.4 @ 0x7ffbc000 (62
entries)
bios0: Dell Inc. PowerEdge 2950
ipmi0 at mainbus0: version 2.0 interface KCS iobase 0xca8/8 spacing 4
mainbus0: Intel MP Specification (Version 1.4) (DELL PE 01B2 )
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU 5110 @ 1.60GHz, 1596.14 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,
CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,NXE,LONG
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: apic clock running at 265MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Xeon(R) CPU 5110 @ 1.60GHz, 1595.93 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,
CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,NXE,LONG
cpu1: 4MB 64b/line 16-way L2 cache
cpu2 at mainbus0: apid 7 (application processor)
cpu2: Intel(R) Xeon(R) CPU 5110 @ 1.60GHz, 1595.94 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,
CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,NXE,LONG
cpu2: 4MB 64b/line 16-way L2 cache
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU 5110 @ 1.60GHz, 1595.93 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,
CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,NXE,LONG
cpu3: 4MB 64b/line 16-way L2 cache
mpbios: bus 0 is type PCI
mpbios: bus 1 is type PCI
mpbios: bus 2 is type PCI
mpbios: bus 3 is type PCI
mpbios: bus 4 is type PCI
mpbios: bus 5 is type PCI
mpbios: bus 6 is type PCI
mpbios: bus 7 is type PCI
mpbios: bus 8 is type PCI
mpbios: bus 9 is type PCI
mpbios: bus 10 is type PCI
mpbios: bus 11 is type PCI
mpbios: bus 12 is type PCI
mpbios: bus 13 is type PCI
mpbios: bus 14 is type PCI
mpbios: bus 15 is type PCI
mpbios: bus 16 is type PCI
mpbios: bus 17 is type ISA
ioapic0 at mainbus0 apid 8 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 8
ioapic1 at mainbus0 apid 9 pa 0xfec81000, version 20, 24 pins
ioapic1: misconfigured as apic 0, remapped to apid 9 pci0 at mainbus0
bus 0: configuration mode 1 pchb0 at pci0 dev 0 function 0 Intel 5000X
Host rev 0x12 ppb0 at pci0 dev 2 function 0 Intel 5000 PCIE rev 0x12
pci1 at ppb0 bus 6
ppb1 at pci1 dev 0 function 0 Intel 6321ESB PCIE rev 0x01
pci2 at ppb1 bus 7
ppb2 at pci2 dev 0 function 0 Intel 6321ESB PCIE rev 0x01
pci3 at ppb2 bus 8
ppb3 at pci3 dev 0 function 0 ServerWorks PCIE-PCIX rev 0xc2
pci4 at ppb3 bus 9
bnx0 at pci4 dev 0 function 0 Broadcom BCM5708 rev 0x11: apic 8 int 16
(irq 11), address 00:18:8b:47:5c:ad brgphy0 at bnx0 phy 1: BCM5708C
10/100/1000baseT PHY, rev. 5
ppb4 at pci2 dev 1 function 0 Intel 6321ESB PCIE rev 0x01
pci5 at ppb4 bus 10
ppb5 at pci1 dev 0 function 3 Intel 6321ESB PCIE-PCIX rev 0x01
pci6 at ppb5 bus 11
ppb6 at pci0 dev 3 function 0 Intel 5000 PCIE rev 0x12
pci7 at ppb6 bus 1
ppb7 at pci7 dev 0 function 0 Intel IOP333 PCIE-PCIX rev 0x00
pci8 at ppb7 bus 2
mfi0 at pci8 dev 14 function 0 Dell PERC 5 rev 0x00: apic 9 int 14
(irq 5)
mfi0: logical drives 2, version 5.0.2-0003, 256MB RAM scsibus0 at mfi0:
2 targets sd0 at scsibus0 targ 0 lun 0: DELL, PERC 5/i, 1.00 SCSI3
0/direct fixed
sd0: 34176MB, 34176 cyl, 64 head, 32 sec, 512 bytes/sec, 69992448 sec
total
sd1 at scsibus0 targ 1 lun 0: DELL, PERC 5/i, 1.00 SCSI3 0/direct
fixed
sd1: 138752MB, 138752 cyl, 64 head, 32 sec, 512 bytes/sec, 284164096 sec
total
ppb8 at pci7 dev 0 function 2 Intel IOP333 PCIE-PCIX rev 0x00
pci9 at ppb8 bus 3
ppb9 at pci0 dev 4 function 0 Intel 5000 PCIE rev 0x12 pci10 at ppb9
bus 12 ppb10 at pci0 dev 5 function 0 Intel 5000 PCIE rev 0x12
pci11 at ppb10 bus 13
ppb11 at pci0 dev 6 function 0 Intel 5000 PCIE rev 0x12
pci12 at ppb11 bus 14
ppb12 at pci0 dev 7 function 0 Intel 5000 PCIE rev 0x12
pci13 at ppb12 bus 15
pchb1 at pci0 dev 16 function 0 Intel 5000 Error Reporting rev 0x12
pchb2 at pci0 dev 16 function 1 Intel 5000 Error Reporting rev 0x12
pchb3 at pci0 dev 16 function 2 Intel 5000 Error Reporting rev 0x12
pchb4 at pci0 dev 17 function 0 Intel 5000 Reserved rev 0x12
pchb5 at pci0 dev 19 function 0 Intel 5000 Reserved rev 0x12
pchb6 at pci0 dev 21 function 0 Intel 5000 FBD rev 0x12
pchb7 at pci0 

Re: ifficiency

2006-05-22 Thread Ryan Flannery

On 5/22/06, prad [EMAIL PROTECTED] wrote:

this is not openbsd specific, but i wanted to ask people who really understand
the inner workings of programming languages.

suppose that you have 2 conditions A and B where B take a lot of effort to
determine (eg looking for a string match in a huge file).

either A or B needs to be true before you can execute 'this'.

the 2 if statements below are equivalent i think:

if A or B:
do this

if A:
do this
elseif B:
do this

now, do they work the same way?

in the second if A is true we don't need to go looking for B (the more
laborious one).

in the first, do both A and B get evaluated or does A get evaluated first
(because it is first in sequence) and if it is true, no evaluation of B takes
place?

do all programming and shell languages handle this the same way?

--
In friendship,
prad

  ... with you on your journey
Towards Freedom
http://www.towardsfreedom.com (website)
Information, Inspiration, Imagination - truly a site for soaring I's




most programming languages take this into account.
if you have

if (condition1 OR condition2 OR ...)
  foo
end if

condition2 is only evaluated/checked if condition1 results in 'false'.
C, Java, Haskell do this, as do most shell languages (actually, all
that i can think of).
It's a pretty standard method for evaluating a disjunction within a conditional.

Hope it helps,
-Ryan



Re: Recurring donations using paypal

2006-04-05 Thread Ryan Flannery

On Apr 5, 2006, at 3:41 PM, Marco Peereboom wrote:

Just wanted to let everyone know that I added monthly recurring  
donations to

the list of donation methods.  Go sign up at:
http://www.openbsd.org/donations.html
http://www.openssh.org/donations.html

If it doesn't show up wait a little longer before all changes  
prorogate to

mirrors.




A great feature!

As a grad student, I can't afford much.  But come pay day every month  
I'd like
to donate a little.  Remembering to do this amidst school is  
difficult.  Now, I

don't have to.

Nice work.

-Ryan



Re: openbsd and the money -solutions

2006-03-23 Thread Ryan Flannery

correction: no one with a great deal of money seems to care.  ;)

I've been following the thread, and once I saw it on slashdot I got  
off my lazy
ass and donated what little I could right now (more to come, but on a  
grad

student salary, I can't donate what companies can).

I really hate prolonging this thread, but I'm curious about the  
following...
I've done quite bit of contract work around my area, and in most  
cases I've been
able to implement OpenBSD for something.  Whenever that's happened,  
I've always
pushed for the company to make a donation.  In most cases it's worked  
(actually
all that I can think of), resulting in (usually) around $500.  It's  
not what the
larger companies could do, but I'm curious if other contractors try  
to push
donations when they utilize openbsd/openssh.  All the companies I've  
worked with

have been fairly receptive.

-ryan


On Mar 23, 2006, at 9:34 PM, Aaron Glenn wrote:


On 3/23/06, Edd Barrett [EMAIL PROTECTED] wrote:

Hi,

Just an idea, but why not try to have this conversation linked to on
slashdot  / digg. There is huge traffic to these sites from the linux
community, who all owe the OpenBSD developers for OpenSSH.


http://www.digg.com/linux_unix/OpenBSD_needs_a_major_donor
http://bsd.slashdot.org/article.pl?sid=06/03/21/1555243

No one seems to care (unless donations have shot up and Theo, et. al.
haven't mentioned it)

aaron.glenn