主页

Bugzilla API

install pip install python-bugzilla github API # api address BZ = 'https://bugzilla.xxx.com' BZ_API = 'https://bugzilla.xxx.com/xmlrpc.cgi' # create bugzilla bzapi = bugzilla.Bugzilla(BZ_API,user=user,password=pwd) #bzapi.login(user,pwd) # query bug query = bzapi.build_query(bug_id=bugs) query['include_fields'] = ['id', 'status', 'qa_contac...

阅读更多

Execute Script On Boot

Steps 1, create your srcipt under /usr/local/bin [root@dhcp-128-17 ~]# cat /usr/local/bin/start_job_scheduler.sh #!/bin/bash klogin liali 123456 pgrep watchdog.sh || { cd /var/www/html/job_scheduler; ./watchdog.sh & } pgrep ci-manager.sh || { cd /var/www/html/job_scheduler/ci; ./ci-manager.sh &} 2, call your script in /etc/rc.d/rc.loca...

阅读更多

Container

Namespace A namespace wraps a global system resource in an abstraction that makes it appear to the processes within the namespace that they have their own isolated instance of the global resource. Changes to the global resource are visible to other processes that are members of the namespace, but are invisible to oth...

阅读更多

PCI,PCIe扫盲

PCI和PCIe PCI即Peripheral Component Interconnect,中文意思是“外围器件互联”,是由PCISIG (PCI Special Interest Group)推出的一种局部并行总线标准。 它曾经是个人电脑中使用最为广泛的接口,几乎所有的主板产品上都带有这种插槽。目前该总线已经逐渐被PCI Express总线所取代。 PCI-Express是继ISA和PCI总线之后的第三代I/O总线,即3GIO。 由Intel在2001年的IDF上提出,由PCI-SIG(PCI特殊兴趣组织)认证发布后才改名为“PCI-Express”。它的主要优势就是数据传输速率高,另外还有抗干扰能力强,传输距离远,功耗低等优点。 PCI做的工作 0、Driver通过pci_r...

阅读更多

devlink

devlink-dev: 1. devlink dev show - display devlink device attributes # devlink dev show pci/0000:01:00.0 2. devlink dev eswitch set - sets devlink device eswitch attributes # devlink dev eswitch set pci/0000:5e:00.0 mode switchdev 3. devlink dev param show - display devlink device supported configuration parameters attributes # dev...

阅读更多

expect脚本语言 匹配机制

expect # cat expect_test #!/usr/bin/expect spawn ./test expect { "xxx" { } "123" { puts "got123"; exp_continue; } "555" { puts "got555"; exp_continue; } } # cat test #!/bin/bash sleep 3 echo "444" sleep 3 echo "555" sleep 3 echo "123" sleep 3 echo "666" sleep 3 echo "123" test脚本用于输出一组数据: 444 555 123 666 123 expect_te...

阅读更多

网卡收发包流程

讲一下网卡收包流程(gemini) 网络适配器(网卡/NIC)收包是一个从物理信号转换为内核数据包的过程。这个过程涉及硬件、驱动、内核协议栈的紧密配合。 为了让你更直观地理解,我们可以将这个过程分为四个主要阶段: 1. 物理层与链路层处理 (硬件阶段) 当数据包通过光纤或双绞线到达网卡时,网卡首先进行初步处理: 信号转换: 网卡将物理电信号/光信号转换为数字信号。 校验与过滤: * 检查 FCS (帧校验序列),如果出错则丢弃。 检查 MAC 地址,看是否发给本机的(或是广播/组播),如果不匹配且未开启混杂模式,则丢弃。 DMA 传输: 这是关键的一步。网卡不会等 CPU 来拿数据,而是通过 DMA (Direct Memory Access) 直接将数据包写入主机内存中的...

阅读更多

Scrapy简介

Scrapy HomePage 概览 Scrapy是一个python爬虫框架,用于抓取网站上的数据。 一个示例爬虫 import scrapy class QuotesSpider(scrapy.Spider): name = 'quotes' start_urls = [ 'http://quotes.toscrape.com/tag/humor/', ] def parse(self, response): for quote in response.css('div.quote'): yield { 'author': quote.xpath('spa...

阅读更多