Re: boundend less than total sectors — amd64, install70.iso, new HDD

2021-11-17 Thread Theo de Raadt
Stuart Henderson  wrote:

> > If that's the case, you have to reinstall on GPT.
> 
> But that isn't, if the disk is just used for OpenBSD and boot is close enough
> to the start of the disk (i.e. root partition isn't too far in) then setting
> the full disk with 'b' is enough, OpenBSD uses its own disklabel and doesn't
> need the entire disk to be shown in the fdisk partition

The command is

> b *




Re: boundend less than total sectors — amd64, install70.iso, new HDD

2021-11-17 Thread Łukasz Moskała
Dnia 17 listopada 2021 23:58:21 CET, Stuart Henderson 
 napisał/a:
>On 2021-11-17, Łukasz Moskała  wrote:
>>
>>
>> Dnia 17 listopada 2021 23:13:19 CET, u...@mailo.com napisał/a:
>>>Questions recap:
>>>1. Is it `OpenBSD` tools' fault or is it the HDD's fault,
>>>so should I replace the HDD under warranty?
>>>2. Can I rest assured that my install will work fine?
>>>
>>>After unpackaging a newly bought HDD,
>>>S.M.A.R.T. was checked — all new and OK,
>>>then `Hard Disk Sentinel` from under `Windows` —
>>>write-read test, random order, random data — all OK.
>>>
>>>Afterwards, `OpenBSD` was installed from `install70.iso` DVD
>>>after failing to boot `install70.img` from USB, issue asked here:
>>>https://marc.info/?t=16364002931=1=2
>>>In the installed `OpenBSD` I noticed that almost half of the disk
>>>was unused, so I booted into installer again and found with
>>>`disklabel -h wd0`:
>>>
>>>total sectors: 7814037168 # total bytes: 3.6T
>>>boundend: 4294956960
>>>
>>>Heck, how and why?
>>>
>>>http://man.openbsd.org/disklabel#b
>>>Set OpenBSD disk boundaries. This option tells disklabel which parts of
>>>the disk it is allowed to modify. This option is probably only useful
>>>for ports with fdisk(8) partition tables where the ending sector in the
>>>MBR is incorrect. The user may enter ‘*’ at the “Size” prompt to
>>>indicate the entire size of the disk (minus the starting sector). This
>>>is useful for disks where the fdisk partition table is incapable of
>>>storing the real size. Note: data may become corrupted if boundaries are
>>>extended such that they overlap with other resident operating systems.
>>>
>>>"This option is probably only useful for ports with fdisk(8) partition
>>>tables where the ending sector in the MBR is incorrect."
>>>1. Ports of `OpenBSD` to a certain hardware platform
>>>or which ports are spoken about?
>>>2. If my reading is correct, it should be some edge case, but
>>>the issue is on `amd64` — the most mainstream platform,
>>>7.0 — the most recent release
>>>and a new hard disk.
>>>
>>>I resorted to `b` of `disklabel` twice:
>>>on creating the encrypted device and on partitioning it,
>>>thus got full size used,
>>>but `fdisk -v wd0` still insists on "4294956960 Sectors"
>>>instead of 7814037168;
>>>and `fdisk -v sd4` still insists on "4294852800 Sectors"
>>>instead of 7814036576.
>>>
>>>Questions:
>>>1. What exactly is wrong: `OpenBSD`'s tools or the hard disk or what?
>>>Since it is a newly bought HDD, should I apply for warranty?
>>>2. Having set `boundend` manually, should I expect a robust operation,
>>>or might that nuisance pop up later on and interfere?
>>>
>>>Thanks
>>>
>>>
>>
>> Are you using MBR or GPT?
>> MBR has 2TiB size limit, so it kind of sounds like your issue.
>
>That's correct
>
>> If that's the case, you have to reinstall on GPT.
>
>But that isn't, if the disk is just used for OpenBSD and boot is close enough
>to the start of the disk (i.e. root partition isn't too far in) then setting
>the full disk with 'b' is enough, OpenBSD uses its own disklabel and doesn't
>need the entire disk to be shown in the fdisk partition
>
>
>

Thank you both Stuart Henderson and Crystal Kolipe for correcting me.
--
Łukasz Moskała



Re: boundend less than total sectors — amd64, install70.iso, new HDD

2021-11-17 Thread Stuart Henderson
On 2021-11-17, Łukasz Moskała  wrote:
>
>
> Dnia 17 listopada 2021 23:13:19 CET, u...@mailo.com napisał/a:
>>Questions recap:
>>1. Is it `OpenBSD` tools' fault or is it the HDD's fault,
>>so should I replace the HDD under warranty?
>>2. Can I rest assured that my install will work fine?
>>
>>After unpackaging a newly bought HDD,
>>S.M.A.R.T. was checked — all new and OK,
>>then `Hard Disk Sentinel` from under `Windows` —
>>write-read test, random order, random data — all OK.
>>
>>Afterwards, `OpenBSD` was installed from `install70.iso` DVD
>>after failing to boot `install70.img` from USB, issue asked here:
>>https://marc.info/?t=16364002931=1=2
>>In the installed `OpenBSD` I noticed that almost half of the disk
>>was unused, so I booted into installer again and found with
>>`disklabel -h wd0`:
>>
>>total sectors: 7814037168 # total bytes: 3.6T
>>boundend: 4294956960
>>
>>Heck, how and why?
>>
>>http://man.openbsd.org/disklabel#b
>>Set OpenBSD disk boundaries. This option tells disklabel which parts of
>>the disk it is allowed to modify. This option is probably only useful
>>for ports with fdisk(8) partition tables where the ending sector in the
>>MBR is incorrect. The user may enter ‘*’ at the “Size” prompt to
>>indicate the entire size of the disk (minus the starting sector). This
>>is useful for disks where the fdisk partition table is incapable of
>>storing the real size. Note: data may become corrupted if boundaries are
>>extended such that they overlap with other resident operating systems.
>>
>>"This option is probably only useful for ports with fdisk(8) partition
>>tables where the ending sector in the MBR is incorrect."
>>1. Ports of `OpenBSD` to a certain hardware platform
>>or which ports are spoken about?
>>2. If my reading is correct, it should be some edge case, but
>>the issue is on `amd64` — the most mainstream platform,
>>7.0 — the most recent release
>>and a new hard disk.
>>
>>I resorted to `b` of `disklabel` twice:
>>on creating the encrypted device and on partitioning it,
>>thus got full size used,
>>but `fdisk -v wd0` still insists on "4294956960 Sectors"
>>instead of 7814037168;
>>and `fdisk -v sd4` still insists on "4294852800 Sectors"
>>instead of 7814036576.
>>
>>Questions:
>>1. What exactly is wrong: `OpenBSD`'s tools or the hard disk or what?
>>Since it is a newly bought HDD, should I apply for warranty?
>>2. Having set `boundend` manually, should I expect a robust operation,
>>or might that nuisance pop up later on and interfere?
>>
>>Thanks
>>
>>
>
> Are you using MBR or GPT?
> MBR has 2TiB size limit, so it kind of sounds like your issue.

That's correct

> If that's the case, you have to reinstall on GPT.

But that isn't, if the disk is just used for OpenBSD and boot is close enough
to the start of the disk (i.e. root partition isn't too far in) then setting
the full disk with 'b' is enough, OpenBSD uses its own disklabel and doesn't
need the entire disk to be shown in the fdisk partition



-- 
Please keep replies on the mailing list.



Re: boundend less than total sectors ??? amd64, install70.iso, new HDD

2021-11-17 Thread Crystal Kolipe
> Are you using MBR or GPT?
> MBR has 2TiB size limit, so it kind of sounds like your issue. If that's the
> case, you have to reinstall on GPT.

No you don't.  At least not if you're using the disk exclusively with OpenBSD
or you know for sure that any other operating systems that touch it will
co-operate.

For disks larger than 2 Tb, you can create an fdisk partition spanning the
first 2 Tb, then just adjust the bounds within the disklabel to use the
whole capacity of the disk.

If you don't need to boot from the disk, you could probably get away with
not creating fdisk partitions at all, and just creating a disklabel on the
raw volume.  However, there are various caveats doing this, some of which
may not be obvious.



Re: boundend less than total sectors — amd64, install70.iso, new HDD

2021-11-17 Thread Łukasz Moskała



Dnia 17 listopada 2021 23:13:19 CET, u...@mailo.com napisał/a:
>Questions recap:
>1. Is it `OpenBSD` tools' fault or is it the HDD's fault,
>so should I replace the HDD under warranty?
>2. Can I rest assured that my install will work fine?
>
>After unpackaging a newly bought HDD,
>S.M.A.R.T. was checked — all new and OK,
>then `Hard Disk Sentinel` from under `Windows` —
>write-read test, random order, random data — all OK.
>
>Afterwards, `OpenBSD` was installed from `install70.iso` DVD
>after failing to boot `install70.img` from USB, issue asked here:
>https://marc.info/?t=16364002931=1=2
>In the installed `OpenBSD` I noticed that almost half of the disk
>was unused, so I booted into installer again and found with
>`disklabel -h wd0`:
>
>total sectors: 7814037168 # total bytes: 3.6T
>boundend: 4294956960
>
>Heck, how and why?
>
>http://man.openbsd.org/disklabel#b
>Set OpenBSD disk boundaries. This option tells disklabel which parts of
>the disk it is allowed to modify. This option is probably only useful
>for ports with fdisk(8) partition tables where the ending sector in the
>MBR is incorrect. The user may enter ‘*’ at the “Size” prompt to
>indicate the entire size of the disk (minus the starting sector). This
>is useful for disks where the fdisk partition table is incapable of
>storing the real size. Note: data may become corrupted if boundaries are
>extended such that they overlap with other resident operating systems.
>
>"This option is probably only useful for ports with fdisk(8) partition
>tables where the ending sector in the MBR is incorrect."
>1. Ports of `OpenBSD` to a certain hardware platform
>or which ports are spoken about?
>2. If my reading is correct, it should be some edge case, but
>the issue is on `amd64` — the most mainstream platform,
>7.0 — the most recent release
>and a new hard disk.
>
>I resorted to `b` of `disklabel` twice:
>on creating the encrypted device and on partitioning it,
>thus got full size used,
>but `fdisk -v wd0` still insists on "4294956960 Sectors"
>instead of 7814037168;
>and `fdisk -v sd4` still insists on "4294852800 Sectors"
>instead of 7814036576.
>
>Questions:
>1. What exactly is wrong: `OpenBSD`'s tools or the hard disk or what?
>Since it is a newly bought HDD, should I apply for warranty?
>2. Having set `boundend` manually, should I expect a robust operation,
>or might that nuisance pop up later on and interfere?
>
>Thanks
>
>

Are you using MBR or GPT?
MBR has 2TiB size limit, so it kind of sounds like your issue. If that's the 
case, you have to reinstall on GPT.

Kind regards
--
Łukasz Moskała



boundend less than total sectors — amd64, install70.iso, new HDD

2021-11-17 Thread uxer
Questions recap:
1. Is it `OpenBSD` tools' fault or is it the HDD's fault,
so should I replace the HDD under warranty?
2. Can I rest assured that my install will work fine?

After unpackaging a newly bought HDD,
S.M.A.R.T. was checked — all new and OK,
then `Hard Disk Sentinel` from under `Windows` —
write-read test, random order, random data — all OK.

Afterwards, `OpenBSD` was installed from `install70.iso` DVD
after failing to boot `install70.img` from USB, issue asked here:
https://marc.info/?t=16364002931=1=2
In the installed `OpenBSD` I noticed that almost half of the disk
was unused, so I booted into installer again and found with
`disklabel -h wd0`:

total sectors: 7814037168 # total bytes: 3.6T
boundend: 4294956960

Heck, how and why?

http://man.openbsd.org/disklabel#b
Set OpenBSD disk boundaries. This option tells disklabel which parts of
the disk it is allowed to modify. This option is probably only useful
for ports with fdisk(8) partition tables where the ending sector in the
MBR is incorrect. The user may enter ‘*’ at the “Size” prompt to
indicate the entire size of the disk (minus the starting sector). This
is useful for disks where the fdisk partition table is incapable of
storing the real size. Note: data may become corrupted if boundaries are
extended such that they overlap with other resident operating systems.

"This option is probably only useful for ports with fdisk(8) partition
tables where the ending sector in the MBR is incorrect."
1. Ports of `OpenBSD` to a certain hardware platform
or which ports are spoken about?
2. If my reading is correct, it should be some edge case, but
the issue is on `amd64` — the most mainstream platform,
7.0 — the most recent release
and a new hard disk.

I resorted to `b` of `disklabel` twice:
on creating the encrypted device and on partitioning it,
thus got full size used,
but `fdisk -v wd0` still insists on "4294956960 Sectors"
instead of 7814037168;
and `fdisk -v sd4` still insists on "4294852800 Sectors"
instead of 7814036576.

Questions:
1. What exactly is wrong: `OpenBSD`'s tools or the hard disk or what?
Since it is a newly bought HDD, should I apply for warranty?
2. Having set `boundend` manually, should I expect a robust operation,
or might that nuisance pop up later on and interfere?

Thanks




Re: How to restore vendor-specified MAC address

2021-11-17 Thread Radek
On Wed, 17 Nov 2021 17:33:25 - (UTC)
Stuart Henderson  wrote:

> On 2021-11-17, Radek  wrote:
> > On Wed, 17 Nov 2021 11:22:42 +0100
> > Denis Fondras  wrote:
> >
> >> Le Wed, Nov 17, 2021 at 05:03:42AM +0100, Radek a écrit :
> >> > 
> >> > How can I restore the vendor's MAC address?
> >> > It is 6.8/amd64.
> >> > 
> >> 
> >> Check dmesg, it will give you the original MAC address, then ifconfig 
> >> lladdr...
> >> 
> >
> > Hello Denis,
> > dmesg shows my new_MAC.
> > I know the value of my original MAC address but I used to think that 
> > removing lladdr value from /etc/hostname.if and then reboot restores the 
> > original MAC. I doesn't.
> 
> How about a power-cycle (rather than just a reboot)?
I'll do it ASAP.

> 
> > Is there any way to "force" OS to restore original MAC address by reading 
> > it from hardware/NIC instead of ifconfig lladdr ...?
> 
> That's what it normally does.
> 
> If it's somehow stuck on the new one and a power-cycle doesn't clear it then
> presumably using lladdr to reset it to the original will stick (look in old
> boot messages in /var/log/messages.*.gz, dhcp server logs, maybe printed
> on the motherboard, etc)
I have a copy of the original MAC and presumably it's not a problem to restore 
it with ifconfig lladdr but I'm trying to find out why /etc/netstart (and 
even reboot) doesn't clear it.

> 
> -- 
> Please keep replies on the mailing list.
> 


-- 
Radek



Re: How to restore vendor-specified MAC address

2021-11-17 Thread Radek
On Wed, 17 Nov 2021 17:48:44 +0100
Łukasz Moskała  wrote:

> 
> 
> Dnia 17 listopada 2021 16:39:07 CET, Radek  napisał/a:
> >On Wed, 17 Nov 2021 11:22:42 +0100
> >Denis Fondras  wrote:
> >
> >> Le Wed, Nov 17, 2021 at 05:03:42AM +0100, Radek a écrit :
> >> > 
> >> > How can I restore the vendor's MAC address?
> >> > It is 6.8/amd64.
> >> > 
> >> 
> >> Check dmesg, it will give you the original MAC address, then ifconfig 
> >> lladdr...
> >> 
> >
> >Hello Denis,
> >dmesg shows my new_MAC.
> >I know the value of my original MAC address but I used to think that 
> >removing lladdr value from /etc/hostname.if and then reboot restores the 
> >original MAC. I doesn't.
> >Is there any way to "force" OS to restore original MAC address by reading it 
> >from hardware/NIC instead of ifconfig lladdr ...?
> >
> 
> I have no idea how the lladdr option is handled by driver, but it looks like 
> your network card decided to write new_MAC to it's EEPROM chip (where it's 
> usually stored).
I thought the same thing.
> 
> Out of curiosity, does linux or any other OS show new_MAC or vendor's MAC?
It's a production router. I'm planning to replace that box with another one in 
a few weeks, then I'll do some tests.
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x7ee42040 (9 entries)
bios0: vendor coreboot version "v4.13.0.1" date 11/25/2020
bios0: PC Engines apu1

> --
> Łukasz Moskała
> 


-- 
Radek



Re: adding firmware during installation

2021-11-17 Thread Noth



On 17/11/2021 08:29, Luca Ferrari wrote:

On Tue, Nov 16, 2021 at 3:03 PM Noth  wrote:

Run the installer as usual, then once that has finished:

umount /mnt2 (this is where the install sets are)

remove installer usb drive and insert usb drive with the firmware

mount /dev/sd1a (or sd1i if using vfat) /mnt2

cp /mnt2/iwn-firmware-version.tgz /mnt/root

chroot /mnt

pkg_add /root/iwn-firmware-version.tgz

exit

reboot!

Thanks, however, if I have to install the drivers and reboot, it does
make more sense to me to reboot and install the driver then.
I was searching for a method to add the driver at the beginning of the
installation.
Nevermind, problem solved.

Luca


I think you might want to check out the release(8) manpage. Build a 
release, add the firmware into the $RELEASEDIR before the sh checkflist 
step or possibly the make release one (I haven't tried this) and 
complete the creation of the installation images. Worth doing in a VM 
for ease of use.


Good luck!

Noth



Re: How to restore vendor-specified MAC address

2021-11-17 Thread Stuart Henderson
On 2021-11-17, Radek  wrote:
> On Wed, 17 Nov 2021 11:22:42 +0100
> Denis Fondras  wrote:
>
>> Le Wed, Nov 17, 2021 at 05:03:42AM +0100, Radek a écrit :
>> > 
>> > How can I restore the vendor's MAC address?
>> > It is 6.8/amd64.
>> > 
>> 
>> Check dmesg, it will give you the original MAC address, then ifconfig 
>> lladdr...
>> 
>
> Hello Denis,
> dmesg shows my new_MAC.
> I know the value of my original MAC address but I used to think that removing 
> lladdr value from /etc/hostname.if and then reboot restores the original MAC. 
> I doesn't.

How about a power-cycle (rather than just a reboot)?

> Is there any way to "force" OS to restore original MAC address by reading it 
> from hardware/NIC instead of ifconfig lladdr ...?

That's what it normally does.

If it's somehow stuck on the new one and a power-cycle doesn't clear it then
presumably using lladdr to reset it to the original will stick (look in old
boot messages in /var/log/messages.*.gz, dhcp server logs, maybe printed
on the motherboard, etc)

-- 
Please keep replies on the mailing list.



Re: type checking/signalling shell and utilities?

2021-11-17 Thread Theo de Raadt
Reuben ua Bríġ  wrote:

> > Date: Wed, 17 Nov 2021 09:34:21 -0700
> > From: "Theo de Raadt" 
> >
> > Oh you want magic
> > 
> > you'll find it next to the ponies.
> 
> This is not magic. It is syntax. Or is C also "magic"?
> 
> The shell is the one that expands *. The shell knows they are files. It
> is not unreasonable to expect the shell to pass that information on.
> 
> I find your lack of faith disturbing.

It is really exhausting watching these replays of discussions from
before 75% of the readers were born.  They went nowhere then.  They will
go nowhere now.

The other exhausting part is "I can't do this, why doesn't someone do
this for me, oh I will ask a mailing list".



Re: How to restore vendor-specified MAC address

2021-11-17 Thread Łukasz Moskała



Dnia 17 listopada 2021 16:39:07 CET, Radek  napisał/a:
>On Wed, 17 Nov 2021 11:22:42 +0100
>Denis Fondras  wrote:
>
>> Le Wed, Nov 17, 2021 at 05:03:42AM +0100, Radek a écrit :
>> > 
>> > How can I restore the vendor's MAC address?
>> > It is 6.8/amd64.
>> > 
>> 
>> Check dmesg, it will give you the original MAC address, then ifconfig 
>> lladdr...
>> 
>
>Hello Denis,
>dmesg shows my new_MAC.
>I know the value of my original MAC address but I used to think that removing 
>lladdr value from /etc/hostname.if and then reboot restores the original MAC. 
>I doesn't.
>Is there any way to "force" OS to restore original MAC address by reading it 
>from hardware/NIC instead of ifconfig lladdr ...?
>

I have no idea how the lladdr option is handled by driver, but it looks like 
your network card decided to write new_MAC to it's EEPROM chip (where it's 
usually stored).

Out of curiosity, does linux or any other OS show new_MAC or vendor's MAC?
--
Łukasz Moskała



Re: type checking/signalling shell and utilities?

2021-11-17 Thread Theo de Raadt
Reuben ua Bríġ  wrote:

> I felt a more elegant solution would be a shell that can pass an array
> of strings as an argument, just as C can, and knows when to do so,
> rather than having each string as an argument. I wanted to know if
> there is already a shell that accomplishes that.--No need to reinvent
> the shell if someone has done so already.

Oh you want magic

you'll find it next to the ponies.



Re: How to restore vendor-specified MAC address

2021-11-17 Thread Radek
On Wed, 17 Nov 2021 11:22:42 +0100
Denis Fondras  wrote:

> Le Wed, Nov 17, 2021 at 05:03:42AM +0100, Radek a écrit :
> > 
> > How can I restore the vendor's MAC address?
> > It is 6.8/amd64.
> > 
> 
> Check dmesg, it will give you the original MAC address, then ifconfig 
> lladdr...
> 

Hello Denis,
dmesg shows my new_MAC.
I know the value of my original MAC address but I used to think that removing 
lladdr value from /etc/hostname.if and then reboot restores the original MAC. I 
doesn't.
Is there any way to "force" OS to restore original MAC address by reading it 
from hardware/NIC instead of ifconfig lladdr ...?

-- 
Radek



Re: type checking/signalling shell and utilities?

2021-11-17 Thread Paul de Weerd
On Thu, Nov 18, 2021 at 01:38:14AM +1100, Reuben ua Bríġ wrote:
| > Date: Thu, 18 Nov 2021 01:30:25 +1100
| > From: Reuben ua Bríġ 
| > 
| > Does anyone know of any shell and utilities where, for example, if
| > 
| > -rf
| > 
| > is a file name, the rm utility will understand so, and not think it is
| > a controlling flag (ugh! in-band signalling)? One where an array of
| > strings can be past as a single argument? Etc? etc?
| 
| correction: is a file name expanded from a pattern, ...

Fix your pattern.  From "*" or "??f" to "./*" or "/path/to/??f".

Also, look at $* versus $@ in the ksh manpage.  First paragraph of
http://man.openbsd.org/ksh.1#Parameters

Cheers,

Paul 'WEiRD' de Weerd

-- 
>[<++>-]<+++.>+++[<-->-]<.>+++[<+
+++>-]<.>++[<>-]<+.--.[-]
 http://www.weirdnet.nl/ 



subscribe misc@openbsd.org

2021-11-17 Thread 王 海鑫
subscribe misc@openbsd.org


Re: type checking/signalling shell and utilities?

2021-11-17 Thread Todd C . Miller
On Thu, 18 Nov 2021 01:30:25 +1100, Reuben ua =?UTF-8?B?QnLDrcSh?= wrote:

> Does anyone know of any shell and utilities where, for example, if
>
>   -rf
>
> is a file name, the rm utility will understand so, and not think it is
> a controlling flag (ugh! in-band signalling)? One where an array of
> strings can be past as a single argument? Etc? etc?

This is why POSIX requires utilities to treat "--" as end of options.
That way a script can run:

rm -- $possibly_evil_pattern

and not have things interpreted as options.  But if you don't trust
the input I sure hope this rm is not being run in a privileged context.

 - todd



Re: How to check that HT is working and used?

2021-11-17 Thread Stuart Henderson
On 2021-11-17, Dev Op  wrote:
> Hi all!
>
> I was dealing with one router and faced with the fact that I did not see
> hypertrading after installing OpenBSD 7.0. I came across an email
> https://www.mail-archive.com/source-changes@openbsd.org/msg99141.html,
> where I read hypertrading was disabled for Intel processors running on
> OpenBSD/amd64 and that it can be enabled via hw.smt. I did so, but I don't
> see it making a difference. How do you make sure it's on and used?

It doesn't usually produce much benefit in OpenBSD, sometimes it actually
slows things down.

You can see if it is working because top will show processes spread across
the HT "cpus" (which aren't really CPU cores but share resources). i.e.
twice as many as the number of real CPUs on the system.

Also there's a reason why it was disabled by default!

> OpenBSD router1 7.0 GENERIC#224 amd64

For some reason you are running a uniprocessor kernel. If this was on
purpose then it's totally expected that you see only one cpu. If not: did
you install in a strange way?

I would run the installer again and do an "upgrade" to 7.0 and make sure
bsd.mp is installed.

> dmesg.boot is here: https://pastebin.com/G24A7Jbw

This is not irc, there is no need for pastebin in a mailing list :)

> Before updating the router, I noticed that it worked without hypertrading
> on OpenBSD 6.7/amd64 with a good load:
>
> ->% uptime
> 11:03 AM up 209 days, 4:25, 3 users, load averages: 3.40, 3.17, 3.02
>
> I didn’t see which process was eating the CPU in htop, but the average load
> was scary. Suggested that HT disabled might be the cause, so I decided to
> update the OS and enable HT.

Load isn't a clear indication of cpu use, this doesn't necessarily show that
something is wrong. Nothing scary about theae values.

-- 
Please keep replies on the mailing list.



Re: How to check that HT is working and used?

2021-11-17 Thread Crystal Kolipe
On Wed, Nov 17, 2021 at 11:00:10AM +0300, Dev Op wrote:
> I was dealing with one router and faced with the fact that I did not see
> hypertrading after installing OpenBSD 7.0. I came across an email
> https://www.mail-archive.com/source-changes@openbsd.org/msg99141.html,
> where I read hypertrading was disabled for Intel processors running on
> OpenBSD/amd64 and that it can be enabled via hw.smt. I did so, but I don't
> see it making a difference. How do you make sure it's on and used?

Hyperthreading is not 'disabled' by the OpenBSD kernel in the same way that
it can be disabled in the BIOS.  All cores will be detected and active by
the MP kernel, but no processes will be scheduled on the HT cores.

What 'difference' are you expecting to see, anyway?

> dmesg.boot is here: https://pastebin.com/G24A7Jbw

Please include the full dmesg inline in future.

> The following services worked before the updates: pf / CARP / ospfd /
> zabbix-proxy / snmpd.

I would be surprised if this machine is actually CPU bound, and that
enabling HT would show a meaningful performance increase for your
application.

Also note that HT is unused by default in OpenBSD for good reasons that
have been discussed and explained on the mailing lists before.



Re: How to check that HT is working and used?

2021-11-17 Thread Łukasz Moskała

W dniu 17.11.2021 o 10:53, Dev Op pisze:

omg.. damn autocorrect! s/hypertrading/Hyper-threading/ :) Sometimes words
change their meaning. I'm laughing. Sorry for that.


