pf queuing/bandwidth control question

2022-02-16 Thread Matthias Pressfreund
On a server with 3 LAN interfaces (re0/1/2):
* re0 connected to the ISP
* re1 connected to the internal network
* re2 so far unused

I was setting up pf queues for bandwidth control as follows:
* one queue on re0 for outgoing traffic
* another queue on re1 for incoming traffic

Now, I would like to connect a wireless LAN router to re2 offering a guest 
network. As far as I understood, a pf queue has to be bound to exactly one 
network interface. So I'm wondering if there is another way to include incoming 
traffic on re2 into the very same bandwidth control currently realized by the 
queue on re1.



Values from wsconsctl(8) and xbacklight(1) may differ

2022-02-16 Thread Joel Carnat
Hello,

I have just noticed that depending on how you change the display
brightness on my ThinkPad, values may differ wether I query using
wsconsctl(8) and xbacklight(1).

Here's what I have observed:
# doas wsconsctl display.brightness ; xbacklight -get 
display.brightness=25.11%
25.00

# xbacklight -set 50  
# doas wsconsctl display.brightness ; xbacklight -get 
display.brightness=50.00%
50.00

# doas wsconsctl display.brightness=75
display.brightness -> 75.11%
# doas wsconsctl display.brightness ; xbacklight -get 
display.brightness=75.11%
50.00

I also tried using the (ThinkPad T460s) keyboard brightness buttons and
check which software show the proper value. From the previous step, hit
the button until I got to the max brightness I could get, I end up with:

# doas wsconsctl display.brightness ; xbacklight -get 
display.brightness=100.00%
50.00

Then as little light as I could get:
# doas wsconsctl display.brightness ; xbacklight -get 
display.brightness=2.69%
50.00

In case it matters, this is "7.0 GENERIC.MP#335 amd64" with "Intel HD
Graphics 520" attached as inteldrm0 using "modeset(0): glamor X
acceleration enabled on Mesa Intel(R) HD Graphics 520 (SKL GT2)"

Regards,
Joel C.



Re: smtpd bounce messages and non-existent users

2022-02-16 Thread Tom Szilagyi
On Tue, Feb 15, 2022 at 12:26:55PM -0600, fix...@gmail.com wrote:
> I have a server configured to accept mail for the domain of the server
> itself (example.org) and virtual domains (example.com). The virtual
> domain has several mappings of users to both local mbox accounts and
> remote forwarding. That works correctly.
> 
> The problems I'm having are:
> 
> 1. When I send mail to non-existent users in vusers from the local
> machine, no bounce message is ever sent back to the user. I do see the
> following log entries, but is there a way to configure bounce messages
> sent back to the client in this case?
> 
> Feb 15 12:15:09 server smtpd[90604]: 886047b20afc9b3d smtp
> disconnected reason=quit
> Feb 15 12:15:22 server smtpd[90604]: 886047b5d8ac59a6 smtp connected
> address=local host=server.example.org
> Feb 15 12:15:22 server smtpd[90604]: 886047b5d8ac59a6 smtp
> failed-command command="RCPT TO: "
> result="524 5.2.4 Mailing list expansion problem:
> "
> Feb 15 12:15:22 server smtpd[90604]: 886047b5d8ac59a6 smtp
> disconnected reason=disconnect

Your mail server is not accepting the mail because of the invalid
recipient. Not having accepted the incoming mail, your mail server did
not assume responsibility for transferring it to the recipient. There
is, therefore, no reason for a bounce message. Further, it would be
actively harmful to have such functionality, because anyone poking
your server could trigger it to send bounces to any real or imaginary
addresses.

> 
> 
> 2. Even when sending from a local account to a local non-existent user
> such as fakeu...@server.example.org, I don't get a bounce as I'd
> expect.
> 
> Feb 15 12:18:05 server smtpd[90604]: 886047b616b4564e smtp connected
> address=local host=server.example.org
> Feb 15 12:18:05 server smtpd[90604]: 886047b616b4564e smtp
> failed-command command="RCPT TO: "
> result="550 Invalid recipient: "
> Feb 15 12:18:05 lax smtpd[90604]: 886047b616b4564e smtp disconnected
> reason=disconnect

Again, why do you expect a bounce? As the SMTP client, you got a clear
error message "invalid recipient" and the transaction was aborted.

> 
> 
> 3. When sending mail to non-existent users from an external mail
> server, I get the same log message generated and a 524 error is sent
> back to the sender with "Mailing list expansion problem" as the
> message.
> 
> Is there a way to generate a standard 550 Invalid recipient message,
> instead?

