Skip to content

Can not use linux perf tools on aws ec2 f2 instance

0

ubuntu@ip-172-31-87-218:~/aws-fpga/hdk/cl/examples/cl_sde/software/runtime$ sudo perf stat ./chip_interact 32 16384 0 > temp.txt WARNING: perf not found for kernel 6.14.0-1012

You may need to install the following packages for this specific kernel: linux-tools-6.14.0-1012-aws linux-cloud-tools-6.14.0-1012-aws

You may also want to install one of the following packages to keep up to date: linux-tools-aws linux-cloud-tools-aws ubuntu@ip-172-31-87-218:/aws-fpga/hdk/cl/examples/cl_sde/software/runtime$ sudo apt-get linux-tools-6.14.0-1012-aws E: Invalid operation linux-tools-6.14.0-1012-aws ubuntu@ip-172-31-87-218:/aws-fpga/hdk/cl/examples/cl_sde/software/runtime$ sudo apt-get install linux-cloud-tools-6.14.0-1012-aws Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package linux-cloud-tools-6.14.0-1012-aws E: Couldn't find any package by glob 'linux-cloud-tools-6.14.0-1012-aws' E: Couldn't find any package by regex 'linux-cloud-tools-6.14.0-1012-aws'

I was trying to perf my program so I can learn something about it (why it is slower than I expected). But I can not use the perf tool in linux. Despite that I have already use sudo apt-get update and sudo apt-get upgrade, I still can not install the given package. What can I do to use performance profile tools on my f2 instance?

  • Hi Inspire Group,

    I noticed that you mentioned doing a sudo apt-get upgrade on your instance. An upgrade should never be performed, as the FPGA Developer AMI needs to adhere to various requirements to work with Vivado/Vitis, other AMD software, and utilities included in the development kit.

    It looks like Mike was able to get linux-tools-aws installed in his comment below. Does this solution work for you?

    I would also encourage you to take a look at our Software Optimization Guide to help you get the most out of your application if you happen to be using an f2.48xlarge instance: https://awsdocs-fpga-f2.readthedocs-hosted.com/latest/sdk/docs/F2-Software-Performance-Optimization-Guide.html

asked a year ago617 views

2 Answers
0

It appears you're trying to use the Linux perf tools on an Ubuntu-based EC2 F2 instance, but encountering package installation issues.

The error message indicates that you need specific performance tools packages for your kernel version (6.14.0-1012-aws), but these packages aren't available in your current repositories.

Since you're working on an F2 instance, you have a few options:

  1. Try installing the generic Linux tools package:
sudo apt-get install linux-tools-generic
  1. If you need kernel-specific performance tools, you might need to use a different version of Amazon Linux or Ubuntu that has better support for the tools you need.

  2. Amazon Linux 2 includes perf tools in its kernel-tools packages. If your workload allows, you could consider using Amazon Linux 2 instead of Ubuntu, as AL2 has perf tools included in packages like kernel-tools and python-perf.

  3. For Ubuntu specifically, try installing:

sudo apt-get install linux-tools-common linux-tools-aws

If you need to stay with your current Ubuntu instance, you might need to build the perf tools from source for your specific kernel version if the packages aren't available in the repositories.

Remember that F2 instances are FPGA-based, and you might also want to explore AWS-specific FPGA development and profiling tools that are designed specifically for these instance types.
Sources
Amazon Linux 2 version 2.0.20210126.0 release notes - Amazon Linux 2
Amazon Linux 2 version 2.0.20250328.0 release notes - Amazon Linux 2
Amazon Linux 2 version 2.0.20250428.0 release notes - Amazon Linux 2

answered a year ago

0

On your Ubuntu 24.04 AMI, try the following commands

sudo apt update
sudo apt install -y linux-tools-aws

I was able to install on FPGA Developer AMI (Ubuntu).

ubuntu@ip-172-31-45-146:/$ cat ~/src/RELEASE_NOTES.md 
# RELEASE NOTES

## FPGA Developer AMI (Ubuntu) - 1.18.0

- Update Xilinx tools to 2025.1

ubuntu@ip-172-31-45-146:~$ uname -r
6.14.0-1012-aws
ubuntu@ip-172-31-45-146:~$ sudo apt info linux-tools-aws
Package: linux-tools-aws
Version: 6.14.0-1012.12~24.04.1
Priority: optional
Section: kernel
Source: linux-meta-aws-6.14
Origin: Ubuntu
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 9216 B
Provides: linux-tools
Depends: linux-tools-6.14.0-1012-aws
Download-Size: 2310 B
APT-Manual-Installed: yes
APT-Sources: http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
Description: Linux kernel versioned tools for Amazon Web Services (AWS) systems.
 This package will always depend on the latest Linux kernel versioned tools
 available for Amazon Web Services (AWS) systems.

N: There is 1 additional record. Please use the '-a' switch to see it
ubuntu@ip-172-31-45-146:~$
AWS
EXPERT

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.