借用官方的话就是:
对于 ubuntu 系统来说直接
sudo apt-get install systemtap
那么 centos 就是
yum install systemtap
上面安装的 systemtap 有一定程度不可用,例如在运行的时候出现 这个问题,部分截图如下所示:
出现上面问题的原因是 linux 内核版本太新,而 systemtap 版本太旧导致的,这个时候需要用源码安装。
官方的 release 版本。从里面挑选最新的版本来安装。比如 ubuntu 20,那么就选 systemtap-4.6.tar.gz
wget https://sourceware.org/systemtap/ftp/releases/systemtap-4.6.tar.gz
下载完包以后直接解压:
tar -zxf systemtap-4.6.tar.gz
sudo apt-get install build-essential
sudo apt-get install gettext
sudo apt-get install elfutils
sudo apt-get install libdw-dev
cd 到systemtap-4.6目录中进行编译
cd systemtap-4.6
./configure
make -j4 && sudo make install
由于ubuntu 桌面版默认没有安装kernel-debug-info,所以安装了systemtap后仍然不能够追踪内核信息,因此需要手动安装kernel-debug-info包
uname -a
输出:
Linux dev-25 5.13.0-35-generic #40~20.04.1-Ubuntu SMP Mon Mar 7 09:18:32 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
这里需要根据机器具体的架构选择
wget http://ddebs.ubuntu.com/pool/main/l/linux/linux-image-unsigned-5.13.0-35-generic-dbgsym_5.13.0-35.40_amd64.ddeb
sudo dpkg -i linux-image-unsigned-5.13.0-35-generic-dbgsym_5.13.0-35.40_amd64.ddeb
sudo apt-get install elfutils
sudo stap -ve 'probe begin { log("hello systemtap!") exit() }'
结果如上所示,表示成功安装
sudo apt-get remove systemtap
进入systemtap文件夹
make uninstall
configure: Running systemtap uninstalled, entirely out of the build tree,
configure: is not supported.
这个问题暂时忽略掉,没解决但是暂时没发现对后续操作有什么影响
bpf-translate.cxx:37:29: fatal error: elfutils/libebl.h: No such file or directory
compilation terminated.
Makefile:1677: recipe for target 'stap-bpf-translate.o' failed
因为提示elfutils相关,所以一直以为是elfutils的安装问题,但是通过尝试,猜想是因为elfutils已经更新了版本,但我们安装的是2.9版本的SystemTap,复盘的时候觉得应该是重新安装到最新版本4.4的SystemTap解决了这个问题
就根据之前的步骤,下载4.4版本的SystemTap,然后安装。
内存不足时
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
系统没有交换分区, 编译过程中内存耗尽, 导致了编译中断
//创建分区文件[email protected]:~/systemtap-3.2# sudo dd if=/dev/zero of=/swapfile bs=64M count=16
16+0 records in
16+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.7991 s, 283 MB/s
[email protected]:~/systemtap-3.2# //生成swap文件系统
[email protected]:~/systemtap-3.2# sudo mkswap /swapfile
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=5d981976-9350-4fe8-bb06-5aac1b41c220
[email protected]:~/systemtap-3.2# //激活swap文件
[email protected]:~/systemtap-3.2# swapon /swapfile
swapon: /swapfile: insecure permissions 0644, 0600 suggested.
安装了4.4版本的SystemTap,./configure无误,make时换了一个错误
HelperSDT/_HelperSDT.c:9:20: fatal error: Python.h: No such file or directorycompilation terminated.
因为没有安装python的开发版,即Python-devel这个包
sudo apt-get install python-dev
安装完毕后,执行systemtap的操作报错
[email protected]:~# stap -e 'probe begin{printf("hello"); exit();}'
/usr/local/share/systemtap/runtime/linux/access_process_vm.h:35:54: error: passing argument 6 of ‘get_user_pages’ makes pointer from integer without a cast [-Werror=int-conversion]
[email protected]:~# stap -e 'probe kernel.function("sys_open") {log("hello world") exit()}'
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stap5B8ZsJ/stap_46c39130569454c3b11457bdcd15b4a0_1277_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h: In function ‘__access_process_vm_’:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:54: error: passing argument 6 of ‘get_user_pages’ makes pointer from integer without a cast [-Werror=int-conversion]/usr/share/systemtap/runtime/linux/access_process_vm.h:35:13: error: too many arguments to function ‘get_user_pages’
参考
简而言之,就是“Ubuntu的systemtap软件包当前已过期”
那么就通过选择4.4版本的systemtap即可解决
缺少 Python module Setuptools,参考
To install setuptools on Debian:
sudo apt-get install python3-setuptools
For an older version of Python (Python 2.x):
sudo apt-get install python-setuptools
用原生js写一个拖拽,需要考虑到兼容的问题,事件绑定的问题,浏览器默认事件的问题。首先需要用到Event 对象,代表事件的状态,比如事件在其中发生的元素、键盘按键的状态、鼠标的位置、鼠标按钮的状态。代码如下:<!DOCTYPE html><html lang="en"><head> <meta c...
今天训练模型输入python3 train.py --model_def config/yolov3-custom.cfg --data_config config/custom.data第一次出现这个错误,记录解决方案:查了看到有人说什么加上except:continue;大概跟我出的错不一样,总之我没法按照这样解决问题,先截图一下我出问题的界面:File “train.py”, line 62, in model = Darknet(opt.model_def).to(device)File
编程题#3:发票统计注意: 总时间限制: 1000ms 内存限制: 65536kB描述有一个小型的报账系统,它有如下功能:(1)统计每个人所报发票的总钱数(2)统计每类发票的总钱数将此系统简化为如下:假设发票类别共有A、B、C三种;一共有三个人,ID分别为1、2、3。输入系统输入包含三行,每行第一个数为人员ID(整型,1或2或
Jenkins SSH报错:Exception when publishing, exception message [Exec exit status not zero. Status [1]]报错图片:网上通常见到的返回码是-1,而对于1的基本没看到,偶尔找到一两篇博客有提及,但是给出的解决方案也不符合我的情况。这边介绍下我这里遇到的情况。直接上干货。首先,排查下我SSH连接有没有问题,这个可以在Jenkins 系统管理那里找到对应的服务器-配置,点击Test Configurat.
整理文档的时候突然发现这么个东西,顺手发出来,后面看浏览量和点赞量再做补充或者调整Linux作为每个程序员都要打交道的系统,其操作命令实在是太重要了chmod赋予权限数字权限意义chmod是Linux下设置文件权限的命令,后面的数字表示不同用户或用户组的权限。一般是三个数字:第一个数字表示文件所有者的权限第二个数字表示与文件所有者同属一个用户组的其他用户的权限第三个数字表示其它用户组的权限。权限分为三种:读(r=4),写(w=2),执行(x=1)。综合起来还有可读可执行(rx.
UITableView学习笔记 作者:一片枫叶 看TableView的资料其实已经蛮久了,一直想写点儿东西,却总是因为各种原因拖延,今天晚上有时间静下心来记录一些最近学习的TableView的知识。下面进入正题,UITableView堪称UIKit里面最复杂的一个控件了,使用起来不算难,但是要用好并不...
先来一张用百度脑图做的“国外优秀网站”思维导图,让你一目了然。
chrome开发者模式控制台报如下错误DevTools failed to load SourceMap: Could not load content for chrome-extension://ncennffkjdiamlpmcbajkmaiiiddgioo/js/xl-content.js.map: HTTP error: status code 404, net::ERR_UNKNOW...
谷歌账号登录报错account.googles.com响应时间过长
ffmpeg基础五:单独解码裸流aac或MP3或H264用于解析输入的数据流并把它们分成一帧一帧的压缩编码数据。比较形象的说法就是把长长的一段连续的数据“切割”成一段段的数据。av_parser_parse2():解析数据获得一个Packet, 从输入的数据流中分离出一帧一帧的压缩编码数据。读取文件流,使用av_parser_parse2就可以获取出packet。这也是为什么后面使用。
一.什么是Spring框架 1.什么是Spring Spring框架是个一个全栈的框架.意思就是使用Spring的框架可以开发web层,service层还有dao层. 本质:Spring就是一个对象的容器,因为在这个容器中有可以处理请求的对象,所以可以用来写web层,因为有service层对象,所以可以用来写service层,因为有dao层对象,所以可以用...
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>五子棋</title> <style type="text/css"> canvas { display: block;