skywalking 实现收集基于python的Django项目链路追踪案例

2023-11-02

一、python3环境设置

1.1、安装python3

apt-get update
apt install python3-pip -y
pip install "apache-skywalking"
[root@skywalking-agent-07 ~]# pip install "apache-skywalking"

Collecting apache-skywalking
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f29f5b41880>, 'Connection to files.pythonhosted.org timed out. (connect timeout=15)')': /packages/3f/2a/8934d1a7d781ec3c16114bad1bc5376bcf506e261c42c6b6718c0418e5a9/apache_skywalking-0.8.0-py3-none-any.whl
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f29f5b41910>, 'Connection to files.pythonhosted.org timed out. (connect timeout=15)')': /packages/3f/2a/8934d1a7d781ec3c16114bad1bc5376bcf506e261c42c6b6718c0418e5a9/apache_skywalking-0.8.0-py3-none-any.whl
  Downloading apache_skywalking-0.8.0-py3-none-any.whl (168 kB)
     |████████████████████████████████| 168 kB 670 kB/s 
Collecting packaging
  Downloading packaging-21.3-py3-none-any.whl (40 kB)
     |████████████████████████████████| 40 kB 4.2 MB/s 
Collecting wrapt
  Downloading wrapt-1.14.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (81 kB)
     |████████████████████████████████| 81 kB 4.7 MB/s 
Collecting grpcio-tools
  Downloading grpcio_tools-1.49.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB)
     |████████████████████████████████| 2.4 MB 5.0 MB/s 
Collecting grpcio
  Downloading grpcio-1.49.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB)
     |████████████████████████████████| 4.7 MB 41.9 MB/s 
Collecting pyparsing!=3.0.5,>=2.0.2
  Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
     |████████████████████████████████| 98 kB 7.3 MB/s 
Collecting protobuf<5.0dev,>=4.21.3
  Downloading protobuf-4.21.7-cp37-abi3-manylinux2014_x86_64.whl (408 kB)
     |████████████████████████████████| 408 kB 13.8 MB/s 
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from grpcio-tools->apache-skywalking) (45.2.0)
Requirement already satisfied: six>=1.5.2 in /usr/lib/python3/dist-packages (from grpcio->apache-skywalking) (1.14.0)
Installing collected packages: pyparsing, packaging, wrapt, protobuf, grpcio, grpcio-tools, apache-skywalking
Successfully installed apache-skywalking-0.8.0 grpcio-1.49.1 grpcio-tools-1.49.1 packaging-21.3 protobuf-4.21.7 pyparsing-3.0.9 wrapt-1.14.1

1.2、导入模块,验证当前环境是否能正常注册到skywalking server

[root@skywalking-agent-07 ~]# python3

Python 3.8.10 (default, Jun 22 2022, 20:18:18) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from skywalking import agent, config
>>> config.init(collector_address='172.16.88.187:11800', service_name='python-app')
>>> agent.start()
skywalking [MainThread] [WARNING] plugin sw_aiohttp failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_bottle failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_celery failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_django failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_elasticsearch failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_falcon failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_fastapi failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_flask failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_kafka failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_mysqlclient failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_psycopg failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_psycopg2 failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_pymongo failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_pymysql failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_pyramid failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_rabbitmq failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_redis failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_sanic failed to install, please disregard this warning if the corresponding package was not used in your project
skywalking [MainThread] [WARNING] plugin sw_tornado failed to install, please disregard this warning if the corresponding package was not used in your project
>>> 
>>> exit()
[root@skywalking-agent-07 ~]#

二、上传并部署django项目

2.1、上传项目并安装依赖包

[root@skywalking-agent-07 ~]# tar -xf django-test.tgz

[root@skywalking-agent-07 ~]# cd django-test/
[root@skywalking-agent-07 django-test]# ls
bin  include  lib  mysite  pyvenv.cfg  requirements.txt
[root@skywalking-agent-07 django-test]# cat requirements.txt 
apache-skywalking==0.7.0
asgiref==3.4.1
backports.zoneinfo==0.2.1
Django==4.0.1
grpcio==1.43.0
grpcio-tools==1.43.0
packaging==21.3
protobuf==3.19.3
PyMySQL==1.0.2
pyparsing==3.0.6
six==1.16.0
sqlparse==0.4.2
wrapt==1.13.3
[root@skywalking-agent-07 django-test]# pip3 install -r requirements.txt   #安装依赖包
Collecting apache-skywalking==0.7.0
  Downloading apache_skywalking-0.7.0-py3-none-any.whl (169 kB)
     |████████████████████████████████| 169 kB 610 kB/s 
Collecting asgiref==3.4.1
  Downloading asgiref-3.4.1-py3-none-any.whl (25 kB)
Collecting backports.zoneinfo==0.2.1
  Downloading backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_x86_64.whl (74 kB)
     |████████████████████████████████| 74 kB 2.5 MB/s 
Collecting Django==4.0.1
  Downloading Django-4.0.1-py3-none-any.whl (8.0 MB)
     |████████████████████████████████| 8.0 MB 4.2 MB/s 
Collecting grpcio==1.43.0
  Downloading grpcio-1.43.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB)
     |████████████████████████████████| 4.1 MB 27.8 MB/s 
Collecting grpcio-tools==1.43.0
  Downloading grpcio_tools-1.43.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB)
     |████████████████████████████████| 2.4 MB 10.4 MB/s 
Requirement already satisfied: packaging==21.3 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 7)) (21.3)
Collecting protobuf==3.19.3
  Downloading protobuf-3.19.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
     |████████████████████████████████| 1.1 MB 10.6 MB/s 
Collecting PyMySQL==1.0.2
  Downloading PyMySQL-1.0.2-py3-none-any.whl (43 kB)
     |████████████████████████████████| 43 kB 3.9 MB/s 
Collecting pyparsing==3.0.6
  Downloading pyparsing-3.0.6-py3-none-any.whl (97 kB)
     |████████████████████████████████| 97 kB 12.5 MB/s 
Collecting six==1.16.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting sqlparse==0.4.2
  Downloading sqlparse-0.4.2-py3-none-any.whl (42 kB)
     |████████████████████████████████| 42 kB 2.1 MB/s 
Collecting wrapt==1.13.3
  Downloading wrapt-1.13.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (84 kB)
     |████████████████████████████████| 84 kB 4.7 MB/s 
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from grpcio-tools==1.43.0->-r requirements.txt (line 6)) (45.2.0)
ERROR: launchpadlib 1.10.13 requires testresources, which is not installed.
Installing collected packages: wrapt, six, grpcio, protobuf, grpcio-tools, apache-skywalking, asgiref, backports.zoneinfo, sqlparse, Django, PyMySQL, pyparsing
  Attempting uninstall: wrapt
    Found existing installation: wrapt 1.14.1
    Uninstalling wrapt-1.14.1:
      Successfully uninstalled wrapt-1.14.1
  Attempting uninstall: six
    Found existing installation: six 1.14.0
    Not uninstalling six at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'six'. No files were found to uninstall.
  Attempting uninstall: grpcio
    Found existing installation: grpcio 1.49.1
    Uninstalling grpcio-1.49.1:
      Successfully uninstalled grpcio-1.49.1
  Attempting uninstall: protobuf
    Found existing installation: protobuf 4.21.7
    Uninstalling protobuf-4.21.7:
      Successfully uninstalled protobuf-4.21.7
  Attempting uninstall: grpcio-tools
    Found existing installation: grpcio-tools 1.49.1
    Uninstalling grpcio-tools-1.49.1:
      Successfully uninstalled grpcio-tools-1.49.1
  Attempting uninstall: apache-skywalking
    Found existing installation: apache-skywalking 0.8.0
    Uninstalling apache-skywalking-0.8.0:
      Successfully uninstalled apache-skywalking-0.8.0
  Attempting uninstall: pyparsing
    Found existing installation: pyparsing 3.0.9
    Uninstalling pyparsing-3.0.9:
      Successfully uninstalled pyparsing-3.0.9
Successfully installed Django-4.0.1 PyMySQL-1.0.2 apache-skywalking-0.7.0 asgiref-3.4.1 backports.zoneinfo-0.2.1 grpcio-1.43.0 grpcio-tools-1.43.0 protobuf-3.19.3 pyparsing-3.0.6 six-1.16.0 sqlparse-0.4.2 wrapt-1.13.3
[root@skywalking-agent-07 django-test]# pip3 install -r requirements.txt #再次确认是否遗漏少装
Requirement already satisfied: apache-skywalking==0.7.0 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 1)) (0.7.0)
Requirement already satisfied: asgiref==3.4.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 2)) (3.4.1)
Requirement already satisfied: backports.zoneinfo==0.2.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 3)) (0.2.1)
Requirement already satisfied: Django==4.0.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 4)) (4.0.1)
Requirement already satisfied: grpcio==1.43.0 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 5)) (1.43.0)
Requirement already satisfied: grpcio-tools==1.43.0 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 6)) (1.43.0)
Requirement already satisfied: packaging==21.3 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 7)) (21.3)
Requirement already satisfied: protobuf==3.19.3 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 8)) (3.19.3)
Requirement already satisfied: PyMySQL==1.0.2 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 9)) (1.0.2)
Requirement already satisfied: pyparsing==3.0.6 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 10)) (3.0.6)
Requirement already satisfied: six==1.16.0 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 11)) (1.16.0)
Requirement already satisfied: sqlparse==0.4.2 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 12)) (0.4.2)
Requirement already satisfied: wrapt==1.13.3 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 13)) (1.13.3)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from grpcio-tools==1.43.0->-r requirements.txt (line 6)) (45.2.0)
[root@skywalking-agent-07 django-test]# 

