Re: Laptop lid closing script

2012-05-31 Thread Jan Stary
On May 31 07:37:18, Jan Stary wrote:
 On May 30 20:15:42, Robert Connolly wrote:
  Hello.
  
  Is there any way to configure an ACPI event, such as closing the lid of a
  laptop, to run a script, like 'apm -C' and screensaver?
  apm(8) and sensorsd(8) don't seem to do anything like this.
 
 Not exactly hooked to a lid close but to a suspend
 (which happens on lid close if machdep.lidsuspend=1)
 - see apm(8) mentioning /etc/apm/suspend.

That's apmd(8) of course.



Re: Idea for apmd

2012-05-31 Thread Tomas Bodzar
On Thu, May 31, 2012 at 3:45 AM, Juan Francisco Cantero Hurtado
i...@juanfra.info wrote:
 Hi. I've been using OpenBSD on my netbook daily for a few months. I was
 using apmd with the -C setting. My netbook is slow and the battery life
 is important, so 800Mhz (apmd -C) or 1600Mhz (apm -A) is not a big
 difference for me.

 Now I have a desktop computer with support for cpu speed scaling. In
 this case the options of apmd are very limited. If I use -A my cpu is
 always at 2700Mhz, wasting energy and heating my room (I live in the
 very sunny Extremadura :) ). If I use -C, apm rarely raises the speed
 and the cpu is almost always at 800Mhz.

 This is important because when I open a web page with a lot of
 javascript, the browser is very slow. Also when I compile something with
 make -j1, apmd doesn't raise the speed of my CPU, I need use make
 -j4 for raising the cpu speed to 2700Mhz.

What shows top, vmstat, systat about %sys, %usr, %idle during that
time? Because you can have 800MHz of CPU, but %usr and/or %sys can be
eg. only 20% so there's no reason to switch to higher frequency.


 I understand the problem with the limits of apmd. The developers can't
 generate a limits for each CPU and workflow. I've been playing with the
 values of PERFINCTHRES and PERFDECTHRES on usr.sbin/apmd/apmd.c and
 checking the changes of speed with while true; do apm | grep cool;
 sleep 1; done. I'm using 20 and 60 respectively right now. Probably
 this values aren't the best values but are better than the defaults (for
 my CPU and workflow). The performance is very good and I can see the cpu
 speed raising and lowering. I've tested various values and 20/60 are a
 good compromise performance vs energy consumption.

 In short, I have a suggestion for apmd. Add one option for to set
 PERFINCTHRES and other for to set PERFDECTHRES. Each user could to
 configure the behavior of apm -C on rc.conf.local. Example:
 apmd_flags=-C -I 20 -D 60. Obviously, apm -C would use the defaults
 if both options aren't used.

 The implementation is simple and it will not break any system.
 Unfortunately I can't code the idea (despite I've read the code), so I
 wanted share this with you. B Some developer interested? :)

 Cheers.

 --
 Juan Francisco Cantero Hurtado http://juanfra.info