ср, 17 нояб. 2021 г. в 11:00, Dev Op :


Hi all!

I was dealing with one router and faced with the fact that I did not see
hypertrading after installing OpenBSD 7.0. I came across an email
https://www.mail-archive.com/source-changes@openbsd.org/msg99141.html,
where I read hypertrading was disabled for Intel processors running on
OpenBSD/amd64 and that it can be enabled via hw.smt. I did so, but I don't
see it making a difference. How do you make sure it's on and used?

router1$ dmesg | grep ^cpu
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel(R) Xeon(R) CPU E5430 @ 2.66GHz, 2667.11 MHz, 06-17-06
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,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,SSE4.1,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu0: 6MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
cpu0: mwait min=64, max=64, C-substates=0.2.2.2, IBE
router1$ sysctl hw
hw.machine=amd64
hw.model=Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
hw.ncpu=1
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=sd0:fa871ac66d86823a
hw.diskcount=1
hw.sensors.acpitz0.temp0=8.30 degC (zone temperature)
hw.sensors.cpu0.temp0=50.00 degC
hw.sensors.ciss0.drive0=online (sd0), OK
hw.cpuspeed=2667
hw.setperf=100
hw.vendor=HP
hw.product=ProLiant DL360 G5
hw.serialno=CZJ815A9BY
hw.uuid=34353739-3234-435a-4a38-313541394259
hw.physmem=4276432896
hw.usermem=4276416512
hw.ncpufound=1
hw.allowpowerdown=1
hw.perfpolicy=manual
hw.smt=1
hw.ncpuonline=1
router1$ uname -a
OpenBSD router1 7.0 GENERIC#224 amd64
router1$

