Skip to content

Instantly share code, notes, and snippets.

@metajiji
Created March 23, 2019 18:52
Show Gist options
  • Save metajiji/42119a604e2d1d97abcec3d1308b5307 to your computer and use it in GitHub Desktop.
Save metajiji/42119a604e2d1d97abcec3d1308b5307 to your computer and use it in GitHub Desktop.
nspawn or docker containers reboot host

systemd 231-4

Reboot host-system from container:

[root@box ~]# echo b > /proc/sysrq-trigger 

Other things m - Will dump current memory info to your console.

[root@box ~]# echo m > /proc/sysrq-trigger 

dmesg On the host:

[18529.421008] sysrq: SysRq : Show Memory
[18529.421016] Mem-Info:
[18529.421028] active_anon:398347 inactive_anon:124929 >isolated_anon:0
active_file:83056 inactive_file:84631 >isolated_file:0
unevictable:0 dirty:255 writeback:0 unstable:0
slab_reclaimable:9008 slab_unreclaimable:99856
mapped:93061 shmem:125442 pagetables:7025 >bounce:0
free:52856 free_pcp:1169 free_cma:0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment