性能工具04_lttng安装

LTTng-tools阿里云主机上安装成功,最好采用源码安装,

源码安装,ok,demo,ok

sudo apt install libpopt-dev
sudo apt install libxml2-dev
wget https://lttng.org/files/lttng-tools/lttng-tools-latest-2.13.tar.bz2
tar -xf lttng-tools-latest-2.13.tar.bz2
cd lttng-tools-2.13.*
./configure
make
sudo make install
sudo ldconfig
补充安装包
apt install pkg-config

安装liburcu

这里说明liburcu库没有安装
liburcu库官方网址:http://lttng.org/urcu
我们安装一下:
压缩包下载地址:https://lttng.org/files/urcu/?O=D
我选择了https://lttng.org/files/urcu/userspace-rcu-0.13.0.tar.bz2
在这里插入图片描述
解压并编译安装:

1
2
3
4
5
6
wget https://lttng.org/files/urcu/userspace-rcu-0.13.0.tar.bz2  
tar -xf userspace-rcu-0.13.0.tar.bz2
cd userspace-rcu-0.13.0/
./configure
make
make install

返回执行:LTTng-tools configure

错误:configure: error: Package requirements (lttng-ust >= 2.13) were not met

LTTng-UST

1
2
3
4
5
6
wget https://lttng.org/files/lttng-ust/lttng-ust-latest-2.13.tar.bz2  
tar -xf lttng-ust-latest-2.13.tar.bz2
cd lttng-ust-2.13.*
./configure --disable-numa
make
make install

补充安装:
apt-get install libnuma-dev(略)
返回执行:LTTng-tools configure,ok

继续执行LTTng-tools make

继续执行LTTng-tools make install

安装babeltrace2

1
2
3
apt-add-repository ppa:lttng/ppa  
apt-get update
apt-get install babeltrace2

样例lttng_ust_tracef(),ok

简洁安装,安装ok,demo报错make error

从Ubuntu 12.04开始,LTTng的包可以直接从包管理器的仓库里找到,所以安装变得非常简单:
sudo aptitude install lttng-tools

lttng_ust_tracef()


aptitude install lttng-tools liblttng-ust-dev
再次make

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×