How to check Health Information of SMART on an NVME disk?

2024-02-15 Thread Mikolaj Kucharski
Hi all,

I'm running -current

OpenBSD 7.4-current (GENERIC.MP) #1626: Thu Jan 25 20:05:01 MST 2024
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

I'm wondering what are the options to monitor NVME wear.

When I try to check via smartctl, I get this:

> # smartctl -a /dev/sd0c
> smartctl 7.4 2023-08-01 r5530 [OpenBSD 7.4 amd64] (local build)
> Copyright (C) 2002-23, Bruce Allen, Christian Franke,
> www.smartmontools.org
> 
> === START OF INFORMATION SECTION ===
> Vendor:   NVMe
> Product:  SAMSUNG MZVL22T0
> Revision: AL2Q
> Compliance:   SPC-4
> User Capacity:2,048,408,248,320 bytes [2.04 TB]
> Logical block size:   512 bytes
> >> Terminate command early due to bad response to IEC mode page
> A mandatory SMART command failed: exiting. To continue, add one or more
> '-T permissive' options.

However with -T option, it's not really better:

> # smartctl -T permissive -a /dev/sd0c
> smartctl 7.4 2023-08-01 r5530 [OpenBSD 7.4 amd64] (local build)
> Copyright (C) 2002-23, Bruce Allen, Christian Franke,
> www.smartmontools.org
> 
> === START OF INFORMATION SECTION ===
> Vendor:   NVMe
> Product:  SAMSUNG MZVL22T0
> Revision: AL2Q
> Compliance:   SPC-4
> User Capacity:2,048,408,248,320 bytes [2.04 TB]
> Logical block size:   512 bytes
> >> Terminate command early due to bad response to IEC mode page
> query_cmd_support response too short
> 
> === START OF READ SMART DATA SECTION ===
> Current Drive Temperature: 0 C
> Drive Trip Temperature:0 C
> 
> Read defect list: asked for grown list but didn't get it
> Error Counter logging not supported
> 
> Device does not support Self Test logging

Any clue what would be the best way to read for example:

- Critical Warning
- Available Spare
- Media and Data Integrity Errors
- Error Information Log Entries

from Health Information of SMART?


OpenBSD 7.4-current (GENERIC.MP) #1626: Thu Jan 25 20:05:01 MST 2024
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 34036183040 (32459MB)
avail mem = 32983470080 (31455MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.2 @ 0x900b (76 entries)
bios0: vendor LENOVO version "N32ET75W (1.51 )" date 12/02/2021
bios0: LENOVO 20XWCTO1WW
efi0 at bios0: UEFI 2.7
efi0: Lenovo rev 0x1510
acpi0 at bios0: ACPI 6.1
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT SSDT SSDT SSDT TPM2 SSDT ECDT HPET APIC SSDT SSDT 
SSDT NHLT SSDT SSDT SSDT LPIT WSMT SSDT DBGP DBG2 POAT SSDT BATB MCFG SSDT ASF! 
BGRT PTDT UEFI FPDT
acpi0: wakeup devices PEG0(S4) PEGP(S4) PEGP(S4) PEGP(S4) XHCI(S3) XDCI(S4) 
HDAS(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) 
PXSX(S4) RP05(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpihpet0 at acpi0: 1920 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz, 2893.33 MHz, 06-8c-01, 
patch 00b4
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,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,AVX512F,AVX512DQ,RDSEED,ADX,SMAP,AVX512IFMA,CLFLUSHOPT,CLWB,PT,AVX512CD,SHA,AVX512BW,AVX512VL,AVX512VBMI,UMIP,PKU,SRBDS_CTRL,MD_CLEAR,IBT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,IBRS_ALL,SKIP_L1DFL,MDS_NO,IF_PSCHANGE,MISC_PKG_CT,ENERGY_FILT,DOITM,FBSDP_NO,GDS_CTRL,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu0: 48KB 64b/line 12-way D-cache, 32KB 64b/line 8-way I-cache, 1MB 64b/line 
20-way L2 cache, 12MB 64b/line 12-way L3 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 38MHz
cpu0: mwait min=64, max=64, C-substates=0.2.0.1.2.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz, 2893.34 MHz, 06-8c-01, 
patch 00b4
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,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,AVX512F,AVX512DQ,RDSEED,ADX,SMAP,AVX512IFMA,CLFLUSHOPT,CLWB,PT,AVX512CD,SHA,AVX512BW,AVX512VL,AVX512VBMI,UMIP,PKU,SRBDS_CTRL,MD_CLEAR,IBT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,IBRS_ALL,SKIP_L1DFL,MDS_NO,IF_PSCHANGE,MISC_PKG_CT,ENERGY_FILT,DOITM,FBSDP_NO,GDS_CTRL,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu1: 48KB 64b/line 12-way D-cache, 32KB 

Re: Does Lenovo X13s runs on -current? 2022q4

2022-11-27 Thread Mikolaj Kucharski
I tried again, without full disk encryption and it works. System booted
properly to a console login prompt.

On Sun, Nov 27, 2022 at 08:40:57PM +, Mikolaj Kucharski wrote:
> Hi,
> 
> I was able to go through installer on today's arm64 snapshot with full
> disk encryption setup. With some manual `sh MAKEDEV sd0 sd1` during the
> installer I managed to install, but then after first boot passphrase and
> boot> prompt I see
> 
> booting sr0a:/bsd: 9769...
> FACP CSRT DBG2 GTDT IORT APIC MCFG PPTT SPCR TPM2 MSDM BGRT
> 
> and then nothing happens. BOOTAA64 1.13. Above is retyped, so there
> could be typos.
> 
> I disabled secure boot, that is the only change in BIOS I did so far.
> 
> Any tips?
> 
> Please CC me in any replies.
> 

-- 
Regards,
 Mikolaj



Does Lenovo X13s runs on -current? 2022q4

2022-11-27 Thread Mikolaj Kucharski
Hi,

I was able to go through installer on today's arm64 snapshot with full
disk encryption setup. With some manual `sh MAKEDEV sd0 sd1` during the
installer I managed to install, but then after first boot passphrase and
boot> prompt I see

booting sr0a:/bsd: 9769...
FACP CSRT DBG2 GTDT IORT APIC MCFG PPTT SPCR TPM2 MSDM BGRT

and then nothing happens. BOOTAA64 1.13. Above is retyped, so there
could be typos.

I disabled secure boot, that is the only change in BIOS I did so far.

Any tips?

Please CC me in any replies.

-- 
Regards,
 Mikolaj



Re: PC Engines APU alternative for OpenBSD - 2022h2

2022-11-26 Thread Mikolaj Kucharski
On Thu, Nov 24, 2022 at 08:50:53PM +0100, Jan Stary wrote:
> On Nov 24 17:01:55, miko...@kucharski.name wrote:
> > On Wed, Sep 28, 2022 at 04:50:39PM +0100, Stuart Henderson wrote:
> > > On 2022-09-28, Mikolaj Kucharski  wrote:
> > > > I'm looking for something similar like PC Engines APU board. Preferably
> > > > 4 network cards, 4GB of RAM, low power consumption, no graphic card,
> > > > serial console access, suitable for wired and Wi-Fi and/or LTE router,
> > > > based on OpenBSD.
> 
> Doesn't PC Engines itself have a model like that?
> 

PC Engines are / were not available for many months now. That is why I
started looking for alternatives.

I already bought few, as they have some models available again. Probably
not for too long.

However in long run, I would like to have some alternative :|

-- 
Regards,
 Mikolaj



Re: PC Engines APU alternative for OpenBSD - 2022h2

2022-11-24 Thread Mikolaj Kucharski
On Wed, Sep 28, 2022 at 04:50:39PM +0100, Stuart Henderson wrote:
> On 2022-09-28, Mikolaj Kucharski  wrote:
> > I'm looking for something similar like PC Engines APU board. Preferably
> > 4 network cards, 4GB of RAM, low power consumption, no graphic card,
> > serial console access, suitable for wired and Wi-Fi and/or LTE router,
> > based on OpenBSD.
> 
> Search with keywords like "mini pc router", "pfsense router" etc,
> you will find a load of boxes along these lines (to pick the first
> one I found, there are loads of choices of all very similar hardware)
> - https://www.aliexpress.com/item/1005004420642522.html?
> They do have video out as well but you can just configure OpenBSD
> to use serial console.

Seeing recent issues with buggy BIOSes I wanted to avoid mini pc hunting
on Aliexpress :/


> Now that the 1G em(4) chips are out of stock everywhere, the common
> NICs these days are igc(4) 2.5G ethernet (very common, to the extent that
> "I225" will probably also do as a search term ..).
> 

-- 
Regards,
 Mikolaj



PC Engines APU alternative for OpenBSD - 2022h2

2022-09-28 Thread Mikolaj Kucharski
Hi,

I'm using PC Engines for years. I have many of them. I want to buy more,
but they are not available on their main web site. I'm still planning to
buy them the moment they will show up on https://www.pcengines.ch/order.htm

However, after many weeks of waiting, I finally reached a point, when I
need to look for alternatives, as few of my hobbyist projects and plans
are on-hold for too long.

I'm looking for something similar like PC Engines APU board. Preferably
4 network cards, 4GB of RAM, low power consumption, no graphic card,
serial console access, suitable for wired and Wi-Fi and/or LTE router,
based on OpenBSD.

To give you an example, I have or had in the past, PC Engines with
OpenBSD as:

- plain simple Ethernet router
- fiber + Ethernet router
- Wi-Fi access point via Ethernet uplink
- Wi-Fi access point via LTE modem uplink
- WireGuard, OpenVPN endpoint
- DNS, DHCP, TFTP and PXE server
- print server and scanner via CUPS and SANE
- HTTP server, plus some automation daemons

Very typical stuff, nothing unusual I would say. I usually duplicate
above setups in various locations, like family house, relatives, and my
own place, but.. I run out of simple and reliable hardware to run it on,
hence this post. I don't want to run full blown PC, because of
electricity consumption and graphic card. In case of kernel panic() I
want to have a system with serial console, by design on motherboard,
not something additional.

>From architecture perspective I think most practical is amd64, but maybe
well supported arm64 would do. If you want to put RPi in the picture, I
don't think about it, as it has only one Ethernet interface.

PS: Please CC me in any replies.

-- 
Regards,
 Mikolaj



Tools, options or workflow for checking modifications in outdated CVS checkout

2022-08-22 Thread Mikolaj Kucharski
Hi,

I have random OpenBSD CVS checkouts across different directories and
machines. I work on something, life interrupts, I come back to it
after longer period of time. In the meantime CVS repo moves forward and
my checkout is out of date.

How I can efficiently check for M's (modified) in the repo, without
actually updating the repo?

I'm looking for something a long the lines, if a file is outdated, but
NOT modified, no output is produced. However if the file is locally
modified, then path should be printed to stdout.

Do you guys know is there any tool available like that?

It's important for me that during that process, repo stays read-only and
no modifications are taking place to the checkout.

To simulate outut I'm looking for something like this:

$ cvs -q up -PAd
? sbin/ifconfig/ifconfig.c-combined
? sbin/ifconfig/obj
? sys/arch/amd64/compile/GENERIC.MP/obj
? usr.sbin/sysupgrade/sysupgrade.diff
? usr.sbin/sysupgrade/sysupgrade.patch
M sbin/ifconfig/ifconfig.8
M sbin/ifconfig/ifconfig.c
M sys/net/if_wg.c
M sys/net/if_wg.h

However above output does update, so modifies the repo, which I wouldn't
want to happen.

Please CC me in any replies.

-- 
Regards,
 Mikolaj



Re: Tools, options or workflow for checking modifications in outdated CVS checkout

2022-08-22 Thread Mikolaj Kucharski
I forgot to add, currently I'm using:

cvs -q diff | grep -ve '^[ +-=@Rrd]'

however I'm wondering is there anything better?


On Mon, Aug 22, 2022 at 12:32:24PM +, Mikolaj Kucharski wrote:
> Hi,
> 
> I have random OpenBSD CVS checkouts across different directories and
> machines. I work on something, life interrupts, I come back to it
> after longer period of time. In the meantime CVS repo moves forward and
> my checkout is out of date.
> 
> How I can efficiently check for M's (modified) in the repo, without
> actually updating the repo?
> 
> I'm looking for something a long the lines, if a file is outdated, but
> NOT modified, no output is produced. However if the file is locally
> modified, then path should be printed to stdout.
> 
> Do you guys know is there any tool available like that?
> 
> It's important for me that during that process, repo stays read-only and
> no modifications are taking place to the checkout.
> 
> To simulate outut I'm looking for something like this:
> 
> $ cvs -q up -PAd
> ? sbin/ifconfig/ifconfig.c-combined
> ? sbin/ifconfig/obj
> ? sys/arch/amd64/compile/GENERIC.MP/obj
> ? usr.sbin/sysupgrade/sysupgrade.diff
> ? usr.sbin/sysupgrade/sysupgrade.patch
> M sbin/ifconfig/ifconfig.8
> M sbin/ifconfig/ifconfig.c
> M sys/net/if_wg.c
> M sys/net/if_wg.h
> 
> However above output does update, so modifies the repo, which I wouldn't
> want to happen.
> 
> Please CC me in any replies.
> 

-- 
Regards,
 Mikolaj



Re: Desktops and laptops status of firewall and FDE

2022-03-25 Thread Mikolaj Kucharski
On Thu, Mar 24, 2022 at 09:56:24AM +, Mikolaj Kucharski wrote:
> Hi,
> 
> Do you guys have an approach, a software to periodically monitor status of
> endpoint machines, laptops, desktops where the requirement is to have
> full disk encryption and firewall enabled, and appropriately configured?
> 
> Machines would be OpenBSD and Linux. I guess MacOS too, but that is less
> relevant I think.
> 

I think I have more specific question. How you would codify answer that
a directory, for example "/" is on a softraid crypto device?

-- 
Regards,
 Mikolaj



Desktops and laptops status of firewall and FDE

2022-03-24 Thread Mikolaj Kucharski
Hi,

Do you guys have an approach, a software to periodically monitor status of
endpoint machines, laptops, desktops where the requirement is to have
full disk encryption and firewall enabled, and appropriately configured?

Machines would be OpenBSD and Linux. I guess MacOS too, but that is less
relevant I think.

-- 
Regards,
 Mikolaj



umb(4) or Wi-Fi and fq_codel - does it make sense?

2021-03-26 Thread Mikolaj Kucharski
I have couple of machines where I've setup PF in following way:

pce-0041# grep -w queue /etc/pf.conf
queue hfsc_fq on em0 flows 1024 qlimit 200 quantum 300 bandwidth 85M max 85M 
default
queue wifi_fq on athn0 flows 1024 qlimit 100 quantum 300 default

pce-0035# grep -w queue /etc/pf.conf
queue q_umb0 on umb0 flows 1024 qlimit 50 quantum 300 default
queue q_athn0 on athn0 flows 1024 qlimit 100 quantum 300 default

pce-0067# grep -w queue /etc/pf.conf
queue q_athn0 on athn0 flows 1024 qlimit 100 quantum 300 default

I'm wondering does it make any sense to have fq_codel without hfsc, in
general (no matter is it wireless or wired interface) and especially
in case of wireless cards (LTE or Wi-Fi)?

Above machine pce-0035 which has umb(4) during the day has terrible
network performance to the internet. I think it is just the location,
because during nights (after midnight and before 7am local time, approx)
speedtest-cli shows order of magnitude beter results (~12Mbit/s at night
versus ~0.4Mbit/s during the day). Users of LTE network in that location
complain about the internet all the time, no matter is it their Android
phones and their data plan or via that OpenBSD access point via athn(4)
via umb(4).

I'm just wondering am I making things worse by introducing queuing on
that type of interfaces?

Is this very empirical problem and I just should invest time to setup
some testing framework to get my answer?

Do you manage any OpenBSD-based LTE + Wi-Fi access points? What's your
experience?

PS. Plese CC me in the replies, I don't have delivery enabled for misc.

-- 
Regards,
 Mikolaj



Recommendation request for LTE modem on PC Engines APU2

2020-07-10 Thread Mikolaj Kucharski
Hi,

I have couple of PC Engines boards and I was thinking to take one spare
APU2E4 and plug into it an LTE modem. I see umb(4) manual page listing
couple of models, but quick searching online shows different interface
on those cards from available on APU. I see also umsm(4) and this one
looks probably more appropriate for PC Engiens system, but not sure are
they capable of LTE speeds.

Also, not sure what would be the practical differences between the
cards, so question for some of you who may have hands on experience
with any of them on OpenBSD.

- What do you use as LTE modem on OpenBSD with miniPCIe interface?

- Would you recommend it or would you go for different card?

- Do you have any type of mobile (3G, 4G or whatever) OpenBSD setup
  on totally different hardware, if so, what is it?

I'm looking for LTE/4G card, something capable of (theoretical) 50Mbps
or more, but if that's not possible, I may revisit my requirements.

Please CC me in any replies, I'm not subscribed to the list.

-- 
Regards,
 Mikolaj



What do you use to generate invoices on OpenBSD?

2019-12-21 Thread Mikolaj Kucharski
Hi,

Do you generate invoices on OpenBSD? What do you recommend? If you have
experience in more than one app, why did you chose one over the other?
If you use something open-source on other OS, let me know as well. If
you use some own written app, for generating invoices, I'm also
interested to hear, just to get an idea, which way people decide to go.

Please carbon-copy me in the replies, thanks!

-- 
Regards,
 Mikolaj



Re: OpenNTPD - no constraint reply - no time sync

2015-07-18 Thread Mikolaj Kucharski
On Sat, Jul 18, 2015 at 11:44:17AM -0600, Brent Cook wrote:
 On Thu, May 28, 2015 at 5:24 PM, Mikolaj Kucharski
 miko...@kucharski.name wrote:
  minimalisic patch as below fixed the issue for me:
 
  Index: constraint.c
  ===
  RCS file: /cvs/src/usr.sbin/ntpd/constraint.c,v
  retrieving revision 1.12
  diff -u -p -u -r1.12 constraint.c
  --- constraint.c28 May 2015 21:34:36 -  1.12
  +++ constraint.c28 May 2015 23:14:47 -
  @@ -279,7 +279,7 @@ constraint_check_child(void)
  cstr-addr-ss), 
  CONSTRAINT_SCAN_INTERVAL);
  }
 
  -   if (fail || cstr-state  STATE_REPLY_RECEIVED) {
  +   if (fail || cstr-state  STATE_QUERY_SENT) {
  cstr-senderrors++;
  constraint_close(cstr-fd);
  }
 
 Thank you for the in-depth analysis. I have been running this patch
 the last couple
 of days and have not experienced any issues as well. What say you reyk?

I can confirm that I run this patch from the end of May (from the time
when I've posted this to the misc mailing list) on amd64 and i386 and I
don't have any issues with it. I did not test portable.

-- 
best regards
q#



Re: OpenNTPD - no constraint reply - no time sync

2015-05-28 Thread Mikolaj Kucharski
);
}
 
