Renamed to put them in the grub namespace.
This commit is contained in:
parent
683a358096
commit
89efbba240
|
|
@ -1,30 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# https://fabianlee.org/2020/01/18/docker-placing-limits-on-container-memory-using-cgroups/
|
||||
|
||||
# Internally Docker uses cgroups to limit memory resources, and in its simplest form is exposed as the flags “-m” and “–memory-swap” when bringing up a docker container.
|
||||
|
||||
# sudo docker run -it -m 8m --memory-swap 8m alpine:latest /bin/sh
|
||||
|
||||
# If you see the message above, or “WARNING: Your kernel does not support cgroup swap limit.”,
|
||||
# then modify “/etc/default/grub” as below:
|
||||
|
||||
## Docker likes kernel swappiness support (on reboot)
|
||||
bash -c "$(perl -p -i -e 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="cgroup_enable=memory"/g' /etc/default/grub)"
|
||||
|
||||
#Now that your server supports swap limit capabilities in your docker run command you can use --memory-swappiness=0 and set --memory-swap equal to --memory. You also need to set -Des.bootstrap.mlockall=true on the docker run commandline.
|
||||
|
||||
# eg.
|
||||
# https://stefanprodan.com/2016/elasticsearch-cluster-with-docker/
|
||||
|
||||
# docker run -d -p 9200:9200 \
|
||||
# --name es-t0 \
|
||||
# --network es-net \
|
||||
# -v "$PWD/storage":/usr/share/elasticsearch/data \
|
||||
# --cap-add=IPC_LOCK --ulimit nofile=65536:65536 --ulimit memlock=-1:-1 \
|
||||
# --memory="2g" --memory-swap="2g" --memory-swappiness=0 \
|
||||
# -e ES_HEAP_SIZE="1g" \
|
||||
# es-t \
|
||||
# -Des.bootstrap.mlockall=true \
|
||||
# -Des.network.host=_eth0_ \
|
||||
# -Des.discovery.zen.ping.multicast.enabled=false
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# test script for 256 color on the fb console. https://www.robmeerman.co.uk/unix/256colours
|
||||
#wget -c -O /var/tmp/256color.pl https://gist.githubusercontent.com/hSATAC/1095100/raw/ee5b4d79aee151248bdafa8b8412497a5a688d42/256color.pl
|
||||
|
||||
# supported modes can be found at the grub console with 'vbeinfo' or 'videoinfo
|
||||
# 0x17d 1920x1200x32 vga=381
|
||||
# 0x17c 1920x1200x8 vga=380
|
||||
|
||||
## Add this to the /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT
|
||||
gfxmode="1920x1200x32,1920x1200x8"
|
||||
sed -i "s|^\(GRUB_GFXMODE=\).*|\1\"$gfxmode\"|" /etc/default/grub
|
||||
sed -i '/^GRUB_GFXMODE=.*/ s/.*/&\nGRUB_GFXPAYLOAD_LINUX=\"keep\"/' /etc/default/grub
|
||||
|
||||
|
||||
# DEPRICATED: vesafb requires a vga= on the kernel commandline.
|
||||
#sed -i 's,^\(GRUB_CMDLINE_LINUX=\).*,\1'\"vga=381\"',' /etc/default/grub
|
||||
|
||||
mount /boot/grub
|
||||
update-grub
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# prevent renaming of network interfaces by udev
|
||||
#ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
|
||||
|
||||
## Add this to the /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT
|
||||
#sed -i 's,^\(GRUB_CMDLINE_LINUX=\).*,\1'\"net.ifnames=0\"',' /etc/default/grub
|
||||
|
||||
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
# NEWARG="processor.ignore_ppc=1"
|
||||
NEWARG="consoleblank=3"
|
||||
sed -i -E "s|^(GRUB_CMDLINE_LINUX_DEFAULT=\"[^\"]*)\"|\1 ${NEWARG}\"|" /etc/default/grub
|
||||
update_grub
|
||||
|
||||
Loading…
Reference in New Issue