File: //proc/thread-self/root/usr/lib64/dtrace/load_dtrace_modules
#!/bin/bash
# Attempt to load the appropriate DTrace module for this kernel.
#
# Also load any modules named in /etc/dtrace-modules. Failure to
# load these is not fatal (nor even reported).
#
#
# Oracle Linux DTrace.
# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.
#
load_modules()
{
if ! modprobe -q dtrace 2>/dev/null; then
return 1
fi
test -f ${DTRACE_MODULES_CONF:-/etc/dtrace-modules} || return 0
# Failure to load modules from /etc/dtrace-modules is nonfatal.
cat ${DTRACE_MODULES_CONF:-/etc/dtrace-modules} | sed 's,\(.\)#.*$,\1,' | while read -r MODULE; do
[[ $MODULE =~ ^# ]] && continue;
modprobe -q $MODULE >/dev/null 2>&1 || true
done
return 0
}
# Suppress all normal output.
exec >/dev/null
# Can't do anything if non-root.
[[ "$(id -u)" != 0 ]] && exit 1
# Try to modprobe it.
load_modules