2.2、创建django项目mysite

[root@skywalking-agent-07 django-test]# rm -fr mysite/
[root@skywalking-agent-07 django-test]# django-admin startproject mysite

2.3、创建应用

[root@skywalking-agent-07 django-test]# cd mysite/
[root@skywalking-agent-07 mysite]# python3 manage.py startapp myapp

2.4、初始化数据库

[root@skywalking-agent-07 mysite]# python3 manage.py makemigrations
[root@skywalking-agent-07 mysite]# python3 manage.py migrate

2.5、创建管理员, 用于登录

[root@skywalking-agent-07 mysite]# python3 manage.py createsuperuser

[root@skywalking-agent-07 mysite]# python3 manage.py createsuperuser
Username (leave blank to use 'root'): root
Email address: admin123@qq.com
Password: 
Password (again): 
This password is too common.
Bypass password validation and create user anyway? [y/N]: y
Superuser created successfully.
[root@skywalking-agent-07 mysite]# 

用户密码:root  1qaz@WSX

2.6、运行项目

设置相关环境变量
[root@skywalking-agent-07 mysite]# export SW_AGENT_NAME='python-app1'
[root@skywalking-agent-07 mysite]# export SW_AGENT_NAMESPACE='python-app1'
[root@skywalking-agent-07 mysite]# export SW_AGENT_COLLECTOR_BACKEND_SERVICES='172.16.88.187:11800'
[root@skywalking-agent-07 mysite]# vi mysite/settings.py

28    ALLOWED_HOSTS = ['127.0.0.1','172.16.88.194']

启动项目

[root@skywalking-agent-07 mysite]# sw-python -d run python3 manage.py runserver 172.16.88.194:80

