Home

CPU基本概念

概述 linux中的cpu架构 在/usr/src/linux-headers-4.15.0-20/arch中可以看到linux支持的cpu类型 linux cpuinfo中的flag 在linux系统中通过cat /proc/cpuinfo可以查看到系统所在cpu的信息,其中flag项中有较多参数,不同类型cpu的flag是不同的,有哪些flag是在linux内核的代码中设定的,例如x86的cpu features CPU flag

Read more

P4 introduce

摘要 P4是Programming Protocol-independent Packet Processors的缩写, 开发环境:windows10 virtualBox vagrant 官方文档 代码库 P4中的一些概念 P4是协议不相关的,所谓协议相关就是只能根据现有的协议来进行编程,例如OpenFlow1.0时有12个字段(IP,MAC等),但这明显是远远不够的。那么P4就解决了这个问题 P4可以定义自己的匹配字段和动作(action),从而定义流表,进而形成流水线 PISA(Protocol Independent Switch Architecture),一种通用的网络设备架构 P4 runtime的定位与OpenFlow一致,与P4配合使用 P...

Read more

Openstack的集成测试框架Tempst

摘要 官方文档 Quickstart pip install tempest tempest init cloud-01,此时会在当前目录下生成cloud-01目录,子目录中的etc包含tempest.conf和tempest.conf.sample。tempest.conf的配置 tempest中的module abc Python本身不提供抽象类和接口机制,要想实现抽象类,可以借助abc模块。ABC是Abstract Base Class的缩写。 six six是为了解决Python2 和 Python3 代码兼容性而产生的。six这个名字来源于 6 = 2 x 3,为什么不用‘Five’呢?5 = 2+3,一是因为乘法更有力量(more powerfu...

Read more

zlink项目开发记录

数据库相关 希望实现一个功能,在用户注册时,数据库中的用户流量使用数据表能够自动增加一个用户的entry Django service_end_date = models.DateField(name=’service_end_date’, default=timezone.now)这段代码导致报错: 'datetime.date' object has no attribute 'tzinfo' 其中的models.DataField应修改为DataTimeField因为后面的default设置了timezone.now setting.py中的DEBUG=True在上线后应修改为False 部署 基础环境搭建 安装docker-c...

Read more

Blog Collect

linux系 Linux内核系统架构介绍 yocto项目介绍 CICD Git 版本控制的核心概念 network 三十天学不会TCP,UDP/IP网络编程 other how to build a blog at github

Read more

git使用

git status引起的命令 git add 使用git status命令可以看到被修改的文件状态为modified,新增文件未Untracked,此时 可以通过git add 进行commit前的存储(staged)。同时,可通过git checkout -- 放弃修改。 git reset HEAD 通过git add命令添加到暂存区的修改,可以需要通过git reset从暂存区撤回到工作区 git push 新的分支时提示错误 libvirt git:(4.5.0) git push origin ctyun-4.5.0 error: src refspec ctyun-4.5.0 does not match any. error: failed to push ...

Read more

Django框架

django.db djanggo.db的package contents: backends (package) migration (package) models (package) transaction utils django.db.models Django models中的Field Django创建模型是通过继承django.db中的models实现,如: from django.db import models class Question(models.Model) question_test = models.CharField(max_length=200) pub_date = models.DataTimeField('date...

Read more

Rally框架分析

rally/rally的目录结构 . ├── __init__.py ├── aas ├── api.py ├── cli ├── common ├── consts.py ├── env ├── exceptions.py ├── plugins ├── task ├── ui ├── utils └── verification cli目录 . ├── __init__.py ├── cliutils.py ├── commands │   ├── __init__.py │   ├── db.py │   ├── deployment.py │   ├── env.py │   ├── plugin.py │   ├── task.py │   └── verif...

Read more