主页

image mode

covert image mode to qcow2 https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/using_image_mode_for_rhel_to_build_deploy_and_manage_operating_systems/creating-bootc-compatible-base-disk-images-with-bootc-image-builder_using-image-mode-for-rhel-to-build-deploy-and-manage-operating-systems#creating-qcow2-images-by-using-bootc-...

阅读更多

daily work

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 mount mount -t nfs fs-qe.usersys.redhat.com:/srv/nfs/vmcore <mount point> mount netqe-bj.usersys.redhat.com:...

阅读更多

restraint

Restraint https://restraint.readthedocs.io/en/latest/commands.html restraint: # cat /var/lib/restraint/rstrnt-commands-env-8081.sh HARNESS_PREFIX=RSTRNT_ RSTRNT_URL=http://localhost:8081 RSTRNT_RECIPE_URL=http://localhost:8081/recipes/16343105 RSTRNT_TASKID=179082209 # cat /usr/lib/systemd/system/restraintd.service [Unit] Description=The rest...

阅读更多

Interview

Python 1. Do you know python comprehensions? list comprehensions https://www.runoob.com/python3/python-comprehensions.html [表达式 for 变量 in 列表] [out_exp_res for out_exp in input_list] 2. Do you know python closure? https://github.com/Jwindler/Ice_story/blob/main/src/python/closure.md 闭包(closure)是一个函数对象,它与它的环境变量(包括自由变量)的引用组合而成的实体。 闭包可以保留函数定义时所在的...

阅读更多

EAP

soruce EAP This document defines the Extensible Authentication Protocol (EAP), an authentication framework which supports multiple authentication methods. EAP typically runs directly over data link layers such as Point-to-Point Protocol (PPP) or IEEE 802, without requiring IP. EAP (Extensible Authentication Protocol) provides its own supp...

阅读更多

tc

soruce tc Tc is used to configure Traffic Control in the Linux kernel. Traffic Control consists of the following: SHAPING When traffic is shaped, its rate of transmission is under control. Shaping may be more than lowering the available bandwidth - it is also used to smooth out bur...

阅读更多

Shell Misc

soruce soruce grep 零宽断言 grep高级用法——断言 先行断言 x(?=y) 当x的右边是y是匹配成功 后发断言 (?<=y)x 当x的左边是y时匹配成功 负向零宽先行断言 x(?!y) x右边不是y时匹配成功 负向零宽后发断言 (?<!y)x x左边不是y时匹配成功 需要使用-P选项 [root@liali-vm1 job_scheduler]# grep -P -o "(?<=SKIP_DRIVER\=\").*?(?=\")" -R list/ list/sriov.list:bnx2x list/sriov.list:igb list/sriov.list:bnx2x list/sriov.list:bnx2x list/s...

阅读更多

decorator

soruce 基本的装饰器 概括的讲,装饰器的作用就是为已经存在的函数或对象添加额外的功能。 def debug(func): def wrapper(*args, **kwargs): # 指定宇宙无敌参数 print "[DEBUG]: enter {}()".format(func.__name__) print 'Prepare and say...', return func(*args, **kwargs) return wrapper # 返回 @debug def say(something): print "hello {}!".format(something) 带参数的装饰...

阅读更多