How To Install kernelshark on CentOS 8

kernelshark is GUI analysis for Ftrace data captured by trace-cmd

Introduction

In this tutorial we learn how to install kernelshark on CentOS 8.

What is kernelshark

Kernelshark is the GUI frontend for analyzing data produced by ’trace-cmd extract'

We can use yum or dnf to install kernelshark on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install kernelshark.

Install kernelshark on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install kernelshark using dnf by running the following command:

sudo dnf -y install kernelshark

Install kernelshark on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install kernelshark using yum by running the following command:

sudo yum -y install kernelshark

How To Uninstall kernelshark on CentOS 8

To uninstall only the kernelshark package we can use the following command:

sudo dnf remove kernelshark

kernelshark Package Contents on CentOS 8

/etc/bash_completion.d/trace-cmd.bash
/usr/bin/kernelshark
/usr/bin/trace-graph
/usr/bin/trace-view
/usr/lib/.build-id
/usr/lib/.build-id/7c
/usr/lib/.build-id/7c/09285e7d704eb0b7513273e6ff5222806dd109
/usr/lib/.build-id/c4
/usr/lib/.build-id/c4/bcece7ecf9d594d2933ecb3449011ee3774ebb
/usr/lib/.build-id/f9/88a54b8775ebe799be7f96e97bda7a46ddca13
/usr/share/applications/kernelshark.desktop
/usr/share/kernelshark
/usr/share/kernelshark/html
/usr/share/kernelshark/html/images
/usr/share/kernelshark/html/images/kshark-cursor-1.png
/usr/share/kernelshark/html/images/kshark-filter-advance-1.png
/usr/share/kernelshark/html/images/kshark-filter-del-adv.png
/usr/share/kernelshark/html/images/kshark-filter-event-adv-list.png
/usr/share/kernelshark/html/images/kshark-filter-events-sched.png
/usr/share/kernelshark/html/images/kshark-filter-events.png
/usr/share/kernelshark/html/images/kshark-filter-list-adv-irq.png
/usr/share/kernelshark/html/images/kshark-filter-sync-dialog.png
/usr/share/kernelshark/html/images/kshark-filter-sync-graph-1.png
/usr/share/kernelshark/html/images/kshark-filter-task-menu.png
/usr/share/kernelshark/html/images/kshark-filter.png
/usr/share/kernelshark/html/images/kshark-graph-info-line.png
/usr/share/kernelshark/html/images/kshark-graph-plot-area.png
/usr/share/kernelshark/html/images/kshark-graph-plot-title.png
/usr/share/kernelshark/html/images/kshark-list-adjust.png
/usr/share/kernelshark/html/images/kshark-list-enable-filter-1.png
/usr/share/kernelshark/html/images/kshark-list-graph-follow-1.png
/usr/share/kernelshark/html/images/kshark-list-graph-follow-2.png
/usr/share/kernelshark/html/images/kshark-list-info-area.png
/usr/share/kernelshark/html/images/kshark-open.png
/usr/share/kernelshark/html/images/kshark-plot-cpu-1.png
/usr/share/kernelshark/html/images/kshark-plot-cpu-2.png
/usr/share/kernelshark/html/images/kshark-plot-cpu-result.png
/usr/share/kernelshark/html/images/kshark-plot-menu.png
/usr/share/kernelshark/html/images/kshark-plot-task-measure-preempt.png
/usr/share/kernelshark/html/images/kshark-plot-task-measure.png
/usr/share/kernelshark/html/images/kshark-plot-task-result.png
/usr/share/kernelshark/html/images/kshark-plot-task-select.png
/usr/share/kernelshark/html/images/kshark-plot-task-zoom-1.png
/usr/share/kernelshark/html/images/kshark-select-a-1.png
/usr/share/kernelshark/html/images/kshark-select-b-1.png
/usr/share/kernelshark/html/images/kshark-unsync-events.png
/usr/share/kernelshark/html/images/kshark-zoom-in-2.png
/usr/share/kernelshark/html/images/kshark-zoom-in-3.png
/usr/share/kernelshark/html/images/kshark-zoom-in-select.png
/usr/share/kernelshark/html/images/kshark-zoom-out-select.png
/usr/share/kernelshark/html/index.html
/usr/share/man/man1/kernelshark.1.gz

References

Summary

In this tutorial we learn how to install kernelshark on CentOS 8 using yum and dnf.