I had this error on Ubuntu:
$ perf sched
perf: 'sched' is not a perf-command. See 'perf --help'.
Then someone suggested compiling perf from source, which worked well
in here.
I ran these commands:
sudo apt install libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf llvm -y
sudo apt install linux-source -y
sudo apt install linux-tools-common -y
sudo apt install libtraceevent-dev -y
sudo apt install libpfm4-dev -y
sudo apt install python3-dev -y
mkdir ~/kernel_compile_sched
cd ~/kernel_compile_sched
mkdir prefix_dir
sudo tar -xf /usr/src/linux-source-*.tar.*
sudo chown afeser . -R
cd linux-source*
cp /boot/config-$(uname -r) ./.config
make oldconfig
cd tools/perf
make -j16 prefix=~/kernel_compile_sched/prefix_dir install
export PATH=~/kernel_compile_sched/prefix_dir/bin:$PATH # do this whenever you need to use the custom perf
Check this one out
Leave a Reply