2015-10-21
- jennifer
- martym
Out of Memory (OOM) refers to a computing state where all available memory, including swap space, has been allocated. | |
Normally this will cause the system to panic and stop functioning as expected. | |
There is a switch that controls OOM behavior in /proc/sys/vm/panic_on_oom. | |
When set to 1 the kernel will panic on OOM. | |
A setting of 0 instructs the kernel to call a function named oom_killer on an OOM. | |
Usually, oom_killer can kill rogue processes and the system will survive. | |
The easiest way to change this is to echo the new value to /proc/sys/vm/panic_on_oom. | |
# cat /proc/sys/vm/panic_on_oom 1 |
# this will open up a root prompt inside a tmux session | |
# if nothing is given, open up a new tmux session with current datetime | |
# if a string is given, attach or new depending on if the session already exists | |
# Note: this will probably cause trouble if multiple people are using it. Recommend | |
# namespacing the sessions with your username. | |
function root () { | |
name=$1 | |
session="new -s" | |
if [ -z "$name" ]; then |
Requirements:
Steps to setup the scripts:
mkdir benches
cd benches
curl https://artifacts.elastic.co/downloads/logstash/logstash-7.6.0.tar.gz | tar -zxf -
cd logstash-7.6.0
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.