revlis.nl
Stash of notes about OSS, OSes, virtualization, dev hobby projects &c
May 30, 2019 — 21:18
Author: silver Category: linux Comments: Off
Linux Control Groups and Namespaces
Used for limiting and isolation
Docs
- https://www.kernel.org/doc/Documentation/namespaces/compatibility-list.txt
- https://www.kernel.org/doc/Documentation/cgroup-v1/
- https://www.kernel.org/doc/Documentation/cgroup-v2.txt
Utils
lsns
nsenter
- cgroup-tools pkg (
cgget
,cgset
, …)
Network
ip netns list
ip netns identify <pid>
ip netns exec <netns> ip
- or:
ip -n|-netns
Processes
- ps axwww -o cgroup
- ps axwww -o cgroup,user,pid,%cpu,%mem,vsz,rss,tname,stat,start,time,comm
- ps axwww -o ipcns,mntns,netns,pidns,userns,utsns,pid,comm
Filesystem
- /proc/<pid>/ns
- /sys/fs/cgroup
Systemd
May 30, 2019 — 20:50
Linting is basically making sure source code is correct.
For Vim there’s ALE: Asynchronous Lint Engine. It supports multiple tools like cpplint for C/C++, ShellCheck for shell scripts, phan for PHP etc etc.
Download
Get it here: https://github.com/w0rp/ale
Commands
- ALELint
- ALEEnable
- ALEDisable
- ALENext
- ALEPrevious
.vimrc
To use Ctrl+j and Ctrl+k to moving between errors:
nmap <silent> <C-k> <Plug>(ale_previous_wrap)
nmap <silent> <C-j> <Plug>(ale_next_wrap)
You must be logged in to post a comment.