# Whether to use daemon. Without daemon it just applies tuning. It is # not recommended, because many functions don't work without daemon, # e.g. there will be no D-Bus, no rollback of settings, no hotplug, # no dynamic tuning, ... daemon = 0
[root@ym-vm1 ~]# tuned-adm list Available profiles:
- balanced - General non-specialized tuned profile # 优化桌面使用 - desktop - Optimize for the desktop use-case # 优化高性能工作负载计算 - hpc-compute - Optimize for HPC compute workloads # 优化延迟性能 - latency-performance - Optimize for deterministic performance at the cost of increased power consumption # 优化网络延时 - network-latency - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance # 优化网络吞吐 - network-throughput - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks # 低功耗 - powersave - Optimize for low power consumption # 优化工作负载的吞吐 - throughput-performance - Broadly applicable tuning that provides excellent performance across a variety of common server workloads # 优化virtual guest - virtual-guest - Optimize for running inside a virtual guest # 优化KVM - virtual-host - Optimize for running KVM guests
This error is being caused because VMware doesn’t actually provide that level interface for CPU access, but CentOS try to load the kernel module anyway.
# start-pre # IPv6 test, module loaded, exit if system is not IPv6-ready ipv6_test || exit 1
# 配置ipv6相关参数 if [ "$IPV6FORWARDING" = "yes" ]; then ipv6_global_forwarding=1 ipv6_global_auto=0 else ipv6_global_forwarding=0 if [ "$IPV6_AUTOCONF" = "no" ]; then ipv6_global_auto=0 else ipv6_global_auto=1 fi fi
# 配置每块网卡的ipv6参数,包括forwarding转发,redirects重定向,是否接受Router Advertisements(RA) if [ ! "$IPV6_SET_SYSCTLS" = "no" ]; then # Reset IPv6 sysctl switches for "all", "default" and still existing devices for i in /proc/sys/net/ipv6/conf/* ; do interface=${i##*/} sinterface=${interface/.//} # Host/Router behaviour for the interface /sbin/sysctl -e -w net.ipv6.conf.$sinterface.forwarding=$ipv6_global_forwarding >/dev/null 2>&1
# Autoconfiguration and redirect handling for Hosts /sbin/sysctl -e -w net.ipv6.conf.$sinterface.accept_ra=$ipv6_global_auto >/dev/null 2>&1 /sbin/sysctl -e -w net.ipv6.conf.$sinterface.accept_redirects=$ipv6_global_auto >/dev/null 2>&1 done fi ;;
nmcli重载
1 2 3 4 5 6 7
#tell NM to reload its configuration if [ "$(LANG=C nmcli -t --fields running general status 2>/dev/null)" = "running" ]; then nmcli connection reload fi
# 启动Loopback网卡接口 action $"Bringing up loopback interface: " ./ifup ifcfg-lo
判断是否支持vlan
1 2 3 4 5 6 7
case"$VLAN"in yes) if [ ! -d /proc/net/vlan ] && ! modprobe 8021q >/dev/null 2>&1 ; then net_log $"No 802.1Q VLAN support available in kernel." fi ;; esac
for i in$interfaces; do unset DEVICE TYPE SLAVE NM_CONTROLLED eval $(LANG=C grep -F "DEVICE=" ifcfg-$i) eval $(LANG=C grep -F "TYPE=" ifcfg-$i) eval $(LANG=C grep -F "SLAVE=" ifcfg-$i) eval $(LANG=C grep -F "NM_CONTROLLED=" ifcfg-$i)
if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi
if [ "$SLAVE" = "yes" ] && ( ! is_nm_running || is_false $NM_CONTROLLED ) ; then continue fi
if [ "${DEVICE##cipcb}" != "$DEVICE" ] ; then vpninterfaces="$vpninterfaces$i" continue fi if [ "$TYPE" = "xDSL" -o "$TYPE" = "Modem" ]; then xdslinterfaces="$xdslinterfaces$i" continue fi
if [ "$TYPE" = "Bridge" ]; then bridgeinterfaces="$bridgeinterfaces$i" continue fi if [ "$TYPE" = "IPSEC" ] || [ "$TYPE" = "IPIP" ] || [ "$TYPE" = "GRE" ]; then vpninterfaces="$vpninterfaces$i" continue fi
if [ "${DEVICE%%.*}" != "$DEVICE" -o "${DEVICE##vlan}" != "$DEVICE" ] ; then vlaninterfaces="$vlaninterfaces$i" continue fi if LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null ; then # this loads the module, to preserve ordering is_available $i continue fi action $"Bringing up interface $i: " ./ifup $i boot [ $? -ne 0 ] && rc=1 done
# 这里是配置ipv4的默认路由,路由条目在static-routes中定义 if [ -f /etc/sysconfig/static-routes ]; then if [ -x /sbin/route ]; then grep "^any" /etc/sysconfig/static-routes | whileread ignore args ; do /sbin/route add -$args done else net_log $"Legacy static-route support not available: /sbin/route not found" fi fi
# 配置ipv6默认路由条目 # IPv6 hook (post IPv4 start) if [ -x /etc/sysconfig/network-scripts/init.ipv6-global ]; then /etc/sysconfig/network-scripts/init.ipv6-global start post fi