Re: Plan 9 to OpenBSD (Was Re: OpenBSD in April's issue of the CACM)

2012-05-31 Thread Alexandre Ratchov
On Wed, May 30, 2012 at 09:27:32PM +0200, Peter Laufenberg wrote:
 
 The only thing I miss is an X-less framebuffer in OpenBSD even
 it'd support just a console and text editor. IMHO X has to die,
 it's a huge pile of crap.
 

A lot of us are dreaming of a framebuffer console (and X), but
nobody wrote the code yet.

-- Alexandre



Re: Laptop lid closing script

2012-05-31 Thread David Coppa
On Thu, May 31, 2012 at 7:37 AM, Jan Stary h...@stare.cz wrote:
 On May 30 20:15:42, Robert Connolly wrote:
 Hello.

 Is there any way to configure an ACPI event, such as closing the lid of a
 laptop, to run a script, like 'apm -C' and screensaver?
 apm(8) and sensorsd(8) don't seem to do anything like this.

 Not exactly hooked to a lid close but to a suspend
 (which happens on lid close if machdep.lidsuspend=1)
 - see apm(8) mentioning /etc/apm/suspend.

I have this in my ~/.xinitrc:

xidle -area 1 -delay 10800 -program /usr/X11R6/bin/xlock -mode blank 

And then in /etc/apm/suspend:

---8---

#!/bin/sh
pkill -30 -x xidle

---8---

Cheers!
David



Re: ikev2 between openbsd and windows

2012-05-31 Thread Peter J. Philipp
On Tue, May 29, 2012 at 01:55:45PM +0200, Mike Belopuhov wrote:
 On Wed, May 16, 2012 at 17:30 +0400, Pavel Shvagirev wrote:
  2. Doesn't work EAP mode - Windows stops on Checking username and
  password error. Then #13803, 1931...
 
 Hi,
 
 Just to mention it for those not following source-changes@
 that there was a bug in the message ID handling that prevented
 EAP from working correctly.  The fix was committed on Friday.
 
 Cheers,
 Mike

Hi,

I still can't get it to work.  I made two screenshots they are here:

http://ipv4.goldflipper.net/private/iked-eap1.jpg

and

http://ipv4.goldflipper.net/private/iked-eap2.jpg

My iked config looks like this:

ikev2 win7 passive esp \
from 172.16.20.0/24 to 0.0.0.0/0 local any peer any \
srcid 10.0.0.1 \
eap mschap-v2 \
config address 172.16.20.1 \
config name-server 212.18.3.5 \
tag $name-$id

I installed the iked from the -current source on top of the 5.0 binary 
I believe these are the right ones because I see your recent timestamp
in them:

ikev2_msg.c:/*  $OpenBSD: ikev2_msg.c,v 1.15 2012/05/30 09:18:14 mikeb Exp $

Any hint on what I'm doing wrong?  Sorry the screenshots are in german,
Fehler 13843 is Error 13843.  I googled for that but wasn't any wiser after.

Regards,
-peter



Re: ikev2 between openbsd and windows

2012-05-31 Thread Mike Belopuhov
On Thu, May 31, 2012 at 12:18 +0200, Peter J. Philipp wrote:
 On Tue, May 29, 2012 at 01:55:45PM +0200, Mike Belopuhov wrote:
  On Wed, May 16, 2012 at 17:30 +0400, Pavel Shvagirev wrote:
   2. Doesn't work EAP mode - Windows stops on Checking username and
   password error. Then #13803, 1931...
  
  Hi,
  
  Just to mention it for those not following source-changes@
  that there was a bug in the message ID handling that prevented
  EAP from working correctly.  The fix was committed on Friday.
  
  Cheers,
  Mike
 
 Hi,
 
 I still can't get it to work.  I made two screenshots they are here:
 
 http://ipv4.goldflipper.net/private/iked-eap1.jpg
 
 and
 
 http://ipv4.goldflipper.net/private/iked-eap2.jpg
 
 My iked config looks like this:
 

do you have a user specification in your iked.conf?
which user are you trying to authenticate as?
user specification occupies a separate line and looks
like that:

user username password

iked can't consult the local password database or radius
or any other authentication service at the moment except
this internal database.

also, have you tried w/o mschap? you need to select the
Computerzertifikate verwenden radio button to turn eap off.

 ikev2 win7 passive esp \
 from 172.16.20.0/24 to 0.0.0.0/0 local any peer any \
 srcid 10.0.0.1 \
 eap mschap-v2 \
 config address 172.16.20.1 \
 config name-server 212.18.3.5 \
 tag $name-$id
 

looks fine except of absent of the user specification.
i'd ditch the tag though as i didn't test it but it shouldn't
affect anything.

 I installed the iked from the -current source on top of the 5.0 binary 
 I believe these are the right ones because I see your recent timestamp
 in them:
 
 ikev2_msg.c:/*  $OpenBSD: ikev2_msg.c,v 1.15 2012/05/30 09:18:14 mikeb Exp $
 
 Any hint on what I'm doing wrong?  Sorry the screenshots are in german,
 Fehler 13843 is Error 13843.  I googled for that but wasn't any wiser after.
 
 Regards,
 -peter



Re: ikev2 between openbsd and windows

2012-05-31 Thread Peter J. Philipp
On Thu, May 31, 2012 at 12:28:47PM +0200, Mike Belopuhov wrote:
  My iked config looks like this:
  
 
 do you have a user specification in your iked.conf?
 which user are you trying to authenticate as?
 user specification occupies a separate line and looks
 like that:
 
 user username password
 
 iked can't consult the local password database or radius
 or any other authentication service at the moment except
 this internal database.

Yes I do have a user entry, right at the top.  I didn't think posting
it was a good idea.

 also, have you tried w/o mschap? you need to select the
 Computerzertifikate verwenden radio button to turn eap off.

I tried that but it had an error, which made me want to try EAP again.

  ikev2 win7 passive esp \
  from 172.16.20.0/24 to 0.0.0.0/0 local any peer any \
  srcid 10.0.0.1 \
  eap mschap-v2 \
  config address 172.16.20.1 \
  config name-server 212.18.3.5 \
  tag $name-$id
  
 
 looks fine except of absent of the user specification.
 i'd ditch the tag though as i didn't test it but it shouldn't
 affect anything.

Hmm.  What to do... Any hint on how to debug this best?

-peter



Re: ikev2 between openbsd and windows

2012-05-31 Thread Mike Belopuhov
On Thu, May 31, 2012 at 12:47 +0200, Peter J. Philipp wrote:
 On Thu, May 31, 2012 at 12:28:47PM +0200, Mike Belopuhov wrote:
   My iked config looks like this:
   
  
  do you have a user specification in your iked.conf?
  which user are you trying to authenticate as?
  user specification occupies a separate line and looks
  like that:
  
  user username password
  
  iked can't consult the local password database or radius
  or any other authentication service at the moment except
  this internal database.
 
 Yes I do have a user entry, right at the top.  I didn't think posting
 it was a good idea.
 
  also, have you tried w/o mschap? you need to select the
  Computerzertifikate verwenden radio button to turn eap off.
 
 I tried that but it had an error, which made me want to try EAP again.
 
   ikev2 win7 passive esp \
   from 172.16.20.0/24 to 0.0.0.0/0 local any peer any \
   srcid 10.0.0.1 \
   eap mschap-v2 \
   config address 172.16.20.1 \
   config name-server 212.18.3.5 \
   tag $name-$id
   
  
  looks fine except of absent of the user specification.
  i'd ditch the tag though as i didn't test it but it shouldn't
  affect anything.
 
 Hmm.  What to do... Any hint on how to debug this best?
 

try to verify that certificates are installed correctly on windows
and are valid.  make sure you didn't install them by doubleclicking
(as i initially wrote) but imported them via mmc into the right
section (under Komputerkonto).

try to change to 0.0.0.0/0 to something like to 10.50.0.1,
where you can assign 10.50.0.1 to lo1.

make sure that certificates were created by commands like:

 ikectl ca CA certificate 10.0.0.1 create

and host using FQDN.  srcid must match that otherwise windows
refuses to connect.

and at last, please provice output from the iked -dvv.

cheers,
mike



Re: ikev2 between openbsd and windows

2012-05-31 Thread Mike Belopuhov
On Thu, May 31, 2012 at 12:18 +0200, Peter J. Philipp wrote:
 My iked config looks like this:
 
 ikev2 win7 passive esp \
 from 172.16.20.0/24 to 0.0.0.0/0 local any peer any \
 srcid 10.0.0.1 \
 eap mschap-v2 \
 config address 172.16.20.1 \
 config name-server 212.18.3.5 \
 tag $name-$id
 

i've just realised you made a mistake by exchanging from and
to specifications.  the correct way is:

from 0.0.0.0/0 to 172.16.20.0/24 local any peer any \

it should always read i provide access from a network behind
MYSELF to a network behind my PEER regardless of whether you
initiate or a respond.  in other words just like in ipsec.conf.



Re: ACPI problems on a W500 thinkpad: software or hardware?

2012-05-31 Thread Rafael Sadowski
On Wed May 30, 2012 at 03:59:31PM +0200, Benny Lofgren wrote:
 On 2012-05-30 05.19, STeve Andre' wrote:
  May 29 19:15:36 paladin /bsd: acpithinkpad0: unknown event 0x6022
  May 29 19:15:36 paladin /bsd: acpitz1: critical temperature exceeded
  100C (3732K), shutting down
   
 
 It's probably no help to you, but 100B0 C is not 3732 K. It is however
 373.15 K, which if you round it up interestingly enough is 373.2 K, i e
 the same number, one magnitude off.
 

You're right. 3732K -- 3458.85C but I code we see:

#define KTOC(k) ((k - 2732) / 10)



Lenceria Erotica | Camara de Fotos Samsung | Test de Alcoholemia | Aromatizador automatico | Pochoclera Automatica | Juego de Cocina | Cuchillo Deli Pro | Cena Gourmet en Brands

2012-05-31 Thread Bonus Cupon
Para visualizar correctamente este newsletter ingresa a
http://news1.bonuscupon.com.ar/r.html?uid=1.n.29hh.dk.qtd580f6eo



Re: Idea for apmd

2012-05-31 Thread Jes
I agree with Juan Francisco, In think it would nice to have a more smoth
speed control cpu way, forma example like the proposed oneroso in this
thread, similar to netbsd. Andris it would nicer if in a future openbsd
implementar the P-states oferta the cpu, to save battery on laptops.
Anyway my openbsd laptop (thinkpad R61 2200 Mhz ) has a good performance
with apmd -C.

BR

Jes (from Corunha :) )
El 30/05/2012 20:50, Juan Francisco Cantero Hurtado i...@juanfra.info
escribis:

 Hi. I've been using OpenBSD on my netbook daily for a few months. I was
 using apmd with the -C setting. My netbook is slow and the battery life
 is important, so 800Mhz (apmd -C) or 1600Mhz (apm -A) is not a big
 difference for me.

 Now I have a desktop computer with support for cpu speed scaling. In
 this case the options of apmd are very limited. If I use -A my cpu is
 always at 2700Mhz, wasting energy and heating my room (I live in the
 very sunny Extremadura :) ). If I use -C, apm rarely raises the speed
 and the cpu is almost always at 800Mhz.

 This is important because when I open a web page with a lot of
 javascript, the browser is very slow. Also when I compile something with
 make -j1, apmd doesn't raise the speed of my CPU, I need use make
 -j4 for raising the cpu speed to 2700Mhz.

 I understand the problem with the limits of apmd. The developers can't
 generate a limits for each CPU and workflow. I've been playing with the
 values of PERFINCTHRES and PERFDECTHRES on usr.sbin/apmd/apmd.c and
 checking the changes of speed with while true; do apm | grep cool;
 sleep 1; done. I'm using 20 and 60 respectively right now. Probably
 this values aren't the best values but are better than the defaults (for
 my CPU and workflow). The performance is very good and I can see the cpu
 speed raising and lowering. I've tested various values and 20/60 are a
 good compromise performance vs energy consumption.

 In short, I have a suggestion for apmd. Add one option for to set
 PERFINCTHRES and other for to set PERFDECTHRES. Each user could to
 configure the behavior of apm -C on rc.conf.local. Example:
 apmd_flags=-C -I 20 -D 60. Obviously, apm -C would use the defaults
 if both options aren't used.

 The implementation is simple and it will not break any system.
 Unfortunately I can't code the idea (despite I've read the code), so I
 wanted share this with you.  Some developer interested? :)

 Cheers.

 --
 Juan Francisco Cantero Hurtado http://juanfra.info



Re: (Kinda O.T.) Digital Millennium Copyright Act used to censor hardware specifications

2012-05-31 Thread Ted Unangst
On Thu, May 31, 2012 at 11:11, Brett wrote:

 Pursuant to a rights owner notice under the Digital Millennium Copyright
 Act (DMCA), the Wikimedia Foundation acted under the law and took down and
 restricted the content in question. A copy of the received notice can be

 Reverse engineering necessary to have open source in the brave new world?

PCI spec docs (and many others) are copyrighted.  Maybe they should be,
maybe they shouldn't, but they are.

As far as I know, the actual specs cannot be copyrighted (or it's
murky), but knowing wikipedia, somebody probably copied an entire
table from the doc and dropped it into the article.  that's a no-no,
and not something I'd find nearly as alarming as censorship.



Re: Idea for apmd

2012-05-31 Thread Ted Unangst
On Thu, May 31, 2012 at 08:28, Tomas Bodzar wrote:
 On Thu, May 31, 2012 at 3:45 AM, Juan Francisco Cantero Hurtado
 i...@juanfra.info wrote:

 This is important because when I open a web page with a lot of
 javascript, the browser is very slow. Also when I compile something with
 make -j1, apmd doesn't raise the speed of my CPU, I need use make
 -j4 for raising the cpu speed to 2700Mhz.
 
 What shows top, vmstat, systat about %sys, %usr, %idle during that
 time? Because you can have 800MHz of CPU, but %usr and/or %sys can be
 eg. only 20% so there's no reason to switch to higher frequency.

apmd scaling works like crap with more than one cpu.  This was fixed,
then unfixed, but you can get the code from cvs if you like.



problem SOLVED (was: Re: more Thinkpad T60 X/video woes (5.0-stable amd64))

2012-05-31 Thread Jonathan Thornburg
In a thread back in November 2011,
  http://marc.info/?t=132173453400070r=1w=1
I reported intermittent kernel/X hangs (usually under near-idle loads)
on a Thinkpad T60 widescreen laptop (alas I misspelled the name as
Tinkpad in the Subject: line) running 5.0-stable amd64.  My full
dmesg is given in the first message in that thread,
  http://marc.info/?l=openbsd-miscm=132105242827683w=1
along with various other (hopefully-)relevant information.  There's
also more information on the problem symptoms in my later messages in
that thread,
  http://marc.info/?l=openbsd-miscm=132103762123592w=1
  http://marc.info/?l=openbsd-miscm=132137790200900w=1
  http://marc.info/?l=openbsd-miscm=132813757309520w=1

I'm pleased to report that as of 5.1/amd64 (either -release or -stable)
the problem is solved -- the default autoconfigure-everything X works
fine, with no crashes or hangs and full video acceleration.

My thanks to all who contributed ideas in the thread (and to all the
developers for a *great* 5.1)!

ciao,

-- 
-- Jonathan Thornburg [remove -animal to reply] 
jth...@astro.indiana-zebra.edu
   Dept of Astronomy  IUCSS, Indiana University, Bloomington, Indiana, USA
   Washing one's hands of the conflict between the powerful and the
powerless means to side with the powerful, not to be neutral.
  -- quote by Freire / poster by Oxfam



Re: AMD Zacate E350 (ASUS E35M1-M) dmesg/experiences?

2012-05-31 Thread Manolis Tzanidakis
Please reply on the list. I'm already subscribed and others might find
your questions useful. Also, don't send HTML e-mails. Check the lists'
guidelines.

On Thu (31/05/12), Eugene Yunak wrote:
 Thank you very much, this is super helpful! i am going to buy either
 this board or the E450 one and dmesg is precisely what i needed.
 
 One question if i may - do you know if it supports boot from USB and
 maybe USB raid 1? (i want to create mirror of usb sticks and install OS
 there, and use all the sata ports for data hdds).

It boots from USB. I installed OBSD this way. I suppose softraid(4)
should support raid 1 with USB drives/sticks. I don't think it's a good
idea though.

-- 
Manolis Tzanidakis
http://mtzanidakis.com/
mtzanidakis[at]gmail[dot]com



Re: using relayd in transparent mode

2012-05-31 Thread Kevin Chadwick
On Wed, 28 Mar 2012 15:58:45 +0200
Schmurfy wrote:

 So there really is something broken in the relayd shipped with OpenBSD 5.0
 at least for transparent mode.

I use relayd at securelevel 2 in some cases which works for relaying to
or on a single server. I've found relayd on 5.1 now exits due to
operation failed creating the table.

flush_rulesets: transaction for relayd failed: operation not permitted.

Once at the default securelevel I also found the transparent app proxy
for dns causes relayd to exit as soon as any dns request is made.

Not complaining, thanks for working on relayd. Just thought I'd share in
case it triggered anything aside from it's a priv sep improvement and
other work in progress at the moment.


I notice the examples I'm pretty sure were in the man page? for
transparent layer 7 proxy have gone. Is relayd heading away from that?
Or just that the main uses were verified to work during the recode.



Re: OpenBSD in April's issue of the CACM

2012-05-31 Thread Kevin Chadwick
On Tue, 29 May 2012 17:35:40 -0600
Theo de Raadt wrote:

 to realize I was talking to The Right People (even if they kept
 saying they are not).  For one of them, check out how the revolving
 door works:
 
 Fred Baker f...@cisco.com
 and
 en.wikipedia.org/wiki/Fred_Baker_(IETF_chair)
 
 That is what we are up against.  I also did talk a lot to Robert
 Barr.  None of it was going anywhere.
 
 So I was there, fighting that patent battle -- and we tried to do it
 by going after the *very first network patent* recognized by people who
 lied about being about standards.

I knew about the protocol refusal. I had no idea Ciscos fell over on
deployment however. That's hilarious, they should pay the OpenBSD devs
for fixing their firewalls.

Would no work get done if members of supposedly independent bodies had
to have independent employees. It reminds me a little of Apple having a
member on the html5 standards team that vetoed Googles member (the other
apparently) as Apple wanted mp4 rather than having ogg as the
specified standard. 

p.s. All the phones in use on the web and their accel
chips would have been replaced by now anyway.



Thinkpad T60 sticky touchpad (amd64/5.1-stable)

2012-05-31 Thread Jonathan Thornburg
Hi,

I have a Lenovo Thinkpad T60 amd64 laptop (dmesg below) running 5.1-stable
(fresh install of -release from the CD set, then CVS update to -stable).
The touchpad

  pms0 at pckbc0 (aux slot)
  wsmouse0 at pms0 mux 0
  wsmouse1 at pms0 mux 0
  pms0: Synaptics touchpad, firmware 6.2

has an irritating problem in 5.1 (which was *not* present on this same
machine when running 5.0-{release,stable} with X video acceleration
disabled):  When running X (autoconfigured with no xorg.conf), the
pointer will intermittently jump to and stick at either the left side
of the screen, the top of the screen, or the top left corner.  When
stuck to the left side of the screen the pointer will only move up/down,
not left/right; when stuck to the top side of the screen the pointer
will only move left/right, not up/down; when stuck to the top left
corner the pointer won't move at all.

The only way I've found to recover from a stuck state is to press
(any) one of the touchpad buttons; that allows the pointer to be moved
in both directions again.

The mean occurence rate is on the order of 3-5 stickings per hour,
but there seems to be clustering, with several pairs or triplets less
than 10 seconds apart.  I've kept a log of all stickings this since
I updated to 5.1-stable 8 days ago.  In that time, I've had a total
of 118 stickings (24 top-side, 77 left-side, 17 top-left-corner),
including 5 in the time it took me to compose this message.

I think (but am not certain) that all the stickings have occured when
I used the touchpad to move the pointer.  That is, I think (but am not
certain) that no sticking has ever happened *without* my touching the
touchpad.

One other thing that may be relevant...  Moving from 5.0 to 5.1 the
touchpad is much more sensitive, i.e., the ratio
  (cm pointer movement)/(cm finger movement on touchpad)
went up by about an order of magnitude.  In 5.0 and before I used
'xset m 2 10' in my .xinitrc; in 5.1 I'm using 'xset m 1/4' to
compensate for the higher sensitivity.

Has anyone else seen this sticky touchpad problem?  Is there a known
workaround/fix?  Are there useful debug options I could enable in the pms
driver or elsewhere to gather more information?

dmesg:
OpenBSD 5.1-stable (GENERIC.MP) #0: Wed May 23 21:13:00 EDT 2012
r...@cobalt.astro.indiana.edu:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3218931712 (3069MB)
avail mem = 3119144960 (2974MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (68 entries)
bios0: vendor LENOVO version 7IET23WW (1.04 ) date 12/27/2006
bios0: LENOVO 87424GU
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT SSDT SSDT SSDT 
SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) LURT(S3) DURT(S3) EXP0(S4) EXP1(S4) 
EXP2(S4) EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) USB7(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 1995.32 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,NXE,LONG,LAHF
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: apic clock running at 166MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU T7200 @ 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF
cpu1: 4MB 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
acpimcfg0 at acpi0 addr 0xf000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
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 12 (EXP3)
acpiprt6 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpipwrres0 at acpi0: PUBS
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 100 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model 92P1139 serial  3681 type LION oem Panasonic
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 1995 MHz: speeds: 2000, 1667, 1333, 1000 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel 82945GM Host rev 0x03
ppb0 at pci0 dev 1 function 0 Intel 82945GM PCIE rev 0x03: msi
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 ATI Radeon Mobility X1400 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: apic 1 int 16
drm0 at radeondrm0

Re: (Kinda O.T.) Digital Millennium Copyright Act used to censor hardware specifications

2012-05-31 Thread Tim van der Molen
On Thu, 31 May 2012 17:12:58 +0200, Ted Unangst wrote:
 On Thu, May 31, 2012 at 11:11, Brett wrote:
 
  Pursuant to a rights owner notice under the Digital Millennium Copyright
  Act (DMCA), the Wikimedia Foundation acted under the law and took down and
  restricted the content in question. A copy of the received notice can be
 
  Reverse engineering necessary to have open source in the brave new world?
 
 PCI spec docs (and many others) are copyrighted.  Maybe they should be,
 maybe they shouldn't, but they are.
 
 As far as I know, the actual specs cannot be copyrighted (or it's
 murky), but knowing wikipedia, somebody probably copied an entire
 table from the doc and dropped it into the article.  that's a no-no,
 and not something I'd find nearly as alarming as censorship.

Actually, the crime consisted in linking to a few PDFs located
elsewhere. The last revision of the article to contain the links is:

http://en.wikipedia.org/w/index.php?title=Conventional_PCIoldid=405114605



Re: (Kinda O.T.) Digital Millennium Copyright Act used to censor hardware specifications

2012-05-31 Thread Theo de Raadt
Shame on you.

Don't you know that linking to links that link to links that have DCMA'd
is a crime?

Enjoy the bars.

 On Thu, 31 May 2012 17:12:58 +0200, Ted Unangst wrote:
  On Thu, May 31, 2012 at 11:11, Brett wrote:
  
   Pursuant to a rights owner notice under the Digital Millennium Copyright
   Act (DMCA), the Wikimedia Foundation acted under the law and took down and
   restricted the content in question. A copy of the received notice can be
  
   Reverse engineering necessary to have open source in the brave new world?
  
  PCI spec docs (and many others) are copyrighted.  Maybe they should be,
  maybe they shouldn't, but they are.
  
  As far as I know, the actual specs cannot be copyrighted (or it's
  murky), but knowing wikipedia, somebody probably copied an entire
  table from the doc and dropped it into the article.  that's a no-no,
  and not something I'd find nearly as alarming as censorship.
 
 Actually, the crime consisted in linking to a few PDFs located
 elsewhere. The last revision of the article to contain the links is:
 
 http://en.wikipedia.org/w/index.php?title=Conventional_PCIoldid=405114605



Re: spamd 250 messages

2012-05-31 Thread Kevin Chadwick
On Wed, 30 May 2012 13:00:45 -0400
Kurt Mosiejczuk wrote:

 That's also why spamd in greylisting stutters for the first 10 seconds. 
   Many spammers disconnect now when stuttered at, so they give up before 
 even starting the greylisting process.

It might be now. I believe the original reason was to tie up
more spammers resources than your own.



Re: spamd 250 messages

2012-05-31 Thread Kurt Mosiejczuk

Kevin Chadwick wrote:

On Wed, 30 May 2012 13:00:45 -0400
Kurt Mosiejczuk wrote:


That's also why spamd in greylisting stutters for the first 10 seconds. 
  Many spammers disconnect now when stuttered at, so they give up before 
even starting the greylisting process.



It might be now. I believe the original reason was to tie up
more spammers resources than your own.


That's why the blacklist mode stutters.  It's a tarpit.  Originally 
greylisting didn't stutter.


http://www.openbsd.org/papers/bsdcan05-spamd/

In particular, this slide:

http://www.openbsd.org/papers/bsdcan05-spamd/mgp00017.html

--Kurt



Re: spamd 250 messages

2012-05-31 Thread Theo de Raadt
 Kevin Chadwick wrote:
  On Wed, 30 May 2012 13:00:45 -0400
  Kurt Mosiejczuk wrote:
 
  That's also why spamd in greylisting stutters for the first 10 seconds. 
Many spammers disconnect now when stuttered at, so they give up before 
  even starting the greylisting process.
 
  It might be now. I believe the original reason was to tie up
  more spammers resources than your own.
 
 That's why the blacklist mode stutters.  It's a tarpit.  Originally 
 greylisting didn't stutter.
 
 http://www.openbsd.org/papers/bsdcan05-spamd/
 
 In particular, this slide:
 
 http://www.openbsd.org/papers/bsdcan05-spamd/mgp00017.html

It was discovered quite early on that spammers were using something like:

   write a line to the socket
   (wait up to 5 seconds for the response)
   (not finished yet?  give up - disconnect)

   (move on to the next target)



ifconfig bridge delete

2012-05-31 Thread Pieter Verberne

Hi,

$ sudo ifconfig bridge0 delete athn0
ifconfig: athn0: bad value
$ sudo ifconfig bridge0 del athn0
$

Uuhm?

Cheers,
 Pieter

OpenBSD 5.1 (GENERIC) #160: Sun Feb 12 09:46:33 MST 2012
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Geode(TM) Integrated Processor by AMD PCS (AuthenticAMD 
586-class) 500 MHz

cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX,MMXX,3DNOW2,3DNOW
real mem  = 536408064 (511MB)
avail mem = 517537792 (493MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 20/70/03, BIOS32 rev. 0 @ 0xfac40
pcibios0 at bios0: rev 2.0 @ 0xf/0x1
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc8000/0xa800
cpu0 at mainbus0: (uniprocessor)
amdmsr0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
io address conflict 0x6100/0x100
io address conflict 0x6200/0x200
pchb0 at pci0 dev 1 function 0 AMD Geode LX rev 0x33
glxsb0 at pci0 dev 1 function 2 AMD Geode LX Crypto rev 0x00: RNG AES
vr0 at pci0 dev 6 function 0 VIA VT6105M RhineIII rev 0x96: irq 11, 
address 00:00:24:cd:7d:f8
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
0x004063, model 0x0034
vr1 at pci0 dev 7 function 0 VIA VT6105M RhineIII rev 0x96: irq 5, 
address 00:00:24:cd:7d:f9
ukphy1 at vr1 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
0x004063, model 0x0034
vr2 at pci0 dev 8 function 0 VIA VT6105M RhineIII rev 0x96: irq 9, 
address 00:00:24:cd:7d:fa
ukphy2 at vr2 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
0x004063, model 0x0034
vr3 at pci0 dev 9 function 0 VIA VT6105M RhineIII rev 0x96: irq 12, 
address 00:00:24:cd:7d:fb
ukphy3 at vr3 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
0x004063, model 0x0034

athn0 at pci0 dev 17 function 0 Atheros AR9280 rev 0x01: irq 15
athn0: AR9280 rev 2 (2T2R), ROM rev 22, address 00:0c:42:66:5a:da
glxpcib0 at pci0 dev 20 function 0 AMD CS5536 ISA rev 0x03: rev 3, 
32-bit 3579545Hz timer, watchdog, gpio

gpio0 at glxpcib0: 32 pins
pciide0 at pci0 dev 20 function 2 AMD CS5536 IDE rev 0x01: DMA, 
channel 0 wired to compatibility, channel 1 wired to compatibility

wd0 at pciide0 channel 0 drive 1: WDC WD5000BPVT-24HXZT3
wd0: 16-sector PIO, LBA48, 476940MB, 976773168 sectors
wd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ohci0 at pci0 dev 21 function 0 AMD CS5536 USB rev 0x02: irq 7, 
version 1.0, legacy support

ehci0 at pci0 dev 21 function 1 AMD CS5536 USB rev 0x02: irq 7
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 AMD EHCI root hub rev 2.00/1.00 addr 1
isa0 at glxpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
nsclpcsio0 at isa0 port 0x2e/2: NSC PC87366 rev 9: GPIO VLM TMS
gpio1 at nsclpcsio0: 29 pins
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 AMD OHCI root hub rev 1.00/1.00 addr 1
mtrr: K6-family MTRR support (2 registers)
umass0 at uhub0 port 1 configuration 1 interface 0 JMicron USB to 
ATA/ATAPI Bridge rev 2.00/1.00 addr 2

umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: WDC WD32, 00AAJS-08B4A0, 3A01 SCSI2 
0/direct fixed serial.152d2338D577A4144203

sd0: 305245MB, 512 bytes/sector, 625142448 sectors
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on wd0a (8ffb259a89b69646.a) swap on wd0b dump on wd0b



Re: ifconfig bridge delete

2012-05-31 Thread Camiel Dobbelaar
On 31-5-2012 19:01, Pieter Verberne wrote:
 $ sudo ifconfig bridge0 delete athn0
 ifconfig: athn0: bad value
 $ sudo ifconfig bridge0 del athn0
 $

The manpage is wrong.  Only del works for the bridge.  delete is
used to remove an address from the interface.

Probably a remainder of the brconfig/ifconfig merge.

I'll prepare a diff for the manpage if nobody beats me to it.



Re: ifconfig bridge delete

2012-05-31 Thread Theo de Raadt
 $ sudo ifconfig bridge0 delete athn0
 ifconfig: athn0: bad value
 $ sudo ifconfig bridge0 del athn0
 $
 
 Uuhm?

This is an error in the manual page.

It came about due to the merge of brconfig(8) into ifconfig(8).  When
brconfig was a seperate program either delete if or del if
would do the same thing.

However in ifconfig, delete (noargs) has a different meaning: delete
the first IP address on the interface.  Hence, the first commandline
you entered is parsed as two commands: delete (with no argument), and
athn0.  athn0 is not a good command...

In the new world order where they are merged, the right command to issue
regarding the bridge is simply del if.

Index: ifconfig.8
===
RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
retrieving revision 1.227
diff -u -p -u -r1.227 ifconfig.8
--- ifconfig.8  18 Mar 2012 23:37:08 -  1.227
+++ ifconfig.8  31 May 2012 17:29:45 -
@@ -517,18 +517,15 @@ bridge member interfaces.
 Allow non-IPv4, IPv6, ARP, or Reverse ARP packets through
 .Ar interface .
 .It Cm del Ar interface
-Alias for
-.Cm delete .
-.It Cm deladdr Ar address
-Delete
-.Ar address
-from the cache.
-.It Cm delete Ar interface
 Remove
 .Ar interface
 from the bridge.
 Promiscuous mode is turned off for the interface when it is
 removed from the bridge.
+.It Cm deladdr Ar address
+Delete
+.Ar address
+from the cache.
 .It Cm delspan Ar interface
 Delete
 .Ar interface



Re: ACPI problems on a W500 thinkpad: software or hardware?

2012-05-31 Thread Erling Westenvik
Coming to think about it: a few months ago I had the same problem with
an old HP nc6210 laptop running 5.0 RELEASE. It would output similar
meaningless messages to console, complaining about temperatures close to
the surface of the Sun before panicking into deep ddb(4)-space..

At that point I assumed it to be some hardware issue and since the
machine just act as a mpd server hooked up to my hi-fi, I solved it by
taking out the battery and running apmd -C. To be honest I didn't have a
clue to why I did either, but the problem vanished.

-- 
Cheers,
Erling

  On 2012-05-30 05.19, STeve Andre' wrote:
   May 29 19:15:36 paladin /bsd: acpithinkpad0: unknown event 0x6022
   May 29 19:15:36 paladin /bsd: acpitz1: critical temperature exceeded
   100C (3732K), shutting down




Re: Idea for apmd

2012-05-31 Thread Juan Francisco Cantero Hurtado
On Thu, May 31, 2012 at 11:15:13AM -0400, Ted Unangst wrote:
 On Thu, May 31, 2012 at 08:28, Tomas Bodzar wrote:
  On Thu, May 31, 2012 at 3:45 AM, Juan Francisco Cantero Hurtado
  i...@juanfra.info wrote:
 
  This is important because when I open a web page with a lot of
  javascript, the browser is very slow. Also when I compile something with
  make -j1, apmd doesn't raise the speed of my CPU, I need use make
  -j4 for raising the cpu speed to 2700Mhz.
  
  What shows top, vmstat, systat about %sys, %usr, %idle during that
  time? Because you can have 800MHz of CPU, but %usr and/or %sys can be
  eg. only 20% so there's no reason to switch to higher frequency.
 
 apmd scaling works like crap with more than one cpu.  This was fixed,
 then unfixed, but you can get the code from cvs if you like.

Thanks for the info. I'll take a look.

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: Idea for apmd

2012-05-31 Thread Juan Francisco Cantero Hurtado
On Thu, May 31, 2012 at 08:28:34AM +0200, Tomas Bodzar wrote:
 On Thu, May 31, 2012 at 3:45 AM, Juan Francisco Cantero Hurtado
 i...@juanfra.info wrote:
  Hi. I've been using OpenBSD on my netbook daily for a few months. I was
  using apmd with the -C setting. My netbook is slow and the battery life
  is important, so 800Mhz (apmd -C) or 1600Mhz (apm -A) is not a big
  difference for me.
 
  Now I have a desktop computer with support for cpu speed scaling. In
  this case the options of apmd are very limited. If I use -A my cpu is
  always at 2700Mhz, wasting energy and heating my room (I live in the
  very sunny Extremadura :) ). If I use -C, apm rarely raises the speed
  and the cpu is almost always at 800Mhz.
 
  This is important because when I open a web page with a lot of
  javascript, the browser is very slow. Also when I compile something with
  make -j1, apmd doesn't raise the speed of my CPU, I need use make
  -j4 for raising the cpu speed to 2700Mhz.
 
 What shows top, vmstat, systat about %sys, %usr, %idle during that
 time? Because you can have 800MHz of CPU, but %usr and/or %sys can be
 eg. only 20% so there's no reason to switch to higher frequency.

I've been using top for to check %idle. The problem is that apmd
calculates the average idle. If your system has two cores, the first
with 98%idle and the second with 20%idle, apmd doesn't raise the cpu
speed.

Use limits less strict is the simplest workaround for me.

Cheers.

-- 
Juan Francisco Cantero Hurtado http://juanfra.info



Re: (Kinda O.T.) Digital Millennium Copyright Act used to censor hardware specifications

2012-05-31 Thread Tim van der Molen
On Thu, 31 May 2012 18:25:14 +0200, Theo de Raadt wrote:
 Shame on you.
 
 Don't you know that linking to links that link to links that have DCMA'd
 is a crime?
 
 Enjoy the bars.

I'm sure quoting mails that link to links that link to DCMA'd links is a
felony, too.

Perhaps we'll be sharing a cell.

  On Thu, 31 May 2012 17:12:58 +0200, Ted Unangst wrote:
   On Thu, May 31, 2012 at 11:11, Brett wrote:
   
Pursuant to a rights owner notice under the Digital Millennium Copyright
Act (DMCA), the Wikimedia Foundation acted under the law and took down 
and
restricted the content in question. A copy of the received notice can be
   
Reverse engineering necessary to have open source in the brave new 
world?
   
   PCI spec docs (and many others) are copyrighted.  Maybe they should be,
   maybe they shouldn't, but they are.
   
   As far as I know, the actual specs cannot be copyrighted (or it's
   murky), but knowing wikipedia, somebody probably copied an entire
   table from the doc and dropped it into the article.  that's a no-no,
   and not something I'd find nearly as alarming as censorship.
  
  Actually, the crime consisted in linking to a few PDFs located
  elsewhere. The last revision of the article to contain the links is:
  
  http://en.wikipedia.org/w/index.php?title=Conventional_PCIoldid=405114605



Re: Large scale DNS anycast setup: OpenBSD performance issues

2012-05-31 Thread Kostas Zorbadelos
David Diggles da...@elven.com.au writes:

 On Tue, May 29, 2012 at 01:44:51PM +0300, Kostas Zorbadelos wrote:
 Henning Brauer lists-open...@bsws.de writes:
 
  if it is really thread related and not sth small  stupid - try it.

 For testing purposes, do you have pf turned off, or a 1 line pf.conf, like:


pf is disabled during the tests.

 pass

 ?



Re: (Kinda O.T.) Digital Millennium Copyright Act used to censor hardware specifications

2012-05-31 Thread Peter Laufenberg
On Thu, May 31, 2012 at 11:11, Brett wrote:

 Pursuant to a rights owner notice under the Digital Millennium Copyright
 Act (DMCA), the Wikimedia Foundation acted under the law and took down and
 restricted the content in question. A copy of the received notice can be

 Reverse engineering necessary to have open source in the brave new world?

PCI spec docs (and many others) are copyrighted.  Maybe they should be,
maybe they shouldn't, but they are.

As far as I know, the actual specs cannot be copyrighted (or it's
murky), but knowing wikipedia, somebody probably copied an entire
table from the doc and dropped it into the article.  that's a no-no,
and not something I'd find nearly as alarming as censorship.

A DCMA notice is an improvement over the furious clean-up happening behind the 
scenes.

For example: search for CIPSO, a NetLabel protocol with an IETF RFC, the word 
appears 1263 times in Linux kernel 3.3. No Wikipedia entry but 
Linux_Security_Modules links to an ex-entry... without deletion log. Try the 
Multi ADM link on the same page: dead again, no deletion log. Hmm, the page 
was last edited yesterday. Date of its most recent reference? June 2010. Second 
most recent? 2006.

If you're lucky you can come across time travel pages: a days-old edit using 
future tense to refer to events years in the past.

Entrusting the very definition of reality to a bunch of LSD-dropping hippies is 
JUST NOT RESPONSIBLE :)

-- p



Re: Thinkpad T60 sticky touchpad (amd64/5.1-stable)

2012-05-31 Thread Peter Laufenberg
I have a Lenovo Thinkpad T60 amd64 laptop (dmesg below) running 5.1-stable
(fresh install of -release from the CD set, then CVS update to -stable).
The touchpad

  pms0 at pckbc0 (aux slot)
  wsmouse0 at pms0 mux 0
  wsmouse1 at pms0 mux 0
  pms0: Synaptics touchpad, firmware 6.2

has an irritating problem in 5.1 (which was *not* present on this same
machine when running 5.0-{release,stable} with X video acceleration
disabled):  When running X (autoconfigured with no xorg.conf), the
pointer will intermittently jump to and stick at either the left side
of the screen, the top of the screen, or the top left corner.
(snip)

Has anyone else seen this sticky touchpad problem?

I've had problems with a synaptics touchpad + USB laser mouse but wasn't using 
the touchpad at all. It wasn't stick-related, possibly not X-related, the mouse 
would connect/disconnect randomly but it's an old laptop so it's possible the 
mouse was just drawing too much power. I haven't investigated the issue further 
yet.

-- p



Re: (Kinda O.T.) Digital Millennium Copyright Act used to censor hardware specifications

2012-05-31 Thread Theo de Raadt
 On Thu, 31 May 2012 18:25:14 +0200, Theo de Raadt wrote:
  Shame on you.
  
  Don't you know that linking to links that link to links that have DCMA'd
  is a crime?
  
  Enjoy the bars.
 
 I'm sure quoting mails that link to links that link to DCMA'd links is a
 felony, too.
 
 Perhaps we'll be sharing a cell.

Probably.  But you'll be serving two terms, and I only one.

   On Thu, 31 May 2012 17:12:58 +0200, Ted Unangst wrote:
On Thu, May 31, 2012 at 11:11, Brett wrote:

 Pursuant to a rights owner notice under the Digital Millennium 
 Copyright
 Act (DMCA), the Wikimedia Foundation acted under the law and took 
 down and
 restricted the content in question. A copy of the received notice can 
 be

 Reverse engineering necessary to have open source in the brave new 
 world?

PCI spec docs (and many others) are copyrighted.  Maybe they should be,
maybe they shouldn't, but they are.

As far as I know, the actual specs cannot be copyrighted (or it's
murky), but knowing wikipedia, somebody probably copied an entire
table from the doc and dropped it into the article.  that's a no-no,
and not something I'd find nearly as alarming as censorship.
   
   Actually, the crime consisted in linking to a few PDFs located
   elsewhere. The last revision of the article to contain the links is:
   
   [LINK DELETED]



Re: OpenBSD in April's issue of the CACM

2012-05-31 Thread Kostas Zorbadelos
Theo de Raadt dera...@cvs.openbsd.org writes:

 If you are not a member of the ACM, you can read it in ACM
 Queue, in which it
 was published in January:
 http://queue.acm.org/detail.cfm?id=2090149

 Yes, and people can even comment there, too.  Looks like a few already
 have.  However, it is unlikely that the ACM staff will read those
 comments unless this is brought to their attention,

My ACM subcription ended a few months ago without renewing. I had seen
the article on Queue and fortunately I used the correct link in the
comments ;-)
If I still had a subscription and saw this article on CACM, I would be
really annoyed. Having an article on a personal space on a web site is
not (in my opinion) the same as a written article in the official
membership magazine of ACM. 
I would definitely like to write them about it in complain, but I
certainly am not qualified to talk about the issue. The voice of the
main developers or OpenBSD project's representatives is much stronger
and authoritative. 

Regards,
Kostas



Re: (Kinda O.T.) Digital Millennium Copyright Act used to censor hardware specifications

2012-05-31 Thread Tim van der Molen
On Thu, 31 May 2012 21:19:23 +0200, Theo de Raadt wrote:
  On Thu, 31 May 2012 18:25:14 +0200, Theo de Raadt wrote:
   Shame on you.
   
   Don't you know that linking to links that link to links that have DCMA'd
   is a crime?
   
   Enjoy the bars.
  
  I'm sure quoting mails that link to links that link to DCMA'd links is a
  felony, too.
  
  Perhaps we'll be sharing a cell.
 
 Probably.  But you'll be serving two terms, and I only one.

Very clever. But those who give up their right to link to DCMA'd links
for a little more liberty deserve neither. Or something very close to
that.

On Thu, 31 May 2012 17:12:58 +0200, Ted Unangst wrote:
 On Thu, May 31, 2012 at 11:11, Brett wrote:
 
  Pursuant to a rights owner notice under the Digital Millennium 
  Copyright
  Act (DMCA), the Wikimedia Foundation acted under the law and took 
  down and
  restricted the content in question. A copy of the received notice 
  can be
 
  Reverse engineering necessary to have open source in the brave new 
  world?
 
 PCI spec docs (and many others) are copyrighted.  Maybe they should 
 be,
 maybe they shouldn't, but they are.
 
 As far as I know, the actual specs cannot be copyrighted (or it's
 murky), but knowing wikipedia, somebody probably copied an entire
 table from the doc and dropped it into the article.  that's a no-no,
 and not something I'd find nearly as alarming as censorship.

Actually, the crime consisted in linking to a few PDFs located
elsewhere. The last revision of the article to contain the links is:

[LINK DELETED]



Re: Tuning for pppoe over fibre 30M/1M link

2012-05-31 Thread David Diggles
FYI I have now run the same pppoe(4) download test on core2duo with OpenBSD 5.1,
on em0 interface.  It beats the Mac.

Mac G5 dual core 2GHz
3MB/s
Intel core2duo 3GHz OpenBSD i386
3.44MB/s

I have found on the Geode 300MHz, cleaning up the pf.conf, removing
modulate state, and no-df from scrub improves the throughput to:
1.8MB/s.

I ordered an Atom with 3 Intel NICs, just arrived!

Looking forward to testing it out.

The test I am doing is

ftp -o /dev/null http://mirror.internode.on.net/pub/OpenBSD/5.1/src.tar.gz

Internode is my ISP.

On Mon, May 28, 2012 at 05:07:01PM +0200, Andre Keller wrote:
 Am 28.05.2012 15:26, schrieb David Diggles:
  Maybe I should try some of the kernel tuning suggested on calomel.
 
 I would not even visit that site... It's mostly a waste of time as most
 of the tunings are not up-to-date or just plain wrong. OpenBSD ships
 with pretty sane defaults that normally do not need any tweaking unless
 you run some unorthodox configuration. If you need to tweak something
 look into the faq and the sysctl(3) man page and not to calomel.org
 
 
 Could you please be a bit more specific about your setup?
 
 Are you using pppoe(4) or pppoe(8)?
 
 Do you see maxed out mbufs (netstat -m), a very high interrupt load (top
 / vmstat -i), ifq drops (sysctl net.inet.ip.ifq.drops), interface errors
 (netstat -i)?
 
 I'm running pppoe(4) on a lot of Geode 500MHz powered boxes and have no
 problem getting 30Mbit/s throughput of unencrypted traffic...
 
 
 
 g
 Andri



Re: OpenBSD in April's issue of the CACM

2012-05-31 Thread Martin Schröder
2012/5/31 Kostas Zorbadelos kzo...@otenet.gr:
 I would definitely like to write them about it in complain, but I
 certainly am not qualified to talk about the issue. The voice of the
 main developers or OpenBSD project's representatives is much stronger
 and authoritative.

Theo is already discussing the article in the comments forum - much
better than I could.

The author did not get elected as treasurer of ACM, but is still an
editor of Queue. :-(

Best
   Martin



announce: C Conference CFP closing June 7th

2012-05-31 Thread Brandon Philips
The first ever C Conference is happening August 28th, 2012 in San
Diego, CA. The target audience are people who implement systems in C.
Whether that be new languages, libraries, kernels, daemons or games.

A reverse call for papers is up and closes June 7th. Submit talks you
would like to give or talks you want to see given. Either way!

Early bird tickets are available for $225. If you plan to attend
LinuxCon/CloudOpen the following day you can get a package with C Conf
and LinuxCon/CloudOpen for $520 (LinuxCon/CloudOpen are $500 alone).

http://cconf.org

Hope to see you there. Email me if you have any questions!

Brandon



Re: (Kinda O.T.) Digital Millennium Copyright Act used to censor hardware specifications

2012-05-31 Thread Theo de Raadt
 Very clever. But those who give up their right to link to DCMA'd links
 for a little more liberty deserve neither. Or something very close to
 that.

Most of those falling into that trap are Americans, so they don't
know where you are coming from.



Re: Tuning for pppoe over fibre 30M/1M link

2012-05-31 Thread Bentley, Dain
You'll find the atom performance is good. I have an atom 330 with 2 gigs of
RAM and dual on board NICs with another PCI NIC and it runs great. I also have
openvpn in bridge mode and squid running and no hiccups ar all.

Regards,
Dain Bentley

-Original Message-
From: David Diggles [da...@elven.com.au]
Received: Thursday, 31 May 2012, 4:51pm
To: misc@openbsd.org [misc@openbsd.org]
Subject: Re: Tuning for pppoe over fibre 30M/1M link

FYI I have now run the same pppoe(4) download test on core2duo with OpenBSD
5.1,
on em0 interface.  It beats the Mac.

Mac G5 dual core 2GHz
3MB/s
Intel core2duo 3GHz OpenBSD i386
3.44MB/s

I have found on the Geode 300MHz, cleaning up the pf.conf, removing
modulate state, and no-df from scrub improves the throughput to:
1.8MB/s.

I ordered an Atom with 3 Intel NICs, just arrived!

Looking forward to testing it out.

The test I am doing is

ftp -o /dev/null http://mirror.internode.on.net/pub/OpenBSD/5.1/src.tar.gz

Internode is my ISP.

On Mon, May 28, 2012 at 05:07:01PM +0200, Andre Keller wrote:
 Am 28.05.2012 15:26, schrieb David Diggles:
  Maybe I should try some of the kernel tuning suggested on calomel.

 I would not even visit that site... It's mostly a waste of time as most
 of the tunings are not up-to-date or just plain wrong. OpenBSD ships
 with pretty sane defaults that normally do not need any tweaking unless
 you run some unorthodox configuration. If you need to tweak something
 look into the faq and the sysctl(3) man page and not to calomel.org


 Could you please be a bit more specific about your setup?

 Are you using pppoe(4) or pppoe(8)?

 Do you see maxed out mbufs (netstat -m), a very high interrupt load (top
 / vmstat -i), ifq drops (sysctl net.inet.ip.ifq.drops), interface errors
 (netstat -i)?

 I'm running pppoe(4) on a lot of Geode 500MHz powered boxes and have no
 problem getting 30Mbit/s throughput of unencrypted traffic...



 g
 Andri



Re: Idea for apmd

2012-05-31 Thread Stuart Henderson
On 2012-05-31, Ted Unangst t...@tedunangst.com wrote:
 On Thu, May 31, 2012 at 08:28, Tomas Bodzar wrote:
 On Thu, May 31, 2012 at 3:45 AM, Juan Francisco Cantero Hurtado
 i...@juanfra.info wrote:

 This is important because when I open a web page with a lot of
 javascript, the browser is very slow. Also when I compile something with
 make -j1, apmd doesn't raise the speed of my CPU, I need use make
 -j4 for raising the cpu speed to 2700Mhz.
 
 What shows top, vmstat, systat about %sys, %usr, %idle during that
 time? Because you can have 800MHz of CPU, but %usr and/or %sys can be
 eg. only 20% so there's no reason to switch to higher frequency.

 apmd scaling works like crap with more than one cpu.  This was fixed,
 then unfixed, but you can get the code from cvs if you like.



conflicts. if anyone wants it they could grab it from junkpile.org/apmd.diff 



Morto worm seems to be back

2012-05-31 Thread Geir Svalland
Hello

ofc off topic but maybe of interest to some.

Apparently affecting Windows 2003 and possibly 2008

 

An old friend seems to have made his way back. The worm Morto spreading
via RDP

http://www.precisesecurity.com/worms/w32-morto

 

Last 2 days I've seen a huge increase of probes on my port 3389 coming
mostly from Europa.

Anyone else noticed ?

 

23:02:22.730299 rule 4/(match) block in on fxp0: 62.20.45.114.3215 
83.227.225.121.3389: S 98958501:98958501(0) win 65535 mss
1460,nop,nop,sackOK (DF) [tos 0x20]

 

/Hasse



Unresponsive -current + rtorrent

2012-05-31 Thread Daniel Bolgheroni
Hi misc@,

Running the latest snapshot, there are some issues I'm facing when I run
rtorrent + ~5 downloads.

The system becomes VERY unresponsive, varying between 5 seconds of activity
and 10 seconds locked.

Before this, had 2 complete locks, and did a cold reboot. No serial to
try something, nor a second computer atm either.

Running top, I see that sometimes CPU for rtorrent goes to more than
200%. Running systat, the interrupts maintain its pace, but at the
boundaries of the 10 sec locks,  I can see 'ipi' going to something around
100 (1 million).

Didn't find what ipi means. A 'man -k' gives me ipic.

Thoughts?
Thank you.

OpenBSD 5.1-current (GENERIC.MP) #302: Fri May 25 19:24:55 MDT 2012
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2110390272 (2012MB)
avail mem = 2031915008 (1937MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xfc480 (33 entries)
bios0: vendor American Megatrends Inc. version 200.T02 date 10/26/2010
bios0: POSITIVO POSITIVO MOBILE
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG SLIC ECDT DBGP BOOT OEMB HPET GSCI ATKG SSDT
acpi0: wakeup devices USB0(S3) USB1(S3) USB2(S3) USB5(S3) EUSB(S3) USB3(S3) 
USB4(S3) USB6(S3) USBE(S3) HDAC(S3) P0P1(S4) P0P2(S3) P0P3(S3) WLAN(S3) 
P0P4(S3) P0P7(S4) GLAN(S4) P0P8(S3) SLPB(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Pentium(R) Dual-Core CPU T4500 @ 2.30GHz, 2300.43 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,XSAVE,NXE,LONG,LAHF
cpu0: 1MB 64b/line 4-way L2 cache
cpu0: apic clock running at 200MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Pentium(R) Dual-Core CPU T4500 @ 2.30GHz, 2300.08 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,XSAVE,NXE,LONG,LAHF
cpu1: 1MB 64b/line 4-way L2 cache
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpiec0 at acpi0
acpihpet0 at acpi0: 14318179 Hz
uvm_km_kmem_grow: grown to 0x8001
acpi0: unable to load \\_SB_.PCI0._INI.USBT
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 1 (P0P2)
acpiprt3 at acpi0: bus 2 (P0P3)
acpiprt4 at acpi0: bus 3 (P0P4)
acpiprt5 at acpi0: bus 5 (P0P7)
acpicpu0 at acpi0: C2, C1, PSS
acpicpu1 at acpi0: C2, C1, PSS
acpitz0 at acpi0acpitz0: THRM: failed to read _CRT
: no critical temperature defined
acpiac0 at acpi0: AC unit in unknown state
acpibat0 at acpi0: BAT0 not present
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: LID_
acpivideo0 at acpi0: VGA_
acpivout0 at acpivideo0: LCDD
acpivideo1 at acpi0: VGA_
cpu0: Enhanced SpeedStep 2300 MHz: speeds: 2300, 1600, 1200 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel GM45 Host rev 0x09
vga1 at pci0 dev 2 function 0 Intel GM45 Video rev 0x09
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 0xd000, size 0x1000
inteldrm0 at vga1: apic 2 int 16
drm0 at inteldrm0
Intel GM45 Video rev 0x09 at pci0 dev 2 function 1 not configured
uhci0 at pci0 dev 26 function 0 Intel 82801I USB rev 0x03: apic 2 int 16
uhci1 at pci0 dev 26 function 1 Intel 82801I USB rev 0x03: apic 2 int 17
uhci2 at pci0 dev 26 function 2 Intel 82801I USB rev 0x03: apic 2 int 19
ehci0 at pci0 dev 26 function 7 Intel 82801I USB rev 0x03: apic 2 int 18
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 Intel 82801I HD Audio rev 0x03: msi
azalia0: codecs: Realtek ALC269, Intel/0x2802, using Realtek ALC269
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 Intel 82801I PCIE rev 0x03: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 1 Intel 82801I PCIE rev 0x03: msi
pci2 at ppb1 bus 2
athn0 at pci2 dev 0 function 0 Atheros AR2427 rev 0x01: apic 2 int 17
athn0: AR9285 rev 2 (1T1R), ROM rev 13, address 48:5d:60:a2:e0:6a
ppb2 at pci0 dev 28 function 2 Intel 82801I PCIE rev 0x03: msi
pci3 at ppb2 bus 3
ppb3 at pci0 dev 28 function 5 Intel 82801I PCIE rev 0x03: msi
pci4 at ppb3 bus 5
re0 at pci4 dev 0 function 0 Realtek 8168 rev 0x03: RTL8168D/8111D (0x2800), 
apic 2 int 17, address e0:69:95:a1:cb:1b
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
uhci3 at pci0 dev 29 function 0 Intel 82801I USB rev 0x03: apic 2 int 23
uhci4 at pci0 dev 29 function 1 Intel 82801I USB rev 0x03: apic 2 int 19
uhci5 at pci0 dev 29 function 2 Intel 82801I USB rev 0x03: apic 2 int 18
ehci1 at pci0 dev 29 function 7 Intel 82801I USB rev 0x03: apic 2 int 23
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb4 at pci0 

ipsec routing dinamic ip over adsl

2012-05-31 Thread carlos albino garcia grijalba
hi folksi have the following problemremote office connect to my vpn server in
order to connect to the internals over the ipsec tunnel the office has ip
phonesto connect to call manager over the 192.168.0.0/16 the ip phone
192.168.30.2/28 so the ip phone connect correct but thereis another ip client
a watch the people wants to excract info from the watch who is over the net
172.1.100.1 th PC that whants to connect to runs over the 10.0.0.89 but i can
reach the watch and the watch can not ping over the 172 address space the
clientit is a cisco router over ADSL line so DInamic public IP is
on172.1.100.1 --X192.168.30.2--OKvpn openbsd server ipsec.confike passive esp
from any to {192.168.0.0/16, 10.0.0.0/16, 172.1.0.0/16} peer any \main auth
hmac-sha1 enc aes-128 group modp1024 \quick auth hmac-sha1 enc aes-128 psk
1234ABC3344ike passive from {192.168.0.0/16, 10.0.0.0/16, 172.1.0.0/16} to any
\main auth hmac-sha1 enc aes-128 group modp1024 \quick auth hmac-sha1 enc
aes-128 psk 1234ABC3344ipsecctl -sallFLOWS:flow esp in from 192.168.30.0/28 to
192.168.0.0/16 peer 187.131.59.237 srcid x.x.x.x/32 dstid 187.131.59.237/32
type useflow esp out from 192.168.0.0/16 to 192.168.30.0/28 peer
187.131.59.237 srcid x.x.x.x/32 dstid 187.131.59.237/32 type requireSAD:esp
tunnel from 187.131.59.237 to x.x.x.x spi 0x4a135abc auth hmac-sha1 enc aesesp
tunnel from x.x.x.x to 187.131.59.237 spi 0x96591035 auth hmac-sha1 enc
aesifconfigbge0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
lladdr 00:11:85:f1:cb:6bpriority: 0groups: egress
media: Ethernet autoselect (1000baseT full-duplex)status: active
inet x.x.x.x netmask 0xff00 broadcast 148.235.89.255inet6
fe80::211:85ff:fef1:cb6b%bge0 prefixlen 64 scopeid 0x1re0:
flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500lladdr
00:22:6b:bd:8a:1epriority: 0media: Ethernet autoselect
(1000baseT full-duplex)status: activeinet 10.0.0.1 netmask
0xff00 broadcast 10.0.0.255inet6 fe80::222:6bff:febd:8a1e%re0
prefixlen 64 scopeid 0x2rl0:
flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500lladdr
00:50:bf:05:3f:6bpriority: 0media: Ethernet autoselect
(100baseTX full-duplex)status: activeinet 192.168.100.210
netmask 0xff00 broadcast 192.168.100.255inet6
fe80::250:bfff:fe05:3f6b%rl0 prefixlen 64 scopeid 0x3enc0: flags=0
priority: 0groups: encstatus: activenetstat -nf -f
encapRouting tablesEncap:Source Port  DestinationPort
Proto SA(Address/Proto/Type/Direction)192.168.30.0/280 192.168/16
0 0 187.131.59.237/esp/use/in192.168/16 0 192.168.30.0/28
0 0 187.131.59.237/esp/require/outany ideas?



Re: Unresponsive -current + rtorrent

2012-05-31 Thread Brett
On Thu, 31 May 2012 23:47:31 -0300
Daniel Bolgheroni dbolgher...@devio.us wrote:

 Hi misc@,
 
 Running the latest snapshot, there are some issues I'm facing when I run
 rtorrent + ~5 downloads.
 
 The system becomes VERY unresponsive, varying between 5 seconds of activity
 and 10 seconds locked.
 
 Before this, had 2 complete locks, and did a cold reboot. No serial to
 try something, nor a second computer atm either.
 
 Running top, I see that sometimes CPU for rtorrent goes to more than
 200%. Running systat, the interrupts maintain its pace, but at the
 boundaries of the 10 sec locks,  I can see 'ipi' going to something around
 100 (1 million).
 
 Didn't find what ipi means. A 'man -k' gives me ipic.
 
 Thoughts?
 Thank you.
 


Before the version now in ports was committed I noticed that rtorrent would 
become unresponsive for 5-10 seconds when using the arrow navigation keys, see: 
http://marc.info/?l=openbsd-portsm=133531038607123w=2

Since reporting this, I realised that this only would happen if I had about 
9-10 torrents available for seeding and/or downloading at once (it would still 
happen even if there was no network activity occurring). I didn't notice any 
undue CPU load. My overall system is fine, just rtorrent that becomes sluggish.

The old version could cope with these numbers no problem.

I don't have a solution, except to only run the amount of torrents your machine 
can handle (5 or 6 is ok for my computer). Since rtorrent is normally very 
lightweight it should be able to cope with a lot more than it currently can.

PS this thread should probably have been on ports@. 



Re: Unresponsive -current + rtorrent

2012-05-31 Thread Daniel Bolgheroni
On Fri, Jun 01, 2012 at 01:15:19PM +1000, Brett wrote:

 I don't have a solution, except to only run the amount of torrents your 
 machine can handle (5 or 6 is ok for my computer). Since rtorrent is normally 
 very lightweight it should be able to cope with a lot more than it currently 
 can.

There is a kryptonite. If I run audio/cplay also (sndio?), the system
completely freezes.

 PS this thread should probably have been on ports@. 

Maybe, but because it probably exposes something that is system related,
I thought it could be posted here.

Thank you.



xidle(1) not working well

2012-05-31 Thread Robert Connolly
Hello.

I am having problems with xidle(1)...

This command does nothing.. xlock doesn't run after 5 seconds, or minutes:
xidle -program /usr/X11R6/bin/xlock -timeout 5
unless I put my mouse cursor in the NW corner.

xidle -delay 5 -sw -program /usr/X11R6/bin/xlock -timeout 10
This command also does nothing, unless I put the mouse cursor in the SW
corner.

For fun I tried using -area 500 and -area 5000, and xlock would work once
and only once.

I would like xidle to trigger when the cursor and keyboard are idle in any
position.



Re: Laptop lid closing script

2012-05-31 Thread Robert Connolly
I am favoring this approach, to use idle events to do apm -C and turn off
the monitor, and run a locking screensaver when the system suspends.

Thanks

On Thu, May 31, 2012 at 12:03 AM, David Coppa dco...@gmail.com wrote:

 On Thu, May 31, 2012 at 7:37 AM, Jan Stary h...@stare.cz wrote:
  On May 30 20:15:42, Robert Connolly wrote:
  Hello.
 
  Is there any way to configure an ACPI event, such as closing the lid of
 a
  laptop, to run a script, like 'apm -C' and screensaver?
  apm(8) and sensorsd(8) don't seem to do anything like this.
 
  Not exactly hooked to a lid close but to a suspend
  (which happens on lid close if machdep.lidsuspend=1)
  - see apm(8) mentioning /etc/apm/suspend.

 I have this in my ~/.xinitrc:

 xidle -area 1 -delay 10800 -program /usr/X11R6/bin/xlock -mode blank 

 And then in /etc/apm/suspend:

 ---8---

 #!/bin/sh
 pkill -30 -x xidle

 ---8---

 Cheers!
 David



Re: spamd-setup fails from cron

2012-05-31 Thread David Diggles
On Tue, May 29, 2012 at 09:51:54AM +0200, Bret Lambert wrote:
  Please avoid 15 minutes past the hour ;-)
 
 sleep $(($RANDOM % 2048))  /usr/libexec/spamd-setup -d

Tried something like the above, and found it still
fails at peak times, so I am trying something else:

I made a wrapper called ss (spamd sync), to keep
retrying within a diminishing timeframe.

#!/bin/sh
remaining=$1;shift
cmd=$@
lock=/var/run/$(basename $1).lock
[ -f $lock ] || {
  touch $lock
  while [ $remaining -gt 0 ]; do
seconds=$(($RANDOM % $remaining))
echo $(date) $seconds  $lock
sleep $s
$cmd  return || remaining=$(($remaining - $seconds))
  done
  rm $lock
}

0 * * * * ss 3600 /usr/libexec/spamd-setup -d

The time overhead of running the command creates a small
possibility for overlapping of cron events, so I created
a lock file.  This also seemed a good place to store the
sleep value(s).

/var/run/spamd-setup.lock

spamd-setup(8) does not say how it behaves when daemonized.
Maybe this is a better option than running from the cron?

.d.d.