主页

getopt

Reference set – set --是根据分隔符IFS,把值依次赋给$1,$2,$3,例子2就是展示这个。 getopt $ getopt --help 用法: getopt optstring parameters getopt [options] [--] optstring parameters getopt [options] -o|--options optstring [options] [--] parameters 选项: -a, --alternative 允许长选项以 - 开始 -h, --help 这个简短的用法指南 -l, --longoptions <长选项> ...

阅读更多

trap

Reference Concept Signals are software interrupts sent to a program to indicate that an important event has occurred. The events can vary from user requests to illegal memory access errors. Some signals, such as the interrupt signal, indicate that a user has asked the program to do something that is not in the usual flow of control. The foll...

阅读更多

selinux

Reference 概念 1. 为什么提出SELinux 之前学习的权限,都是基于用户的(所有者、所有组、其它用户),只有当该用户针对某个文件或者目录具备相应的rws权限之后,才可以做相应的操作 此时系统管理员无法通过基于用户的标准访问策略(DAC)生成全面、精细的安全策略 此时就需要通过SELinux来实现 2. SELinux简介 SELinux实施强制访问控制(MAC),SELinux对每个文件、进程、目录、端口都有专门的安全标签,此标签被称为安全上下文; SELinux就是基于进程安全上下文和文件/目录的安全上下文来实现策略控制 即:只有当文件/目录的安全上下文类型和进程的安全上下文类型符合时,该进程才可以对文件/目录做相应的操作 Subject是要管理的程序,Objec...

阅读更多

igmp

Reference igmp  通过组播,可以实现一个主机同时向组内的多台主机发送数据,节省网络带宽。 组播ip地址范围是224.0.0.0-----239.255.255.255,其中224.0.0.0-----224.0.0.255是有特殊用途的保留地址,239.0.0.0-----239.255.255.255是私网地址,224.0.1.0-----238.255.255.255是用于公网上的组播地址。 组播有一系列的协议支持包括: 1、用于主机和路由器之间的IGMP协议。实现主机加入、离开组播组等功能。 2、路由器之间的组播协议有:PIM-SM、PIM-DM。实现嫁接、剪枝等功能。 还有一个IGMP Snooping,用在交换机上。开启IGMP Snoop...

阅读更多

send patch to upstream

Reference send patch to linux upstream # install git and setup git yum install git yum install git-email git config --global user.name "xxx" git config --global user.email "xxx@xxx.com" # 配置 ~/.gitcommit文件 selftests: bonding: add tests for ether type changes Why I do these changes and how I do it. Signed-off-by: Liang Li <liali@redhat...

阅读更多

Systemd

Reference CONCEPTS systemd is a system and service manager for Linux operating systems. When run as first process on boot (as PID 1), it acts as init system that brings up and maintains userspace services. CONCEPTS systemd provides a dependency system between various entities called "units" of 11 different types. Units encapsulate vari...

阅读更多

Kernel Misc

Reference Compile Kernel # compile kernel CONFIG_DEBUG_INFO_BTF=n CONFIG_SYSTEM_TRUSTED_KEYS="" dnf install -y ncurses-devel openssl openssl-devel elfutils-libelf-devel flex bison bc dwarves tar make menuconfig make -j8 all make modules_install make install brew # brew bash /mnt/tests/kernel/networking/common/tools/brewkoji_install.sh brew d...

阅读更多

NIC Offload

Reference NIC Offloads NIC tso and bond tso can take effect respectively But if bond tso is off, NIC tso can't take effect. Bond doesnt propagate conf to slaves. Didn't see GSO take effect on NIC and bond. GSO is a software implementation of tso. Bond doesnt propagate conf to slaves. NIC gro can take effect. But no difference when bond GRO i...

阅读更多