edit /etc/sysconfig/network-scripts/ifcfg-eth0
it will looks like
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
#!/bin/bash | |
set -x | |
docker manifest rm kubeovn/kube-ovn:${VERSION} | |
docker manifest rm kubeovn/vpc-nat-gateway:${VERSION} | |
docker pull kubeovn/kube-ovn:${VERSION}-x86 | |
docker pull kubeovn/kube-ovn:${VERSION}-arm | |
docker pull kubeovn/vpc-nat-gateway:${VERSION}-x86 | |
docker pull kubeovn/vpc-nat-gateway:${VERSION}-arm |
Linux memory management is a complex system designed to efficiently allocate and manage system memory resources across various processes. The concept of watermarks is crucial in this system, playing a significant role in balancing memory allocation and ensuring system stability. Here's a simplified explanation of how memory management works in Linux, particularly focusing on the role of watermarks: | |
### 1. **Memory Zones** | |
Linux divides physical memory into several zones, such as DMA (Direct Memory Access), DMA32, and Normal zones. These divisions are based on memory addressing limitations of hardware devices and other architectural requirements. | |
### 2. **Pages** | |
The fundamental unit of memory management in Linux is the page. Memory allocation requests from processes are handled in terms of pages. | |
### 3. **Watermarks** | |
Each memory zone in Linux has defined watermarks, which are thresholds used to manage memory pressure and availability. There are typically three watermark levels in each zone: |
#!/bin/bash | |
# docker run --name=close --network=host --privileged --restart=always -d close:v0.0.1 | |
while true; do | |
if [ -f dump ]; then | |
rm dump | |
fi | |
timeout 5m tcpdump -nn tcp and port 22 and greater 44 -w dump |
yum install -y yum-utils | |
yum-config-manager \ | |
--add-repo \ | |
https://download.docker.com/linux/centos/docker-ce.repo | |
yum install -y docker-ce docker-ce-cli containerd.io | |
systemctl enable docker | |
systemctl start docker | |
cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo | |
[kubernetes] |
#!/usr/bin/env bash | |
set -euo pipefail | |
REGISTRY="index.alauda.cn/alaudak8s" | |
POD_CIDR="10.16.0.0/16" # Do NOT overlap with NODE/SVC/JOIN CIDR | |
SVC_CIDR="10.96.0.0/12" # Do NOT overlap with NODE/POD/JOIN CIDR | |
JOIN_CIDR="100.64.0.0/16" # Do NOT overlap with NODE/POD/SVC CIDR | |
VERSION="v1.0.0" | |
echo "[Step -1] Delete flannel and galaxy resource on host" |
package main | |
import ( | |
"net/http" | |
"github.com/prometheus/client_golang/prometheus/promhttp" | |
) | |
func main() { | |
http.Handle("/metrics", promhttp.Handler()) |
edit /etc/sysconfig/network-scripts/ifcfg-eth0
it will looks like
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
8.2.3. HTTP log format | |
---------------------- | |
The HTTP format is the most complete and the best suited for HTTP proxies. It | |
is enabled by when "option httplog" is specified in the frontend. It provides | |
the same level of information as the TCP format with additional features which | |
are specific to the HTTP protocol. Just like the TCP format, the log is usually | |
emitted at the end of the session, unless "option logasap" is specified, which | |
generally only makes sense for download sites. A session which matches the | |
"monitor" rules will never logged. It is also possible not to log sessions for |
#!/bin/bash | |
while : | |
do | |
address=`ifconfig bond0 | grep inet | grep -v inet6|awk '{print $2}'` | |
echo $address | |
ip route | grep cali | grep -v src | while read -r line ; | |
do | |
ip route replace $line src $address |
#!/usr/bin/env python | |
""" | |
Very simple HTTP server in python. | |
Usage:: | |
./dummy-web-server.py [<port>] | |
Send a GET request:: | |
curl http://localhost |