Ángel Ortega

@angel@triptico.com

ex-writer, ex-programmer, ex-musician, ex-illustrator
ex-escritor, ex-programador, ex-músico, ex-dibujante
40.4231709,-3.6612241
https://triptico.com
0 ★ 0 ↺
in reply to »

Ángel Ortega »

I see similar numbers:

angel@lucifer:~$ sysctl hw | grep mem
hw.physmem=8453619712
hw.usermem=8453464064
angel@lucifer:~$ top | grep Memory
Memory: Real: 98M/4030M act/tot Free: 3779M Cache: 3116M Swap: 0K/4088K
I always took for granted that top output was to be interpreted as 'Real:' + 'Free:' = total memory, but now I'm deep in a sea of doubt 😕

CC: @Hetzner_Online@social.cologne

...

Antonino Catinello »

@angel @Hetzner_Online Can you use procmap on your VM? I get permission denied on all processes as root.

@angel @solene Any idea how to debug this? To find the cause for that issue.

...

0 ★ 0 ↺

Ángel Ortega »

Sorry, I forgot to mention in my previous message that the output I copypasted was not from a VM, but from a real computer under my desk.

In this very same machine, I get the error

procmap: /dev/mem: Operation not permitted
no matter the option I give to procmap. I vaguely recall this command working in the past.

...

Antonino Catinello »

@angel Thank you for that clarification. Wonder what the issue is here ...

That narrows it down to either some type of BIOS/UEFI memory setting or a bug on OpenBSD. 🤔

It's the first time that this happens to me with my first 7.2 installation.

procmap seems to be an indicator for that bug.
Edit: I was wrong about procmap. marc.info/?l=openbsd-cvs&m=147

...

0 ★ 0 ↺

Ángel Ortega »

Interesting. It seems you also cannot execute as root

sysctl kern.allowkmem=1
You must put it in /etc/sysctl.conf.

This is probably common knowledge for OpenBSD superusers, but I'm still a bit of a newbie here.

Thanks for the clues!

Antonino Catinello »

@angel

You're right I think. I have no idea why tot and free are split though. 🤔

I usually use free¹ (totals) which shows the correct amount of "physical memory available", but not the correct "used amount" anymore. 🙄

The values in top work if you accumulate the values tot + free = total RAM - shared video memory (if used). I couldn't find a better explanation either².

¹ github.com/NanXiao/free
² marc.info/?t=161031536400002&r marc.info/?l=openbsd-misc&m=16

...

1 ★ 0 ↺

Ángel Ortega »

Certainly, it's a bit confusing. The otherwise excellent manual page top(1) should benefit of a sentence explaining these measures a little bit.

History