dmesg.boot is here: https://pastebin.com/G24A7Jbw

According to the Intel CPU E5430 specification, it has 4 cores.

Before updating the router, I noticed that it worked without hypertrading
on OpenBSD 6.7/amd64 with a good load:

->% uptime
11:03 AM up 209 days, 4:25, 3 users, load averages: 3.40, 3.17, 3.02

I didn’t see which process was eating the CPU in htop, but the average
load was scary. Suggested that HT disabled might be the cause, so I decided
to update the OS and enable HT.

The following services worked before the updates: pf / CARP / ospfd /
zabbix-proxy / snmpd.

Thank you for any suggestions.

Regards,
Den





Hi,

https://calomel.org/network_performance.html

According to this article, enabling hyperthreading in router may degrade 
performance.


I'm more concerned that your dmesg says only cpu0, while it should also 
have cpu1 cpu2 and cpu3 (with hyperthreading enabled also cpu4, cpu5, 
cpu6 and cpu7)


Also hw.ncpu=1 - it looks like actually you have only one cpu core enabled.

I suggest you should look in bios, because you most likely disabled 3 of 
4 cores. You can also try resetting bios to factory defaults.


This also explains high load, I think that when you'll enable them, and 
disable hyperthreading, your load may drop to about 0.8.


How much cpu usage graphs do you see in htop?


