检查当前环境内核的版本,执行如下命令:

uname -a

输出信息如下:

Linux jackie-ubuntu 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

安装perf工具,执行如下命令:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get install linux-tools-common linux-tools-$(uname -r)

查看perf工具的版本,执行如下命令:

perf --version

输出信息如下:

perf version 5.4.30

查看perf命令的使用帮助,输出信息如下:

 usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS]

 The most commonly used perf commands are:
annotate Read perf.data (created by perf record) and display annotated code
archive Create archive with object files with build-ids found in perf.data file
bench General framework for benchmark suites
buildid-cache Manage build-id cache.
buildid-list List the buildids in a perf.data file
c2c Shared Data C2C/HITM Analyzer.
config Get and set variables in a configuration file.
data Data file related processing
diff Read perf.data files and display the differential profile
evlist List the event names in a perf.data file
ftrace simple wrapper for kernel's ftrace functionality
inject Filter to augment the events stream with additional information
kallsyms Searches running kernel for symbols
kmem Tool to trace/measure kernel memory properties
kvm Tool to trace/measure kvm guest os
list List all symbolic event types
lock Analyze lock events
mem Profile memory accesses
record Run a command and record its profile into perf.data
report Read perf.data (created by perf record) and display the profile
sched Tool to trace/measure scheduler properties (latencies)
script Read perf.data (created by perf record) and display trace output
stat Run a command and gather performance counter statistics
test Runs sanity tests.
timechart Tool to visualize total system behavior during a workload
top System profiling tool.
version display the version of perf binary
probe Define new dynamic tracepoints
trace strace inspired tool See 'perf help COMMAND' for more information on a specific command.

参考资料

ubuntu环境下安装perf工具的更多相关文章

  1. 【转载】Ubuntu环境下安装QT(转)

    Ubuntu 安装 Qt 开发环境 简单实现是本文要介绍的内容,内容很短,取其精华,详细介绍Qt 类库的说明,先来看内容. 一.Ubuntu下安装Qt $ sudo apt-get install q ...

  2. Ubuntu环境下安装CUDA9.0

    前言: 本篇文章是基于安装CUDA 9.0的经验写,CUDA9.0目前支持Ubuntu16.04和Ubuntu17.04两个版本,如下图所示(最下面的安装方式我们选择第一个,即runfile方式): ...

  3. 在Ubuntu环境下安装eclipse

    Eclipse运行需要Java环境,java环境的安装见https://www.cnblogs.com/Sabre/p/10349320.html,本文不再赘述. 1.下载eclipse eclips ...

  4. Ubuntu环境下安装TinyOS系统

    1.输入下面命令会弹出source list窗口   1 sudo gedit /etc.apt/sources.list 在尾部添加以下地址:   1 2 deb http://tinyos.sta ...

  5. Ubuntu 环境下安装 Docker

    系统要求 Docker目前只能运行在64位平台上,并且要求内核版本不低于3.10,实际上内核越新越好,过低的内核版本容易造成功能不稳定. 用户可以通过如下命令检查自己的内核版本详细信息: $ unam ...

  6. [python] Ubuntu 环境下安装 python3.5 + pip

    一般情况下先添加PPA,但是我添加PPA会报错: sudo add-apt-repository ppa:fkrull/deadsnakes ubuntu add-apt-repository: co ...

  7. window环境下安装 pip 工具 【pip为Python的扩展管理工具】

    Python有一些扩展管理工具,例如easy_install和pip工具,我推荐各位使用pip工具,因为pip工具具有很好的安装和卸载体验. 我们首先需要打开pip的官方网站, 下载必要的文件包,然后 ...

  8. linux环境下安装tcping工具测试访问超时

    wget https://sources.voidlinux.eu/tcping-1.3.5/tcping-1.3.5.tar.gz tar zxvf tcping-1.3.5.tar.gz cd t ...

  9. ubuntu环境下安装docker遇到的坑

    ubuntu安装docker的前提条件是: 1. Linux 的内核版本在 3.10 或以上: 2. linux 内核要开启 cgroup 和 namespace 功能 可以执行命令:uname –a ...

  10. ubuntu 环境下 安装虚拟环境

    sudo pip3 install virtualenv 安装虚拟环境 sudo pip3 instal virtualenvwrapper #安装虚拟环境扩展包 编辑home目录下面的.bashrc ...

随机推荐

  1. RN运行ios报错No matching function for call to 'RCTBridgeModuleNameForClass'

    xcode更新12.5后,ios运行报错No matching function for call to 'RCTBridgeModuleNameForClass' 解决方法: 在ios/Podfil ...

  2. MySQL基础3-数据库增删改操作

    一.SQL通用语法 SQL 语法可以单行或者多行书写,以分号结尾. SQL 语句可以使用空格/缩进来增强语句的可读性. MySQL 数据库的 SQL 语句不区分大小写,关键字建议使用大写. 注释: 单 ...

  3. 第132篇:npm第一次使用自己的包(package-lock.json、package.json文件作用说明)

    好家伙,   1.新建一个文件夹,命名为test   2.下载包 npm i panghu-planebattle   空白的文件夹中多了两个文件 package-lock.json和package. ...

  4. 【Azure Function】在Function执行中遇见Timeout错误

    问题描述 在Function执行中遇见Timeout错误: Microsoft.Azure.WebJobs.Host.FunctionTimeoutException /Timeout value o ...

  5. 【Azure Redis Cache】对StackExchange.Redis IOCP错误消息的解读

    问题描述 在使用StackExchange.Redis连接到Azure Redis服务时,时常出现StackExchange.Redis.RedisTimeoutException异常. 全部错误消息 ...

  6. 【Azure 微服务】Service fabric升级结构版本失败问题

    问题描述 Service fabric升级结构版本失败,Service Fabric的可靠性层是白银层,持久性层为青铜层,当把节点从6个直接在虚拟规模集(VMSS)中缩放成了3个.从而引起了Servi ...

  7. 如何使用疯狂URL获取抖音推流码地址(抖音推流码地址获取教程)

    本节所用到的工具:疯狂URL.OBS推流工具 什么是推流地址? 平时我们如果是下载直播,叫拉流.但如果是你自己要直播,属于上传直播流数据,叫推流,即:把直播流数据推送到视频服务器,然后别人才能看到直播 ...

  8. [VueJsDev] 其他知识 - NestJS 学习内容

    [VueJsDev] 目录列表 https://www.cnblogs.com/pengchenggang/p/17037320.html NestJS 学习内容 NestJS 学习总结 Step. ...

  9. libwebsockets支持外部eventloop变更

    早些年还在使用2.4+版本,现在最新版已经到4.1+,centos 7也使用3.+版本.对于使用外部eventloop相关的接口发生了大的变更.libev也应为早早对iouring支持,4+版本亲睐l ...

  10. apt-get install安装软件时出现依赖错误解决方案

    在使用apt-get install安装软件时,经常会遇到如上图所示错误,该错误的意思为缺少依赖软件,解决方案为: aptitude install golang-go