Ubuntu 22.04 how2 Tubostat
Turbostat, a powerful tool for reporting processor topology, frequency, idle power-state statistics, temperature, and power on X86 processors.
In this guide, we'll walk you through the process of installing Turbostat on Ubuntu 22.04, as well as explain how to use it in two different ways.
Installing Turbostat on Ubuntu 22.04
Start by updating your package list with the command:
sudo apt-get update
Next, install the linux-tools-common package by running the following command:
sudo apt-get install linux-tools-common
Alternatively, non-root users can also run Turbostat by setting the
cap_sys_rawio
capability with the following command:
setcap cap_sys_rawio=ep ./turbostat
To ensure that Turbostat does not interfere with other programs, including multiple instances of itself, it is necessary to grant read access to the
/dev/cpu/*/msr
file with the command:
chmod +r /dev/cpu/*/msr
Using Turbostat
Turbostat can be used in two ways:
Supply a command as an argument which is forked and statistics are printed upon its completion.
Omit the command and Turbostat displays statistics at a certain interval. The interval can be changed using the
--interval
option.
Take your Ubuntu 22.04 performance monitoring to the next level with Turbostat. With its extensive range of features and easy-to-use interface, it's the perfect tool for developers and system administrators alike.
To display statistics at a fixed interval of 1 second:
turbostat --interval 1
To display statistics for a specific core:
turbostat --core 3
To display statistics for all cores:
turbostat --all-cores
To display statistics while running a specific command:
turbostat --interval 1 --quiet --all-cores stress --cpu 8 --timeout 60
To display statistics in CSV format:
turbostat --csv --interval 1
To display statistics for a specific socket:
turbostat --socket 1
These are just a few examples of the many options available when using Turbostat. You can also specify different fields to be displayed, such as temperature, power, or frequency, and you can output the statistics to a file for later analysis. You can see more on the man pages or in the documentation.
Reference Links: https://manpages.ubuntu.com/manpages/bionic/man8/turbostat.8.html https://manpages.ubuntu.com/manpages/xenial/man8/turbostat.8.html https://www.kernel.org/doc/Documentation/cpu-freq/boost.txt https://ubuntu.pkgs.org/22.04/ubuntu-updates-main-amd64/linux-tools-common_5.15.0-30.31_all.deb.html https://askubuntu.com/questions/37618/is-turbo-boost-working https://www.mankier.com/8/turbostat
Citations:
https://manpages.ubuntu.com/manpages/bionic/man8/turbostat.8.html https://ubuntu.pkgs.org/22.04/ubuntu-updates-main-amd64/linux-tools-common_5.15.0-30.31_all.deb.html https://www.mankier.com/8/turbostat https://manpages.ubuntu.com/manpages/xenial/man8/turbostat.8.html https://www