You can put something like this in your smtpd.conf(5) to reject
invalid recipients up front with a message of your choosing:

filter validuser phase rcpt-to match !rcpt-to  \
reject "550 5.1.1 Mailbox does not exist"

and then include that filter in the chain for the exchanger listener.

HTH,
Tom

> 
> 
> Configurations are below; thank you very much in advance for assistance.
> 
> # uname -a
> OpenBSD server 7.0 GENERIC#5 amd64
> 
> # hostname
> server.example.org
> 
> # cat /etc/mail/vdoms
> example.com
> 
> # cat /etc/mail/vusers
> b...@example.com b...@big-mail-provider.xyz
> j...@example.comjane
> 
> # cat /etc/mail/smtpd.conf
> ## smtpd.conf
> listen on em0 hostname server.example.org
> listen on lo0
> table aliases db:/etc/mail/aliases.db
> table vusers file:/etc/mail/vusers
> table vdoms file:/etc/mail/vdoms
> #
> action "local" mbox alias 
> action "receive" mbox virtual 
> action "outbound" relay
> #
> match for local action "local"
> match from any for domain example.org action "local"
> match from any for domain  action "receive"
> match from local for any action "outbound"
> 



Re: disk space issue

2022-02-16 Thread Lourens

On 2/16/22 17:26, Todd wrote:

I like ncdu when searching for what is using disk space.

ncdu -x /

https://openports.se/sysutils/ncdu

On Wed, Feb 16, 2022 at 4:32 AM Lourens  wrote:


Thank you Todd,  that is a useful app.




Re: disk space issue

2022-02-16 Thread Lourens

On 2/16/22 14:43, Raimo Niskanen wrote:


Read the man pages for du(1) the switches -x and -k and
sort(1) the switch -n.  I suspect the command you have claimed
to run will not sort correctly.

Normally only 100..100 MB is used on / so you have done something strange.


Thank you Raimo,
All sorted here now, all that remains is for me to assimilate what I 
have learnt.*



*



Re: disk space issue

2022-02-16 Thread Todd
I like ncdu when searching for what is using disk space.

ncdu -x /

https://openports.se/sysutils/ncdu

On Wed, Feb 16, 2022 at 4:32 AM Lourens  wrote:

> Hello to Everyone,
>
> Thank you for your time and expertise.
>
> This is my first OpenBSD installation**so I am an obsd greenhorn, this
> is 7.0 that has been kept up to date
> *
> *
> My / has run out of disk space and I cannot see any perculiar content in
> it and I am  a little nervous to
> mess with anything in /.
>
>
> puffy7# sysctl hw.disknames
> hw.disknames=sd0:51e8581cb33ae259,sd1:fe144bc22452a8e3
>
> puffy7# disklabel -h sd0
> # /dev/rsd0c:
>
> 16 partitions:
> #size   offset  fstype [fsize bsize   cpg]
>a: 1.0G  256  4.2BSD   2048 16384 12960 # /
>b:16.1G  2097408swap # none
>c:  3726.0G0  unused
>d: 4.0G 35862752  4.2BSD   2048 16384 12960 # /tmp
>e:35.7G 44251328  4.2BSD   2048 16384 12960 # /var
>f: 6.0G119122016  4.2BSD   2048 16384 12960 # /usr
>g: 1.0G131704928  4.2BSD   2048 16384 12960 #
> /usr/X11R6
>h:20.0G133802080  4.2BSD   2048 16384 12960 #
> /usr/local
>i: 2.0G175745120  4.2BSD   2048 16384 12960 #
> /usr/src
>j: 6.0G179939424  4.2BSD   2048 16384 12960 #
> /usr/obj
>k:   300.0G192522368  4.2BSD   4096 32768 26062 # /home
>
> puffy7# cat /etc/fstab
> 51e8581cb33ae259.b none swap sw
> 51e8581cb33ae259.a / ffs rw 1 1
> 51e8581cb33ae259.k /home ffs rw,nodev,nosuid 1 2
> 51e8581cb33ae259.d /tmp ffs rw,nodev,nosuid 1 2
> 51e8581cb33ae259.f /usr ffs rw,nodev 1 2
> 51e8581cb33ae259.g /usr/X11R6 ffs rw,nodev 1 2
> 51e8581cb33ae259.h /usr/local ffs rw,wxallowed,nodev 1 2
> 51e8581cb33ae259.j /usr/obj ffs rw,nodev,nosuid 1 2
> 51e8581cb33ae259.i /usr/src ffs rw,nodev,nosuid 1 2
> 51e8581cb33ae259.e /var ffs rw,nodev,nosuid 1 2
> fe144bc22452a8e3.c /home/lourens/mnt/t1 ffs rw,nodev,nosuid 1 2
>
> puffy7# df -h
> Filesystem SizeUsed   Avail Capacity  Mounted on
> /dev/sd0a  986M985M  -48.2M   105%/
> /dev/sd0k  295G274G6.4G98%/home
> /dev/sd0d  3.9G8.3M3.7G 0%/tmp
> /dev/sd0f  5.8G1.1G4.4G20%/usr
> /dev/sd0g  986M295M642M31%/usr/X11R6
> /dev/sd0h 19.4G6.3G   12.1G34%/usr/local
> /dev/sd0j  5.8G2.0K5.5G 0%/usr/obj
> /dev/sd0i  1.9G2.0K1.8G 0%/usr/src
> /dev/sd0e 34.6G   64.2M   32.8G 0%/var
> /dev/sd1c  902G507G350G59%/home/lourens/mnt/t1
>
> puffy7# ls -lh
> total 135564
> -rw-r--r--   1 root  wheel   578B Sep 30 22:00 .cshrc
> -rw-r--r--   1 root  wheel   468B Sep 30 22:00 .profile
> drwxr-xr-x   2 root  wheel   512B Sep 30 22:00 altroot
> drwxr-xr-x   2 root  wheel   1.0K Sep 30 22:01 bin
> -rw-r--r--   1 root  wheel  86.3K Dec 26 16:59 boot
> -rwx--   1 root  wheel  20.7M Feb 16 05:40 bsd
> -rwx--   1 root  wheel  20.7M Feb 15 06:19 bsd.booted
> -rw---   1 root  wheel   4.0M Dec 26 16:58 bsd.rd
> -rw---   1 root  wheel  20.6M Dec 26 16:58 bsd.sp
> drwxr-xr-x   6 root  wheel  19.5K Feb 16 05:39 dev
> drwxr-xr-x  43 root  wheel   2.0K Feb 16 05:40 etc
> drwxr-xr-x   3 root  wheel   512B Dec 26 16:59 home
> drwxr-xr-x   3 root  wheel   512B Feb 14 09:06 mnt
> drwx--  10 root  wheel   512B Jan 20 18:19 root
> drwxr-xr-x   2 root  wheel   1.5K Dec 26 17:15 sbin
> lrwxrwx---   1 root  wheel11B Sep 30 22:00 sys -> usr/src/sys
> drwxrwxrwt  11 root  wheel   1.0K Feb 16 09:57 tmp
> drwxr-xr-x  16 root  wheel   512B Dec 26 16:59 usr
> drwxr-xr-x  23 root  wheel   512B Sep 30 22:57 var
>
>
> Any pointers to improving my knowledge and skill will be most welcome.
> *
> *
> Awesome O/S, thank you to all involved in it.
>
> Lourens.
> **
> *
> *
>
>


Re: No sound on ThinkPad X220 using current snapshot

2022-02-16 Thread Dirk-Wilhelm Peters
Matthias Schmidt  wrote:

> * Alexandre Ratchov wrote:
> > On Mon, Feb 14, 2022 at 01:11:09PM +0100, Dirk-Wilhelm Peters wrote:
> > > Hi,
> > > 
> > > after a recent update to the latest snapshot on my ThinkPad X220, there
> > > is no sound after returning from suspend mode. The problem persists
> > > even after a reboot. I have to shutdown/restart the machine to enable
> > > audio output again. Headphone output is not affected.
> > > 
> > 
> > This is recent regression, right?

Yes. The latest snapshot fixes the problem.

> > FWIW mixer settings are saved during suspend and restored on
> > resume. Working headphones suggests this may be caused by parts of the
> > system (speaker amplifiers) not being powered.
> 
> FYI, I had the same issue with a Thinkpad X250 and the recent snapshot
> from this morning fixed it for me.
> 
> OpenBSD 7.0-current (GENERIC) #336: Wed Feb 16 01:14:53 MST 2022

I have just upgraded my machine (X220) and can confirm that the problem has been
fixed.

