hypersolana/net/scripts/install-perf.sh
kirill lykov cd01c1a4ce
Add profile option to net scripts (#25624)
* add image option to cloud CreateInstaces

* add script to install perf

* add profile option to gce.sh

* add profile option for net.sh start

* Revert "add image option to cloud CreateInstaces"

This reverts commit fd63991861e632ae87e79281bca63a0f8173e201.

* remove imageName from gce.sh

* fix for gce.sh

* add comments on permissions setup

* remove profile option for gce.sh

* remove short arg
2022-06-21 19:28:15 +02:00

18 lines
531 B
Bash
Executable File

#!/usr/bin/env bash
#
# perf setup
#
set -ex
[[ $(uname) = Linux ]] || exit 1
[[ $USER = root ]] || exit 1
# install perf
apt-get --assume-yes install linux-tools-common linux-tools-generic "linux-tools-$(uname -r)"
# setup permissions
# Impose no scope and access restrictions on using perf_events performance monitoring
echo -1 | tee /proc/sys/kernel/perf_event_paranoid
# Allow recording kernel reference relocation symbol to avoid skewing symbol resolution if relocation was used
echo 0 | tee /proc/sys/kernel/kptr_restrict