Score:0

Very weird memory use

ee flag

out of nowhere my ubuntu 22.00 complained that it's memory was full. After some investigation I came across something really, really weird. Potentially worring.

I listed the use of the various dirs in order to try and clean up the system and this is what I found.

cd / sudo du -xhd1

4,0K    ./srv
2,5M    ./root
248K    ./tmp
304M    ./opt
6,3G    ./home
8,0K    ./media
18M ./etc
4,0K    ./mnt
16K ./lost+found
84K ./snap
4,0K    ./cdrom
6,7G    ./usr
475G    ./var
174M    ./boot
491G    .

cd var sudo du -xhd1

454G    ./log
52K ./spool
153M    ./cache
92K ./tmp
29M ./crash
21G ./lib
176K    ./backups
4,0K    ./opt
4,0K    ./mail
4,0K    ./metrics
2,3M    ./snap
4,0K    ./local
475G    .

cd log sudo du -xhd1

4,0K    ./gdm3
4,0K    ./openvpn
8,0K    ./hp
4,1G    ./journal
1,4M    ./installer
24K ./unattended-upgrades
76K ./cups
4,0K    ./speech-dispatcher
26M ./calico
20K ./postgresql
540K    ./apt
4,0K    ./private
32K ./letsencrypt
36K ./sysstat
444K    ./pods
4,0K    ./dist-upgrade
44K ./containers
455G    .

As you can see my log folder is insanely overflowing. But when I list its content, IT DOESN'T EVEN ADD UP!

What the hell is going on? Please, if you have any idea, let me know. Thank you so much in advance

Pilot6 avatar
cn flag
There is no Ubuntu 22.00 release. It looks like you are asking about disk space, not about "memory". What do you mean by "when I list its content, IT DOESN'T EVEN ADD UP!"? Please [edit] the question to make it more clear.
guiverc avatar
cn flag
Please clarify your question; Ubuntu releases are *year.month* in format, 22.00 means 2022 and 00 is not a valid month (01 - 12 are expected months, but releases don't occur every month). Are you using Ubuntu?
Doug Smythies avatar
gn flag
Your command syntax is only looking at directories within /var/log. You need to include the files. There is likely a better way but try `sudo du -xhd1 *`
Terrance avatar
id flag
You have log files in the /var/log directory that are adding up to 455G. I would run a `ls -al` from the `/var/log` directory so that you can see the largest log files. Then I would look into why those files are so large. You might be experiencing a hardware failure.
waltinator avatar
it flag
Your Question title complains about "Memory" but in the text you examine disk space. Use `df` or `sudo du -sk /*`. Read `man df du`. Please read https://askubuntu.com/help/how-to-ask and https://askubuntu.com/help/formatting
Score:0
ee flag

Thank you very much everyone for the suggestions, ultimately, since luckily I was able to store everything safely I deleted the partition. I am very inclined to belive that I was experiencing some sort of hardware failure. I may have miscinfigured the dual boot with windows, because I have always used Linux on older computers, and it was very strangely acting up lately. I may retry dual booting and being more careful in the process

Terrance avatar
id flag
Without examining the log files it will be difficult to say exactly what was going on. The acting strangely lately could have been due to the drive being full. I did in the past have a drive that was going bad and the logs were filling up with sector write failures but yet the drive was passing SMART and other tests that I was throwing at it. The drive finally kicked the bucket but it never tripped the SMART tests. In the future I would recommend that you look at the logs before deleting an entire partition to confirm any suspicions you may have.
user20656733 avatar
ee flag
Yes, good point. If it ever happens again (hopefully not though) I will first take a look at the logs. Thank you @Terrance
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.