Kind regards
--
Łukasz Moskała



Re: How to restore vendor-specified MAC address

2021-11-17 Thread Denis Fondras
Le Wed, Nov 17, 2021 at 05:03:42AM +0100, Radek a écrit :
> 
> How can I restore the vendor's MAC address?
> It is 6.8/amd64.
> 

Check dmesg, it will give you the original MAC address, then ifconfig lladdr...



Re: How to check that HT is working and used?

2021-11-17 Thread Dev Op
omg.. damn autocorrect! s/hypertrading/Hyper-threading/ :) Sometimes words
change their meaning. I'm laughing. Sorry for that.


ср, 17 нояб. 2021 г. в 11:00, Dev Op :

> Hi all!
>
> I was dealing with one router and faced with the fact that I did not see
> hypertrading after installing OpenBSD 7.0. I came across an email
> https://www.mail-archive.com/source-changes@openbsd.org/msg99141.html,
> where I read hypertrading was disabled for Intel processors running on
> OpenBSD/amd64 and that it can be enabled via hw.smt. I did so, but I don't
> see it making a difference. How do you make sure it's on and used?
>
> router1$ dmesg | grep ^cpu
> cpu0 at mainbus0: (uniprocessor)
> cpu0: Intel(R) Xeon(R) CPU E5430 @ 2.66GHz, 2667.11 MHz, 06-17-06
> 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,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,SSE4.1,LONG,LAHF,PERF,SENSOR,MELTDOWN
> cpu0: 6MB 64b/line 16-way L2 cache
> cpu0: smt 0, core 0, package 0
> cpu0: mwait min=64, max=64, C-substates=0.2.2.2, IBE
> router1$ sysctl hw
> hw.machine=amd64
> hw.model=Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
> hw.ncpu=1
> hw.byteorder=1234
> hw.pagesize=4096
> hw.disknames=sd0:fa871ac66d86823a
> hw.diskcount=1
> hw.sensors.acpitz0.temp0=8.30 degC (zone temperature)
> hw.sensors.cpu0.temp0=50.00 degC
> hw.sensors.ciss0.drive0=online (sd0), OK
> hw.cpuspeed=2667
> hw.setperf=100
> hw.vendor=HP
> hw.product=ProLiant DL360 G5
> hw.serialno=CZJ815A9BY
> hw.uuid=34353739-3234-435a-4a38-313541394259
> hw.physmem=4276432896
> hw.usermem=4276416512
> hw.ncpufound=1
> hw.allowpowerdown=1
> hw.perfpolicy=manual
> hw.smt=1
> hw.ncpuonline=1
> router1$ uname -a
> OpenBSD router1 7.0 GENERIC#224 amd64
> router1$
>
> dmesg.boot is here: https://pastebin.com/G24A7Jbw
>
> According to the Intel CPU E5430 specification, it has 4 cores.
>
> Before updating the router, I noticed that it worked without hypertrading
> on OpenBSD 6.7/amd64 with a good load:
>
> ->% uptime
> 11:03 AM up 209 days, 4:25, 3 users, load averages: 3.40, 3.17, 3.02
>
> I didn’t see which process was eating the CPU in htop, but the average
> load was scary. Suggested that HT disabled might be the cause, so I decided
> to update the OS and enable HT.
>
> The following services worked before the updates: pf / CARP / ospfd /
> zabbix-proxy / snmpd.
>
> Thank you for any suggestions.
>
> Regards,
> Den
>


