You are not logged in.

#1 2018-05-21 02:38:38

undoIT
Member
Registered: 2016-04-24
Posts: 16

[Solved] How to install, configure & check if systemd-swap is running

I am using btrfs without a swap partition on my laptop. I installed systemd-swap, configured it to use ZRam / swapfc, then enabled and started the service using systemctl. When I check with free -h, swapon -s or top I do not see any evidence that it is running. Also, there does not seem to be a swap file generated anywhere. Is there a way I can confirm that systemd-swap is indeed installed properly and running? I searched quite a bit and there is hardly any information on this.

Last edited by undoIT (2018-05-21 03:43:19)

Offline

#2 2018-05-21 02:51:25

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] How to install, configure & check if systemd-swap is running

What is in the journal for the service?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-05-21 02:57:44

undoIT
Member
Registered: 2016-04-24
Posts: 16

Re: [Solved] How to install, configure & check if systemd-swap is running

Since last boot:

May 20 19:51:29 user systemd[1]: Started Manage swap spaces on zram, files and partitions..
May 20 19:51:29 user systemd-swap[669]: INFO: Load: /etc/systemd//swap.conf
May 20 19:51:29 user systemd-swap[669]: /etc/systemd//swap.conf: line 1: ###################################################>
May 20 19:51:29 user systemd-swap[669]: INFO: Zram: check availability
May 20 19:51:29 user systemd-swap[669]: INFO: Zram: not part of kernel, trying to find zram module
May 20 19:51:30 user systemd-swap[669]: INFO: Zram: module successfully loaded
May 20 19:51:30 user systemd-swap[669]: INFO: Zram: trying to initialize free device
May 20 19:51:30 user systemd-swap[669]: INFO: Zram: initialized: /dev/zram0
May 20 19:51:31 user systemd-swap[669]: stat: cannot read file system information for '/var/lib/systemd-swap/swapfc/': No su>
May 20 19:51:31 user systemd-swap[669]: stat: cannot read file system information for '/var/lib/systemd-swap/swapfc/': No su>
May 20 19:51:31 user systemd-swap[669]: INFO: swapD: pickup devices from systemd-gpt-auto-generator
May 20 19:51:31 user systemd-swap[669]: INFO: swapD: searching swap devices

Offline

#4 2018-05-21 03:01:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] How to install, configure & check if systemd-swap is running

Your journal is truncated, but it seems to answer your questions.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2018-05-21 03:02:07

undoIT
Member
Registered: 2016-04-24
Posts: 16

Re: [Solved] How to install, configure & check if systemd-swap is running

Okay. I tried this on another laptop, rebooted and there was no evidence the swap was running. Same on this laptop. However, after I posted the initial message and rebooted, I do see now a swap file at /dev/zram0 and the commands to check for swap do indicate that swap is available. I need to check the other laptop to see if something was not configured properly. Do you think there is any problem with this message?

May 20 19:51:31 user systemd-swap[669]: stat: cannot read file system information for '/var/lib/systemd-swap/swapfc/': No su>

Offline

#6 2018-05-21 03:04:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] How to install, configure & check if systemd-swap is running

That's only half a message...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2018-05-21 03:06:26

undoIT
Member
Registered: 2016-04-24
Posts: 16

Re: [Solved] How to install, configure & check if systemd-swap is running

May 20 19:51:31 user systemd-swap[669]: stat: cannot read file system information for '/var/lib/systemd-swap/swapfc/': No such file or directory

Offline

#8 2018-05-21 03:42:35

undoIT
Member
Registered: 2016-04-24
Posts: 16

Re: [Solved] How to install, configure & check if systemd-swap is running

Okay, I have systemd-swap configured properly on the other laptop now and tested it out. It does become very slow when memory is maxed, but it is nowhere near as bad as no swap and the endless wait to get into TTY to kill some processes / hoping that a hard shutdown will not be required. Unless there is something to be concerned about with the "No such file or directory message", it appears to be working. Thanks for the help.

Offline

Board footer

Powered by FluxBB