2

My system: Linux/Lubuntu 18.04 LTS, 64 bit

What I wanted to do was checking the value of my swappiness with the terminal-command

sysctl vm.swappiness

Out of sheer clumsiness I only typed

sysctl vm

and hit Enter.

The thing is: I got output after all:

rosika@rosika-Lenovo-H520e ~> sysctl vm
vm.admin_reserve_kbytes = 8192
vm.block_dump = 0
vm.compact_unevictable_allowed = 1
vm.dirty_background_bytes = 0
vm.dirty_background_ratio = 10
vm.dirty_bytes = 0
vm.dirty_expire_centisecs = 3000
vm.dirty_ratio = 20
vm.dirty_writeback_centisecs = 500
vm.dirtytime_expire_seconds = 43200
vm.drop_caches = 0
vm.extfrag_threshold = 500
vm.hugepages_treat_as_movable = 0
vm.hugetlb_shm_group = 0
vm.laptop_mode = 0
vm.legacy_va_layout = 0
vm.lowmem_reserve_ratio = 256   256 32  1
vm.max_map_count = 65530
vm.memory_failure_early_kill = 0
vm.memory_failure_recovery = 1
vm.min_free_kbytes = 67584
vm.min_slab_ratio = 5
vm.min_unmapped_ratio = 1
vm.mmap_min_addr = 65536
sysctl: Zugriff verweigert auf Schlüssel »vm.mmap_rnd_bits«
sysctl: Zugriff verweigert auf Schlüssel »vm.mmap_rnd_compat_bits«
vm.nr_hugepages = 0
vm.nr_hugepages_mempolicy = 0
vm.nr_overcommit_hugepages = 0
vm.numa_stat = 1
vm.numa_zonelist_order = Node
vm.oom_dump_tasks = 1
vm.oom_kill_allocating_task = 0
vm.overcommit_kbytes = 0
vm.overcommit_memory = 0
vm.overcommit_ratio = 50
vm.page-cluster = 3
vm.panic_on_oom = 0
vm.percpu_pagelist_fraction = 0
vm.stat_interval = 1
sysctl: Zugriff verweigert auf Schlüssel »vm.stat_refresh«
vm.swappiness = 60
vm.user_reserve_kbytes = 121890
vm.vfs_cache_pressure = 100
vm.watermark_scale_factor = 10
vm.zone_reclaim_mode = 0
rosika@rosika-Lenovo-H520e ~> echo $status 
255

Yet, as you can see, I got exit-code 255.

So can someone tell me what I have done? I hope it wasn´t something too silly after all.

4

AFAIK all your command did was print every variable = value pair from the /proc/sys/vm namespace instead of just that of vm.swappiness - essentially the equivalent of having done cat /proc/sys/vm/* instead of cat /proc/sys/vm/swappiness.

To have actually changed any parameters, you would have needed to add -w or --write (and specified a particular one, and likely to have elevated your privileges as well).

  • Tnx a lot for your answer and good explanation. That sounds reassuring. I certainly didn´t add -w or --write. So everything should be fine. – Rosika Jun 26 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.