We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
collect
1 parent 335727a commit f387291Copy full SHA for f387291
collect
@@ -207,6 +207,16 @@ perf_version=$(perf --version)
207
process_opts "$@"
208
find_compressor
209
210
+# Check if running as root
211
+if [ "$(id -u)" -ne 0 ]; then
212
+ die "This script must be run as root."
213
+fi
214
+
215
+# Check if perf is available
216
+if ! which perf >/dev/null 2>&1; then
217
+ die "The 'perf' command is not found in PATH."
218
219
220
# Specific to Cisco IOS-XR: disable memdbg if present, since otherwise it can
221
# cause perf to coredump.
222
if [ "$LD_PRELOAD" = "/pkg/lib/libmemdbg.so" ]; then
0 commit comments