skywalking-cli [DEBUG] Args received Namespace(command=['python3', 'manage.py', 'runserver', '172.16.88.194:80'], debug=True, option='run')
skywalking-cli [DEBUG] SkyWalking Python agent with CLI option 'run' and command ['python3', 'manage.py', 'runserver', '172.16.88.194:80']
skywalking-cli [DEBUG] SkyWalking Python agent `runner` received command ['python3', 'manage.py', 'runserver', '172.16.88.194:80']
skywalking-cli [DEBUG] Adding sitecustomize.py to PYTHONPATH
skywalking-cli [DEBUG] Updated PYTHONPATH - /usr/local/lib/python3.8/dist-packages/skywalking/bootstrap/loader
skywalking-cli [DEBUG] New process starting with file - `python3` args - `['python3', 'manage.py', 'runserver', '172.16.88.194:80']`
skywalking-loader [MainThread] [DEBUG] ---------------sitecustomize.py---------------
skywalking-loader [MainThread] [DEBUG] Successfully imported sitecustomize.py from `/usr/local/lib/python3.8/dist-packages/skywalking/bootstrap/loader/sitecustomize.py`
skywalking-loader [MainThread] [DEBUG] You are inside working dir - /root/django-test/mysite
skywalking-loader [MainThread] [DEBUG] Using Python version - 3.8.10 (default, Jun 22 2022, 20:18:18) 
[GCC 9.4.0] 
skywalking-loader [MainThread] [DEBUG] Using executable at - /usr/bin/python3
skywalking-loader [MainThread] [DEBUG] System Base Python executable location /usr
skywalking-loader [MainThread] [DEBUG] Original sitecustomize module not found, skipping.
skywalking-loader [MainThread] [DEBUG] SkyWalking Python Agent starting, loader finished.
skywalking [MainThread] [WARNING] failed to install plugin sw_aiohttp
skywalking [MainThread] [WARNING] failed to install plugin sw_celery
skywalking [MainThread] [WARNING] failed to install plugin sw_elasticsearch
skywalking [MainThread] [WARNING] failed to install plugin sw_falcon
skywalking [MainThread] [WARNING] failed to install plugin sw_flask
skywalking [MainThread] [WARNING] failed to install plugin sw_kafka
skywalking [MainThread] [WARNING] failed to install plugin sw_psycopg2
skywalking [MainThread] [WARNING] failed to install plugin sw_pymongo
skywalking [MainThread] [WARNING] failed to install plugin sw_pyramid
skywalking [MainThread] [WARNING] failed to install plugin sw_rabbitmq
skywalking [MainThread] [WARNING] failed to install plugin sw_redis
skywalking [MainThread] [WARNING] failed to install plugin sw_sanic
skywalking [MainThread] [WARNING] failed to install plugin sw_tornado
skywalking-loader [MainThread] [DEBUG] ---------------sitecustomize.py---------------
skywalking-loader [MainThread] [DEBUG] Successfully imported sitecustomize.py from `/usr/local/lib/python3.8/dist-packages/skywalking/bootstrap/loader/sitecustomize.py`
skywalking-loader [MainThread] [DEBUG] You are inside working dir - /root/django-test/mysite
skywalking-loader [MainThread] [DEBUG] Using Python version - 3.8.10 (default, Jun 22 2022, 20:18:18) 
[GCC 9.4.0] 
skywalking-loader [MainThread] [DEBUG] Using executable at - /usr/bin/python3
skywalking-loader [MainThread] [DEBUG] System Base Python executable location /usr
skywalking-loader [MainThread] [DEBUG] Original sitecustomize module not found, skipping.
skywalking-loader [MainThread] [DEBUG] SkyWalking Python Agent starting, loader finished.
skywalking [MainThread] [WARNING] failed to install plugin sw_aiohttp
skywalking [MainThread] [WARNING] failed to install plugin sw_celery
skywalking [MainThread] [WARNING] failed to install plugin sw_elasticsearch
skywalking [MainThread] [WARNING] failed to install plugin sw_falcon
skywalking [MainThread] [WARNING] failed to install plugin sw_flask
skywalking [MainThread] [WARNING] failed to install plugin sw_kafka
skywalking [MainThread] [WARNING] failed to install plugin sw_psycopg2
skywalking [MainThread] [WARNING] failed to install plugin sw_pymongo
skywalking [MainThread] [WARNING] failed to install plugin sw_pyramid
skywalking [MainThread] [WARNING] failed to install plugin sw_rabbitmq
skywalking [MainThread] [WARNING] failed to install plugin sw_redis
skywalking [MainThread] [WARNING] failed to install plugin sw_sanic
skywalking [MainThread] [WARNING] failed to install plugin sw_tornado
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
October 04, 2022 - 03:48:47
Django version 4.0.1, using settings 'mysite.settings'
Starting development server at http://172.16.88.194:80/
Quit the server with CONTROL-C.

2.7、检查并验证项目是否正常运行

2.8、验证skywalking server端数据采集

本文引用https://www.cnblogs.com/cyh00001/p/16753484.html

仅做个人学习记录使用

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

skywalking 实现收集基于python的Django项目链路追踪案例 的相关文章