-- 
Regards,
Den


How to check that HT is working and used?

2021-11-17 Thread Dev Op
Hi all!

I was dealing with one router and faced with the fact that I did not see
hypertrading after installing OpenBSD 7.0. I came across an email
https://www.mail-archive.com/source-changes@openbsd.org/msg99141.html,
where I read hypertrading was disabled for Intel processors running on
OpenBSD/amd64 and that it can be enabled via hw.smt. I did so, but I don't
see it making a difference. How do you make sure it's on and used?

router1$ dmesg | grep ^cpu
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel(R) Xeon(R) CPU E5430 @ 2.66GHz, 2667.11 MHz, 06-17-06
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,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,SSE4.1,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu0: 6MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
cpu0: mwait min=64, max=64, C-substates=0.2.2.2, IBE
router1$ sysctl hw
hw.machine=amd64
hw.model=Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
hw.ncpu=1
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=sd0:fa871ac66d86823a
hw.diskcount=1
hw.sensors.acpitz0.temp0=8.30 degC (zone temperature)
hw.sensors.cpu0.temp0=50.00 degC
hw.sensors.ciss0.drive0=online (sd0), OK
hw.cpuspeed=2667
hw.setperf=100
hw.vendor=HP
hw.product=ProLiant DL360 G5
hw.serialno=CZJ815A9BY
hw.uuid=34353739-3234-435a-4a38-313541394259
hw.physmem=4276432896
hw.usermem=4276416512
hw.ncpufound=1
hw.allowpowerdown=1
hw.perfpolicy=manual
hw.smt=1
hw.ncpuonline=1
router1$ uname -a
OpenBSD router1 7.0 GENERIC#224 amd64
router1$

dmesg.boot is here: https://pastebin.com/G24A7Jbw

According to the Intel CPU E5430 specification, it has 4 cores.

Before updating the router, I noticed that it worked without hypertrading
on OpenBSD 6.7/amd64 with a good load:

->% uptime
11:03 AM up 209 days, 4:25, 3 users, load averages: 3.40, 3.17, 3.02

I didn’t see which process was eating the CPU in htop, but the average load
was scary. Suggested that HT disabled might be the cause, so I decided to
update the OS and enable HT.

The following services worked before the updates: pf / CARP / ospfd /
zabbix-proxy / snmpd.

Thank you for any suggestions.

Regards,
Den