-   if (fail || cstr-state  STATE_REPLY_RECEIVED) {
+   if (fail || cstr-state  STATE_QUERY_SENT) {
cstr-senderrors++;
constraint_close(cstr-fd);
}


a bit more verbose change, which may (or may not) be a more clear is:

Index: constraint.c
===
RCS file: /cvs/src/usr.sbin/ntpd/constraint.c,v
retrieving revision 1.12
diff -u -p -u -r1.12 constraint.c
--- constraint.c28 May 2015 21:34:36 -  1.12
+++ constraint.c28 May 2015 23:16:57 -
@@ -272,6 +272,8 @@ constraint_check_child(void)
fatalx(constraint %s, signal %d, 
log_sockaddr((struct sockaddr *)
cstr-addr-ss), sig);
+   if (!fail  cstr-state == STATE_QUERY_SENT)
+   continue;
if (fail) {
log_debug(no constraint reply from %s
 received in time, next query %ds,


I'm running with the first patch for last couple of days and it works
for me, but I'm not sure is this the correct(tm) approach.


On Tue, Mar 31, 2015 at 02:16:31AM +0100, Mikolaj Kucharski wrote:
 Hi,
 
 I have following ntpd.conf file on an OpenBSD machine:
 
 OpenBSD 5.7-current (GENERIC) #839: Mon Mar 30 14:21:47 MDT 2015
 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
 
 # /etc/ntpd.conf
 server 0.pool.ntp.org
 server 1.pool.ntp.org
 server 2.pool.ntp.org
 server 3.pool.ntp.org
 constraints from www.google.com
 
 I've noticed that ntpd(8) often ends up with all peers in 'peer not valid'
 state, never syncing the time. I've enabled debug logging and this is
 what I see in the logs:
 
 Mar 31 00:29:38 openbsd57 ntpd[12097]: ntp engine ready
 Mar 31 00:29:39 openbsd57 ntpd[12097]: constraint request to 
 2a00:1450:400b:800::2004
 Mar 31 00:29:39 openbsd57 ntpd[12097]: constraint request to 216.58.211.132
 Mar 31 00:29:39 openbsd57 ntpd[30212]: tls failed: 2a00:1450:400b:800::2004: 
 connect
 Mar 31 00:29:39 openbsd57 ntpd[12097]: no constraint reply from 
 2a00:1450:400b:800::2004 received in time, next query 900s
 Mar 31 00:34:37 openbsd57 ntpd[12097]: 0 out of 4 peers valid
 Mar 31 00:34:37 openbsd57 ntpd[12097]: bad peer 0.pool.ntp.org 
 (54.194.18.100) 
 Mar 31 00:34:37 openbsd57 ntpd[12097]: bad peer 1.pool.ntp.org 
 (149.157.192.5) 
 Mar 31 00:34:37 openbsd57 ntpd[12097]: bad peer 2.pool.ntp.org 
 (193.1.219.116) 
 Mar 31 00:34:37 openbsd57 ntpd[12097]: bad peer 3.pool.ntp.org (85.91.1.164) 
 Mar 31 00:44:39 openbsd57 ntpd[12097]: constraint request to 
 2a00:1450:400b:800::2004
 Mar 31 00:44:39 openbsd57 ntpd[12097]: constraint request to 216.58.211.132
 Mar 31 00:44:39 openbsd57 ntpd[1720]: tls failed: 2a00:1450:400b:800::2004: 
 connect
 Mar 31 00:44:39 openbsd57 ntpd[12097]: no constraint reply from 
 2a00:1450:400b:800::2004 received in time, next query 900s
 Mar 31 00:59:39 openbsd57 ntpd[12097]: constraint request to 
 2a00:1450:400b:800::2004
 Mar 31 00:59:39 openbsd57 ntpd[12097]: constraint request to 216.58.211.132
 Mar 31 00:59:39 openbsd57 ntpd[13994]: tls failed: 2a00:1450:400b:800::2004: 
 connect
 Mar 31 00:59:39 openbsd57 ntpd[12097]: no constraint reply from 
 2a00:1450:400b:800::2004 received in time, next query 900s
 
 
 That box doesn't have IPv6 configured:
 
 # ifconfig
 lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 32768
 priority: 0
 groups: lo
 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
 inet6 ::1 prefixlen 128
 inet 127.0.0.1 netmask 0xff00
 vio0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
 lladdr 52:54:00:12:34:72
 priority: 0
 groups: egress
 media: Ethernet autoselect
 status: active
 inet 172.16.0.52 netmask 0xff00 broadcast 172.16.0.255
 enc0: flags=0
 priority: 0
 groups: enc
 status: active
 
 
 # nc -v 2a00:1450:400b:800::2004 443
 nc: connect to 2a00:1450:400b:800::2004 port 443 (tcp) failed: No route to 
 host
 

-- 
best regards
q#



OpenNTPD - no constraint reply - no time sync

2015-03-30 Thread Mikolaj Kucharski
Hi,

I have following ntpd.conf file on an OpenBSD machine:

OpenBSD 5.7-current (GENERIC) #839: Mon Mar 30 14:21:47 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC

# /etc/ntpd.conf
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org
constraints from www.google.com

I've noticed that ntpd(8) often ends up with all peers in 'peer not valid'
state, never syncing the time. I've enabled debug logging and this is
what I see in the logs:

Mar 31 00:29:38 openbsd57 ntpd[12097]: ntp engine ready
Mar 31 00:29:39 openbsd57 ntpd[12097]: constraint request to 
2a00:1450:400b:800::2004
Mar 31 00:29:39 openbsd57 ntpd[12097]: constraint request to 216.58.211.132
Mar 31 00:29:39 openbsd57 ntpd[30212]: tls failed: 2a00:1450:400b:800::2004: 
connect
Mar 31 00:29:39 openbsd57 ntpd[12097]: no constraint reply from 
2a00:1450:400b:800::2004 received in time, next query 900s
Mar 31 00:34:37 openbsd57 ntpd[12097]: 0 out of 4 peers valid
Mar 31 00:34:37 openbsd57 ntpd[12097]: bad peer 0.pool.ntp.org (54.194.18.100) 
Mar 31 00:34:37 openbsd57 ntpd[12097]: bad peer 1.pool.ntp.org (149.157.192.5) 
Mar 31 00:34:37 openbsd57 ntpd[12097]: bad peer 2.pool.ntp.org (193.1.219.116) 
Mar 31 00:34:37 openbsd57 ntpd[12097]: bad peer 3.pool.ntp.org (85.91.1.164) 
Mar 31 00:44:39 openbsd57 ntpd[12097]: constraint request to 
2a00:1450:400b:800::2004
Mar 31 00:44:39 openbsd57 ntpd[12097]: constraint request to 216.58.211.132
Mar 31 00:44:39 openbsd57 ntpd[1720]: tls failed: 2a00:1450:400b:800::2004: 
connect
Mar 31 00:44:39 openbsd57 ntpd[12097]: no constraint reply from 
2a00:1450:400b:800::2004 received in time, next query 900s
Mar 31 00:59:39 openbsd57 ntpd[12097]: constraint request to 
2a00:1450:400b:800::2004
Mar 31 00:59:39 openbsd57 ntpd[12097]: constraint request to 216.58.211.132
Mar 31 00:59:39 openbsd57 ntpd[13994]: tls failed: 2a00:1450:400b:800::2004: 
connect
Mar 31 00:59:39 openbsd57 ntpd[12097]: no constraint reply from 
2a00:1450:400b:800::2004 received in time, next query 900s


That box doesn't have IPv6 configured:

# ifconfig
lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 32768
priority: 0
groups: lo
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff00
vio0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
lladdr 52:54:00:12:34:72
priority: 0
groups: egress
media: Ethernet autoselect
status: active
inet 172.16.0.52 netmask 0xff00 broadcast 172.16.0.255
enc0: flags=0
priority: 0
groups: enc
status: active


# nc -v 2a00:1450:400b:800::2004 443
nc: connect to 2a00:1450:400b:800::2004 port 443 (tcp) failed: No route to host


-- 
best regards
q#



Re: OpenBSD and disk slowliness

2015-01-09 Thread Mikolaj Kucharski
Martin, Theo,

I would like to apologize you and other developers for spreading unhelpful
advises which hurt the project.

I truly regret that and I am very sorry.

Regards,
 Mikolaj

On Fri, Jan 09, 2015 at 02:34:36AM +0100, Martin Pieuchot wrote:
 Dear Mikolaj,
 
 On 09/01/15(Fri) 00:30, Mikolaj Kucharski wrote:
  Hi,
  
  This problem looks very similar as:
  
  https://marc.info/?l=openbsd-miscm=140288534929223w=2
  
  On my i386 KVM after each upgrade I run this:
  
  #!/bin/sh
  
  for kernel in /bsd /bsd.mp
  do
  config -fe $kernel  EOF
  find mpbios
  disable mpbios
  find mpbios
  find acpimadt
  disable acpimadt
  find acpimadt
  quit
  EOF
  done
  
  
  Please CC me in any replies, I'm not receiving mails from `misc`
 
 Your email makes me really sad.
 
 It makes me really sad because I want to believe that you sent it in
 order to help somebody.  However you're doing the contrary and you are
 doing it publicly.  That means other people will later find your email
 and, believing that you are trying to help, do what you recommend.
 
 Please do not recommend to *disable* anything in a kernel.
 
 Disabling something that you don't understand might be good enough for
 you.  But it does not help me, or I believe anyone else, to fix the 
 damn problem people are having.
 
 Instead of giving such advices, I'd suggest you to read sendbug(1) and
 fill a bug report as complete as possible such that competent people
 might have a chance to help you fix your problem.  If you do that you
 might be able to run a GENERIC kernel without disabling anything.  You
 might also prevent other people to send other bug reports for the same
 problem.
 
 Think about it, the system you're running is good because *a lot* of
 other people did not deactivate anything but instead sent good or not
 so good bug reports.
 
 Sadly you've just answered to yet another bug report without information,
 giving a bad advice and nobody can improve OpenBSD.
 
 I hope I didn't sound to harsh and I hope to see a nice bug report from
 you in bugs@ soon.
 
 Best regards,
 Martin


On Thu, Jan 08, 2015 at 06:56:46PM -0700, Theo de Raadt wrote:
  This problem looks very similar as:
  
  https://marc.info/?l=openbsd-miscm=140288534929223w=2
  
  On my i386 KVM after each upgrade I run this:
  
  #!/bin/sh
  
  for kernel in /bsd /bsd.mp
  do
  config -fe $kernel  EOF
  find mpbios
  disable mpbios
  find mpbios
  find acpimadt
  disable acpimadt
  find acpimadt
  quit
  EOF
  done
  
  
  Please CC me in any replies, I'm not receiving mails from `misc`
 
 Mikolaj,
 
 This kind of mail wants me want to push for removal of the config -e
 support.
 
 It is incredibly bad advice.
 
 Yes, there are bugs in the interrupt handling code, every operating
 system on PCs has this because it is very difficult code to debug.
 And machines are slowly changing in behaviour.  But advising users to
 all run different code paths leads to a fragmented userbase running
 different kernel code paths, which lead them to all submit different
 misleading bug reports and as a result, more pressure on fewer
 developers.  Who might eventually stop caring as much.
 
 If as a general rule we all want better code running on our systems,
 where do you fit in?
 
 Let me be blunt.  Your advice is bad.



Re: OpenBSD and disk slowliness

2015-01-08 Thread Mikolaj Kucharski
Hi,

This problem looks very similar as:

https://marc.info/?l=openbsd-miscm=140288534929223w=2

On my i386 KVM after each upgrade I run this:

#!/bin/sh

for kernel in /bsd /bsd.mp
do
config -fe $kernel  EOF
find mpbios
disable mpbios
find mpbios
find acpimadt
disable acpimadt
find acpimadt
quit
EOF
done


Please CC me in any replies, I'm not receiving mails from `misc`


On Thu, Jan 08, 2015 at 05:21:48PM -0600, Jorge Gabriel Lopez Paramount wrote:
 Hi all,
 
 A few months ago I tried to install OpenBSD 5.5 in a KVM virtual machine
 running Linux in an amd64 computer. First tried to install the i386 version
 since my Linux virtual machines are i686 and was painfully slow, so much
 that I almost decided to not use OpenBSD. Then I tried with the amd64
 version and ran blazingly fast, was so impressed that I'm here.
 
 Time passed and installed some i386 virtual machines running in atom chips
 without issues and so far have been running fine so I forgot the issue, but
 last week started to upgrade them to 5.6 and was again painfully slow, one
 hour to upgrade each one. And since the slow part of upgrading was at
 untarring and the LED of the disk was blinking like crazy I supposed it was
 some issue with the virtual hard disk.
 
 Now that I know more about OpenBSD tried again to install the same 5.5
 version in the same amd64 computer, but this time using the virtio drivers,
 and in less than 5 minutes installed a new OpenBSD server with no issues at
 all. As reference this is the kvm command I used:
 
 kvm -vnc :15 -m 256 -name openbsd -pidfile /qemu/OpenBSD/OpenBSD.pid -k es
 -net nic,macaddr=52:54:00:12:34:84,model=virtio -net tap,ifname=tap17 -drive
 file=/dev/eliseos/qemu-004,cache=none,if=virtio -cdrom
 /software/OpenBSD/5.5/i386/install55.iso -boot d -daemonize
 
 I would like to share this because I have read in many places about hard
 disk slowliness with OpenBSD, verly likely dissapointing new users when in
 fact OpenBSD is very good.
 

-- 
best regards
q#



OpenNTPd leap-second handling - clarification in man page

2015-01-08 Thread Mikolaj Kucharski
Hi,

This year we will have positive leap second[1] I've recently got asked
how OpenNTPD handles leap seconds and did anything change from 2012[2].

I've looked at the source code and I don't see any changes from that
time until now that would made me think OpenNTPD handles leap seconds
differently than back then.

Giving that this question may come back again, would it make sense to
explain in ntpd(8) how the daemon handles leap seconds?

As I suck at words, below patch is copy paste from Phil Pennock's
email[2]. Let me know what do you think?

Please CC me with any replies.


Index: ntpd.8
===
RCS file: /cvs/src/usr.sbin/ntpd/ntpd.8,v
retrieving revision 1.37
diff -u -p -u -r1.37 ntpd.8
--- ntpd.8  12 Feb 2014 15:45:52 -  1.37
+++ ntpd.8  8 Jan 2015 21:34:11 -
@@ -96,6 +96,16 @@ adjusts the clock frequency using the
 system call to compensate for systematic drift.
 .Pp
 .Nm
+passes on leap second indicators found from servers but otherwise does
+nothing with them.
+In particular, the local clock is never adjusted as a result of leap
+seconds, until after the event when the upstream servers pass on the new
+value of time and
+.Nm
+corrects time accordingly, as though the local system were just off by a
+second (which it literally now is).
+.Pp
+.Nm
 is usually started at boot time, and can be enabled by
 setting
 .Va ntpd_flags


References
 1. http://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat
 2. http://marc.info/?l=openbsd-miscm=133070254713971w=2

-- 
best regards
q#



Asus Eee PC 1000 hangs on GENERIC.MP#209 27th Jun 2014 snapshot

2014-06-28 Thread Mikolaj Kucharski
Hi,

Just upgraded my Asus Eee PC 1000 to the latest snapshot:

OpenBSD 5.5-current (GENERIC.MP) #209: Fri Jun 27 12:23:05 MDT 2014
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP

and it hungs around time when console changes to higher resolution.
Machine stays with blank screen forever.

After disabling acpi0 during boot up I'm able to start the machine.
Below I'm inlining dmesgs from previous working snapshot and from broken
one with acpi0 disabled.

I have email delivery disabled for misc, if you need any additional
info from me, please CC me in any emails. Thanks.


# dmesg (good)
OpenBSD 5.5-current (GENERIC.MP) #191: Mon Jun 16 21:35:45 MDT 2014
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Atom(TM) CPU N270 @ 1.60GHz (GenuineIntel 686-class) 1.61 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF
real mem  = 1064464384 (1015MB)
avail mem = 1034600448 (986MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 07/14/08, BIOS32 rev. 0 @ 0xf0010, SMBIOS 
rev. 2.5 @ 0xf06f0 (30 entries)
bios0: vendor American Megatrends Inc. version 0702 date 07/14/2008
bios0: ASUSTeK Computer INC. 1000
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET SSDT
acpi0: wakeup devices P0P2(S4) P0P1(S4) P0P4(S4) P0P6(S4) P0P7(S4) P0P8(S4) 
P0P9(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 133MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.0.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Atom(TM) CPU N270 @ 1.60GHz (GenuineIntel 686-class) 1.60 GHz
cpu1: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 1, remapped to apid 2
acpimcfg0 at acpi0 addr 0xe000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 5 (P0P4)
acpiprt2 at acpi0: bus 3 (P0P6)
acpiprt3 at acpi0: bus 1 (P0P7)
acpiprt4 at acpi0: bus -1 (P0P8)
acpiprt5 at acpi0: bus -1 (P0P9)
acpiprt6 at acpi0: bus 4 (P0P5)
acpiec0 at acpi0
acpicpu0 at acpi0: C2, C1, PSS
acpicpu1 at acpi0: C2, C1, PSS
acpitz0 at acpi0: critical temperature is 90 degC
acpibat0 at acpi0: BAT0 model 1000 serial   type LION oem ASUS
acpiac0 at acpi0: AC unit online
acpiasus0 at acpi0
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: PWRB
bios0: ROM list: 0xc/0xec00! 0xcf000/0x1000
cpu0: Enhanced SpeedStep 1600 MHz: speeds: 1600, 1333, 1067, 800 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 Intel 82945GME Host rev 0x03
vga1 at pci0 dev 2 function 0 Intel 82945GME Video rev 0x03
intagp0 at vga1
agp0 at intagp0: aperture at 0xd000, size 0x1000
inteldrm0 at vga1
drm0 at inteldrm0
composite sync not supported
composite sync not supported
inteldrm0: 1024x600
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
Intel 82945GM Video rev 0x03 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 Intel 82801GB HD Audio rev 0x02: msi
azalia0: codecs: Realtek ALC269
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x02: apic 2 int 16
pci1 at ppb0 bus 5
ppb1 at pci0 dev 28 function 1 Intel 82801GB PCIE rev 0x02: apic 2 int 17
pci2 at ppb1 bus 4
ale0 at pci2 dev 0 function 0 Attansic Technology L1E rev 0xb0: AR8113, msi, 
address 00:22:15:65:26:97
atphy0 at ale0 phy 0: F1 10/100/1000 PHY, rev. 9
ppb2 at pci0 dev 28 function 2 Intel 82801GB PCIE rev 0x02: apic 2 int 18
pci3 at ppb2 bus 3
ppb3 at pci0 dev 28 function 3 Intel 82801GB PCIE rev 0x02: apic 2 int 19
pci4 at ppb3 bus 1
ral0 at pci4 dev 0 function 0 Ralink RT2790 rev 0x00: apic 2 int 19, address 
00:15:af:cb:45:e3
ral0: MAC/BBP RT2872 (rev 0x0200), RF RT2720 (MIMO 1T2R)
uhci0 at pci0 dev 29 function 0 Intel 82801GB USB rev 0x02: apic 2 int 23
uhci1 at pci0 dev 29 function 1 Intel 82801GB USB rev 0x02: apic 2 int 19
uhci2 at pci0 dev 29 function 2 Intel 82801GB USB rev 0x02: apic 2 int 18
uhci3 at pci0 dev 29 function 3 Intel 82801GB USB rev 0x02: apic 2 int 16
ehci0 at pci0 dev 29 function 7 Intel 82801GB USB rev 0x02: apic 2 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0xe2
pci5 at ppb4 bus 6
ichpcib0 at pci0 dev 31 function 0 Intel 82801GBM LPC rev 0x02: PM disabled
pciide0 at pci0 dev 31 function 2 Intel 

Re: Asus Eee PC 1000 hangs on GENERIC.MP#209 27th Jun 2014 snapshot

2014-06-28 Thread Mikolaj Kucharski
acpidump files attached, if anyone would like to see them

-- 
best regards
q#

[demime 1.01d removed an attachment of type application/x-tar-gz]



Re: Asus Eee PC 1000 hangs on GENERIC.MP#209 27th Jun 2014 snapshot

2014-06-28 Thread Mikolaj Kucharski
On Sat, Jun 28, 2014 at 11:39:20PM +0100, Mikolaj Kucharski wrote:
 acpidump files attached, if anyone would like to see them

ah, totally forgot about rules of misc mailing list and demime

-- 
best regards
q#



Re: Very slow I/O under OpenBSD i386 on qemu-kvm from RHEL7rc

2014-06-17 Thread Mikolaj Kucharski
On Mon, Jun 16, 2014 at 11:07:39PM +0100, Kevin Chadwick wrote:
 previously on this list Mikolaj Kucharski contributed:
 
  by disabling mpbios on
   OpenBSD and falling back to the old pic controller, in this case you

  
  I cannot find how to enable 'the old pic controller' in libvirt with
  qemu-kvm. Do you know by any chance how to enable it?
 
 I believe he means disabling mpbios at OpenBSD's boot or in boot.conf
 means KVM will automatically fall back. Virtual hosting companies like
 arpnetworks generally ask you to do this for OpenBSD.
 
 boot -c
 disable mpbios

Ah, I got confused. Yes, I'm aware of this, as I've seen this on the
list archives mentioned few times. I actually tested this, and I don't
see any difference. See at my below tests:


 OpenBSD i386/virtio (default) [test12] 

# time dd if=/dev/zero of=/tmp/TEST bs=4096 count=1024x1024
1048576+0 records in
1048576+0 records out
4294967296 bytes transferred in 3635.270 secs (1181471 bytes/sec)
   60m35.50s real 0m1.24s user54m15.15s system

 OpenBSD i386/virtio (disable mpbios) [test13] 

# time dd if=/dev/zero of=/tmp/TEST bs=4096 count=1024x1024
1048576+0 records in
1048576+0 records out
4294967296 bytes transferred in 3628.306 secs (1183739 bytes/sec)
   60m28.49s real 0m1.33s user54m8.30s system


On the archives I have seen recommendation to disable mpbios while
machine is slow in general, however I am experiencing only slow disk
I/O. I thought my problem is unrelated to mpbios.

With qemu-kvm from RHEL7 on bsd.sp there is no mpbios mentioned in
dmesg(8) (I didn't test bsd.mp). See dmesg output at the bottom of this
email. Also starting OpenBSD with mpbios disabled via boot_config(8)
ends up with:



--- dmesg.txt   Sat Jun 14 15:49:02 2014
+++ disable-mpbios.txt  Tue Jun 17 08:15:34 2014
@@ -4,6 +4,11 @@
 cpu0: 
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,NXE,LONG,SSE3,CX16,LAHF,ABM,SSE4A,PERF
 real mem  = 536367104 (511MB)
 avail mem = 515158016 (491MB)
+User Kernel Config
+UKC disable mpbios
+368 mpbios0 disabled
+UKC quit
+Continuing...
 mpath0 at root
 scsibus0 at mpath0: 256 targets
 mainbus0 at root
@@ -22,7 +27,7 @@
 ioapic0 at mainbus0: apid 0 pa 0xfec0, version 11, 24 pins
 acpiprt0 at acpi0: bus 0 (PCI0)
 acpicpu0 at acpi0
-bios0: ROM list: 0xc/0x1000! 0xc1000/0xa00 0xc2000/0x2400 0xed800/0x2800!
+bios0: ROM list: 0xc/0x1000! 0xc1000/0xa00 0xc2000/0x2400 0xed800/0x2800
 pci0 at mainbus0 bus 0: configuration mode 1 (bios)
 pchb0 at pci0 dev 0 function 0 Intel 82441FX rev 0x02
 pcib0 at pci0 dev 1 function 0 Intel 82371SB ISA rev 0x00
@@ -32,11 +37,11 @@
 uhci0 at pci0 dev 1 function 2 Intel 82371SB USB rev 0x01: apic 0 int 11
 piixpm0 at pci0 dev 1 function 3 Intel 82371AB Power rev 0x03: apic 0 int 9
 iic0 at piixpm0
-iic0: addr 0x1c 0f=00 words 00=9d87 01=9d87 02=9d87 03=9d87 04=9d87 05=9d87 
06=9d87 07=9d87
-iic0: addr 0x1d 0f=00 words 00=9d87 01=9d87 02=9d87 03=9d87 04=9d87 05=9d87 
06=9d87 07=9d87
-iic0: addr 0x4c 00=00 01=00 02=00 03=00 04=00 05=00 06=00 07=00 08=00 words 
00=9d87 01=9d87 02=9d87 03=9d87 04=9d87 05=9d87 06=9d87 07=9d87
-iic0: addr 0x4d 3e=d1 48=d1 4a=d1 4e=d1 fc=d1 fe=d1 words 00=9d87 01=9d87 
02=9d87 03=9d87 04=9d87 05=9d87 06=9d87 07=9d87
-iic0: addr 0x4e 00=00 01=00 02=00 03=00 04=00 05=00 06=00 07=00 08=00 3e=d1 
48=d1 4a=d1 4e=d1 fc=d1 fe=d1 words 00=9d87 01=9d87 02=9d87 03=9d87 04=9d87 
05=9d87 06=9d87 07=9d87
+iic0: addr 0x1c 0f=00 words 00=8fc5 01=8fc5 02=8fc5 03=8fc5 04=8fc5 05=8fc5 
06=8fc5 07=8fc5
+iic0: addr 0x1d 0f=00 words 00=8fc5 01=8fc5 02=8fc5 03=8fc5 04=8fc5 05=8fc5 
06=8fc5 07=8fc5
+iic0: addr 0x4c 00=00 01=00 02=00 03=00 04=00 05=00 06=00 07=00 08=00 words 
00=8fc5 01=8fc5 02=8fc5 03=8fc5 04=8fc5 05=8fc5 06=8fc5 07=8fc5
+iic0: addr 0x4d 3e=d1 48=d1 4a=d1 4e=d1 fc=d1 fe=d1 words 00=8fc5 01=8fc5 
02=8fc5 03=8fc5 04=8fc5 05=8fc5 06=8fc5 07=8fc5
+iic0: addr 0x4e 00=00 01=00 02=00 03=00 04=00 05=00 06=00 07=00 08=00 3e=d1 
48=d1 4a=d1 4e=d1 fc=d1 fe=d1 words 00=8fc5 01=8fc5 02=8fc5 03=8fc5 04=8fc5 
05=8fc5 06=8fc5 07=8fc5
 virtio0 at pci0 dev 3 function 0 Qumranet Virtio Network rev 0x00: Virtio 
Network Device
 vio0 at virtio0: address 52:54:00:12:34:70
 virtio0: apic 0 int 11



Full, default dmesg:


OpenBSD 5.5-current (GENERIC) #162: Tue Jun 10 21:17:31 MDT 2014
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: QEMU Virtual CPU version 1.5.3 (AuthenticAMD 686-class, 512KB L2 cache) 
2.61 GHz
cpu0: 
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,NXE,LONG,SSE3,CX16,LAHF,ABM,SSE4A,PERF
real mem  = 536367104 (511MB)
avail mem = 515158016 (491MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 06/23/99, BIOS32 rev. 0 @ 0xfc672, SMBIOS 
rev. 2.4 @ 0xfdde0 (10 entries)
bios0: vendor Bochs version Bochs date 01/01/2011
bios0: Red Hat KVM
acpi0 at bios0: rev 0
acpi0: sleep

Re: Very slow I/O under OpenBSD i386 on qemu-kvm from RHEL7rc

2014-06-17 Thread Mikolaj Kucharski
Mike,

On Tue, Jun 17, 2014 at 10:30:23AM -0700, Mike Larkin wrote:
 On Tue, Jun 17, 2014 at 05:10:51AM -0400, Brad Smith wrote:
  Because ACPI is in use which takes higher precedence over MP BIOS. You
  have to disable acpimadt.
  
 
 Randomly disabling parts of the kernel is likely to cause other problems.
 

I agree, but disabling mpbios and acpimadt makes a huge difference for me
on qemu-kvm-1.5.3-60.el7.x86_64:


 OpenBSD i386/virtio (bsd.sp disable mpbios and acpimadt) 

# time dd if=/dev/zero of=/tmp/TEST bs=4096 count=1024x1024
1048576+0 records in
1048576+0 records out
4294967296 bytes transferred in 18.524 secs (231854084 bytes/sec)
0m18.52s real 0m0.24s user 0m14.48s system


It takes now 18 seconds to run above dd(1), when previously it took 60
mintues. Thanks Christiano and Brad for the tips.


Do you guys think it's worth opening bug report with RedHat to get them
look into this, or is the problem more on OpenBSD side? Ideally I would
like to run unmodified OpenBSD kernel on my VMs.


$ diff -I'^iic0' dmesg.txt disable-mpbios-and-acpimadt.txt
--- dmesg.txt   Sat Jun 14 15:49:02 2014
+++ disable-mpbios-and-acpimadt.txt Tue Jun 17 13:30:46 2014
@@ -4,6 +4,13 @@
 cpu0: 
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,NXE,LONG,SSE3,CX16,LAHF,ABM,SSE4A,PERF
 real mem  = 536367104 (511MB)
 avail mem = 515158016 (491MB)
+User Kernel Config
+UKC disable mpbios
+368 mpbios0 disabled
+UKC disable acpimadt
+501 acpimadt0 disabled
+UKC quit
+Continuing...
 mpath0 at root
 scsibus0 at mpath0: 256 targets
 mainbus0 at root
@@ -15,22 +22,20 @@
 acpi0: tables DSDT FACP SSDT APIC RSDT
 acpi0: wakeup devices
 acpitimer0 at acpi0: 3579545 Hz, 24 bits
-acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
-cpu0 at mainbus0: apid 0 (boot processor)
-mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
-cpu0: apic clock running at 999MHz
-ioapic0 at mainbus0: apid 0 pa 0xfec0, version 11, 24 pins
 acpiprt0 at acpi0: bus 0 (PCI0)
 acpicpu0 at acpi0
+mpbios at bios0 function 0x0 not configured
 bios0: ROM list: 0xc/0x1000! 0xc1000/0xa00 0xc2000/0x2400 0xed800/0x2800!
+cpu0 at mainbus0: (uniprocessor)
+mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
 pci0 at mainbus0 bus 0: configuration mode 1 (bios)
 pchb0 at pci0 dev 0 function 0 Intel 82441FX rev 0x02
 pcib0 at pci0 dev 1 function 0 Intel 82371SB ISA rev 0x00
 pciide0 at pci0 dev 1 function 1 Intel 82371SB IDE rev 0x00: DMA, channel 0 
wired to compatibility, channel 1 wired to compatibility
 pciide0: channel 0 disabled (no drives)
 pciide0: channel 1 disabled (no drives)
-uhci0 at pci0 dev 1 function 2 Intel 82371SB USB rev 0x01: apic 0 int 11
-piixpm0 at pci0 dev 1 function 3 Intel 82371AB Power rev 0x03: apic 0 int 9
+uhci0 at pci0 dev 1 function 2 Intel 82371SB USB rev 0x01: irq 11
+piixpm0 at pci0 dev 1 function 3 Intel 82371AB Power rev 0x03: irq 9
 iic0 at piixpm0
 iic0: addr 0x1c 0f=00 words 00=d4d0 01=d4d0 02=d4d0 03=d4d0 04=d4d0 05=d4d0 
06=d4d0 07=d4d0
 iic0: addr 0x1d 0f=00 words 00=d4d0 01=d4d0 02=d4d0 03=d4d0 04=d4d0 05=d4d0 
06=d4d0 07=d4d0
@@ -39,13 +44,13 @@
 iic0: addr 0x4e 00=00 01=00 02=00 03=00 04=00 05=00 06=00 07=00 08=00 3e=d1 
48=d1 4a=d1 4e=d1 fc=d1 fe=d1 words 00=9d87 01=9d87 02=9d87 03=9d87 04=9d87 
05=9d87 06=9d87 07=9d87
 virtio0 at pci0 dev 3 function 0 Qumranet Virtio Network rev 0x00: Virtio 
Network Device
 vio0 at virtio0: address 52:54:00:12:34:70
-virtio0: apic 0 int 11
+virtio0: irq 11
 virtio1 at pci0 dev 4 function 0 Qumranet Virtio Storage rev 0x00: Virtio 
Block Device
 vioblk0 at virtio1
 scsibus1 at vioblk0: 2 targets
 sd0 at scsibus1 targ 0 lun 0: VirtIO, Block Device,  SCSI3 0/direct fixed
 sd0: 102400MB, 512 bytes/sector, 209715200 sectors
-virtio1: apic 0 int 11
+virtio1: irq 11
 isa0 at pcib0
 isadma0 at isa0
 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo


-- 
best regards
q#



Re: Very slow I/O under OpenBSD i386 on qemu-kvm from RHEL7rc

2014-06-16 Thread Mikolaj Kucharski
On Mon, Jun 16, 2014 at 11:19:16AM +0200, Christiano F. Haesbaert wrote:
 On 16 June 2014 04:19, Mikolaj Kucharski miko...@kucharski.name wrote:
  My main question is, do you experience similar slow I/O on OpenBSD i386
  on your Qemu/KVM installations?
 
  Are you aware of any problem with OpenBSD i386 under Qemu/KVM?
 
  Not sure should this report go to RedHat, KVM or to OpenBSD, but I've
  tested RHEL7rc with CentOS 6.5, NetBSD 6.1.4 installer and OpenBSD
  current bsd.rd and only OpenBSD i386 seems to have slow I/O problem
  under latest Enterprise Linux from RedHat. I've decided to report the
  issue here. I've tested OpenBSD guest with IDE, SCSI and VirtIO disk.
  SCSI disk currently don't seem to work at all with both amd64 and i386:
 
 
 The problem is the i386 ioapic/apic implementation and how OpenBSD
 uses the lapic_tpr to block incoming interrupts.


Giving what you wrote, where do you think the problem should be fixed?
On OpenBSD side, or on KVM side?


 Basically if you're using ioapic (and you are), OpenBSD maps the
 lapic_tpr to the special TPR register to block interrupts everytime
 you get an interrupt of raise it yourself by splraise()/spl* and so
 on.
 
 You don't suffer this on amd64 since the masking is done purely in
 software. You can also verify this statement by disabling mpbios on
 OpenBSD and falling back to the old pic controller, in this case you


I cannot find how to enable 'the old pic controller' in libvirt with
qemu-kvm. Do you know by any chance how to enable it?


 don't use ioapic, and the pic code does the mask in software,
 lapic_tpr is still the same variable being touched, but in this code
 path, it's not mapped to the cpu TPR.
 
 To have an ideia of the cost of touching the tpr:
 
 real hardware: ~25 cycles.
 kvm + flexpriority (cpu extension): ~2700 cycles.
 kvm without flextpriority: 100k+ cycles.
 
 So every interrupt you take needs to touch at least lapic_tpr twice,
 which before would cost ~50cycles, and now it's more than ~200kcycles.
 
 Of course these numbers are relevant to the machine I've tested, but
 you get an idea on how much slower it is.


Thank you for the above explanation.

-- 
best regards
q#



Very slow I/O under OpenBSD i386 on qemu-kvm from RHEL7rc

2014-06-15 Thread Mikolaj Kucharski
Hi,

Please CC me in any replies as I'm not subscribed to misc emails.

My main question is, do you experience similar slow I/O on OpenBSD i386
on your Qemu/KVM installations?

Are you aware of any problem with OpenBSD i386 under Qemu/KVM?

Not sure should this report go to RedHat, KVM or to OpenBSD, but I've
tested RHEL7rc with CentOS 6.5, NetBSD 6.1.4 installer and OpenBSD
current bsd.rd and only OpenBSD i386 seems to have slow I/O problem
under latest Enterprise Linux from RedHat. I've decided to report the
issue here. I've tested OpenBSD guest with IDE, SCSI and VirtIO disk.
SCSI disk currently don't seem to work at all with both amd64 and i386:


 OpenBSD i386/scsi [test07] 

# time dd if=/dev/zero of=/dev/sd0c bs=4096 count=10240
sd0(vioscsi0:0:0): Check Condition (error 0x70) on opcode 0x28
SENSE KEY: Illegal Request
 ASC/ASCQ: ASC 0x24 ASCQ 0x00
dd: /dev/sd0c: Invalid argument
5+0 records in
4+0 records out
16384 bytes transferred in 0.093 secs (174834 bytes/sec)
0m0.25s real 0m0.00s user 0m0.15s system

# time dd if=/dev/zero of=/dev/rsd0c bs=4096 count=10240
sd0(vioscsi0:0:0): Check Condition (error 0x70) on opcode 0x2a
SENSE KEY: Illegal Request
 ASC/ASCQ: ASC 0x24 ASCQ 0x00
dd: /dev/rsd0c: Invalid argument
42+0 records in
41+0 records out
167936 bytes transferred in 0.290 secs (578587 bytes/sec)
0m0.46s real 0m0.00s user 0m0.34s system


 OpenBSD amd64/scsi [test08] 

# time dd if=/dev/zero of=/dev/sd0c bs=4096 count=10240
sd0(vioscsi0:0:0): Check Condition (error 0x70) on opcode 0x28
SENSE KEY: Illegal Request
 ASC/ASCQ: ASC 0x24 ASCQ 0x00
dd: /dev/sd0c: Invalid argument
5+0 records in
4+0 records out
16384 bytes transferred in 0.061 secs (265367 bytes/sec)
0m0.07s real 0m0.00s user 0m0.00s system

# time dd if=/dev/zero of=/dev/rsd0c bs=4096 count=10240
sd0(vioscsi0:0:0): Check Condition (error 0x70) on opcode 0x2a
SENSE KEY: Illegal Request
 ASC/ASCQ: ASC 0x24 ASCQ 0x00
dd: /dev/rsd0c: Invalid argument
42+0 records in
41+0 records out
167936 bytes transferred in 0.081 secs (2063603 bytes/sec)
0m0.10s real 0m0.00s user 0m0.00s system


However I'm not chasing the SCSI problem, as VirtIO and IDE do work on
OpenBSD. VirtIO seems to be a bit faster, so I'm focusing all my tests
on VirtIO. If you look below at test02 you notice that to create 4GB
zero filled file takes 42 minutes. In comparision on Scientific Linux it
takes 5 minutes (also a bit slow, but not that much). On amd64 the same
operation is taking seconds.

  +-+-+
  |  RHEL7  |  SL6.5  |
 ++-+-+
 |  i386  |  42min  |  5min   |
 ++-+-+
 | amd64  |  42sec  |  28sec  |
 ++-+-+

I did tests on OpenBSD and NetBSD installers, however I have fully
installed i386 OpenBSD on RHEL7rc and it is also very slow. I'm
providing some information below, but if you need any more details,
please let me know.


 DETAILS 

rhel7rc rpm -q kernel qemu-kvm
kernel-3.10.0-121.el7.x86_64
qemu-kvm-1.5.3-60.el7.x86_64

bsd.rd/amd64 dmesg | sed -e 2q
OpenBSD 5.5-current (RAMDISK_CD) #188: Fri Jun 13 13:01:15 MDT 2014
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD

bsd.rd/i386 dmesg | sed -e 2q
OpenBSD 5.5-current (RAMDISK_CD) #169: Fri Jun 13 12:51:59 MDT 2014
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/RAMDISK_CD

# dmesg | grep sd0
sd0 at scsibus1 targ 0 lun 0: VirtIO, Block Device,  SCSI3 0/direct fixed
sd0: 10240MB, 512 bytes/sector, 20971520 sectors

 FILESYSTEM TESTS (4GB) 

 OpenBSD amd64/virtio (RHEL7rc) [test01] 

# time dd if=/dev/zero of=/mnt/TEST bs=4096 count=1024x1024
1048576+0 records in
1048576+0 records out
4294967296 bytes transferred in 42.753 secs (100458532 bytes/sec)
0m42.79s real 0m0.07s user 0m5.77s system

 OpenBSD i386/virtio (RHEL7rc) [test02] 

# time dd if=/dev/zero of=/mnt/TEST bs=4096 count=1024x1024
1048576+0 records in
1048576+0 records out
4294967296 bytes transferred in 2592.993 secs (1656374 bytes/sec)
   43m13.11s real 0m0.56s user37m14.95s system


 OpenBSD amd64/virtio (Scientific Linux 6.5) [test03] 

# time dd if=/dev/zero of=/mnt/TEST bs=4096 count=1024x1024
1048576+0 records in
1048576+0 records out
4294967296 bytes transferred in 28.288 secs (151829547 bytes/sec)
0m28.29s real 0m0.22s user 0m6.78s system

 OpenBSD i386/virtio (Scientific Linux 6.5) [test04] 

# time dd if=/dev/zero of=/mnt/TEST bs=4096 count=1024x1024
1048576+0 records in
1048576+0 records out
4294967296 bytes transferred in 301.991 secs (14222149 bytes/sec)
5m2.00s real 0m0.61s user 4m15.20s system


 NetBSD i386/virtio (RHEL7rc) [test05] 

# dd if=/dev/zero of=/mnt/TEST bs=4096 count=1024x1024
1048576+0 records in
1048576+0 records out
4294967296 bytes transferred in 58.620 secs (73267951 

Re: restore: no memory to extend symbol table

2014-06-11 Thread Mikolaj Kucharski
On Tue, Jun 10, 2014 at 09:18:33PM +0200, Otto Moerbeek wrote:
 A ulimit -a reveals your data limit, which is likely smaller than 1GB.
 
 You could try ulimit -d unlimited

Doh! That did the trick. No more error message, restore(8) finished
its work and all is good. Thanks Otto!

-- 
best regards
q#



restore: no memory to extend symbol table

2014-06-10 Thread Mikolaj Kucharski
Hi,

I think I'm hitting memory limit while trying to restore filesystem on
one of my VMs. I've tested restore with 1GB of RAM and got error message
from the subject. Dump has someting like:

# zcat current1.dump.sd0a.gz | restore -t -s1 -f - | wc -l
617560

of files and directories. Do you guys know how much memory box needs to
have to restore the filesystem with so many inodes? I'm using bsd.rd:

OpenBSD 5.5-current (RAMDISK_CD) #154: Mon Jun  9 10:30:10 MDT 2014
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/RAMDISK_CD


PS. Please CC me in any replies. Thank you.

-- 
best regards
q#



PATCH: faq/ports/specialtopics.html

2014-04-18 Thread Mikolaj Kucharski
Small fix for $OpenBSD$ marker. While at it, bring example in sync
with ports tree.


Index: faq/ports/specialtopics.html
===
RCS file: /cvs/www/faq/ports/specialtopics.html,v
retrieving revision 1.37
diff -u -r1.37 specialtopics.html
--- faq/ports/specialtopics.html5 Apr 2014 21:41:06 -   1.37
+++ faq/ports/specialtopics.html18 Apr 2014 08:35:14 -
@@ -1254,13 +1254,13 @@
 blockquotepre
 #!/bin/sh
 #
-# $OpenBSD: specialtopics.html,v 1.37 2014/04/05 21:41:06 sthen Exp $
+# #36;OpenBSD#36;
 
 daemon=${TRUEPREFIX}/sbin/munin-node
 
 . /etc/rc.d/rc.subr
 
-pexp=perl: ${daemon}
+pexp=/usr/bin/perl -wT $daemon
 
 rc_pre() {
install -d -o _munin /var/run/munin


-- 
best regards
q#



Re: smtpd dies with fatal: smtp: ssltree out of sync

2013-12-31 Thread Mikolaj Kucharski
Joel Knight had similar problem in the past and he gave me a clue that
the problem my be related to multiple certificates in one single file
(lile cert.pem has). Below change makes OpenSMTPD running again for me:

--- /etc/mail/smtpd.confWed Jan  1 00:23:52 2014
+++ /etc/mail/smtpd.confWed Jan  1 00:24:04 2014
@@ -6,7 +6,6 @@
 bounce-warn 4h, 1d, 2d
 expire 7d

-pki openbsd.my.domain ca /etc/ssl/cert.pem
 pki openbsd.my.domain key /etc/mail/certs/smtpd.key
 pki openbsd.my.domain dhparams /etc/mail/certs/dh4096.pem
 pki openbsd.my.domain certificate /etc/mail/certs/smtpd.crt


Thanks again Joel!

On Mon, Dec 30, 2013 at 10:45:46PM +, Mikolaj Kucharski wrote:
 Hi,
 
 I've just upgraded my OpenBSD-based mail server to:
 
 OpenBSD 5.4-current (GENERIC.MP) #187: Sat Dec 28 17:15:20 MST 2013
 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
 
 
 and I cannot figure out where is the problem in my smtpd config:
 
 
 # /etc/mail/smtpd.conf
 
 ext_if = re0
 
 max-message-size 35m
 bounce-warn 4h, 1d, 2d
 expire 7d
 
 pki openbsd.my.domain ca /etc/ssl/cert.pem
 pki openbsd.my.domain key /etc/mail/certs/smtpd.key
 pki openbsd.my.domain dhparams /etc/mail/certs/dh4096.pem
 pki openbsd.my.domain certificate /etc/mail/certs/smtpd.crt
 
 listen on lo0
 listen on $ext_if tls pki openbsd.my.domain auth-optional
 
 table aliases db:/etc/mail/aliases.db
 
 accept from any for local alias aliases deliver to mbox
 accept from local for any relay
 
 
 
 # smtpd -n -f /etc/mail/smtpd.conf
 configuration OK
 
 # smtpd -dvvv -f /etc/mail/smtpd.conf
 debug: init ssl-tree
 info: loading pki information for openbsd.my.domain
 info: OpenSMTPD 5.4.1 starting
 debug: bounce warning after 4h
 debug: bounce warning after 1d
 debug: bounce warning after 2d
 debug: using fs queue backend
 debug: using ramqueue scheduler backend
 debug: using ram stat backend
 info: startup [debug mode]
 debug: parent_send_config_ruleset: reloading
 debug: parent_send_config_mfa: reloading
 debug: parent_send_config: configuring smtp
 mfa: building simple chains...
 mfa: building complex chains...
 mfa: done building complex chains
 mfa: done building default chain
 debug: mfa ready
 smtpd: fatal: smtp: ssltree out of sync
 warn: mfa - smtp: pipe closed
 warn: control - smtp: pipe closed
 warn: parent - smtp: pipe closed
 failed to open table aliases
 warn: mta - control: pipe closed
 warn: mda - control: pipe closed
 warn: scheduler - control: pipe closed
 debug: queue: done loading queue into scheduler
 warn: queue - smtp: pipe closed
 
 # pgrep -lf smtpd | wc -l
0
 
 Any idea what I'm doing wrong?
 

-- 
best regards
q#



smtpd dies with fatal: smtp: ssltree out of sync

2013-12-30 Thread Mikolaj Kucharski
Hi,

I've just upgraded my OpenBSD-based mail server to:

OpenBSD 5.4-current (GENERIC.MP) #187: Sat Dec 28 17:15:20 MST 2013
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP


and I cannot figure out where is the problem in my smtpd config:


# /etc/mail/smtpd.conf

ext_if = re0

max-message-size 35m
bounce-warn 4h, 1d, 2d
expire 7d

pki openbsd.my.domain ca /etc/ssl/cert.pem
pki openbsd.my.domain key /etc/mail/certs/smtpd.key
pki openbsd.my.domain dhparams /etc/mail/certs/dh4096.pem
pki openbsd.my.domain certificate /etc/mail/certs/smtpd.crt

listen on lo0
listen on $ext_if tls pki openbsd.my.domain auth-optional

table aliases db:/etc/mail/aliases.db

accept from any for local alias aliases deliver to mbox
accept from local for any relay



# smtpd -n -f /etc/mail/smtpd.conf
configuration OK

# smtpd -dvvv -f /etc/mail/smtpd.conf
debug: init ssl-tree
info: loading pki information for openbsd.my.domain
info: OpenSMTPD 5.4.1 starting
debug: bounce warning after 4h
debug: bounce warning after 1d
debug: bounce warning after 2d
debug: using fs queue backend
debug: using ramqueue scheduler backend
debug: using ram stat backend
info: startup [debug mode]
debug: parent_send_config_ruleset: reloading
debug: parent_send_config_mfa: reloading
debug: parent_send_config: configuring smtp
mfa: building simple chains...
mfa: building complex chains...
mfa: done building complex chains
mfa: done building default chain
debug: mfa ready
smtpd: fatal: smtp: ssltree out of sync
warn: mfa - smtp: pipe closed
warn: control - smtp: pipe closed
warn: parent - smtp: pipe closed
failed to open table aliases
warn: mta - control: pipe closed
warn: mda - control: pipe closed
warn: scheduler - control: pipe closed
debug: queue: done loading queue into scheduler
warn: queue - smtp: pipe closed

# pgrep -lf smtpd | wc -l
   0

Any idea what I'm doing wrong?


-- 
best regards
q#



Re: PF altq and limiting traffic among multiple interfaces

2012-11-26 Thread Mikolaj Kucharski
Thank you all for your reply. Breen, no - I really do not have, so
limited bandwith like described below. However each time I started to
download not even being close to my maximum bandwith, both ingress and
egress traffic dropped for a while, maybe for 1 - 2 seconds then
recovered, and again dropped, again recovered, so on, so forth.

I could limit a lot upload traffic, by changing bandwidth keyword on
external interface for priq scheduler. That worked to see more stable
internet, however I waneted to limit download and not upload.

I have many internal interfaces (like the person in quoted post). That's
why I've asked, is that setup possible as it would let me do, in similar
way, what I wanted. However your posts pointed me in different
direction, and I think I've solved my problem.


It looks that performance of ppp(8)+pppoe(8)+tun(4) vs pppoe(4) has huge
difference with higher speeds, and as I never dealt with ADSL before in
my life, I did not know that. I've look at:

http://www.openbsd.org/faq/faq6.html#PPP

when I initially needed to setup my new internet connection and somehow
didn't picked up that userland pppoe will be slower.

After Stuart's email I've looked again, how to setup pppoe(4) and it
works hell of a lot better. No more ingress (and egress) stalls.

Then found some old post[#ref1] which mentions performance difference
between kernel and userland version of PPPoE.


Could faq6.html#PPP have a small note (if that make sense) that initial
PPPoE setup one could choose as userland pppoe(8), as it is easier to
debug any issues and then as a permanent solution switch to kernel
oe(4) because of better performance with higher connection speeds
of DSL line?



And for the records, as easy as it is. OpenBSD kernel PPPoE
configuration for Eircom:

# /etc/hostname.pppoe0
inet 0.0.0.0 255.255.255.255 NONE pppoedev vr0 authproto chap \
authname eir...@eircom.net authkey broadband1 \
description pppoe uplink
dest 0.0.0.1
up
!/sbin/route -nq add default -ifp pppoe0 0.0.0.1


References
 1. http://forums.whirlpool.net.au/archive/481579


On Tue, Nov 20, 2012 at 10:45:05PM +, Mikolaj Kucharski wrote:
 Hi,
 
 Searched for this for a while. Found below old post, without answer. Is
 this actually possible to setup that way?
 
 
  From http://marc.info/?l=openbsd-pfm=112015092309886w=2
  
  List:   openbsd-pf
  Subject:Altq - limiting traffic among multiple interfaces
  From:   Jonathan Camenisch alaythia () gmail ! com
  Date:   2005-06-30 14:15:55
  Message-ID: fd5fdde005063007153fc4c2c2 () mail ! gmail ! com
  
  In our organization, I'd like to use Altq to keep any one process
  (download or whatever) from hogging bandwidth and degrading
  performance for others. It's more complicated than I expected, though,
  and I haven't been able to find an example that's much like my
  environment (I'd be glad to publish mine if I could get it working
  well). Here's the layout:
  
   Office (internal) subnet DMZ
 |   /
   [fxp0]  [fxp1]
  Internet ---[fxp4]OpenBSD/pf firewall
   [fxp2]  [fxp3]
 |   \
  Guest class 1 subnet  Guest class 2 subnet
  
  We have sort of a conference center, so we're providing access for
  guests as well as offices. Hence all the subnets. We also host some of
  our own web sites on the DMZ.
  
  Now to make it more complicated, our fractional T1 provides 512Kb of
  *total* bandwidth. That is, the total of upload *and* download
  bandwidth can never exceed 512Kb.
  
  Ideally, I would like to set up a single 512k queue and divy it up
  (with cbq) among all traffic that passes in or out of fxp4, regardless
  of which interface it exits. (I'd really like to allow borrowing among
  all directions.)
  
  But as far as I know, there's no way to do exactly that. What I'm
  hoping someone could suggest is, what's the best I can do? That is,
  how can I get the best utilization out of my limited connection while
  preventing anything from hogging it?
  
  Forgive me if I'm overlooking information that's already available.
  I'm afraid my brain's gotten a little scrambled trying to adapt the
  altq model to this scenario. Thank you for your time!
  
  Jonathan
 

-- 
best regards
q#



PF altq and limiting traffic among multiple interfaces

2012-11-20 Thread Mikolaj Kucharski
Hi,

Searched for this for a while. Found below old post, without answer. Is
this actually possible to setup that way?


 From http://marc.info/?l=openbsd-pfm=112015092309886w=2
 
 List:   openbsd-pf
 Subject:Altq - limiting traffic among multiple interfaces
 From:   Jonathan Camenisch alaythia () gmail ! com
 Date:   2005-06-30 14:15:55
 Message-ID: fd5fdde005063007153fc4c2c2 () mail ! gmail ! com
 
 In our organization, I'd like to use Altq to keep any one process
 (download or whatever) from hogging bandwidth and degrading
 performance for others. It's more complicated than I expected, though,
 and I haven't been able to find an example that's much like my
 environment (I'd be glad to publish mine if I could get it working
 well). Here's the layout:
 
  Office (internal) subnet DMZ
|   /
  [fxp0]  [fxp1]
 Internet ---[fxp4]OpenBSD/pf firewall
  [fxp2]  [fxp3]
|   \
 Guest class 1 subnet  Guest class 2 subnet
 
 We have sort of a conference center, so we're providing access for
 guests as well as offices. Hence all the subnets. We also host some of
 our own web sites on the DMZ.
 
 Now to make it more complicated, our fractional T1 provides 512Kb of
 *total* bandwidth. That is, the total of upload *and* download
 bandwidth can never exceed 512Kb.
 
 Ideally, I would like to set up a single 512k queue and divy it up
 (with cbq) among all traffic that passes in or out of fxp4, regardless
 of which interface it exits. (I'd really like to allow borrowing among
 all directions.)
 
 But as far as I know, there's no way to do exactly that. What I'm
 hoping someone could suggest is, what's the best I can do? That is,
 how can I get the best utilization out of my limited connection while
 preventing anything from hogging it?
 
 Forgive me if I'm overlooking information that's already available.
 I'm afraid my brain's gotten a little scrambled trying to adapt the
 altq model to this scenario. Thank you for your time!
 
 Jonathan


-- 
best regards
q#



OpenBSD and shebang line to a script not supported?

2011-10-31 Thread Mikolaj Kucharski
Hi,

Attached archive has small testing scripts to be extracted in /tmp.
There are 2 tests (exec1 and exec2) with 2 scripts each (4 scripts
total):

test#1, openbsd:
$ /tmp/exec1.sh
exec1.sh executed

test#1, linux:
# /tmp/exec1.sh
/tmp/exec1.pl executed
exec1.sh executed


test#2, openbsd:
$ /tmp/exec2.pl
/tmp/exec2.pl[3]: use: not found
/tmp/exec2.pl[4]: use: not found
/tmp/exec2.pl[6]: syntax error: `(' unexpected

test#2, linux:
# /tmp/exec2.pl
exec2.sh executed
exec2.sh executed
exec2.sh executed
^C


What I see is that OpenBSD doesn't support scripts in shebang line and
executes /bin/sh instead. Am I correct here?


PS. Please CC me in replies. Thanks.

-- 
best regards
q#

[demime 1.01d removed an attachment of type application/x-tar-gz]



Re: OpenBSD and shebang line to a script not supported?

2011-10-31 Thread Mikolaj Kucharski
On Mon, Oct 31, 2011 at 11:25:22PM +, Mikolaj Kucharski wrote:
 Attached archive has small testing scripts to be extracted in /tmp.

http://www4.kucharski.name/pub/script-shebang-tests.tgz


-- 
best regards
q#



Re: OpenBSD and shebang line to a script not supported?

2011-10-31 Thread Mikolaj Kucharski
Dear all, before you reply to this thread please check the scripts first
and read carefully the output.

There is no permission denied, nor file not found errors, but execution
of a script with wrong interpreter.

The issue I'm reporting here maybe tricky for some of you, so please
read carefuly before posting a reply.

Also in terms of subject line, I'm talking about *script* in shebang
line, not a *binary* in shebang line. /bin/sh or /usr/bin/perl is a
binary, where exec1.sh and exec2.pl have *scripts* in shebang line.

Thank you.
 
On Mon, Oct 31, 2011 at 11:25:22PM +, Mikolaj Kucharski wrote:
 Hi,
 
 Attached archive has small testing scripts to be extracted in /tmp.
 There are 2 tests (exec1 and exec2) with 2 scripts each (4 scripts
 total):
 
 test#1, openbsd:
 $ /tmp/exec1.sh
 exec1.sh executed
 
 test#1, linux:
 # /tmp/exec1.sh
 /tmp/exec1.pl executed
 exec1.sh executed
 
 
 test#2, openbsd:
 $ /tmp/exec2.pl
 /tmp/exec2.pl[3]: use: not found
 /tmp/exec2.pl[4]: use: not found
 /tmp/exec2.pl[6]: syntax error: `(' unexpected
 
 test#2, linux:
 # /tmp/exec2.pl
 exec2.sh executed
 exec2.sh executed
 exec2.sh executed
 ^C
 
 
 What I see is that OpenBSD doesn't support scripts in shebang line and
 executes /bin/sh instead. Am I correct here?
 
 
 PS. Please CC me in replies. Thanks.
 
 -- 
 best regards
 q#

 -rwxr-xr-x  1 root wheel  129 Oct 31 23:10 exec1.pl
 -rwxr-xr-x  1 root wheel   49 Oct 31 23:10 exec1.sh
 -rwxr-xr-x  1 root wheel  161 Oct 31 23:10 exec2.pl
 -rwxr-xr-x  1 root wheel   67 Oct 31 23:10 exec2.sh


-- 
best regards
q#



Re: OpenBSD and shebang line to a script not supported?

2011-10-31 Thread Mikolaj Kucharski
Also this is what ktrace says:

 31688 ktrace   RET   ktrace 0
 31688 ktrace   CALL  execve(0xcfbdb6fb,0xcfbdb674,0xcfbdb67c)
 31688 ktrace   NAMI  ./exec1.sh
 31688 ktrace   NAMI  /tmp/exec1.pl
 31688 ktrace   RET   execve -1 errno 8 Exec format error

at this stage I think this behaviour is OpenBSD specific, the only
question to the mailing list I have, can you confirm this?

Thanks.

On Tue, Nov 01, 2011 at 12:08:04AM +, Mikolaj Kucharski wrote:
 Dear all, before you reply to this thread please check the scripts first
 and read carefully the output.
 
 There is no permission denied, nor file not found errors, but execution
 of a script with wrong interpreter.
 
 The issue I'm reporting here maybe tricky for some of you, so please
 read carefuly before posting a reply.
 
 Also in terms of subject line, I'm talking about *script* in shebang
 line, not a *binary* in shebang line. /bin/sh or /usr/bin/perl is a
 binary, where exec1.sh and exec2.pl have *scripts* in shebang line.
 
 Thank you.
  
 On Mon, Oct 31, 2011 at 11:25:22PM +, Mikolaj Kucharski wrote:
  Hi,
  
  Attached archive has small testing scripts to be extracted in /tmp.
  There are 2 tests (exec1 and exec2) with 2 scripts each (4 scripts
  total):
  
  test#1, openbsd:
  $ /tmp/exec1.sh
  exec1.sh executed
  
  test#1, linux:
  # /tmp/exec1.sh
  /tmp/exec1.pl executed
  exec1.sh executed
  
  
  test#2, openbsd:
  $ /tmp/exec2.pl
  /tmp/exec2.pl[3]: use: not found
  /tmp/exec2.pl[4]: use: not found
  /tmp/exec2.pl[6]: syntax error: `(' unexpected
  
  test#2, linux:
  # /tmp/exec2.pl
  exec2.sh executed
  exec2.sh executed
  exec2.sh executed
  ^C
  
  
  What I see is that OpenBSD doesn't support scripts in shebang line and
  executes /bin/sh instead. Am I correct here?
  
  
  PS. Please CC me in replies. Thanks.
  
  -- 
  best regards
  q#
 
  -rwxr-xr-x  1 root wheel  129 Oct 31 23:10 exec1.pl
  -rwxr-xr-x  1 root wheel   49 Oct 31 23:10 exec1.sh
  -rwxr-xr-x  1 root wheel  161 Oct 31 23:10 exec2.pl
  -rwxr-xr-x  1 root wheel   67 Oct 31 23:10 exec2.sh
 
 
 -- 
 best regards
 q#

-- 
best regards
q#



Re: smtpd and no DH parameters found in

2011-06-06 Thread Mikolaj Kucharski
On Sun, May 22, 2011 at 11:59:32PM +, Kevin Chadwick wrote:
 On Sun, 22 May 2011 23:12:21 +0100
 Mikolaj Kucharski wrote:
 
  If I'm using 4096-bit RSA key, do I need to use 4096-bit size DH
  parameters file? 
 
 No
 
 Do they need to match?
 No
 
  Is it okay to have DH smaller or even bigger?
 
 Yes, some programs like dovecot manage it automatically so maybe?
 there's more info in the source code.

Do you mean more info in dovecot sources?


PS. I have delivery disabled for misc@, please keep me in CC.

-- 
best regards
q#



Re: smtpd and no DH parameters found in

2011-05-22 Thread Mikolaj Kucharski
On Thu, May 19, 2011 at 07:58:55PM +, Kevin Chadwick wrote:
 On Thu, 19 May 2011 01:06:49 +0100
 Mikolaj Kucharski wrote:
 
  On Thu, May 19, 2011 at 12:42:57AM +0200, Gilles Chehade wrote:
   smtpd is just telling you that you did not generate Diffie-Hellman
   parameters [see smtpd.conf(5) / starttls(8)], and that it will use
   its own builtin parameters. 
   
   It is safe to ignore the message, but it is safer to actually take
   the time to generate your very own parameters. We don't do it when
   booting or starting smtpd for the first time because it can take a
   very looong time :-)
 
 Interestingly on the same unloaded system, sometimes it takes absolutely
 ages and sometimes it takes seconds.
 
  
  Okay, but how big (long) DH parameters file I should generate? Is this
  something simple as:
  
  openssl dhparam -outform PEM -out dh.pem size
  
  I didn't really get that after reading smtpd.conf(5) and starttls(8).
  
 
 I do 1024 and regenerate it every so often (early morning, once a week
 or twice a year, depending on usage/preference)

Does length of DH parameters matter for different sizes or types of
private key?

If I'm using 4096-bit RSA key, do I need to use 4096-bit size DH
parameters file? Do they need to match? Is it okay to have DH smaller or
even bigger?

I'm happy to read about it more, but openssl(1) man page wasn't too
helpful for me (unless I've missed something).

-- 
best regards
q#



Re: smtpd and no DH parameters found in

2011-05-18 Thread Mikolaj Kucharski
On Thu, May 19, 2011 at 12:42:57AM +0200, Gilles Chehade wrote:
 smtpd is just telling you that you did not generate Diffie-Hellman
 parameters [see smtpd.conf(5) / starttls(8)], and that it will use
 its own builtin parameters. 
 
 It is safe to ignore the message, but it is safer to actually take
 the time to generate your very own parameters. We don't do it when
 booting or starting smtpd for the first time because it can take a
 very looong time :-)

Okay, but how big (long) DH parameters file I should generate? Is this
something simple as:

openssl dhparam -outform PEM -out dh.pem size

I didn't really get that after reading smtpd.conf(5) and starttls(8).

-- 
best regards
q#



Re: make build failure

2011-04-22 Thread Mikolaj Kucharski
Thanks, that was the problem.

-- 
best regards
q#



make build failure

2011-04-21 Thread Mikolaj Kucharski
Hi,

I didn't make build for few years now, but usually never had issues with
it. Is anyone aware of folloing build errors, or may have a hunch where
did I screw up?


=== libstdc++-v3
c++ -O2 -pipe -g -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H 
-I/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../libstdc++-v3/ 
-I/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/libsupc++ 
-I/home/users/mik
olaj/src/gnu/lib/libstdc++-v3/../../gcc/gcc 
-I/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/include 
-I/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../../gcc/gcc/gcc/include 
-I/home/users/m
ikolaj/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/include 
-I/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../libiberty/include -I. 
-frandom-seed=RepeatabilityConsideredGood -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -
I/home/users/mikolaj/src/gnu/lib/libstdc++-v3 
-I/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/libsupc++ 
-I/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../../gcc/gcc 
-I/home/users/mikolaj/s
rc/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/include 
-I/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../../gcc/gcc/gcc/include 
-I/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/include 
-I/h
ome/users/mikolaj/src/gnu/lib/libstdc++-v3/../libiberty/include -I. 
-frandom-seed=RepeatabilityConsideredGood  -fno-implicit-templates 
-ffunction-sections -fdata-sections  -Wno-deprecated -fno-implicit-template
s -ffunction-sections -fdata-sections  -Wno-deprecated  -idirafter 
/home/users/mikolaj/dst/usr/include/g++  -nostdinc -idirafter 
/home/users/mikolaj/dst/usr/include -c 
/home/users/mikolaj/src/gnu/lib/libstdc++-
v3/../../gcc/libstdc++-v3/src/bitmap_allocator.cc -o bitmap_allocator.o
In file included from 
/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/include/ext/bitmap_allocator.h:37,
 from 
/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/src/bitmap_allocator.cc:30:
/home/users/mikolaj/dst/usr/include/g++/cstddef:50:28: error: bits/c++config.h: 
No such file or directory
In file included from 
/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/include/ext/bitmap_allocator.h:43,
 from 
/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/src/bitmap_allocator.cc:30:
/home/users/mikolaj/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/include/ext/concurrence.h:41:24:
 error: bits/gthr.h: No such file or directory


$ locate bits/gthr.h
/usr/include/g++/i386-unknown-openbsd4.9/bits/gthr.h

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.9/4.2.1/specs
Target: i386-unknown-openbsd4.9
Configured with: OpenBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719

Snapshot is quite recent

$ ls -l /usr/lib/libc.so.58.1
-r--r--r--  1 root  bin  2522304 Apr 21 04:20 /usr/lib/libc.so.58.1

# /etc/mk.conf
DEBUG   = -g
INSTALL_STRIP   =
STRIP   = /usr/bin/true
BSDOBJDIR   = /home/users/mikolaj/obj
BSDSRCDIR   = /home/users/mikolaj/src


The build script

#!/bin/sh

export DESTDIR=/home/users/mikolaj/dst
export RELEASEDIR=/home/users/mikolaj/rel

export STRIP=/usr/bin/true
export INSTALL_STRIP=

sudo rm -rf /home/users/mikolaj/src \
/home/users/mikolaj/obj \
${DESTDIR} ${RELEASEDIR}

mkdir -p /home/users/mikolaj/src \
/home/users/mikolaj/obj \
${DESTDIR} ${RELEASEDIR}

lndir /usr/src /home/users/mikolaj/src

cd /home/users/mikolaj/src  \
make obj 21 | tee ~/log.make-obj
cd /home/users/mikolaj/src/etc  \
sudo make distrib-dirs 21 | tee ~/log.dirs
cd /home/users/mikolaj/src  \
make SUDO=sudo build 21 | tee ~/log.build

-- 
best regards
q#



Re: dhcp and bridge problem

2010-08-24 Thread Mikolaj Kucharski
Thank you Stefan! Below is explanation how I should configure my
bridge(4). That was exactly my issue, dhcpd(8) was running on sis0, which
didn't had cable plugged in. Now I'm using vether(4) and all works like
a charm.

On Tue, Aug 24, 2010 at 10:55:01PM +0200, Stefan Sperling wrote:
 re http://marc.info/?l=openbsd-miscm=128260593928878w=2
 (sorry not subscribed to misc so this mail has no in-reply-to headers)
 
 I've hit the same problem some time ago.
 
 The root of the problem is related to the way network drivers call bpf(4)
 hooks. Drivers need to pass packets to bpf so that dhcpd can see them.
 Some drivers always pass packets to bpf, but some only do so if the link
 state of the interface is up. This means that with some drivers, dhcpd will
 see packets only if the interface it is listening on has a cable plugged
 into it. E.g. my net5501 soekris with dhcpd listening on vr0 could only
 serve DHCP when the vr0 interface had a cable plugged into it (so for a
 while I patched the vr driver to always call the bpf hook, but that's a
 crude workaround...)
 
 But as of 4.7, we have vether(4), which nicely solves this problem.
 Try putting your dhcpd on a vether interface, and add the vether
 interface to the bridge. Then dhcpd should see packets from all other
 bridge member interfaces just fine. You can add the router's IPs to the
 vether interface -- the other bridge ports don't need to have IP addresses.
 You can think of the vether interface as an additional port of the bridge
 which can safely be used by the machine itself.


Below my current setup which works under:

OpenBSD 4.8 (GENERIC) #136: Mon Aug 16 09:06:23 MDT 2010
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC




== /etc/hostname.bridge0 ==
description link to virtual hosts
add vether0
add sis0
add sis1
add sis2
add sis3
up

== /etc/hostname.sis0 ==
up description part of bridge0

== /etc/hostname.sis1 ==
up description part of bridge0

== /etc/hostname.sis2 ==
up description part of bridge0

== /etc/hostname.sis3 ==
up description part of bridge0

== /etc/hostname.vether0 ==
inet 192.168.110.1 255.255.255.0 NONE description part of bridge0
inet alias 192.168.3.1 255.255.255.0

== /etc/hostname.vr0 ==
dhcp description internet uplink

== /etc/hostname.vr1 ==
inet 192.168.101.1 255.255.255.0 NONE description link to net4511

== /etc/hostname.vr2 ==
inet 192.168.102.1 255.255.255.0 NONE description link to linksys

== /etc/hostname.vr3 ==
inet 192.168.103.1 255.255.255.0 NONE description link to netgear switch

# grep ^dhcpd /etc/rc.conf.local
dhcpd_flags=vr1 vr2 vr3 vether0   # enabled

-- 
best regards
q#



Re: dhcp and bridge problem

2010-08-23 Thread Mikolaj Kucharski
Hi,

I did't manage to resolve my issue. On all members of bridge0, except
sis0 (so sis1, sis2, sis3) I cannot use dhcp (Ethernet broadcast).

You can find my pcap files, which I mentioned in my previous email at
location ref#1. I've also uploaded there `ifconfig -A' output of that
router. My all emails are at ref#2 if you need to re-read what I've
wrote before in this thread.


OpenBSD 4.8 (GENERIC) #136: Mon Aug 16 09:06:23 MDT 2010
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC


References
 1. http://www.kucharski.name/pub/openbsd/pcap-files/
 2. http://marc.info/?t=12808803711r=1w=2

On Fri, Aug 06, 2010 at 04:11:10PM +0100, Mikolaj Kucharski wrote:
 I did some more research. I don't think I find something useful. I'm
 attaching pcap files from each interface when Ethernet broadcast is
 working and the it stop to work. You can see arp who has messages, they
 also stop to work around 14:18:24.
 
 I think the whole problem is because of 00:e0:4c:4c:40:91 machine which
 sends arp who-has every two seconds, if I unplug this machine from
 switch everything is working fine (I'm not able to break the bridge).
 
 If someone is interested in more details about this strange bug please
 contact me off the list.
 
 
 On Fri, Aug 06, 2010 at 01:34:05AM +0100, Mikolaj Kucharski wrote:
  No, sorry, false alarm. It stopped to work again. After rebooting one of
  the virtual machines none of the machines on the bridge (when using
  Ethernet broadcast) is able to get the lease again. You can get lease
  only when you plug the calbe where the dhcpd(8) is running (on sis0).
  
  Fedora, the vm host, is bridging VMs with physical network card.
  
  
  openbsd [ bridge0 ( sis0 sis1 sis2 sis3 ) ] --- cable from sis3 to switch 
  --|
  fedora [ virbr0 ( eth0 vnet0 ) ]  ecable from eth0 to switch 
  ---|
  
  
  
  I'm puzzled with that, don't even know how to troubleshoot this. Any one
  is willing to help me? :/
  
  
  OpenBSD 4.8-beta (GENERIC) #87: Wed Aug  4 20:16:06 MDT 2010
  dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
  
  
  
  References
   1. http://marc.info/?l=openbsd-miscm=128088020301868w=2

-- 
best regards
q#



Re: dhcp and bridge problem

2010-08-06 Thread Mikolaj Kucharski
I did some more research. I don't think I find something useful. I'm
attaching pcap files from each interface when Ethernet broadcast is
working and the it stop to work. You can see arp who has messages, they
also stop to work around 14:18:24.

I think the whole problem is because of 00:e0:4c:4c:40:91 machine which
sends arp who-has every two seconds, if I unplug this machine from
switch everything is working fine (I'm not able to break the bridge).

If someone is interested in more details about this strange bug please
contact me off the list.


On Fri, Aug 06, 2010 at 01:34:05AM +0100, Mikolaj Kucharski wrote:
 No, sorry, false alarm. It stopped to work again. After rebooting one of
 the virtual machines none of the machines on the bridge (when using
 Ethernet broadcast) is able to get the lease again. You can get lease
 only when you plug the calbe where the dhcpd(8) is running (on sis0).
 
 Fedora, the vm host, is bridging VMs with physical network card.
 
 
 openbsd [ bridge0 ( sis0 sis1 sis2 sis3 ) ] --- cable from sis3 to switch --|
 fedora [ virbr0 ( eth0 vnet0 ) ]  ecable from eth0 to switch ---|
 
 
 
 I'm puzzled with that, don't even know how to troubleshoot this. Any one
 is willing to help me? :/
 
 
 OpenBSD 4.8-beta (GENERIC) #87: Wed Aug  4 20:16:06 MDT 2010
 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
 
 
 
 References
  1. http://marc.info/?l=openbsd-miscm=128088020301868w=2

-- 
best regards
q#

[demime 1.01d removed an attachment of type application/x-tar-gz]



Re: dhcp and bridge problem

2010-08-05 Thread Mikolaj Kucharski
Do I need any special parameter to ifconfig(8) to allow Ethernet
broadcast address (ff:ff:ff:ff:ff:ff) travel to all bridge
members?


On Wed, Aug 04, 2010 at 12:59:07AM +0100, Mikolaj Kucharski wrote:
 Hi,
 
 I have two OpenBSD machines, one is a router, second is a guest on KVM
 virtual machine (Fedora 13), both run same OpenBSD version (see below
 for details). I've also used Windows machine connected to sis2 and it
 has the same issue like OpenBSD connected to sis3 (via Fedora 13).
 
 OpenBSD (or Windows) connected to sis3 (or sis2) cannot get the IP from
 the dhcpd(8) server which runs on sis0, but Fedora 13 (like OpenBSD
 connected to sis3) which already has a lease from that dhcpd(8) server
 doesn't have a problem with renewing the lease.
 
 Do you know what I am missing in my setup to make that work?
 
 
 
 OPENBSD ROUTER SETUP:
 
 == /etc/hostname.sis0 ==
 inet 192.168.110.1 255.255.255.0 NONE description part of bridge0
 
 == /etc/hostname.sis1 ==
 up description part of bridge0
 
 == /etc/hostname.sis2 ==
 up description part of bridge0 - cable to windows
 
 == /etc/hostname.sis3 ==
 up description part of bridge0 - cable to virts
 
 == /etc/hostname.bridge0 ==
 description link to virtual hosts
 add sis0
 add sis1
 add sis2
 add sis3
 up
 
 == /etc/pf.conf ==
 set skip on lo
 match out on egress from !(egress) nat-to (egress:0)
 pass
 block in on ! lo0 proto tcp to port 6000:6010
 
 == /etc/sysctl.conf ==
 net.inet.ip.forwarding=1
 
 == /etc/rc.conf.local ==
 dhcpd_flags=vr1 vr2 vr3 sis0
 
 
 
 
 OPENBSD GUEST SETUP:
 
 == /etc/hostname.em0 ==
 dhcp
 
 == /etc/pf.conf ==
 set skip on lo
 match out on egress from !(egress) nat-to (egress:0)
 pass
 block in on ! lo0 proto tcp to port 6000:6010
 
 == /etc/sysctl.conf ==
 net.inet.ip.forwarding=1
 
 
 
 ref1-ROUTER-guest-req# tcpdump -c3 -lvveni sis3 port 67
 tcpdump: listening on sis3, link-type EN10MB
 00:27:06.025235 52:54:00:53:15:40 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68  
 255.255.255.255.67: xid:0xcdbecf9a [|bootp] [tos 0x10] (ttl 16, id 0, len 328)
 00:27:07.036323 52:54:00:53:15:40 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68  
 255.255.255.255.67: xid:0xcdbecf9a secs:1 [|bootp] [tos 0x10] (ttl 16, id 0, 
 len 328)
 00:27:09.046432 52:54:00:53:15:40 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68  
 255.255.255.255.67: xid:0xcdbecf9a secs:3 [|bootp] [tos 0x10] (ttl 16, id 0, 
 len 328)
 
 
 ref2-ROUTER-guest-req# tcpdump -c3 -lvveni bridge0 port 67
 tcpdump: listening on bridge0, link-type EN10MB
 00:29:49.991539 52:54:00:53:15:40 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68  
 255.255.255.255.67: xid:0xe2c0c174 [|bootp] [tos 0x10] (ttl 16, id 0, len 328)
 00:29:50.996544 52:54:00:53:15:40 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68  
 255.255.255.255.67: xid:0xe2c0c174 secs:1 [|bootp] [tos 0x10] (ttl 16, id 0, 
 len 328)
 00:29:53.006556 52:54:00:53:15:40 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68  
 255.255.255.255.67: xid:0xe2c0c174 secs:3 [|bootp] [tos 0x10] (ttl 16, id 0, 
 len 328)
 
 
 ref3-ROUTER-guest-req# tcpdump -c3 -lvveni sis0 port 67
 tcpdump: listening on sis0, link-type EN10MB
 (nothing)
 
 
 ref4-ROUTER-fedora-req# tcpdump -c3 -lvveni sis0 port 67
 tcpdump: listening on sis0, link-type EN10MB
 00:45:37.095604 00:50:8d:9e:73:85 00:00:24:cc:d4:7c 0800 342: 
 192.168.110.206.68  192.168.110.1.67: xid:0xf1d78b4f C:192.168.110.206 
 [|bootp] (DF) (ttl 64, id 0, len 328)
 
 
 
 $ sysctl -n kern.version
 OpenBSD 4.7 (GENERIC) #558: Wed Mar 17 20:46:15 MDT 2010
 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
 
 
 -- 
 best regards
 q#

-- 
best regards
q#



Re: dhcp and bridge problem

2010-08-05 Thread Mikolaj Kucharski
On Thu, Aug 05, 2010 at 10:30:22PM +0200, Claudio Jeker wrote:
 Maybe try a -current snapshot. There was some bridge(4) work to make the
 broadcast and tcpdump behaviour better but maybe something was missed.

Thanks Claudio, that helped. Now everything seems to work.

OpenBSD 4.8-beta (GENERIC) #87: Wed Aug  4 20:16:06 MDT 2010
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC

-- 
best regards
q#



Re: dhcp and bridge problem

2010-08-05 Thread Mikolaj Kucharski
On Thu, Aug 05, 2010 at 11:13:15PM +0100, Mikolaj Kucharski wrote:
 On Thu, Aug 05, 2010 at 10:30:22PM +0200, Claudio Jeker wrote:
  Maybe try a -current snapshot. There was some bridge(4) work to make the
  broadcast and tcpdump behaviour better but maybe something was missed.
 
 Thanks Claudio, that helped. Now everything seems to work.

No, sorry, false alarm. It stopped to work again. After rebooting one of
the virtual machines none of the machines on the bridge (when using
Ethernet broadcast) is able to get the lease again. You can get lease
only when you plug the calbe where the dhcpd(8) is running (on sis0).

Fedora, the vm host, is bridging VMs with physical network card.


openbsd [ bridge0 ( sis0 sis1 sis2 sis3 ) ] --- cable from sis3 to switch --|
fedora [ virbr0 ( eth0 vnet0 ) ]  ecable from eth0 to switch ---|



I'm puzzled with that, don't even know how to troubleshoot this. Any one
is willing to help me? :/


OpenBSD 4.8-beta (GENERIC) #87: Wed Aug  4 20:16:06 MDT 2010
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC



References
 1. http://marc.info/?l=openbsd-miscm=128088020301868w=2

-- 
best regards
q#



dhcp and bridge problem

2010-08-03 Thread Mikolaj Kucharski
Hi,

I have two OpenBSD machines, one is a router, second is a guest on KVM
virtual machine (Fedora 13), both run same OpenBSD version (see below
for details). I've also used Windows machine connected to sis2 and it
has the same issue like OpenBSD connected to sis3 (via Fedora 13).

OpenBSD (or Windows) connected to sis3 (or sis2) cannot get the IP from
the dhcpd(8) server which runs on sis0, but Fedora 13 (like OpenBSD
connected to sis3) which already has a lease from that dhcpd(8) server
doesn't have a problem with renewing the lease.

Do you know what I am missing in my setup to make that work?



OPENBSD ROUTER SETUP:

== /etc/hostname.sis0 ==
inet 192.168.110.1 255.255.255.0 NONE description part of bridge0

== /etc/hostname.sis1 ==
up description part of bridge0

== /etc/hostname.sis2 ==
up description part of bridge0 - cable to windows

== /etc/hostname.sis3 ==
up description part of bridge0 - cable to virts

== /etc/hostname.bridge0 ==
description link to virtual hosts
add sis0
add sis1
add sis2
add sis3
up

== /etc/pf.conf ==
set skip on lo
match out on egress from !(egress) nat-to (egress:0)
pass
block in on ! lo0 proto tcp to port 6000:6010

== /etc/sysctl.conf ==
net.inet.ip.forwarding=1

== /etc/rc.conf.local ==
dhcpd_flags=vr1 vr2 vr3 sis0




OPENBSD GUEST SETUP:

== /etc/hostname.em0 ==
dhcp

== /etc/pf.conf ==
set skip on lo
match out on egress from !(egress) nat-to (egress:0)
pass
block in on ! lo0 proto tcp to port 6000:6010

== /etc/sysctl.conf ==
net.inet.ip.forwarding=1



ref1-ROUTER-guest-req# tcpdump -c3 -lvveni sis3 port 67
tcpdump: listening on sis3, link-type EN10MB
00:27:06.025235 52:54:00:53:15:40 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68  
255.255.255.255.67: xid:0xcdbecf9a [|bootp] [tos 0x10] (ttl 16, id 0, len 328)
00:27:07.036323 52:54:00:53:15:40 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68  
255.255.255.255.67: xid:0xcdbecf9a secs:1 [|bootp] [tos 0x10] (ttl 16, id 0, 
len 328)
00:27:09.046432 52:54:00:53:15:40 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68  
255.255.255.255.67: xid:0xcdbecf9a secs:3 [|bootp] [tos 0x10] (ttl 16, id 0, 
len 328)


ref2-ROUTER-guest-req# tcpdump -c3 -lvveni bridge0 port 67
tcpdump: listening on bridge0, link-type EN10MB
00:29:49.991539 52:54:00:53:15:40 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68  
255.255.255.255.67: xid:0xe2c0c174 [|bootp] [tos 0x10] (ttl 16, id 0, len 328)
00:29:50.996544 52:54:00:53:15:40 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68  
255.255.255.255.67: xid:0xe2c0c174 secs:1 [|bootp] [tos 0x10] (ttl 16, id 0, 
len 328)
00:29:53.006556 52:54:00:53:15:40 ff:ff:ff:ff:ff:ff 0800 342: 0.0.0.0.68  
255.255.255.255.67: xid:0xe2c0c174 secs:3 [|bootp] [tos 0x10] (ttl 16, id 0, 
len 328)


ref3-ROUTER-guest-req# tcpdump -c3 -lvveni sis0 port 67
tcpdump: listening on sis0, link-type EN10MB
(nothing)


ref4-ROUTER-fedora-req# tcpdump -c3 -lvveni sis0 port 67
tcpdump: listening on sis0, link-type EN10MB
00:45:37.095604 00:50:8d:9e:73:85 00:00:24:cc:d4:7c 0800 342: 
192.168.110.206.68  192.168.110.1.67: xid:0xf1d78b4f C:192.168.110.206 
[|bootp] (DF) (ttl 64, id 0, len 328)



$ sysctl -n kern.version
OpenBSD 4.7 (GENERIC) #558: Wed Mar 17 20:46:15 MDT 2010
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC


-- 
best regards
q#



Wrong cksum of base46.tgz set in 20th Jan 2010 snapshot

2010-01-23 Thread Mikolaj Kucharski
Hi,

On all mirrors and on main openbsd server base46.tgz is giving failed
cksum error. Not sure is that random error, as I never saw that before.
File content seems to be fine as reported by gzip, but could someone fix
that if possible?


$ config -ef bsd
OpenBSD 4.6-current (GENERIC) #511: Wed Jan 20 06:46:42 MST 2010
t...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC


$ cksum -c SHA256
(SHA256) INSTALL.i386: OK
(SHA256) INSTALL.linux: OK
(SHA256) base46.tgz: FAILED
(SHA256) bsd: OK
(SHA256) bsd.mp: OK
(SHA256) bsd.rd: OK
(SHA256) cd46.iso: OK
(SHA256) cdboot: OK
(SHA256) cdbr: OK
(SHA256) cdemu46.iso: OK
(SHA256) comp46.tgz: OK
(SHA256) etc46.tgz: OK
(SHA256) floppy46.fs: OK
(SHA256) floppyB46.fs: OK
(SHA256) floppyC46.fs: OK
(SHA256) game46.tgz: OK
(SHA256) install46.iso: OK
(SHA256) man46.tgz: OK
(SHA256) misc46.tgz: OK
(SHA256) pxeboot: OK
(SHA256) xbase46.tgz: OK
(SHA256) xetc46.tgz: OK
(SHA256) xfont46.tgz: OK
(SHA256) xserv46.tgz: OK
(SHA256) xshare46.tgz: OK


$ gzip -vt base46.tgz
base46.tgz: OK

-- 
best regards
q#



VPN ipv4_addr to ipv4_addr tunnel doesn't work

2009-07-18 Thread Mikolaj Kucharski
Hi,

My question is: What I'm doing wrong?


Two machines, both same snapshot, and I'm failing to setup VPN tunnel
between them with following configuration files:


# cn700: /etc/ipsec.conf (vpn server)
ike passive esp tunnel \
from 172.16.0.51 to 79.97.200.174 \
srcid cn700.ath.cx dstid www1.virtualization.lan


# www1: /etc/ipsec.conf (vpn client)
ike dynamic esp tunnel \
from 172.16.0.51 to 79.97.200.174 \
peer 79.97.200.174 \
srcid www1.virtualization.lan dstid cn700.ath.cx


On VPN server (cn700) I get following error:

 Jul 18 15:42:02 cn700 isakmpd[14697]: attribute_unacceptable: 
 ENCRYPTION_ALGORITHM: got AES_CBC, expected 3DES_CBC
 Jul 18 15:42:02 cn700 isakmpd[14697]: message_negotiate_sa: no compatible 
 proposal found
 Jul 18 15:42:02 cn700 isakmpd[14697]: dropped message from 79.97.195.245 port 
 54860 due to notification type NO_PROPOSAL_CHOSEN


ON VPN client (www1) I get following error:

 Jul 18 15:43:46 www1 isakmpd[13468]: transport_send_messages: giving up on 
 exchange peer-79.97.200.174, no response from peer 79.97.200.174:500


On both machines isakmpd(8) started same way `isakmpd -vK'. Machine cn700 has
ip 79.97.200.174, and www1 has ip 172.16.0.51.

# sysctl kern.version
kern.version=OpenBSD 4.6-current (GENERIC) #62: Wed Jul 15 17:27:21 MDT 2009
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC

-- 
best regards
q#



Re: VPN ipv4_addr to ipv4_addr tunnel doesn't work

2009-07-18 Thread Mikolaj Kucharski
On Sat, Jul 18, 2009 at 03:50:23PM +0100, Mikolaj Kucharski wrote:
 On both machines isakmpd(8) started same way `isakmpd -vK'. Machine cn700 has
 ip 79.97.200.174, and www1 has ip 172.16.0.51.

www1 is behind NAT with external ip 79.97.195.245 (as you can see with
error message in my first post).

-- 
best regards
q#



Unix billennium in calendar(1)

2009-07-09 Thread Mikolaj Kucharski
Calendar told me that Unix billennium was today, but Wikipedia and
date(1) command say something different.

Calendar wrote:
 Jul 09Unix billennium begins at 01:46:40 UTC, 2001

$ date -r 10
Sun Sep  9 02:46:40 IST 2001


References
 1. http://en.wikipedia.org/wiki/Unix_billennium

-- 
best regards
q#



OpenBSD's httpd and file resume

2009-07-09 Thread Mikolaj Kucharski
Hi,

Can anyone confirm that OpenBSD's httpd doesn't support resume of the
files with wget -c or totalcmd.exe, but resume works with ftp -C from
base?

-- 
best regards
q#



Re: Unix billennium in calendar(1)

2009-07-09 Thread Mikolaj Kucharski
Ok for attached patch?

On Thu, Jul 09, 2009 at 07:33:02AM +0100, Mikolaj Kucharski wrote:
 Calendar told me that Unix billennium was today, but Wikipedia and
 date(1) command say something different.
 
 Calendar wrote:
  Jul 09  Unix billennium begins at 01:46:40 UTC, 2001
 
 $ date -r 10
 Sun Sep  9 02:46:40 IST 2001
 
 
 References
  1. http://en.wikipedia.org/wiki/Unix_billennium

-- 
best regards
q#
Index: calendar.computer
===
RCS file: /cvs/src/usr.bin/calendar/calendars/calendar.computer,v
retrieving revision 1.13
diff -u calendar.computer
--- calendar.computer   10 Oct 2007 17:23:26 -  1.13
+++ calendar.computer   9 Jul 2009 23:43:27 -
@@ -59,13 +59,13 @@
Temple Univ., Phila, 1948, for symbolic differentiation on the ENIAC
 07/08  Bell Telephone Co. formed (predecessor of ATT), 1877
 07/08  CDC incorporated, 1957
-07/09  Unix billennium begins at 01:46:40 UTC, 2001
 07/22  Berkeley rescinded the 3rd term of BSD license, 1999
 08/14  First Unix-based mallet created, 1954
 08/14  IBM PC announced, 1981
 08/17  MD5 collision found by Chinese researchers, 2004
 08/22  CDC 6600 introduced, 1963
 08/23  DEC founded, 1957
+09/09  Unix billennium begins at 01:46:40 UTC, 2001
 09/15  ACM founded, 1947
 09/20  Harlan Herrick runs first FORTRAN program, 1954
 10/02  First robotics-based CAM, 1939



Re: How to mark filesystem as unclean to force fsck on boot up?

2009-06-28 Thread Mikolaj Kucharski
On Sun, Jun 28, 2009 at 10:08:47AM +0200, Joachim Schipper wrote:
  I'm looking for /forcefsck equivalent. I just wanted to be sure that
  after reading all manuals there is really no such option to mark fs as
  unclean.
 
 That is not really an answer; what *are* you really truing to do? There
 might be a good way to do it on OpenBSD, but we can't really help you.

I want to force fsck on reboot without console access. Now I'm thinking
it would be not a good idea to have that option. For ppl which don't
have console access they will try force fsck and end up with interactive
prompt if something would go wrong. You really need to have console when
you want to fsck a filesystem. For me it's EOT. Sorry for the noise.

 Of course, you may just have been curious; that'd be fine, too.

Yes, I am.

-- 
best regards
q#



Re: How to mark filesystem as unclean to force fsck on boot up?

2009-06-28 Thread Mikolaj Kucharski
On Sun, Jun 28, 2009 at 04:01:00PM +0200, Joachim Schipper wrote:
 You can try fsck -fn. It even works on mounted filesystems. It won't fix
 any issues, but it might tell you if there are any.
 
 Just kill all processes save sshd, wait a bit, call sync(8) a couple of
 times, and run it.

I don't think I will go that way. `boot -s' is okay for me, I have
console access. I would suggest to run fsck on read-only mounted
filesystem if someone wants to check live partition.

Anyway thanks for help.

-- 
best regards
q#



How to mark filesystem as unclean to force fsck on boot up?

2009-06-27 Thread Mikolaj Kucharski
Is it possible?

-- 
best regards
q#



Re: How to mark filesystem as unclean to force fsck on boot up?

2009-06-27 Thread Mikolaj Kucharski
On Sun, Jun 28, 2009 at 12:11:31AM +0200, Joachim Schipper wrote:
 On Sat, Jun 27, 2009 at 08:37:44PM +0100, Mikolaj Kucharski wrote:
  Is it possible?
 
 There is no /forcefsck mechanism for OpenBSD as there is for Linux, but
 fsck does take a -f option to force fsck, even if the filesystem is
 thought to be clean.
 
 You can boot to single user mode (boot -s) to do this. There are some
 complications if this is not possible (e.g. a server in a dedicated
 datacenter); are you in that situation? In other words, what are you
 *really* trying to do?

I'm looking for /forcefsck equivalent. I just wanted to be sure that
after reading all manuals there is really no such option to mark fs as
unclean.

-- 
best regards
q#



Flapping VPN under load on Soekris

2009-06-02 Thread Mikolaj Kucharski
Hi,

Soekris is a VPN gateway for 11 clients. All those 12 machines are running
OpenBSD. 10 of client machines are connected to the VPN via wireless and
all of those 10 machines are behind NAT (they share the same external
ip). 1 host is at remote location connected via wire.

Afer all machine are setup IPsec VPN tunnels I can ssh to them with
their internal IPs and everything works okay. There are no delays on
ssh, all ssh sessions are pretty stable.

Unforunately VPN is starting to flap when I increast bandwidthd load on
one of the servers. If I start env PKG_PATH=scp://.../ pkg_add -ui
IPsec connection will drop after a while. If I connect to samba and try
to download any file larger than 300MB VPN will drop.

Another scenario. When all VPNs are up and stable (traffic is low) and
one of the clients is rebooted at boot time when ipsecctl -f
/etc/ipsec.conf is executed it's tunell is setup and _all_ other
tunnels are immediately dropped.



I would really appreciate some help to explain root of the problem.
Below some config files, isakmpd log, and soekris dmesg attached. Not
all clients have the same ipec.conf(5) though.



Soekris:
OpenBSD 4.5 (GENERIC) #1749: Sat Feb 28 14:51:18 MST 2009
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC

Example client:
OpenBSD 4.5-current (GENERIC) #16: Sun May 31 10:28:18 MDT 2009
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC


# Soekris ipsec.conf(5):
ike passive esp tunnel \
from { \
172.16.0.0/16 192.168.1.0/24 \
192.168.2.0/24 192.168.3.0/24 \
10.0.0.0/8 any \
} to any \
main auth hmac-sha1 enc aes-128 group modp1024 \
quick auth hmac-sha1 enc aes-128 group modp1024 \
srcid net4511.ath.cx


# Example client ipsec.conf(5):
ike dynamic esp tunnel \
from egress to any peer net4511.ath.cx \
main auth hmac-sha1 enc aes-128 group modp1024 \
quick auth hmac-sha1 enc aes-128 group modp1024 \
dstid net4511.ath.cx


# Logs from Soekris:
Jun  2 21:43:44 net4511 isakmpd[16015]: isakmpd: quick mode done: src: 
79.97.195.245 dst: 172.16.0.53
Jun  2 21:43:44 net4511 isakmpd[16015]: isakmpd: quick mode done: src: 
79.97.195.245 dst: 172.16.0.66
Jun  2 21:43:44 net4511 isakmpd[16015]: isakmpd: quick mode done: src: 
79.97.195.245 dst: 172.16.0.50
Jun  2 21:43:44 net4511 isakmpd[16015]: isakmpd: quick mode done: src: 
79.97.195.245 dst: 172.16.0.59
Jun  2 21:43:44 net4511 isakmpd[16015]: isakmpd: quick mode done: src: 
79.97.195.245 dst: 172.16.0.65
Jun  2 21:43:44 net4511 isakmpd[16015]: isakmpd: quick mode done: src: 
79.97.195.245 dst: 172.16.0.52
Jun  2 21:43:44 net4511 isakmpd[16015]: message_parse_payloads: invalid next 
payload type Unknown 29 in payload of type 8
Jun  2 21:43:44 net4511 isakmpd[16015]: dropped message from 172.16.0.66 port 
500 due to notification type INVALID_PAYLOAD_TYPE
Jun  2 21:43:44 net4511 isakmpd[16015]: message_parse_payloads: reserved field 
non-zero: b3
Jun  2 21:43:44 net4511 isakmpd[16015]: dropped message from 172.16.0.50 port 
500 due to notification type PAYLOAD_MALFORMED
Jun  2 21:43:44 net4511 isakmpd[16015]: message_parse_payloads: reserved field 
non-zero: 9e
Jun  2 21:43:44 net4511 isakmpd[16015]: dropped message from 172.16.0.53 port 
500 due to notification type PAYLOAD_MALFORMED
Jun  2 21:43:45 net4511 isakmpd[16015]: isakmpd: quick mode done: src: 
79.97.195.245 dst: 172.16.0.56
Jun  2 21:43:45 net4511 isakmpd[16015]: isakmpd: quick mode done: src: 
79.97.195.245 dst: 172.16.0.226
Jun  2 21:43:45 net4511 isakmpd[16015]: message_parse_payloads: reserved field 
non-zero: c7


-- 
best regards
q#
OpenBSD 4.5 (GENERIC) #1749: Sat Feb 28 14:51:18 MST 2009
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: AMD Am486DX4 W/B or Am5x86 W/B 150 (AuthenticAMD 486-class)
cpu0: FPU
real mem  = 66678784 (63MB)
avail mem = 55160832 (52MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 20/50/27, BIOS32 rev. 0 @ 0xf7840
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 #1 is the last bus
bios0: ROM list: 0xc8000/0x9000
cpu0 at mainbus0: (uniprocessor)
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
elansc0 at pci0 dev 0 function 0 AMD ElanSC520 PCI rev 0x00: product 0 
stepping 1.1, CPU clock 100MHz, reset 0
gpio0 at elansc0: 32 pins
cbb0 at pci0 dev 9 function 0 TI PCI1410 CardBus rev 0x02: irq 10
hifn0 at pci0 dev 16 function 0 Hifn 7955/7954 rev 0x00: LZS 3DES ARC4 MD5 
SHA1 RNG AES PK, 32KB dram, irq 11
sis0 at pci0 dev 18 function 0 NS DP83815 10/100 rev 0x00, DP83816A: irq 5, 
address 00:00:24:c5:23:58
nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1
sis1 at pci0 dev 19 function 0 NS DP83815 10/100 rev 0x00, DP83816A: irq 9, 
address 00:00:24:c5:23:59
nsphyter1 at sis1 phy 0: DP83815 10/100 PHY, rev. 1
cardslot0 at cbb0 

Re: Flapping VPN under load on Soekris

2009-06-02 Thread Mikolaj Kucharski
Can anyone give me example of embedded system (Soekris-like) which is
known to handle PF traffic + VPN traffic at MBit/s throughput, and
packets per second level, generated by home users browsing web,
skyping, playing games on-line (low latency), at the same time.
*Fanless* and which can run OpenBSD of course.

I hope I'm not too demanding, is there anything like that?

On Tue, Jun 02, 2009 at 11:10:14PM +, Stuart Henderson wrote:
 you're probably overloading the CPU. try -current, sis(4) has
 MCLGETI now which should mitigate things a bit. still, that's a
 lot of load you're putting on a little 486 which will almost
 certainly be restricting your throughput.

Thanks Stuart.

-- 
best regards
q#



Re: F5 FirePass SSL VPN on OpenBSD

2009-04-04 Thread Mikolaj Kucharski
On Fri, Apr 03, 2009 at 10:18:56PM +0800, Pui Edylie wrote:
 Hi Mikolaj,

 Here is the Perl script on F5 Dev Central which is used for *nix system

 http://devcentral.f5.com/Default.aspx?tabid=63articleType=ArticleViewarticleId=32

 I have used it with great success on Linux but it should very pretty  
 straight forward for *BSD

Thanks Pui!

Cool stuff. That's what I was looking for. Works fine with ppp(8). Only
thing which I'm not able to make work is `set authkey' with script.

Fragment from ppp(8):
 set [auth]key value
 ... 
 If the first character of value is an exclamation mark (`!'), ppp
 treats the remainder of the string as a program that must be exe-
 cuted to determine the ``authname'' and ``authkey'' values.
 ... 

but that doesn't work for me. Currently I'm copy-pasting authkey from
modified version of perl script[ref#1] output each time I want to
connect to VPN, but that's little bit annoying.

Anybody has cule how to make authname/authkey work with scripts?


$ sysctl -n kern.version
OpenBSD 4.5-current (GENERIC) #14: Fri Mar 27 06:57:10 MDT 2009
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC


# /etc/ppp/ppp.conf
firepass:
 set device !/usr/sbin/openssl s_client -quiet -ign_eof -host 
VPN-SERVER-DOT-COM -port 443
 set authkey COOKIE-FROM-HTTP-HEADERS
 set dial \\ 
GET\\s/myvpn?sess=\\P\\sHTTP/1.0\\r\\nCookie:\\sMRHSession=\\P\\r\\n\\r\\n
 set timeout 0
 set dns DNS-SERVER-TAKEN-FROM-WINDOWS
 enable dns
 accept dns
 resolv reload
 resolv readonly
 add! VPN-SERVER-DOT-COM CURRENT-DEFAULT-GATEWAY
 bg ifconfig INTERFACE description LABEL CONNECTING


# /etc/ppp/ppp.linkup
firepass:
 add! default HISADDR
 resolv rewrite
 shell ifconfig INTERFACE description LABEL is UP


# /etc/ppp/ppp.linkdown
firepass:
 shell ifconfig INTERFACE description LABEL is DOWN
 resolv restore
 resolv reload


References
 1. http://devcentral.f5.com/SDK/sslvpn.public.pl.txt
 2. http://devcentral.f5.com/weblogs/dctv/archive/2006/10/30/fploginscript.aspx
 3. http://fuhm.net/software/f5vpn-login/

-- 
best regards
q#



F5 FirePass SSL VPN on OpenBSD

2009-04-03 Thread Mikolaj Kucharski
Hi,

Anyone knows any open-source client so OpenBSD could connect to it?

-- 
best regards
q#



Re: F5 FirePass SSL VPN on OpenBSD

2009-04-03 Thread Mikolaj Kucharski
On Fri, Apr 03, 2009 at 11:37:47AM +0100, Mikolaj Kucharski wrote:
 Hi,
 
 Anyone knows any open-source client so OpenBSD could connect to it?

I'm looking for ppl who actually know how to do that, not ppl who are
capable to read SERP without understanding the subject.

I'm okay with zero replys for my question if no one has a clue. TIA.

-- 
best regards
q#



Article about network monitoring system developed on OpenBSD

2009-02-02 Thread Mikolaj Kucharski
Hi,

Few months back (maybe years) there was article posted (I don't think
that was on undeadly) about monitoring system in early stage of
development which suppose to be fast, scalable, managed from web and
cli, better than anything else. There was no release at the time I've
read the article, only repository access to the sources. I'm trying to
find this article again, but I'm failing. Maybe someone from the list
have it in bookmarks or is involved/interested in the project and has
link to the article or homepage.

-- 
best regards
q#



Re: Article about network monitoring system developed on OpenBSD

2009-02-02 Thread Mikolaj Kucharski
On Mon, Feb 02, 2009 at 10:53:45AM -0500, Christopher Linn wrote:
 On Mon, Feb 02, 2009 at 03:29:19PM +, Mikolaj Kucharski wrote:
  Hi,
  
  Few months back (maybe years) there was article posted (I don't think
  that was on undeadly) about monitoring system in early stage of
  development which suppose to be fast, scalable, managed from web and
  cli, better than anything else. There was no release at the time I've
  read the article, only repository access to the sources. I'm trying to
  find this article again, but I'm failing. Maybe someone from the list
  have it in bookmarks or is involved/interested in the project and has
  link to the article or homepage.
 
 would this be it:  ?
 
 http://labs.omniti.com/trac/reconnoiter/

Perfect, that's the app. Here is the article which I was refering to:

http://lethargy.org/~jesus/archives/121-Reconnoiter-and-another-platform.html

Thanks!

-- 
best regards
q#



Re: [PF] IPSEC and PF/RDR rule

2009-01-09 Thread Mikolaj Kucharski
Hi,

I have problem on the same field. OpenBSD router with external ip is
redirecting traffic on the port 80:

# router (pf.conf)
rdr pass on ! lo inet proto tcp from any to (self) port = www - 
172.16.0.53

but the 172.16.0.53 is connected to the router with ipsec(4):

# router (ipsec.conf)
ike passive esp tunnel \
from { \
172.16.0.0/16 \
192.168.1.0/24 \
192.168.2.0/24 \
192.168.3.0/24 \
} to any \
srcid my-openbsd-router.home.lan

# 172.16.0.53 (ipsec.conf)
ike dynamic esp tunnel \
from egress to 192.168.2.0/24 \
peer my-openbsd-router-external-ip dstid 
my-openbsd-router.home.lan
ike dynamic esp tunnel \
from egress to 192.168.3.0/24 \
peer my-openbsd-router-external-ip dstid 
my-openbsd-router.home.lan

When I'm in 192.168.2.0/24 network and my laptop has no ipsec configured
I still can reach external ip of my router and traffic is redirected to the
172.16.0.53 web server, but when I'm connecting from outside world I
cannot reach the web server. From my configuration files I can see that
shouldn't work, but I don't know how to alter my configuration to make
it work. Could someone shed some light on this for me please? Thanks.


# router
OpenBSD 4.4-current (GENERIC) #1050: Wed Sep 10 12:18:05 MDT 2008
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC

# web server
OpenBSD 4.4-current (GENERIC) #1643: Tue Dec 30 13:50:47 MST 2008
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC

-- 
best regards
q#



IPsec: The same srcid, dstid and peer for multiple tunnels

2008-11-21 Thread Mikolaj Kucharski
Hi,

Is it possible to have two or more subnets, each configured with the
same srcid, dstid and peer? Currently I cannot make it work. It works
only for the first subnet in the roadwarior config file. Is is possible
at all, no matter what IPsec implementation I would like to use?


# router: /etc/ipsec.conf(5)
ike passive esp tunnel \
from 172.16.0.0/16 to any \
srcid net4511.example.com
ike passive esp tunnel \
from 192.168.1.0/24 to any \
srcid net4511.example.com
ike passive esp tunnel \
from 192.168.2.0/24 to any \
srcid net4511.example.com
ike passive esp tunnel \
from 192.168.3.0/24 to any \
srcid net4511.example.com


# roadwarior: /etc/ipsec.conf(5)
ike dynamic esp tunnel \
from egress to 172.16.0.0/16 \
peer net4511.example.com \
srcid x40.openbsd.home.lan dstid net4511.example.com
ike dynamic esp tunnel \
from egress to 192.168.3.0/24 \
peer net4511.example.com \
srcid x40.openbsd.home.lan dstid net4511.example.com



Both systems are not older than:

# sysctl -n kern.version
OpenBSD 4.4-current (GENERIC) #1050: Wed Sep 10 12:18:05 MDT 2008
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC

-- 
best regards
q#



Re: IPsec: The same srcid, dstid and peer for multiple tunnels

2008-11-21 Thread Mikolaj Kucharski
On Fri, Nov 21, 2008 at 02:52:53PM +, Mikolaj Kucharski wrote:
 Hi,
 
 Is it possible to have two or more subnets, each configured with the
 same srcid, dstid and peer? Currently I cannot make it work. It works
 only for the first subnet in the roadwarior config file. Is is possible
 at all, no matter what IPsec implementation I would like to use?

Thanks Mitja. To resolve my problem config on the router should look
like:

# router: /etc/ipsec.conf(5)
ike passive esp tunnel \
from { \
172.16.0.0/16 \
192.168.1.0/24 \
192.168.2.0/24 \
192.168.3.0/24 \
} to any \
srcid net4511.example.com


Roadwariors don't need to change anything. They can have multiple
tunnels defined separetly.

 # roadwarior: /etc/ipsec.conf(5)
 ike dynamic esp tunnel \
 from egress to 172.16.0.0/16 \
 peer net4511.example.com \
 srcid x40.openbsd.home.lan dstid net4511.example.com
 ike dynamic esp tunnel \
 from egress to 192.168.3.0/24 \
 peer net4511.example.com \
 srcid x40.openbsd.home.lan dstid net4511.example.com

-- 
best regards
q#



Serial ATA RAID ctrl on PCI

2008-10-27 Thread Mikolaj Kucharski
Hi,

I'm looking SATA controller with h/w RAID support which is working on
OpenBSD and has:

- minimum 4 SATA ports (internal preferably)
- Built-in RAID 0, RAID 1, RAID 1+0, RAID 5
- Hot swap (not a must)
- PCI bus
- large drives support (500GB)
- use as RAID and non-RAID controller (not a must)

-- 
best regards
q#



OT: App to get detailed http measurements

2008-06-14 Thread Mikolaj Kucharski
Hi,

This is off topic, but does anyone know preferably commandline utility
with which I could test HTTP server? What interests me is repeated
connections and stats how long it took dns resolv, tcp connect, send
request and finaly download of data.

Really appreciate any tips. Thanks.

-- 
best regards
q#



Re: Lid closed, system freeze with X11 on the console

2008-01-23 Thread Mikolaj Kucharski
On Wed, Jan 23, 2008 at 08:46:43AM +0100, Matthieu Herrb wrote:
  anyone confirm that?
 
 You happen to have a broken snaphot where the i810_drv.so file is a symlink
 to the newer intel driver instead of being the real version 1.4 .1 i810 
 driver.
 
 The kind of problems you're seeing with the intel driver is precisely
 the reason
 why we decided to keep the old version around.
 
 Update to a newer snapshot (or at least a newer xserver42) to go back to the
 working i810 driver.

Thank you. After update, works perfectly now.

-- 
best regards
q#



Lid closed, system freeze with X11 on the console

2008-01-22 Thread Mikolaj Kucharski
Hi,

I can easly reproduce system freeze on my ThinkPad X40 when I start Xorg
and close the lid. System hangs right away, but when I select text
console before I close the lid, everything is fine. Capslock, numlock
doesn't work either after freeze.

This happens after recent update. System without xorg.conf file. Can
anyone confirm that?

$ sysctl -n kern.version
OpenBSD 4.2-current (GENERIC) #650: Fri Jan 18 15:08:48 MST 2008
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC

-- 
best regards
q#
OpenBSD 4.2-current (GENERIC) #650: Fri Jan 18 15:08:48 MST 2008
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) M processor 1200MHz (GenuineIntel 686-class) 1.20 
GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,TM,SBF,EST,TM2
real mem  = 1063743488 (1014MB)
avail mem = 1020669952 (973MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 02/03/04, BIOS32 rev. 0 @ 0xfd740, SMBIOS 
rev. 2.33 @ 0xe0010 (56 entries)
bios0: vendor IBM version 1UET63WW (1.14 ) date 02/03/2004
bios0: IBM 23717GU
apm0 at bios0: Power Management spec V1.2
apm0: battery life expectancy 100%
apm0: AC on, battery charge high
acpi at bios0 function 0x0 not configured
pcibios0 at bios0: rev 2.1 @ 0xfd6d0/0x930
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdeb0/256 (14 entries)
pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82371FB ISA rev 0x00)
pcibios0: PCI bus #3 is the last bus
bios0: ROM list: 0xc/0xc800! 0xcc800/0x1000 0xcd800/0x1000 0xdc000/0x4000! 
0xe/0x1
cpu0 at mainbus0
cpu0: Enhanced SpeedStep 1200 MHz (1180 mV): speeds: 1200, 1100, 1000, 900, 
800, 600 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 Intel 82855GM Host rev 0x02
agp0 at pchb0: aperture at 0xe000, size 0x800
Intel 82855GM Memory rev 0x02 at pci0 dev 0 function 1 not configured
Intel 82855GM Config rev 0x02 at pci0 dev 0 function 3 not configured
vga1 at pci0 dev 2 function 0 Intel 82855GM Video rev 0x02
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
Intel 82855GM Video rev 0x02 at pci0 dev 2 function 1 not configured
uhci0 at pci0 dev 29 function 0 Intel 82801DB USB rev 0x01: irq 11
uhci1 at pci0 dev 29 function 1 Intel 82801DB USB rev 0x01: irq 11
uhci2 at pci0 dev 29 function 2 Intel 82801DB USB rev 0x01: irq 11
ehci0 at pci0 dev 29 function 7 Intel 82801DB USB rev 0x01: irq 11
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb0 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0x81
pci1 at ppb0 bus 2
cbb0 at pci1 dev 0 function 0 Ricoh 5C476 CardBus rev 0x8d: irq 11
sdhc0 at pci1 dev 0 function 1 Ricoh 5C822 SD/MMC rev 0x13: irq 11
sdmmc0 at sdhc0
em0 at pci1 dev 1 function 0 Intel PRO/1000MT Mobile (82541GI) rev 0x00: irq 
11, address 00:0a:e4:24:f5:f3
ipw0 at pci1 dev 2 function 0 Intel PRO/Wireless 2100 rev 0x04: irq 11, 
address 00:0c:f1:26:27:cc
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 3 device 0 cacheline 0x0, lattimer 0xb0
pcmcia0 at cardslot0
ichpcib0 at pci0 dev 31 function 0 Intel 82801DBM LPC rev 0x01: 24-bit timer 
at 3579545Hz
pciide0 at pci0 dev 31 function 1 Intel 82801DBM IDE rev 0x01: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: HITACHI_DK13FA-40B
wd0: 16-sector PIO, LBA, 38154MB, 78140160 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
pciide0: channel 1 disabled (no drives)
ichiic0 at pci0 dev 31 function 3 Intel 82801DB SMBus rev 0x01: irq 11
iic0 at ichiic0
spdmem0 at iic0 addr 0x51: 512MB DDR SDRAM non-parity PC2700CL2.5
auich0 at pci0 dev 31 function 5 Intel 82801DB AC97 rev 0x01: irq 11, ICH4 
AC97
ac97: codec id 0x41445374 (Analog Devices AD1981B)
ac97: codec features headphone, 20 bit DAC, No 3D Stereo
audio0 at auich0
Intel 82801DB Modem rev 0x01 at pci0 dev 31 function 6 not configured
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 Intel UHCI root hub rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 Intel UHCI root hub rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 Intel UHCI root hub rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
aps0 at isa0 port 0x1600/31
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
biomask effd netmask effd ttymask 
mtrr: Pentium Pro MTRR support
softraid0 at root
root on wd0a swap on wd0b dump on wd0b
(--) checkDevMem: using aperture driver /dev/xf86
(--) Using wscons driver on /dev/ttyC4 in pcvt compatibility mode (version 3.32)

This is a pre-release version of the X server 

Quick question about PF and binat

2007-12-21 Thread Mikolaj Kucharski
Hi,

# echo binat on wi0 inet proto '{' tcp udp icmp '}' \
from 192.168.100.2 to any '-' 192.168.15.103 | pfctl -f - 

# pfctl -sn
binat on wi0 inet proto tcp from 192.168.100.2 to any - 192.168.15.103

# sysctl -n kern.version
OpenBSD 4.2-current (GENERIC) #599: Fri Dec 14 17:13:48 MST 2007
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC


I didn't work with PF for long time, so maybe I'm missing something, but
is this behaviour correct? Could someone more experienced comment on
this? TIA

-- 
best regards
q#



C Programming, ioctl(), SIOCGIFCONF and getifaddrs()

2007-06-11 Thread Mikolaj Kucharski
Hi,

I've extracted two functions from Pidgin and its SIPE plugin. Both
functions are returning an IP address of an interface (if I understand
correctly).

I'm attaching C source and output from OpenBSD and Linux. On Linux this
function detects an IP address correctly, but on OpenBSD not.

Here is part (among others) which I don't understand. Declaration of
struc:

struct ifreq *ifr;

and with printf I can see that:

sizeof(*ifr) == sizeof(struct ifreq) /* 32 bytes */

and with my function print_buf I see that on Linux each interface starts
every 32 bytes in a buffer[1024], but on OpenBSD this isn't the case.

Could someone which knows the subject in question contact with me off
the list, how to fix this issue and shed some light so I could
understand that. Thanks in advance.


My other question is, you think that Pidgin should use getifaddrs() to
detect an IP address (please see attached source to avoid confusions)?

-- 
best regards
q#



Re: C Programming, ioctl(), SIOCGIFCONF and getifaddrs()

2007-06-11 Thread Mikolaj Kucharski
I've readed netinfro(4), ifmedia(4), getifaddrs(3) but still not
understand difference between Linux and OpenBSD. Links to any other
documentation, books and manuals will be good enough for me.

-- 
best regards
q#



Re: Problem with cvs update

2007-05-21 Thread Mikolaj Kucharski
On Mon, May 21, 2007 at 10:52:13AM +0200, Artur Grabowski wrote:
 Mikolaj Kucharski [EMAIL PROTECTED] writes:
 
  Hi,
  
  From some time I have a problem updating sources from cvs. Below is an
  example cvs session. The `No space left on device' problem was very
  often for me durning last few months, but from today I cannot update
  src and ports module at all. On target partition there is currently 1GB of
  free space. Thoes anyone has this issue?
 
 Use some other server. anoncvs.ca gets used too hard and runs out of
 /tmp.

Yes, just for records, other servers doesn't have this problem and they
are working without any issues.

-- 
best regards
q#



Problem with cvs update

2007-05-20 Thread Mikolaj Kucharski
Hi,

From some time I have a problem updating sources from cvs. Below is an
example cvs session. The `No space left on device' problem was very
often for me durning last few months, but from today I cannot update
src and ports module at all. On target partition there is currently 1GB of
free space. Thoes anyone has this issue?


$ cd src  cvs -qt up -PAd
 - main loop with [EMAIL PROTECTED]:/cvs
 - Starting server: ssh anoncvs.ca.openbsd.org -l anoncvs cvs server 
Received disconnect from 129.128.5.191: 2: fork failed: Not enough space
cvs [update aborted]: end of file from server (consult above messages if any)
 

$ cd src  cvs -qt up -PAd 
 - main loop with [EMAIL PROTECTED]:/cvs
 - Starting server: ssh anoncvs.ca.openbsd.org -l anoncvs cvs server 
Connection closed by 129.128.5.191
cvs [update aborted]: end of file from server (consult above messages if any)



$ cd src  cvs -qt up -PAd
 - main loop with [EMAIL PROTECTED]:/cvs
 - Starting server: ssh anoncvs.ca.openbsd.org -l anoncvs cvs server
 - Sending file `mkisofs.8' to server
? distrib/sets/lists/etc/ACPI
? distrib/sets/lists/etc/ACPI.MP
? distrib/sets/lists/etc/ACPI_CD
? distrib/sets/lists/etc/ACPI_CD.MP
? distrib/sets/lists/etc/GENERIC_CD
? distrib/sets/lists/etc/GENERIC_CD.MP
? distrib/sets/lists/etc/ACPI
? distrib/sets/lists/etc/ACPI.MP
? distrib/sets/lists/etc/ACPI_CD
? distrib/sets/lists/etc/ACPI_CD.MP
? distrib/sets/lists/etc/GENERIC_CD
? distrib/sets/lists/etc/GENERIC_CD.MP
? distrib/sets/lists/etc/GENERIC_NFS
? distrib/sets/lists/etc/GENERIC_NFS.MP
No space left on device

-- 
best regards
q#



Request for dmesg with Gigabyte GA-M61PM-S2

2007-03-16 Thread Mikolaj Kucharski
Hi,

Could someone who submit dmesg with GA-M61PM-S2 motherboard be so kind
and send it to me off the list with `sysctl hw' output. Thanks in advance.



On Wed, Mar 14, 2007 at 11:30:33PM -0600, Jonathan Gray wrote:
 CVSROOT:  /cvs
 Module name:  src
 Changes by:   [EMAIL PROTECTED]   2007/03/14 23:30:33
 
 Modified files:
   share/man/man4 : nfe.4 
 
 Log message:
 nfe can also be found paired with rgephy(4), ie in Gigabyte M61PM-S2
 from a submitted dmesg.

-- 
best regards
q#



1U rack server with raid driver which regiser with bio(4)

2007-02-20 Thread Mikolaj Kucharski
Hi,

Can you recommend me a server of 1U height with raid controller which
is supported by bio(4) framework? I will be very greatful for dmesg and
sysctl hw.sensors output and one line comment about setup (which raid,
is it hot swapable, etc).

I'm looking for 1U server, where I can setup a two hot pluggable hard
drives in mirror and be able to monitor them with bio(4).


ps. Please include me on cc when replying.

-- 
best regards
q#



Re: 3.9, NFS client freezes with: short receive (0/4) from nfs server...

2007-01-11 Thread Mikolaj Kucharski
Hi,

On Sun, Jul 09, 2006 at 03:27:41PM +0300, Dimitar Kodjabachev wrote:
 I have an NFS server /i386,FC4/ and two OpenBSD /i386,3.9-stable/ NFS
 clients.  At irregular intervals, not corresponding to heavy load or
 other network/system issues, the two clients start complaining with the
 message:
 
   short receive (0/4) from nfs server 
   server.domain.tld:/exported/directory
 
 Shortly after, usually a few seconds, both are unable to access the NFS
 server, as reported in /var/log/messages:
 
   nfs server server.domain.tld:/exported/directory: not responding
 
 At this point, only restarting the client machines allows them to see
 again the NFS server and mount the exported directory /umount -f doesn't
 work/.
 The fstab entries for the NFS mounts are identical on both clients:
 
   server.domain.tld:/exported/directory /mount/point nfs
 rw,nodev,nosuid,tcp,soft,intr,-r=8192,-w=8192 0 0
 
 None of the machines experiences heavy load at any point.  I have changed
 the network cards on both clients.  The dmesg for each of the clients is
 included below.
 
 Mitko

I have exactly same problem on 4.0-current. Does anyone knows howto
force umount -f to work? I didn't had any problems with udp mounted nfs
export like this but copying ~700mb of data took about 20min to copy,
and on tcp it's about 25 seconds.

-- 
best regards
q#
# mount
192.168.9.121:/mnt/storage/pub on /home/disks/nfs type nfs (nodev, nosuid, 
read-only, v3, tcp, soft, intr, timeo=100)
192.168.9.121:/mnt/storage/upload on /home/disks/nfs_rw type nfs (nodev, 
nosuid, v3, tcp, soft, intr, timeo=100)

# fstab
192.168.9.121:/mnt/storage/pub /home/disks/nfs nfs 
ro,-b,-T,-i,-s,nodev,nosuid,noauto 0 0
192.168.9.121:/mnt/storage/upload /home/disks/nfs_rw nfs 
rw,-b,-T,-i,-s,nodev,nosuid,noauto 0 0
OpenBSD 4.0-current (ACPI) #9: Tue Jan  2 07:55:07 MST 2007
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/ACPI
cpu0: Intel(R) Pentium(R) M processor 1.86GHz (GenuineIntel 686-class) 1.87 
GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF,EST,TM2
real mem  = 1073119232 (1047968K)
avail mem = 970752000 (948000K)
using 4256 buffers containing 53780480 bytes (52520K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 10/02/05, BIOS32 rev. 0 @ 0xffe90, 
SMBIOS rev. 2.3 @ 0xf7860 (60 entries)
bios0: Dell Inc. Latitude D610
pcibios0 at bios0: rev 2.1 @ 0xf/0x1
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfb2c0/192 (10 entries)
pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82371 ISA and IDE rev 0x00)
pcibios0: PCI bus #4 is the last bus
bios0: ROM list: 0xc/0x1
acpi0 at mainbus0: rev 0
acpi0: tables DSDT FACP APIC ASF! MCFG SSDT SSDT SSDT 
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpi device at acpi0 from table DSDT not configured
acpi device at acpi0 from table FACP not configured
acpi device at acpi0 from table APIC not configured
acpi device at acpi0 from table ASF! not configured
acpi device at acpi0 from table MCFG not configured
acpi device at acpi0 from table SSDT not configured
acpi device at acpi0 from table SSDT not configured
acpi device at acpi0 from table SSDT not configured
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (AGP_)
acpiprt2 at acpi0: bus 3 (PCIE)
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0: model: DELL C12956 serial: 20589 type: LION oem: 
Samsung SDI
acpibat1 at acpi0: BAT1: not present
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: PBTN
acpibtn2 at acpi0: SBTN
acpicpu0 at acpi0: CPU0: 1867, 1600, 1333, 1067, 800 MHz
acpitz0 at acpi0, critical temperature: 101 degC
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 Intel 82915GM/PM/GMS Host rev 0x03
ppb0 at pci0 dev 1 function 0 Intel 82915PM/GM PCIE rev 0x03
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 ATI Radeon Mobility M300 M22 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb1 at pci0 dev 28 function 0 Intel 82801FB PCIE rev 0x03
pci2 at ppb1 bus 2
bge0 at pci2 dev 0 function 0 Broadcom BCM5751 rev 0x01, BCM5750 A1 (0x4001): 
irq 11, address 00:14:22:d9:e8:14
brgphy0 at bge0 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0
uhci0 at pci0 dev 29 function 0 Intel 82801FB USB rev 0x03: irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1 Intel 82801FB USB rev 0x03: irq 10
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2 Intel 82801FB USB rev 0x03: irq 9
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhci3 at pci0 dev 29 function 3 Intel 82801FB USB rev 0x03: irq 5
usb3 at 

Re: Problem with iPod, not an MSDOS filesystem

2006-12-07 Thread Mikolaj Kucharski
On Wed, Dec 06, 2006 at 04:44:32AM +, Mikolaj Kucharski wrote:
 On Tue, Dec 05, 2006 at 09:27:39PM -0700, Chris Kuethe wrote:
  On 12/5/06, Mikolaj Kucharski [EMAIL PROTECTED] wrote:
  sd0 at scsibus1 targ 1 lun 0: Apple, iPod, 1.62 SCSI0 0/direct removable
  sd0: 76319MB, 19079 cyl, 64 head, 32 sec, 2048 bytes/sec, 39075372 sec 
  total
  
  80GB. Maybe it's one of the ipods with 2K sectors. Look in the
  archives for an experimental patch to possibly make this work.
 
 It looks like perfect answer. Thanks.
 
 http://marc.theaimsgroup.com/?t=11634568114r=1w=2

I used all patches from thread above (sd, msdosfs, and fdisk patch) and
iPod and fdisk are working like a charm. Thanks!

$ sysctl -n kern.version
OpenBSD 4.0-current (ACPI) #8: Wed Dec  6 03:34:00 MST 2006
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/ACPI


Patches attached in this mail too.

-- 
best regards
q#
Index: sbin/fdisk/cmd.c
===
RCS file: /cvs/src/sbin/fdisk/cmd.c,v
retrieving revision 1.42
diff -u -r1.42 cmd.c
--- sbin/fdisk/cmd.c2006/07/27 04:06:13 1.42
+++ sbin/fdisk/cmd.c2006/12/06 18:34:36
@@ -46,7 +46,7 @@
char buf[DEV_BSIZE];
 
/* Copy template MBR */
-   MBR_make(tt, buf);
+   MBR_make(tt, buf, disk-real-sec_size);
MBR_parse(disk, buf, mbr-offset, mbr-reloffset, mbr);
 
MBR_init(disk, mbr);
@@ -321,8 +321,8 @@
printf(Writing MBR at offset %d.\n, offset);
 
fd = DISK_open(disk-name, O_RDWR);
-   MBR_make(mbr, mbr_buf);
-   if (MBR_write(fd, offset, mbr_buf) != -1)
+   MBR_make(mbr, mbr_buf, disk-real-sec_size);
+   if (MBR_write(fd, offset, mbr_buf, disk-real-sec_size) != -1)
ret = CMD_CLEAN;
close(fd);
return (ret);
Index: sbin/fdisk/disk.c
===
RCS file: /cvs/src/sbin/fdisk/disk.c,v
retrieving revision 1.25
diff -u -r1.25 disk.c
--- sbin/fdisk/disk.c   2006/11/19 20:17:12 1.25
+++ sbin/fdisk/disk.c   2006/12/06 18:34:36
@@ -99,11 +99,21 @@
lm-heads = dl.d_ntracks;
lm-sectors = dl.d_nsectors;
lm-size = dl.d_secperunit;
+   lm-sec_size = dl.d_secsize;
unit_types[SECTORS].conversion = dl.d_secsize;
}
DISK_close(fd);
}
 
+   if (lm  lm-sec_size != 512  lm-sec_size != 1024 
+   lm-sec_size != 2048  lm-sec_size != 4096 
+   lm-sec_size != 8192) {
+
+   warnx(Invalid sector size %d, setting to %d, lm-sec_size,
+   DEV_BSIZE);
+   lm-sec_size = DEV_BSIZE;
+   }
+
return (lm);
 }
 
@@ -157,6 +167,7 @@
bm-heads = di.bios_heads;
bm-sectors = di.bios_sectors;
bm-size = di.bios_cylinders * di.bios_heads * di.bios_sectors;
+   bm-sec_size = DEV_BSIZE;
return (bm);
 }
 #else
@@ -187,6 +198,13 @@
disk-label = DISK_getlabelmetrics(disk-name);
disk-bios = DISK_getbiosmetrics(disk-name);
 
+   /*
+* If we have a disklabel, the kernel tells us what size sector
+* this raw device has.  As such, use it.  Yes, not pretty.
+*/
+   if (disk-label  disk-bios)
+   disk-bios-sec_size = disk-label-sec_size;
+
/* If user supplied, use that */
if (user) {
disk-real = user;
@@ -236,11 +254,12 @@
size = ((double)disk-real-size * unit_types[SECTORS].conversion) /
unit_types[i].conversion;
printf(Disk: %s\t, disk-name);
-   if (disk-real)
-   printf(geometry: %d/%d/%d [%.0f %s]\n, disk-real-cylinders,
+   if (disk-real) {
+   printf(geometry: %d/%d/%d [%.0f %s] , disk-real-cylinders,
disk-real-heads, disk-real-sectors, size,
unit_types[i].lname);
-   else
+   printf((%d byte sectors)\n, disk-real-sec_size);
+   } else
printf(geometry: none\n);
 
return (0);
Index: sbin/fdisk/disk.h
===
RCS file: /cvs/src/sbin/fdisk/disk.h,v
retrieving revision 1.8
diff -u -r1.8 disk.h
--- sbin/fdisk/disk.h   2004/08/03 09:22:03 1.8
+++ sbin/fdisk/disk.h   2006/12/06 18:34:36
@@ -34,6 +34,7 @@
u_int32_t heads;
u_int32_t sectors;
u_int32_t size;
+   u_int32_t sec_size;
 } DISK_metrics;
 
 typedef struct _disk_t {
Index: sbin/fdisk/fdisk.c
===
RCS file: /cvs/src/sbin/fdisk/fdisk.c,v
retrieving revision 1.46
diff -u -r1.46 fdisk.c
--- sbin/fdisk/fdisk.c  2006/11/09 00:01:10 1.46
+++ sbin/fdisk/fdisk.c  2006/12/06 18:34:43
@@ -78,8 +78,10 @@
char *mbrfile = NULL;
 #endif
mbr_t mbr;
-   char mbr_buf[DEV_BSIZE];
+   char mbr_buf[MBR_MAX_SIZE

Problem with iPod, not an MSDOS filesystem

2006-12-05 Thread Mikolaj Kucharski
Hi,

I have strange problem with mounting an iPod. On new device I have
this problem:


# cat /etc/fstab | grep ipod
/dev/sd0j /home/disks/ipod msdos rw,nodev,noexec,-u=mikolaj,-g=mikolaj,noauto 0 0
# mount /home/disks/ipod
mount_msdos: /dev/sd0j on /home/disks/ipod: not an MSDOS filesystem


# disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: iPod
flags:
bytes/sector: 2048
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 19079
total sectors: 39075372
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0   # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

16 partitions:
# sizeoffset  fstype [fsize bsize  cpg]
  c:  39075372 0  unused  0 0  # Cyl 0 - 19079*
  i: 6419763  unused  0 0  # Cyl 0*- 31*
  j:  39005820 64260   MSDOS   # Cyl31*- 19077*


sd0 at scsibus1 targ 1 lun 0: Apple, iPod, 1.62 SCSI0 0/direct removable
sd0: 76319MB, 19079 cyl, 64 head, 32 sec, 2048 bytes/sec, 39075372 sec total


I tried a nano version from a friend formated under Windows without any
problems. Any ideas?

# sysctl -n kern.version
OpenBSD 4.0-current (GENERIC) #7: Mon Nov 27 22:32:07 MST 2006
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC

-- 
best regards
q#



Re: Problem with iPod, not an MSDOS filesystem

2006-12-05 Thread Mikolaj Kucharski
On Tue, Dec 05, 2006 at 11:14:34PM -0500, Tim Hoolihan wrote:
 I have strange problem with mounting an iPod. On new device I have
 this problem:
 
 
 # cat /etc/fstab | grep ipod
 /dev/sd0j /home/disks/ipod msdos
 rw,nodev,noexec,-u=mikolaj,-g=mikolaj,noauto 0 0
 # mount /home/disks/ipod
 mount_msdos: /dev/sd0j on /home/disks/ipod: not an MSDOS filesystem
 
 Are you sure it's a windows formatted ipod?  It might be  apple formatted in
 which case you probably need to look into hfsplus in ports.

# file -sL /dev/sd0j
/dev/sd0j: x86 boot sector, code offset 0x3c, OEM-ID *UOKJIHC, \
Bytes/sector 2048, sectors/cluster 8, Media descriptor 0xf8, \
heads 255, hidden sectors 64260, sectors 39005818 (volumes  32 MB) , \
FAT (32 bit), sectors/FAT 9521, serial number 0x890cf46a, \
label: IPOD   

# newfs_msdos -F32 -L IPOD sd0j
[...]
# file -sL /dev/sd0j
/dev/sd0j: data

..and same problem like on the original filesystem: not an MSDOS
filesystem

-- 
best regards
q#



Re: Problem with iPod, not an MSDOS filesystem

2006-12-05 Thread Mikolaj Kucharski
On Tue, Dec 05, 2006 at 09:27:39PM -0700, Chris Kuethe wrote:
 On 12/5/06, Mikolaj Kucharski [EMAIL PROTECTED] wrote:
 sd0 at scsibus1 targ 1 lun 0: Apple, iPod, 1.62 SCSI0 0/direct removable
 sd0: 76319MB, 19079 cyl, 64 head, 32 sec, 2048 bytes/sec, 39075372 sec 
 total
 
 80GB. Maybe it's one of the ipods with 2K sectors. Look in the
 archives for an experimental patch to possibly make this work.

It looks like perfect answer. Thanks.

http://marc.theaimsgroup.com/?t=11634568114r=1w=2

-- 
best regards
q#



PATCH: usr.bin/calendar/calendars/calendar.computer

2006-09-04 Thread Mikolaj Kucharski
Hello,

I think it's worth to remind this day in year that:

07/22  Berkeley rescinded the 3rd term of BSD license, 1999


ps. I'm not on misc, please cc.

-- 
best regards
q#
Index: calendar.computer
===
RCS file: /cvs/src/usr.bin/calendar/calendars/calendar.computer,v
retrieving revision 1.9
diff -u -r1.9 calendar.computer
--- calendar.computer   2006/01/16 16:28:59 1.9
+++ calendar.computer   2006/09/04 20:47:44
@@ -59,6 +59,7 @@
Temple Univ., Phila, 1948, for symbolic differentiation on the ENIAC
 07/08  Bell Telephone Co. formed (predecessor of ATT), 1877
 07/08  CDC incorporated, 1957
+07/22  Berkeley rescinded the 3rd term of BSD license, 1999
 08/14  First Unix-based mallet created, 1954
 08/14  IBM PC announced, 1981
 08/22  CDC 6600 introduced, 1963



Re: chroot /emul/linux /bin/sh

2006-09-03 Thread Mikolaj Kucharski
On Wed, Aug 30, 2006 at 10:51:21PM +0100, Mikolaj Kucharski wrote:
 This is full example:
 
  # pwd
  /root
  # ls -ilhd .
  81 drwx--  4 root  wheel   1.0K Aug 30 08:03 .
  # date
  Wed Aug 30 22:39:30 IST 2006
  # chroot /emul/linux /bin/sh

Just for records:

/emul/linux/usr/sbin/chroot /emul/linux /bin/sh

has exacly same effect like:

/usr/sbin/chroot /emul/linux /bin/sh

 
 Here I noticed that mplayer, which played local mp3 (today I tested it
 again on http streaming, same result) stops, but this is not a problem,
 it's just symptom of..
 
  # pwd
  /root
  # ls -ilhd .
  81 drwx--  4 root  wheel   1.0K Aug 30 08:03 .
  # date
  Thu Jan  1 01:00:02 IST 1970
 
 And that why I sending this mail, I was really surprise here.
 
  # rdate -n vega.cbk.poznan.pl
  Wed Aug 30 22:40:20 IST 2006
  # date
  Wed Aug 30 22:40:21 IST 2006
 
 
 I'm attaching output of pkg_info and dmesg. Package redhat_base is mine
 production, but there are just few additional rpms[1]. I'm not on misc@
 so please CC me.
 
 
 References
  1. http://marc.theaimsgroup.com/?l=openbsd-portsm=115691903407456w=2

-- 
best regards
q#



chroot /emul/linux /bin/sh

2006-08-30 Thread Mikolaj Kucharski
Hi,

Can someone make a comment about this behaviour..

 # date
 Wed Aug 30 07:33:32 IST 2006
 # chroot /emul/linux /bin/sh

..and music in my speakers stops (mplayer)..

 # date
 Thu Jan  1 01:00:01 IST 1970
 # rdate -n vega.cbk.poznan.pl
 Wed Aug 30 07:34:36 IST 2006
 # date
 Wed Aug 30 07:34:38 IST 2006

 # sysctl kern.emul.linux
 kern.emul.linux = 1


ps. I'm not on misc@, please CC me.

-- 
best regards
q#



Re: chroot /emul/linux /bin/sh

2006-08-30 Thread Mikolaj Kucharski
I didn't send to mutch valuable information. I'm testing Linux
compatibility layer under OpenBSD, and was to lazy to put full path of
commands under /emu/linux (/usr/local/emul/redhat). Found some issue
with rename() probably but that's is other story[1]. I was quite
surprise when I put this command:

chroot /emul/linux /bin/sh

This is full example:

 # pwd
 /root
 # ls -ilhd .
 81 drwx--  4 root  wheel   1.0K Aug 30 08:03 .
 # date
 Wed Aug 30 22:39:30 IST 2006
 # chroot /emul/linux /bin/sh

Here I noticed that mplayer, which played local mp3 (today I tested it
again on http streaming, same result) stops, but this is not a problem,
it's just symptom of..

 # pwd
 /root
 # ls -ilhd .
 81 drwx--  4 root  wheel   1.0K Aug 30 08:03 .
 # date
 Thu Jan  1 01:00:02 IST 1970

And that why I sending this mail, I was really surprise here.

 # rdate -n vega.cbk.poznan.pl
 Wed Aug 30 22:40:20 IST 2006
 # date
 Wed Aug 30 22:40:21 IST 2006


I'm attaching output of pkg_info and dmesg. Package redhat_base is mine
production, but there are just few additional rpms[1]. I'm not on misc@
so please CC me.


References
 1. http://marc.theaimsgroup.com/?l=openbsd-portsm=115691903407456w=2

-- 
best regards
q#
OpenBSD 4.0-beta (GENERIC) #1079: Sat Aug 19 14:01:09 MDT 2006
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) M processor 1.86GHz (GenuineIntel 686-class) 1.87 
GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF,EST,TM2
cpu0: unknown Enhanced SpeedStep CPU, msr 0x06120e2906000e29
cpu0: using only highest and lowest power states
cpu0: Enhanced SpeedStep 1867 MHz (1356 mV): speeds: 1867, 800 MHz
real mem  = 1073119232 (1047968K)
avail mem = 970907648 (948152K)
using 4256 buffers containing 5376 bytes (52500K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 10/02/05, BIOS32 rev. 0 @ 0xffe90, 
SMBIOS rev. 2.3 @ 0xf7860 (60 entries)
bios0: Dell Inc. Latitude D610
pcibios0 at bios0: rev 2.1 @ 0xf/0x1
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfb2c0/192 (10 entries)
pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82371 ISA and IDE rev 0x00)
pcibios0: PCI bus #4 is the last bus
bios0: ROM list: 0xc/0x1
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 Intel 82915GM/PM/GMS Host rev 0x03
ppb0 at pci0 dev 1 function 0 Intel 82915PM/GM PCIE rev 0x03
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 ATI Radeon Mobility M300 M22 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb1 at pci0 dev 28 function 0 Intel 82801FB PCIE rev 0x03
pci2 at ppb1 bus 2
bge0 at pci2 dev 0 function 0 Broadcom BCM5751 rev 0x01, BCM5750 A1 (0x4001): 
irq 11, address 00:14:22:d9:e8:14
brgphy0 at bge0 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0
uhci0 at pci0 dev 29 function 0 Intel 82801FB USB rev 0x03: irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1 Intel 82801FB USB rev 0x03: irq 10
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2 Intel 82801FB USB rev 0x03: irq 9
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhci3 at pci0 dev 29 function 3 Intel 82801FB USB rev 0x03: irq 5
usb3 at uhci3: USB revision 1.0
uhub3 at usb3
uhub3: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 29 function 7 Intel 82801FB USB rev 0x03: irq 11
usb4 at ehci0: USB revision 2.0
uhub4 at usb4
uhub4: Intel EHCI root hub, rev 2.00/1.00, addr 1
uhub4: 8 ports with 8 removable, self powered
ppb2 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0xd3
pci3 at ppb2 bus 3
cbb0 at pci3 dev 1 function 0 TI PCI6515 CardBus rev 0x00: irq 5
TI PCI6515 CardBus (Smart Card mode) rev 0x00 at pci3 dev 1 function 5 not 
configured
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 4 device 0 cacheline 0x10, lattimer 0x20
pcmcia0 at cardslot0
auich0 at pci0 dev 30 function 2 Intel 82801FB AC97 rev 0x03: irq 11, ICH6 
AC97
ac97: codec id 0x83847650 (SigmaTel STAC9750/51)
ac97: codec features headphone, 20 bit DAC, 20 bit ADC, SigmaTel 3D
audio0 at auich0
Intel 82801FB Modem rev 0x03 at pci0 dev 30 function 3 not configured
ichpcib0 at pci0 dev 31 function 0 Intel 82801FBM LPC rev 0x03: PM disabled
pciide0 at pci0 dev 31 function 2 Intel 82801FBM SATA rev 0x03: DMA, channel 
0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: ST960822A
wd0: 16-sector PIO, LBA48, 57231MB, 117210240 sectors
wd0(pciide0:0:0): using PIO mode 4, 

Polish diffs to calendar.history

2006-08-24 Thread Mikolaj Kucharski
Hello,

I think that you can remove out obsolete holidays and put there our
current dates. Sorry, but references are in Polish language.

References
 1. 
http://pl.wikipedia.org/wiki/Narodowe_%C5%9Awi%C4%99to_Niepodleg%C5%82o%C5%9Bci
 2. http://pl.wikipedia.org/wiki/Narodowe_%C5%9Awi%C4%99to_Odrodzenia_Polski
 3. http://pl.wikipedia.org/wiki/%C5%9Awi%C4%99to_Narodowe_Trzeciego_Maja


ps. I'm not on misc@

-- 
best regards
q#
Index: calendar.holiday
===
RCS file: /cvs/src/usr.bin/calendar/calendars/calendar.holiday,v
retrieving revision 1.18
diff -u -r1.18 calendar.holiday
--- calendar.holiday2006/07/04 16:02:37 1.18
+++ calendar.holiday2006/08/17 05:43:11
@@ -150,6 +150,7 @@
 05/01  Law Day (decl. by Eisenhower)
 05/01  May Day in many places
 05/02  Constitution Day in Japan
+05/03  Constitution Day in Poland
 05/04  Rhode Island Independence Day
 05/05  Children's Day in Japan, South Korea
 05/05  Coronation Day in Thailand
@@ -159,7 +160,6 @@
 05/07  May Day in United Kingdom
 05/08  Truman Day in Missouri
 05/09  Liberation Day in Czechoslovakia
-05/09  Victory Day in Poland, U.S.S.R.
 05/10  Confederate Memorial Day in South Carolina
 05/10  Mothers Day in Guatemala
 05/11  Minnesota Day in Minnesota
@@ -258,7 +258,6 @@
 07/19  Martyrs Day in Burma
 07/20  Independence Day in Colombia
 07/21  National Holiday in Belgium
-07/22  National Day in Poland
 07/23  Egyptian National Day in Syrian Arab Republic
 07/23  Remembrance Day in Papua, New Guinea
 07/24  Pioneer Day in Utah
@@ -408,6 +407,7 @@
 11/06  Green March Day in Morocco
 11/07  National Revolution Day
 11/07  October Revolution Day in Hungary
+11/11  Independence Day in Poland
 11/11  Remembrance Day in Canada
 11/11  Republic Day in Maldives
 11/15  Dynasty Day in Belgium



x86 Apple MacBook dmesg(8) and sysctl(8) output request.

2006-08-20 Thread Mikolaj Kucharski
Hello,

Can someone with Apple MacBook send me off-list `dmesg' and `sysctl hw'
output from OpenBSD (prefered -current). Thanks in advance.

ps. I'm not on misc@

-- 
best regards
q#



Re: md5 failed on snapshot files from ftp.openbsd.org

2006-08-17 Thread Mikolaj Kucharski
Sorry false alarm :/ After third time everything is ok.

-- 
best regards
q#



files.conf(5) and rules for the i386 GPL floating-point emulator.

2006-08-14 Thread Mikolaj Kucharski
GNU's fpemul was removed some time ago, so this two line of manual can be
romoved too.

-- 
best regards
q#
--- files.conf.5.orig   Fri Aug 11 13:47:50 2006
+++ files.conf.5Mon Aug 14 07:17:06 2006
@@ -373,8 +373,6 @@
 Rules for the
 .Dq class
 class of devices.
-.It Pa sys/gnu/arch/i386/fpemul/files.fpemul
-Rules for the i386 GPL floating-point emulator.
 .It Pa sys/scsi/files.scsi
 Rules for the common
 .Tn SCSI



pkg_add -ui, Can't call method visit on unblessed reference at..

2006-05-22 Thread Mikolaj Kucharski
Hi,

I'm updating packages half years old (don't remeber exacly) to
3.9-release packages on system (that was -current system).


$ dmesg | head -n2
OpenBSD 3.9 (GENERIC) #615: Tue Feb 28 20:41:06 MST 2006
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC


and it's finish with below error:

# pkg_add -ui
(...)
Can't call method visit on unblessed reference at 
/usr/libdata/perl5/OpenBSD/Delete.pm line 105.
# echo $?
255


It's not a big problem, because after re-run `pkg_add -ui' everything
goes forward. I'm attaching screen output of update process and dmesg.

-- 
best regards
q#
# pkg_add -ui
Error from ftp://ftp.openbsd.org/pub/OpenBSD/3.9/packages/i386/:
Unknown command.
Candidates for updating ImageMagick-6.2.3.3-no_x11 -
ImageMagick-6.2.6.1-no_x11
Candidates for updating Xaw3d-1.5p0 - Xaw3d-1.5p0
Candidates for updating aalib-1.2 - aalib-1.2p0
Candidates for updating arc-5.21n - arc-5.21n
Candidates for updating arping-2.05p0 - arping-2.05p0
Candidates for updating atk-1.10.1 - atk-1.10.3p1
Candidates for updating cabextract-1.1 - cabextract-1.1
Candidates for updating cdparanoia-3.a9.8 - cdparanoia-3.a9.8p0
Candidates for updating cdrtools-2.01 - cdrtools-2.01
Candidates for updating clamav-0.88 - clamav-0.88
Candidates for updating curl-7.15.1 - curl-7.15.1
Candidates for updating dmidecode-2.6 - dmidecode-2.6
Candidates for updating dosbox-0.63 - dosbox-0.63p0
Candidates for updating esound-0.2.34 - esound-0.2.34p0
Candidates for updating ettercap-0.6.b-no_x11 - ettercap-0.6.bp3-no_x11
Candidates for updating fetchmail-6.2.5.2p1 - fetchmail-6.3.2
Candidates for updating flac-1.1.2 - flac-1.1.2p1
Candidates for updating gettext-0.10.40p3 - gettext-0.14.5p1
Candidates for updating gimp-2.2.8 - gimp-2.2.10
Candidates for updating glib-1.2.10p0 - glib-1.2.10p1
Candidates for updating glib2-2.6.4 - glib2-2.8.4
Candidates for updating gmake-3.80p1 - gmake-3.80p1
Candidates for updating gmp-4.1.4 - gmp-4.1.4p0
Candidates for updating gphoto-2.1.5 - gphoto-2.1.5
Candidates for updating gqview-2.0.0 - gqview-2.0.1p1
Candidates for updating gtk+-1.2.10p3 - gtk+-1.2.10p4
Candidates for updating gtk+2-2.6.9p0 - gtk+2-2.6.10p1
Candidates for updating gtypist-2.7p0 - gtypist-2.7p0
Candidates for updating gv-3.5.8p4 - gv-3.5.8p4
Candidates for updating ifstat-1.1 - ifstat-1.1p0
Candidates for updating igal-1.4 - igal-1.4
Candidates for updating imlib2-1.1.2p0 - imlib2-1.1.2p2
Candidates for updating iperf-2.0.2 - iperf-2.0.2
Candidates for updating kermit-8.0.211 - kermit-8.0.211
Candidates for updating kismet-200508R1 - kismet-200508R1p1
Candidates for updating lame-3.96.1p0 - lame-3.96.1p1
Candidates for updating lha-1.14i.p0 - lha-1.14i.ac20050924
Candidates for updating libao-0.8.5p2 - libao-0.8.5p2
Candidates for updating libart-2.3.17 - libart-2.3.17
Candidates for updating libaudiofile-0.2.6 - libaudiofile-0.2.6p0
Candidates for updating libdnet-1.10 - libdnet-1.10p1
Candidates for updating libexif-0.5.9p2 - libexif-0.5.9p3
Candidates for updating libglade2-2.5.1 - libglade2-2.5.1p4
Candidates for updating libgphoto-2.1.5 - libgphoto-2.1.5p0
Candidates for updating libltdl-1.5.18 - libltdl-1.5.22p1
Candidates for updating libmikmod-3.1.10p3 - libmikmod-3.1.10p4
Candidates for updating libmng-1.0.9p1 - libmng-1.0.9p1
Candidates for updating libnids-1.18p1 - libnids-1.20
Candidates for updating libogg-1.1.2p0 - libogg-1.1.3
Candidates for updating libslang-1.4.9p2 - libslang-1.4.9p3
Candidates for updating libtheora-1.0alpha4 - libtheora-1.0alpha4p0
Candidates for updating libtool-1.5.18p2 - libtool-1.5.22
Candidates for updating libungif-4.1.0b1 - libungif-4.1.4
Candidates for updating libusb-0.1.10a - libusb-0.1.10ap1
Candidates for updating libutf8-0.7.3p0 - libutf8-0.8
Candidates for updating libvorbis-1.1.1p0 - libvorbis-1.1.2
Candidates for updating libwmf-0.2.8.3 - libwmf-0.2.8.3p1
Candidates for updating libxml-2.6.16p6 - libxml-2.6.16p8
Candidates for updating madplay-0.15.2b - madplay-0.15.2b
Candidates for updating mc-4.6.1p0 - mc-4.6.1p0
Candidates for updating mod_perl-1.29p0 - mod_perl-1.29p0
Candidates for updating mozilla-firefox-1.0.7p2 - mozilla-firefox-1.5.0.1
Candidates for updating mpg321-0.2.10p0 - mpg321-0.2.10p0
Candidates for updating mplayer-1.0pre7p11 - mplayer-1.0pre7p14
Candidates for updating msmtp-1.4.4 - msmtp-1.4.4
Candidates for updating mutt-1.4.2ip2-compressed - mutt-1.4.2ip2-compressed
Candidates for updating nasm-0.98.38p0 - nasm-0.98.38p0
Candidates for updating nmap-3.93-no_x11 - nmap-3.95p0-no_x11
Candidates for updating ntop-1.1 - ntop-1.1
Candidates for updating p5-IO-String-1.06 - p5-IO-String-1.08
Candidates for updating pango-1.8.1 - pango-1.10.2p0
Candidates for updating pcre++-0.9.5 - pcre++-0.9.5p1
Candidates for updating pcre-4.5p1 - pcre-6.4p1
Candidates for updating physfs-1.0.0 - physfs-1.0.0p1
Candidates for updating png2ico-20021208 - png2ico-20021208
Candidates for updating popt-1.7 - popt-1.7p0
Candidates for updating poptop-1.1.4.b4p1 - 

Re: pkg_add -ui, Can't call method visit on unblessed reference at..

2006-05-22 Thread Mikolaj Kucharski
After upgrading by hand every package I found problem which result with
error in my previous post:

# ls -al /var/db/pkg/ | grep atk
drwxr-xr-x2 root  wheel   512 Feb  2 12:57 .libs-atk-1.10.3p0
drwxr-xr-x2 root  wheel   512 May 22 19:00 atk-1.10.1

# pkg_add -rvi atk-1.10.3p1 
parsing atk-1.10.3p1
Checking for collisions with .libs-atk-1.10.3p0... some found
Can't call method visit on unblessed reference at 
/usr/libdata/perl5/OpenBSD/Delete.pm line 105.

-- 
best regards
q#



Re: Can I disable AAAA queries in the resolver?

2006-03-21 Thread Mikolaj Kucharski
On Sat, Mar 18, 2006 at 08:56:00AM +, Rodolfo Gouveia wrote:
 Above we see 10 seconds delay but with Firefox it takes __hours__ to
 do something useful. Is there any posibility to disable those `'
 queries via resolv.conf(5) or $RES_OPTIONS variable?
 
 If that's the main problem, disable ipv6
 support on firefox: in the address bar enter
 about:config and change
 network.dns.disableipv6 to true.

Ok, maybe firefox is running better but anything else is very,
very slowly. Anyway thanks in advice.

$ time lynx -source http://www.google.com  /dev/null
2m31.37s real 0m0.02s user 0m0.00s system

-- 
best regards
q#



Can I disable AAAA queries in the resolver?

2006-03-15 Thread Mikolaj Kucharski
Hi,

Question like in topic. I'm currently in Cork, Ireland and in every
internet cafe here routers drops `' queries which results with
slow DNS resolving:

$ time host openbsd.org
openbsd.org has address 199.185.137.3
;; connection timed out; no servers could be reached
openbsd.org mail is handled by 6 shear.ucar.edu.
openbsd.org mail is handled by 10 cvs.openbsd.org.
0m10.48s real 0m0.00s user 0m0.00s system

Above we see 10 seconds delay but with Firefox it takes __hours__ to
do something useful. Is there any posibility to disable those `'
queries via resolv.conf(5) or $RES_OPTIONS variable?

PS. Maybe someone know dns servers from `eircom.net'.

-- 
best regards
q#



Re: Daily script and root backup question.

2005-12-15 Thread Mikolaj Kucharski
On Wed, Dec 14, 2005 at 10:20:19PM -0500, Nick Holland wrote:
 What problem are you trying to solve?

It's my curiosity and urge for understanding.

  What procedure is more safety? dd'ing device and then run fsck on
  output device, or runing after dump/restore installboot?
 
 There are multiple ways to do most tasks.  One has to be picked.
 
 restore(8) requires that a partition be mounted. (...) 

Thanks!

-- 
best regards
q#



Daily script and root backup question.

2005-12-14 Thread Mikolaj Kucharski
Hi,

Looking at /etc/daily I can see that backup is done by dd(1) command:

echo Backing up root filesystem:
echo copying /dev/r$rootdev to /dev/r$rootbak
dd if=/dev/r$rootdev of=/dev/r$rootbak bs=16b seek=1 skip=1 \
conv=noerror
fsck -y /dev/r$rootbak

My question is: backup isn't done by dump(8) and restore(8) because of
/boot'ing stuff, right? If it is, why it could not be done by dump/restore
and installboot(8)?

What procedure is more safety? dd'ing device and then run fsck on
output device, or runing after dump/restore installboot?

-- 
best regards
q#