随机推荐

  • 面经-阿里电话面试

    又是一年面试季节 闲来无事看看市面上都在找那些技术 查缺补漏弥补不足 当然如果能够找到不错的去处也是好的 说来惭愧 第一次接到阿里电话时正在外边跟同事吃饭 环境实在是不允许 冒昧的给推迟到第二天了 第二次 是第二天的下午开会中 由于手机静音
  • VLC相关参数中文说明!

    用法 vlc 选项 流 您可以在命令行中指定多个流 它们将被加入播放列表队列 指定的首个项目将被首先播放 选项样式 选项 用于设置程序执行期间的全局选项 选项 单字母版本的全局 选项 选项 一个仅在流之前应用的选项 且将覆盖先前的设置 流
  • 探索Java中的反射机制:解析类的信息与执行动态操作

    探索Java中的反射机制 解析类的信息与执行动态操作 引言 在Java编程领域中 反射机制是一项强大的工具 它使得我们能够在运行时动态地获取 使用类的信息 甚至可以对类进行修改 通过反射 我们可以在编译时未知类的情况下 通过获取类的构造方法
  • 为什么 Java 中只有值传递?

    开始之前 我们先来搞懂下面这两个概念 形参 实参 值传递 引用传递 形参 实参 方法的定义可能会用到 参数 有参的方法 参数在程序语言中分为 实参 实际参数 用于传递给函数 方法的参数 必须有确定的值 形参 形式参数 用于定义函数 方法 接
  • python中函数返回值为func 和func() 的区别

    今天看书注意到一个问题 就是有些函数的返回值是直接return func 有些则是return func 看不清其区别 所以自己探究了一下 首先定义一个foo函数 def foo pass 察看type foo 得到
  • fabric2.X以上系统用test-network环境测试自己的链码

    首先 我们需要安装好fabric2 X的环境 具体参考我之前的文章 这里默认已经有了fabric2 X的环境 进入test network文件夹 在开始测试之前 先把gopath项目路径全部解锁 sudo chmod R 777 GOPAT
  • 时间复杂度以及空间复杂度——程序的性能分析

    什么是时间复杂度 算法的渐进时间复杂度T n O f n 其中f n 表示每行代码执行次数之和 而 O 表示正比例关系 大O符号表示法并不是用于来真实代表算法的执行时间的 它是用来表示代码执行时间的增长变化趋势的 时间复杂度是一种用于衡量算
  • 使用MATLAB实现对信号的EMD分解

    文章目录 0 前言 1 经验模式分解EMD 2 希尔伯特变换HT 3 希尔伯特 黄变换HHT 4 基于EMD的语音信号处理 5 MATLAB实现对信号的EMD分解 5 1 对构造的信号进行EMD 5 2 对实际的信号进行EMD 6 参考文献
  • python pyecharts的基础使用

    python pyecharts的基础使用 导包 from pyecharts charts import Line from pyecharts options import TitleOpts LegendOpts ToolboxOpt
  • 如何用springboot实现发送通知给用户的功能

    可以使用 Spring Boot 中的 Spring Boot Starter Mail 来实现发送通知给用户的功能 首先需要在项目的 pom xml 文件中添加对 spring boot starter mail 的依赖 然后在 appl
  • 【程序人生】5个月从职场打杂到月薪14000的女测试工程师逆袭之路

    大家好 我是来自湖南的一位辣妹子 毕业于一所工业大学 大学的专业是软件与工程 其实也算是本专业 大学期间掌握的知识也算比较广 各个方面都会一丢丢 就是不是特别深入 之所以这么说 是因为一直以来我觉得自己还不错 但毕业设计的时候 怎么也做不出
  • Audition报错:“无法应用设备设置,因为发生了以下错误:MME设备内部错误“

    今天打开AU提示有一个错误如下 打开设置以后就这样显示三条都不可用 查找了相关资料发现都不能解决 后来自己尝试几个地方设置才得以解决 问题出在如下 没有选对相应输入输出设备
  • AF_PACKET套接字解密 --- 02

    AF PACKET套接字解密 02 2012 05 23 22 36 57 分类 LINUX 当AF PACKET套接字注册了prot hook后 怎样进行监听呢 先来看发送 当协议栈准备将数据交给net device发送时 它将调用dev
  • (一维数组)输入N个数,然后逆序输出

    一维数组 1 输入N个数 例题6个数 然后逆序输出 define N 6 include stdio h void main int i a N t for i 0 i
  • 网络安全-js安全知识点与XSS常用payloads

    目录 简介 用法 JS必备知识 输出与注释 输出 注释 语法 函数 字符串方法 事件 表单 Cookie 代码执行 伪协议 XSS常用payload 普通 双写绕过 编码绕过 html标签绕过正则 参考 写给和我一样学习安全的小白 简介 J
  • eMMC分区管理

    目录 0 概述 FLASH分区类型 分区大小 分区编址 1 Boot Area Partitions 1 1 容量大小 1 2 从 Boot Area 启动 1 2 1 Original Boot Operation 1 2 2 Alter
  • 递归与回溯的理解

    递归 程序调用自身的编程技巧称为递归 recursion 递归做为一种算法在程序设计语言中广泛应用 一个过程或函数在其定义或说明中有直接或间接调用自身的一种方法 它通常把一个大型复杂的问题层层转化为一个与原问题相似的规模 较小的问题来求解
  • 忘了高高在上的Chatgpt吧,更香的Claude和Bard来了

    最近LLM这一领域近年来进步神速 新的产品层出不穷 给我们的生活和工作带来了巨大便利 也引发了广泛关注 首当其冲的 就数OpenAI研发的ChatGPT ChatGPT是一款基于GPT模型打造的对话AI系统 被业内公认为目前进展最快 实力最
  • 大多数女生为什么不适合当程序员?

    最重要的一点 逻辑思维能力 女程序员最大的问题不是压力大而是思维方式切换的挑战 从抽象到具象 平常需要将问题抽象出来 运用抽象思维解决工作上的困难 生活中间又要很具象 很感性地和人交往 这是非常难以达到的一件事 加上工作压力一大 就容易崩溃
  • skywalking 实现收集基于python的Django项目链路追踪案例

    一 python3环境设置 1 1 安装python3 apt get update apt install python3 pip y pip install apache skywalking root skywalking agent