OpenBSD 7.0-current (GENERIC.MP) #346: Tue Feb 15 11:51:21 MST 2022
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 12746092544 (12155MB)
avail mem = 12342587392 (11770MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xdae9c000 (67 entries)
bios0: vendor LENOVO version "8DET52WW (1.22 )" date 09/15/2011
bios0: LENOVO 4290W1B
acpi0 at bios0: ACPI 4.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT SSDT SSDT HPET APIC MCFG ECDT ASF! TCPA SSDT SSDT 
DMAR UEFI UEFI UEFI
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP4(S4) EXP7(S4) EHC1(S3) 
EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 797.54 MHz, 06-2a-07
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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 797.41 MHz, 06-2a-07
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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 797.42 MHz, 06-2a-07
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 797.41 MHz, 06-2a-07
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf800, bus 0-63
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus 5 (EXP4)
acpiprt5 at acpi0: bus 13 (EXP5)
acpiprt6 at acpi0: bus -1 (EXP7)
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
acpicmos0 at acpi0
tpm0 at acpi0 TPM_ 1.2 (TIS) addr 0xfed4/0x5000, device 0x104a rev 0x4e
acpibat0 at acpi0: BAT0 model "42T4861" serial  5709 type LION oem "SANYO"
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0: version 1.0
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
acpicpu0 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acpicpu1 at acpi0: C3(350@104 io@0x415), C1(1000@1 halt), PSS
acp

Re: disk space issue

2022-02-16 Thread Lourens

On 2/16/22 13:52, Paul de Weerd wrote:

On Wed, Feb 16, 2022 at 12:34:28PM +0100, Kacper Wilgus wrote:
| Can someone please explain to me how is it possible to have negative
| available space? Wouldn't it be impossible to able to take up 105% of
| your disk capacity, and how is it that df(1) reports such when it also
| reports 985M of 986M used?

Read up on filesystems, specifically the FFS as used in BSD.  There
are some very good papers out there.  Also, read the manpages of
tunefs(8) and newfs(8) for info: http://man.openbsd.org/tunefs#m
and http://man.openbsd.org/newfs#m specifically will be enlightening.

Cheers,

Paul


Thank you Paul,
I have been looking for FFS info and I am waiting for the updated 
Absolute OpenBSD from

Michel W Lucas.

I am old enough to enjoy reading to learn.
I will download and study these.

I managed to find the self-created problem by combining suggestions  from :*
*Stuart Henderson, Lukasz Moskala, Raimo Niskanen, Jan Stary and 
resurrecting two brain cells.


I found the file created by my typo while using using dd in /dev!

Now :
puffy7# df -h
Filesystem Size    Used   Avail Capacity  Mounted on
/dev/sd0a  986M    114M    822M    12%    /

Thank you to Everyone for your patience and persistance.*
*
*
*
*

*



Re: No sound on ThinkPad X220 using current snapshot

2022-02-16 Thread Matthias Schmidt
Hi,

* Alexandre Ratchov wrote:
> On Mon, Feb 14, 2022 at 01:11:09PM +0100, Dirk-Wilhelm Peters wrote:
> > Hi,
> > 
> > after a recent update to the latest snapshot on my ThinkPad X220, there
> > is no sound after returning from suspend mode. The problem persists
> > even after a reboot. I have to shutdown/restart the machine to enable
> > audio output again. Headphone output is not affected.
> > 
> 
> This is recent regression, right?
> 
> FWIW mixer settings are saved during suspend and restored on
> resume. Working headphones suggests this may be caused by parts of the
> system (speaker amplifiers) not being powered.

FYI, I had the same issue with a Thinkpad X250 and the recent snapshot
from this morning fixed it for me.

OpenBSD 7.0-current (GENERIC) #336: Wed Feb 16 01:14:53 MST 2022

Cheers

Matthias



Re: No sound on ThinkPad X220 using current snapshot

2022-02-16 Thread Alexandre Ratchov
On Mon, Feb 14, 2022 at 01:11:09PM +0100, Dirk-Wilhelm Peters wrote:
> Hi,
> 
> after a recent update to the latest snapshot on my ThinkPad X220, there
> is no sound after returning from suspend mode. The problem persists
> even after a reboot. I have to shutdown/restart the machine to enable
> audio output again. Headphone output is not affected.
> 

This is recent regression, right?

FWIW mixer settings are saved during suspend and restored on
resume. Working headphones suggests this may be caused by parts of the
system (speaker amplifiers) not being powered.



Re: disk space issue

2022-02-16 Thread Thim Cederlund


On 16/02-22 11:01, Lourens wrote:
> My / has run out of disk space and I cannot see any perculiar content in it
> and I am  a little nervous to
> mess with anything in /.
>

Try running the following command:

# find /dev -type f

If any files show up here besides *MAKEDEV* and the *.lock* files you
are free to remove them.


Best Regards,

Thim Cederlund



[Solved] Re: disk space issue

2022-02-16 Thread Lourens

 On 2/16/22 13:52, Paul de Weerd wrote:

On Wed, Feb 16, 2022 at 12:34:28PM +0100, Kacper Wilgus wrote:
| Can someone please explain to me how is it possible to have negative
| available space? Wouldn't it be impossible to able to take up 105% of
| your disk capacity, and how is it that df(1) reports such when it also
| reports 985M of 986M used?

Read up on filesystems, specifically the FFS as used in BSD. There
are some very good papers out there. Also, read the manpages of
tunefs(8) and newfs(8) for info: http://man.openbsd.org/tunefs#m
and http://man.openbsd.org/newfs#m specifically will be enlightening.

Cheers,

Paul


Thank you Paul,
I have been looking for FFS info and I am waiting for the updated 
Absolute OpenBSD from

Michel W Lucas.

I am old enough to enjoy reading to learn.
I will download and study these.

I managed to find the self-created problem by combining suggestions from :*
*Stuart Henderson, Lukasz Moskala, Raimo Niskanen, Jan Stary and 
resurrecting two brain cells.


I found the file created by my typo while using using dd in /dev!

Now :
puffy7# df -h
Filesystem Size    Used   Avail Capacity  Mounted on
/dev/sd0a  986M    114M    822M    12%    /

Thank you to Everyone for your patience and persistance.*
*
*
*
*

*



Re: disk space issue

2022-02-16 Thread Lourens

On 2/16/22 12:40, Raimo Niskanen wrote:

# du -kx | sort -n

should show which files occupy data.

/ Raimo Niskanen



Thank you Raimo,

Please check my logic - I understand that the error is related to space 
on '/'

and that the other partitions are merely mounted on mount points in '/'.

I see no peculiar nor large files in '/' using "du -hx | sort -n".

I do have a spare disk and am able to manually create partitions and 
hopefully transfer data across,

it does not seem to be elegant solution to my installation incompetence.

Another thought is to attempt resizing partitions?

*
*



Re: disk space issue

2022-02-16 Thread Paul de Weerd
On Wed, Feb 16, 2022 at 12:34:28PM +0100, Kacper Wilgus wrote:
| Can someone please explain to me how is it possible to have negative
| available space? Wouldn't it be impossible to able to take up 105% of
| your disk capacity, and how is it that df(1) reports such when it also
| reports 985M of 986M used?

Read up on filesystems, specifically the FFS as used in BSD.  There
are some very good papers out there.  Also, read the manpages of
tunefs(8) and newfs(8) for info: http://man.openbsd.org/tunefs#m
and http://man.openbsd.org/newfs#m specifically will be enlightening.

Cheers,

Paul

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



Re: disk space issue

2022-02-16 Thread Jan Stary
On Feb 16 12:34:28, kacperwil...@disroot.org wrote:
> > Filesystem Size    Used   Avail Capacity  Mounted on
> > /dev/sd0a  986M    985M  -48.2M   105%    /
> 
> Can someone please explain to me how is it possible to have negative
> available space? Wouldn't it be impossible to able to take up 105% of
> your disk capacity, and how is it that df(1) reports such when it also
> reports 985M of 986M used?

See the -m option of newfs(8).



Re: disk space issue

2022-02-16 Thread Jan Stary
On Feb 16 11:01:17, lour...@runningwolf.co.za wrote:
> Hello to Everyone,
> 
> Thank you for your time and expertise.
> 
> This is my first OpenBSD installation**so I am an obsd greenhorn, this is
> 7.0 that has been kept up to date
> *
> *
> My / has run out of disk space and I cannot see any perculiar content in it


$ doas find -x / -size +100c

On my machine, that would be just

/bsd
/bsd.rd
/sbin/unwind
/bsd.sp
/bsd.booted
/obsd



Re: disk space issue

2022-02-16 Thread Stuart Henderson
On 2022-02-16, Lourens  wrote:
> Hello to Everyone,
>
> Thank you for your time and expertise.
>
> This is my first OpenBSD installation**so I am an obsd greenhorn, this 
> is 7.0 that has been kept up to date
> *
> *
> My / has run out of disk space and I cannot see any perculiar content in 
> it and I am  a little nervous to
> mess with anything in /.

# du -hxd1 /

Most likely, either you have put too many files in /root, or have typo'd
something and created a file in /dev


-- 
Please keep replies on the mailing list.



Re: disk space issue

2022-02-16 Thread Łukasz Moskała



Dnia 16 lutego 2022 12:25:25 CET, Lourens  napisał/a:
>On 2/16/22 12:59, Łukasz Moskała wrote:
>> Hi,
>>
>> Did you ran dd recently? If you specify non-existent output disk in 
>> dd, it'll create file in /dev, then write to it, filling up space.
>>
>> Also, try:
>>  du -shx / | sort -h
>> this should show you which directories take up most space.
>>
>
>Thank you for teaching me something new!
>
>I used dd to write /dev/zero to a USB stick,  the command did zero the 
>USB stick.
>
>the command you suggested :
>puffy7# du -shx / | sort -h
>985M    /*
>*which is similar, to me at least, to my previous
>
>puffy7# df -h
>Filesystem Size    Used   Avail Capacity  Mounted on
>/dev/sd0a  986M    985M  -48.2M   105%    /
>
>
>**
>

Oops, I made a typo in that command. I meant:
 du -shx /* | sort -h

the goal is to show disk space usage per directory in /
--
Łukasz Moskała



Re: disk space issue

2022-02-16 Thread Lourens

On 2/16/22 12:59, Łukasz Moskała wrote:

Hi,

Did you ran dd recently? If you specify non-existent output disk in 
dd, it'll create file in /dev, then write to it, filling up space.


Also, try:
 du -shx / | sort -h
this should show you which directories take up most space.



Thank you for teaching me something new!

I used dd to write /dev/zero to a USB stick,  the command did zero the 
USB stick.


the command you suggested :
puffy7# du -shx / | sort -h
985M    /*
*which is similar, to me at least, to my previous

puffy7# df -h
Filesystem Size    Used   Avail Capacity  Mounted on
/dev/sd0a  986M    985M  -48.2M   105%    /


**



Re: disk space issue

2022-02-16 Thread Łukasz Moskała

W dniu 16.02.2022 o 10:01, Lourens pisze:

Hello to Everyone,

Thank you for your time and expertise.

This is my first OpenBSD installation**so I am an obsd greenhorn, this 
is 7.0 that has been kept up to date

*
*
My / has run out of disk space and I cannot see any perculiar content in 
it and I am  a little nervous to

mess with anything in /.


puffy7# sysctl hw.disknames
hw.disknames=sd0:51e8581cb33ae259,sd1:fe144bc22452a8e3

puffy7# disklabel -h sd0
# /dev/rsd0c:

16 partitions:
#    size   offset  fstype [fsize bsize   cpg]
   a: 1.0G  256  4.2BSD   2048 16384 12960 # /
   b:    16.1G  2097408    swap # none
   c:  3726.0G    0  unused
   d: 4.0G 35862752  4.2BSD   2048 16384 12960 # /tmp
   e:    35.7G 44251328  4.2BSD   2048 16384 12960 # /var
   f: 6.0G    119122016  4.2BSD   2048 16384 12960 # /usr
   g: 1.0G    131704928  4.2BSD   2048 16384 12960 # 
/usr/X11R6
   h:    20.0G    133802080  4.2BSD   2048 16384 12960 # 
/usr/local
   i: 2.0G    175745120  4.2BSD   2048 16384 12960 # 
/usr/src
   j: 6.0G    179939424  4.2BSD   2048 16384 12960 # 
/usr/obj

   k:   300.0G    192522368  4.2BSD   4096 32768 26062 # /home

puffy7# cat /etc/fstab
51e8581cb33ae259.b none swap sw
51e8581cb33ae259.a / ffs rw 1 1
51e8581cb33ae259.k /home ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.d /tmp ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.f /usr ffs rw,nodev 1 2
51e8581cb33ae259.g /usr/X11R6 ffs rw,nodev 1 2
51e8581cb33ae259.h /usr/local ffs rw,wxallowed,nodev 1 2
51e8581cb33ae259.j /usr/obj ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.i /usr/src ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.e /var ffs rw,nodev,nosuid 1 2
fe144bc22452a8e3.c /home/lourens/mnt/t1 ffs rw,nodev,nosuid 1 2

puffy7# df -h
Filesystem Size    Used   Avail Capacity  Mounted on
/dev/sd0a  986M    985M  -48.2M   105%    /
/dev/sd0k  295G    274G    6.4G    98%    /home
/dev/sd0d  3.9G    8.3M    3.7G 0%    /tmp
/dev/sd0f  5.8G    1.1G    4.4G    20%    /usr
/dev/sd0g  986M    295M    642M    31%    /usr/X11R6
/dev/sd0h 19.4G    6.3G   12.1G    34%    /usr/local
/dev/sd0j  5.8G    2.0K    5.5G 0%    /usr/obj
/dev/sd0i  1.9G    2.0K    1.8G 0%    /usr/src
/dev/sd0e 34.6G   64.2M   32.8G 0%    /var
/dev/sd1c  902G    507G    350G    59%    /home/lourens/mnt/t1

puffy7# ls -lh
total 135564
-rw-r--r--   1 root  wheel   578B Sep 30 22:00 .cshrc
-rw-r--r--   1 root  wheel   468B Sep 30 22:00 .profile
drwxr-xr-x   2 root  wheel   512B Sep 30 22:00 altroot
drwxr-xr-x   2 root  wheel   1.0K Sep 30 22:01 bin
-rw-r--r--   1 root  wheel  86.3K Dec 26 16:59 boot
-rwx--   1 root  wheel  20.7M Feb 16 05:40 bsd
-rwx--   1 root  wheel  20.7M Feb 15 06:19 bsd.booted
-rw---   1 root  wheel   4.0M Dec 26 16:58 bsd.rd
-rw---   1 root  wheel  20.6M Dec 26 16:58 bsd.sp
drwxr-xr-x   6 root  wheel  19.5K Feb 16 05:39 dev
drwxr-xr-x  43 root  wheel   2.0K Feb 16 05:40 etc
drwxr-xr-x   3 root  wheel   512B Dec 26 16:59 home
drwxr-xr-x   3 root  wheel   512B Feb 14 09:06 mnt
drwx--  10 root  wheel   512B Jan 20 18:19 root
drwxr-xr-x   2 root  wheel   1.5K Dec 26 17:15 sbin
lrwxrwx---   1 root  wheel    11B Sep 30 22:00 sys -> usr/src/sys
drwxrwxrwt  11 root  wheel   1.0K Feb 16 09:57 tmp
drwxr-xr-x  16 root  wheel   512B Dec 26 16:59 usr
drwxr-xr-x  23 root  wheel   512B Sep 30 22:57 var


Any pointers to improving my knowledge and skill will be most welcome.
*
*
Awesome O/S, thank you to all involved in it.

Lourens.
**
*
*



Hi,

Did you ran dd recently? If you specify non-existent output disk in dd, 
it'll create file in /dev, then write to it, filling up space.


Also, try:
 du -shx / | sort -h
this should show you which directories take up most space.

--
Łukasz Moskała



Re: Problem configuring multiple wireguard tunnels

2022-02-16 Thread Carlos Lopez



> On 15 Feb 2022, at 13:58, Stuart Henderson  wrote:
> 
> On 2022-02-15, Carlos Lopez  wrote:
>> But regarding the question to use different keys for every wg client?
> 
> You have two options:
> 
> 1. use the same 'server' key for all connections: use one wg interface
> on the server
> 
> 2. use different 'server' keys for each connection: each will need to
> have its own wg interface and UDP port
> 
> When deciding which to do, think about what you are trying to protect against.
> 
> -- 
> Please keep replies on the mailing list.

Totally agree Stuart …. The second option is most likely to be used.

Many thanks.
> 



disk space issue

2022-02-16 Thread Lourens

Hello to Everyone,

Thank you for your time and expertise.

This is my first OpenBSD installation**so I am an obsd greenhorn, this 
is 7.0 that has been kept up to date

*
*
My / has run out of disk space and I cannot see any perculiar content in 
it and I am  a little nervous to

mess with anything in /.


puffy7# sysctl hw.disknames
hw.disknames=sd0:51e8581cb33ae259,sd1:fe144bc22452a8e3

puffy7# disklabel -h sd0
# /dev/rsd0c:

16 partitions:
#    size   offset  fstype [fsize bsize   cpg]
  a: 1.0G  256  4.2BSD   2048 16384 12960 # /
  b:    16.1G  2097408    swap # none
  c:  3726.0G    0  unused
  d: 4.0G 35862752  4.2BSD   2048 16384 12960 # /tmp
  e:    35.7G 44251328  4.2BSD   2048 16384 12960 # /var
  f: 6.0G    119122016  4.2BSD   2048 16384 12960 # /usr
  g: 1.0G    131704928  4.2BSD   2048 16384 12960 # 
/usr/X11R6
  h:    20.0G    133802080  4.2BSD   2048 16384 12960 # 
/usr/local
  i: 2.0G    175745120  4.2BSD   2048 16384 12960 # 
/usr/src
  j: 6.0G    179939424  4.2BSD   2048 16384 12960 # 
/usr/obj

  k:   300.0G    192522368  4.2BSD   4096 32768 26062 # /home

puffy7# cat /etc/fstab
51e8581cb33ae259.b none swap sw
51e8581cb33ae259.a / ffs rw 1 1
51e8581cb33ae259.k /home ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.d /tmp ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.f /usr ffs rw,nodev 1 2
51e8581cb33ae259.g /usr/X11R6 ffs rw,nodev 1 2
51e8581cb33ae259.h /usr/local ffs rw,wxallowed,nodev 1 2
51e8581cb33ae259.j /usr/obj ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.i /usr/src ffs rw,nodev,nosuid 1 2
51e8581cb33ae259.e /var ffs rw,nodev,nosuid 1 2
fe144bc22452a8e3.c /home/lourens/mnt/t1 ffs rw,nodev,nosuid 1 2

puffy7# df -h
Filesystem Size    Used   Avail Capacity  Mounted on
/dev/sd0a  986M    985M  -48.2M   105%    /
/dev/sd0k  295G    274G    6.4G    98%    /home
/dev/sd0d  3.9G    8.3M    3.7G 0%    /tmp
/dev/sd0f  5.8G    1.1G    4.4G    20%    /usr
/dev/sd0g  986M    295M    642M    31%    /usr/X11R6
/dev/sd0h 19.4G    6.3G   12.1G    34%    /usr/local
/dev/sd0j  5.8G    2.0K    5.5G 0%    /usr/obj
/dev/sd0i  1.9G    2.0K    1.8G 0%    /usr/src
/dev/sd0e 34.6G   64.2M   32.8G 0%    /var
/dev/sd1c  902G    507G    350G    59%    /home/lourens/mnt/t1

puffy7# ls -lh
total 135564
-rw-r--r--   1 root  wheel   578B Sep 30 22:00 .cshrc
-rw-r--r--   1 root  wheel   468B Sep 30 22:00 .profile
drwxr-xr-x   2 root  wheel   512B Sep 30 22:00 altroot
drwxr-xr-x   2 root  wheel   1.0K Sep 30 22:01 bin
-rw-r--r--   1 root  wheel  86.3K Dec 26 16:59 boot
-rwx--   1 root  wheel  20.7M Feb 16 05:40 bsd
-rwx--   1 root  wheel  20.7M Feb 15 06:19 bsd.booted
-rw---   1 root  wheel   4.0M Dec 26 16:58 bsd.rd
-rw---   1 root  wheel  20.6M Dec 26 16:58 bsd.sp
drwxr-xr-x   6 root  wheel  19.5K Feb 16 05:39 dev
drwxr-xr-x  43 root  wheel   2.0K Feb 16 05:40 etc
drwxr-xr-x   3 root  wheel   512B Dec 26 16:59 home
drwxr-xr-x   3 root  wheel   512B Feb 14 09:06 mnt
drwx--  10 root  wheel   512B Jan 20 18:19 root
drwxr-xr-x   2 root  wheel   1.5K Dec 26 17:15 sbin
lrwxrwx---   1 root  wheel    11B Sep 30 22:00 sys -> usr/src/sys
drwxrwxrwt  11 root  wheel   1.0K Feb 16 09:57 tmp
drwxr-xr-x  16 root  wheel   512B Dec 26 16:59 usr
drwxr-xr-x  23 root  wheel   512B Sep 30 22:57 var


Any pointers to improving my knowledge and skill will be most welcome.
*
*
Awesome O/S, thank you to all involved in it.

Lourens.
**
*
*



Re: /bsd: thread: table is full

2022-02-16 Thread Alexis de BRUYN

On 14/02/2022 17:19, Stuart Henderson wrote:

On 2022-02-14, Alexis de BRUYN  wrote:

Hello Everybody,

Since I have updated my -current deskop this morning (sysupgrade &
pkg_add), the whole box seems slower, I have a lot of application
crashes and I see this message a lot in /var/log/messages : "/bsd:
thread: table is full".

Nothing changes in my habits, I still use the same applications (terms,
thunderbird, firefox, chrome, iridium, ...), heavily.

I have tried to increase progressively some values in sysctl.conf and
login.conf but even with theses high attempts, I still have the same issues.

kern.maxproc=8192
kern.maxfiles=10240



$ sysctl kern.nfiles
kern.nfiles=1960


How about kern.maxthread ? (You can see how many are currently used in
kern.nthreads).


Indeed it was my problem.

Thanks a lot Stuart for your help!

--
Alexis de BRUYN