📄 initd
字号:
#!/bin/bash## Start the iSCSI Enterprise Target.#PATH=/sbin:/bin:/usr/sbin:/usr/binMEM_SIZE=1048576configure_memsize(){ if [ -e /proc/sys/net/core/wmem_max ]; then echo ${MEM_SIZE} > /proc/sys/net/core/wmem_max fi if [ -e /proc/sys/net/core/rmem_max ]; then echo ${MEM_SIZE} > /proc/sys/net/core/rmem_max fi if [ -e /proc/sys/net/core/wmem_default ]; then echo ${MEM_SIZE} > /proc/sys/net/core/wmem_default fi if [ -e /proc/sys/net/core/rmem_default ]; then echo ${MEM_SIZE} > /proc/sys/net/core/rmem_default fi if [ -e /proc/sys/net/ipv4/tcp_mem ]; then echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_mem fi if [ -e /proc/sys/net/ipv4/tcp_rmem ]; then echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_rmem fi if [ -e /proc/sys/net/ipv4/tcp_wmem ]; then echo "${MEM_SIZE} ${MEM_SIZE} ${MEM_SIZE}" > /proc/sys/net/ipv4/tcp_wmem fi}start_server(){ configure_memsize modprobe -q crc32c modprobe iscsi_trgt /usr/sbin/ietd} stop_server(){ ietadm --op delete killall ietd modprobe -r iscsi_trgt}case "$1" in start) start_server ;; stop) stop_server ;; *) echo "Usage: {start|stop}" >&2 exit 1 ;;esacexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -