45 lines
804 B
Bash
45 lines
804 B
Bash
|
#!/usr/bin/bash
|
||
|
|
||
|
# Make sure rtla is installed
|
||
|
if rpm -q rtla; then
|
||
|
:
|
||
|
else
|
||
|
# libtraceevent is a dependency of libtracefs too
|
||
|
sudo dnf install -y libtraceevent
|
||
|
if [[ $? != 0 ]]; then
|
||
|
echo "install of rtla dependency libtraceevent failed"
|
||
|
exit 1
|
||
|
fi
|
||
|
sudo dnf install -y libtracefs
|
||
|
if [[ $? != 0 ]]; then
|
||
|
echo "install of rtla dependency libtracefs failed"
|
||
|
exit 1
|
||
|
fi
|
||
|
sudo dnf install -y rtla
|
||
|
if [[ $? != 0 ]]; then
|
||
|
echo "install of rtla dependency libtracefs failed"
|
||
|
exit 1
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
rtla
|
||
|
if [[ $? != 1 ]]; then
|
||
|
# When you run rtla without a command, it exits with a failure
|
||
|
echo "rtla failed to run"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
rtla timerlat -h
|
||
|
if [[ $? != 0 ]]; then
|
||
|
echo "rtla timerlat -h failed"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
rtla osnoise -h
|
||
|
if [[ $? != 0 ]]; then
|
||
|
echo "rtla osnoise -h failed"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
exit 0
|