mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Initial s390-tools-2.0.0 import
This commit is based on the s390-tools-1.39.0 version. Changes on top of s390-tools-1.39.0: - Add MIT license to all source files - Add LICENSE file - Transform REAMDE to README.md (markdown) - Add AUTHORS.md file - Add CONTRIBUTING.md file - Move changelog from README to CHANGELOG.md file Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
This commit is contained in:
@@ -0,0 +1,166 @@
|
||||
#
|
||||
# Exemplary configuration file for the Linux on System z CPU and memory hotplug
|
||||
# daemon
|
||||
#
|
||||
# The file is evaluated by cpuplugd at startup when called with -c.
|
||||
# It does not contain shell environment variables.
|
||||
|
||||
## Type: integer
|
||||
## Default: 1
|
||||
#
|
||||
# The minimum number of CPUs must be > 0.
|
||||
#
|
||||
CPU_MIN="1"
|
||||
|
||||
## Type: integer
|
||||
## Default: 0
|
||||
#
|
||||
# The maximum number of CPUs to be enabled. If 0 is specified here,
|
||||
# the maximum number of CPUs equals the number of CPUs detected.
|
||||
#
|
||||
CPU_MAX="0"
|
||||
|
||||
## Type: integer
|
||||
## Default: 5
|
||||
#
|
||||
# The update interval described how often the current system state
|
||||
# is checked against the configured set of hotplug and hotunplug rules.
|
||||
# The update interval is defined in seconds.
|
||||
#
|
||||
UPDATE="1"
|
||||
|
||||
## Type: integer
|
||||
## Default: 0
|
||||
#
|
||||
# The minimum size of the static page pool (in 4K pages)
|
||||
#
|
||||
CMM_MIN="0"
|
||||
|
||||
## Type: integer
|
||||
## Default: 131072
|
||||
#
|
||||
# The maximum size of the static page pool (in 4K pages)
|
||||
#
|
||||
# Recommended setting is system size minus 256 MB
|
||||
CMM_MAX="131072" # 512 MB
|
||||
|
||||
#
|
||||
# Variables
|
||||
#
|
||||
# User-defined variables are case-sensitive and must not match a pre-defined
|
||||
# variable or keyword. In the configuration file, definitions
|
||||
# for user-defined variables must precede their use in expressions.
|
||||
# Variable names consist of alphanumeric characters (a-z,A-Z,0-9) and
|
||||
# the "_" character. The maximum name length for a variable is 128 characters,
|
||||
# and the maximum total size for user-defined variables (names + values) is 4096
|
||||
# characters.
|
||||
#
|
||||
pgscan_d="vmstat.pgscan_direct_dma[0] + vmstat.pgscan_direct_normal[0] + vmstat.pgscan_direct_movable[0]"
|
||||
pgscan_d1="vmstat.pgscan_direct_dma[1] + vmstat.pgscan_direct_normal[1] + vmstat.pgscan_direct_movable[1]"
|
||||
# page scan rate in pages / timer tick
|
||||
pgscanrate="(pgscan_d - pgscan_d1) / (cpustat.total_ticks[0] - cpustat.total_ticks[1])"
|
||||
# cache usage in kilobytes
|
||||
avail_cache="meminfo.Cached - meminfo.Shmem"
|
||||
|
||||
user_0="(cpustat.user[0] - cpustat.user[1])"
|
||||
nice_0="(cpustat.nice[0] - cpustat.nice[1])"
|
||||
system_0="(cpustat.system[0] - cpustat.system[1])"
|
||||
user_2="(cpustat.user[2] - cpustat.user[3])"
|
||||
nice_2="(cpustat.nice[2] - cpustat.nice[3])"
|
||||
system_2="(cpustat.system[2] - cpustat.system[3])"
|
||||
CP_Active0="(user_0 + nice_0 + system_0) / (cpustat.total_ticks[0] - cpustat.total_ticks[1])"
|
||||
CP_Active2="(user_2 + nice_2 + system_2) / (cpustat.total_ticks[2] - cpustat.total_ticks[3])"
|
||||
|
||||
CP_ActiveAVG="(CP_Active0+CP_Active2) / 2"
|
||||
idle_0="(cpustat.idle[0] - cpustat.idle[1])"
|
||||
iowait_0="(cpustat.iowait[0] - cpustat.iowait[1])"
|
||||
idle_2="(cpustat.idle[2] - cpustat.idle[3])"
|
||||
iowait_2="(cpustat.iowait[2] - cpustat.iowait[3])"
|
||||
CP_idle0="(idle_0 + iowait_0) / (cpustat.total_ticks[0] - cpustat.total_ticks[1])"
|
||||
CP_idle2="(idle_2 + iowait_2) / (cpustat.total_ticks[2] - cpustat.total_ticks[3])"
|
||||
CP_idleAVG="(CP_idle0 + CP_idle2) / 2"
|
||||
|
||||
## Type: string
|
||||
## Default: "(meminfo.MemFree + cache) / 40"
|
||||
#
|
||||
# The amount of pages the static page pool
|
||||
# is increased if a memunplug rule is matched.
|
||||
#
|
||||
# cmm_inc: 10% of free memory, in 4K pages
|
||||
CMM_INC="meminfo.MemFree / 40"
|
||||
|
||||
## Type: string
|
||||
## Default: "meminfo.MemTotal / 40"
|
||||
#
|
||||
# The amount of pages the static page pool
|
||||
# is decreased if a memplug rule is matched.
|
||||
#
|
||||
# cmm_dec: 10% of total memory, in 4K pages
|
||||
CMM_DEC="meminfo.MemTotal / 40"
|
||||
|
||||
#
|
||||
# Ruledefinitions
|
||||
#
|
||||
# Four kinds of rules are distinguished
|
||||
# (1) hotplug rules, used to enable CPUs
|
||||
# (2) hotunplug rules, to disable CPUs
|
||||
# (3) memplug rules, used to increase memory (decrease cmm balloon)
|
||||
# (4) memunplug rules, used to decrease memory (increase cmm balloon)
|
||||
#
|
||||
# Within the hotplug/hotunplug rule definitions the following variables
|
||||
# can be used:
|
||||
# - loadavg: the current loadaverage
|
||||
# - onumcpus: the current number of CPUs which are online
|
||||
# - runnable_proc: the current amount of runnable processes
|
||||
# - user: the current user percentage
|
||||
# - nice: the current nice percentage
|
||||
# - system: the current system percentage
|
||||
# - idle: the current idle percentage
|
||||
# - iowait: the current iowait percentage
|
||||
# - irq: the current irq percentage
|
||||
# - softirq: the current softirq percentage
|
||||
# - steal: the current steal percentage
|
||||
# - guest: the current guest percentage
|
||||
# - guest_nice: the current guest_nice percentage
|
||||
# - cpustat.<name>: data from /proc/stat and /proc/loadavg
|
||||
# - time: floating point timestamp in "seconds.microseconds"
|
||||
# since the Unix Epoch (1970-01-01 00:00:00 +0000 (UTC))
|
||||
#
|
||||
## Type: string
|
||||
## Default: "(loadavg > onumcpus + 0.75) & (idle < 10.0)"
|
||||
#
|
||||
HOTPLUG="((1 - CP_ActiveAVG) * onumcpus) < 0.08"
|
||||
|
||||
## Type: string
|
||||
## Default: "(loadavg < onumcpus - 0.25) | (idle > 50)"
|
||||
#
|
||||
HOTUNPLUG="(CP_idleAVG * onumcpus) > 1.15"
|
||||
|
||||
#
|
||||
# Memplug and memunplug can contain the following keywords:
|
||||
# - apcr: the amount of page cache operations,
|
||||
# i.e. pgpin + pgpout from /proc/vmstat
|
||||
# (in 512 byte blocks / second)
|
||||
# - freemem: the amount of free memory (in megabytes)
|
||||
# - swaprate: the number of swap operations, i.e. pswpin + pswpout
|
||||
# from /proc/vmstat (in pages / second)
|
||||
# - meminfo.<name>: any value from /proc/meminfo
|
||||
# - vmstat.<name>: any value from /proc/vmstat
|
||||
# - time: floating point timestamp in "seconds.microseconds"
|
||||
# since the Unix Epoch (1970-01-01 00:00:00 +0000 (UTC))
|
||||
#
|
||||
# This function is disabled by default, because this rule has to be
|
||||
# adjusted for each production system, depending on the environment.
|
||||
#
|
||||
## Type: string
|
||||
## Default: "0"
|
||||
#
|
||||
#MEMPLUG="pgscanrate > 20"
|
||||
MEMPLUG="0"
|
||||
|
||||
## Type: string
|
||||
## Default: "0"
|
||||
#
|
||||
#MEMUNPLUG="(meminfo.MemFree + avail_cache) > (meminfo.MemTotal / 10)"
|
||||
MEMUNPLUG="0"
|
||||
|
||||
Executable
+89
@@ -0,0 +1,89 @@
|
||||
#!/bin/bash
|
||||
### BEGIN INIT INFO
|
||||
# Provides: cpacfstatsd
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop: $local_fs
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: 2 3 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Start the cpacfstatsd daemon for Linux on System z
|
||||
# Description: CPACF statistics collection daemon process for Linux on System z
|
||||
### END INIT INFO
|
||||
|
||||
DAEMON=cpacfstatsd
|
||||
DAEMON_PATH=/usr/sbin/cpacfstatsd
|
||||
RUN_PID_FILE=/var/run/cpacfstatsd.pid
|
||||
RETVAL=0
|
||||
OPTIONS=""
|
||||
|
||||
# source function library
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
start()
|
||||
{
|
||||
if [ ! -f $RUN_PID_FILE ]; then
|
||||
echo -n $"Starting $DAEMON:"
|
||||
$DAEMON_PATH $OPTIONS
|
||||
if [ $? == "0" ]; then
|
||||
log_success_msg
|
||||
else
|
||||
log_failure_msg
|
||||
fi
|
||||
echo
|
||||
else
|
||||
echo "$DAEMON (pid $(cat $RUN_PID_FILE)) is already running..."
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
echo -n $"Stopping $DAEMON:"
|
||||
if [ -f $RUN_PID_FILE ]; then
|
||||
killproc $DAEMON_PATH -TERM
|
||||
log_success_msg
|
||||
rm -f $RUN_PID_FILE
|
||||
else
|
||||
log_failure_msg
|
||||
fi
|
||||
echo
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
status()
|
||||
{
|
||||
if [ ! -f $RUN_PID_FILE ]; then
|
||||
echo "$DAEMON is not running."
|
||||
echo
|
||||
else
|
||||
echo "$DAEMON (pid $(cat $RUN_PID_FILE)) is running."
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
# How are we called?
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $DAEMON {start|stop|status|restart}"
|
||||
RETVAL=1
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
Executable
+116
@@ -0,0 +1,116 @@
|
||||
#!/bin/bash
|
||||
### BEGIN INIT INFO
|
||||
# Provides: cpuplugd
|
||||
# Required-Start: $local_fs $remote_fs
|
||||
# Required-Stop: $local_fs $remote_fs
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: 2 3 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Start the cpu hotplug daemon for Linux on System z
|
||||
# Description: Starts the cpuplugd. It uses the configuration
|
||||
# file /etc/cpuplugd.conf
|
||||
### END INIT INFO
|
||||
|
||||
# chkconfig: 235 01 99
|
||||
|
||||
DAEMON=cpuplugd
|
||||
DAEMON_PATH=/usr/sbin/cpuplugd
|
||||
CONFIG_FILE=/etc/cpuplugd.conf
|
||||
RUN_PID_FILE=/var/run/cpuplugd.pid
|
||||
RETVAL=0
|
||||
OPTIONS="-c $CONFIG_FILE"
|
||||
|
||||
# source function library
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
start()
|
||||
{
|
||||
if [ ! -f $RUN_PID_FILE ]; then
|
||||
echo -n $"Starting $DAEMON:"
|
||||
$DAEMON_PATH $OPTIONS
|
||||
if [ $? == "0" ]; then
|
||||
log_success_msg
|
||||
else
|
||||
log_failure_msg
|
||||
fi
|
||||
echo
|
||||
else
|
||||
echo "$DAEMON (pid $(cat $RUN_PID_FILE)) is already running..."
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
echo -n $"Stopping $DAEMON:"
|
||||
if [ -f $RUN_PID_FILE ]; then
|
||||
killproc $DAEMON_PATH -TERM
|
||||
log_success_msg
|
||||
rm -f $RUN_PID_FILE
|
||||
else
|
||||
log_failure_msg
|
||||
fi
|
||||
echo
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
#
|
||||
# We have to wait 2-3 seconds here. When the daemon is stopped it takes
|
||||
# the time we sleep to reactivate cpus. If we restart to fast and
|
||||
# cpuplugd wasn't able to restore some settings we may get a undesired
|
||||
# online cpu count after cpuplugd shutdown
|
||||
#
|
||||
sleep 4
|
||||
start
|
||||
}
|
||||
|
||||
status()
|
||||
{
|
||||
if [ ! -f $RUN_PID_FILE ]; then
|
||||
echo "$DAEMON is not running."
|
||||
echo
|
||||
else
|
||||
echo "$DAEMON (pid $(cat $RUN_PID_FILE), options: $OPTIONS) is running."
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
reload()
|
||||
{
|
||||
echo -n $"Reloading $DAEMON: "
|
||||
if [ -f $RUN_PID_FILE ]; then
|
||||
killproc $DAEMON_PATH -HUP
|
||||
log_success_msg
|
||||
else
|
||||
log_failure_msg
|
||||
fi
|
||||
RETVAL=$?
|
||||
echo
|
||||
}
|
||||
|
||||
|
||||
# How are we called?
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
reload|force-reload)
|
||||
reload
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $DAEMON {start|stop|status|restart|reload}"
|
||||
RETVAL=1
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
Executable
+578
@@ -0,0 +1,578 @@
|
||||
#!/bin/bash
|
||||
### BEGIN INIT INFO
|
||||
# Provides: dumpconf
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop: $local_fs
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: 0 1 2 3 5 6
|
||||
# Default-Stop:
|
||||
# Short-Description: Configure s390 dump feature
|
||||
# Description: Configures the s390 dump feature. It uses the configuration file
|
||||
# /etc/sysconfig/dumpconf
|
||||
# X-Systemd-RemainAfterExit: true
|
||||
### END INIT INFO
|
||||
|
||||
# chkconfig: 012356 01 99
|
||||
|
||||
# This script can be either used stand-alone or as System V init script.
|
||||
|
||||
DUMPCONF_BIN=/etc/init.d/dumpconf
|
||||
DUMP_CONFIG_FILE=/etc/sysconfig/dumpconf
|
||||
CMDFULL=$0
|
||||
CMD="dumpconf"
|
||||
LOCKFILE=/var/lock/$CMD
|
||||
PIDFILE=/var/run/$CMD.pid
|
||||
ERRMSG="Check $DUMP_CONFIG_FILE!"
|
||||
|
||||
RETVAL=0
|
||||
BACKGROUND=0
|
||||
|
||||
pr_info()
|
||||
{
|
||||
if [ $BACKGROUND -eq 0 ]; then
|
||||
echo "$@"
|
||||
else
|
||||
echo "$@" | logger -t dumpconf
|
||||
fi
|
||||
}
|
||||
|
||||
pr_error()
|
||||
{
|
||||
if [ $BACKGROUND -eq 0 ]; then
|
||||
echo "$@" >&2
|
||||
else
|
||||
echo "$@" | logger -t dumpconf
|
||||
fi
|
||||
}
|
||||
|
||||
check_environment()
|
||||
{
|
||||
if [ ! -f $DUMP_CONFIG_FILE ]; then
|
||||
pr_error "no config file found: $DUMP_CONFIG_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(cat /proc/filesystems|grep sysfs)" = "" ]; then
|
||||
pr_error "no sysfs found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SYSFSDIR=$(cat /proc/mounts|awk '$3=="sysfs"{print $2; exit}')
|
||||
if [ "$SYSFSDIR" = "" ]; then
|
||||
pr_error "sysfs not mounted"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DUMP_CONFIG_DIR=/$SYSFSDIR/firmware/dump
|
||||
ON_PANIC_CONFIG_FILE=/$SYSFSDIR/firmware/shutdown_act\
|
||||
ions/on_panic
|
||||
ON_RESTART_CONFIG_FILE=/$SYSFSDIR/firmware/shutdown_act\
|
||||
ions/on_restart
|
||||
if [ ! -d $DUMP_CONFIG_DIR ]; then
|
||||
pr_info "kernel has no dump on panic support"
|
||||
exit 0
|
||||
fi
|
||||
REIPL_CONFIG_DIR=/$SYSFSDIR/firmware/reipl
|
||||
if [ ! -d $REIPL_CONFIG_DIR ]; then
|
||||
pr_info "kernel has no dump on panic support"
|
||||
exit 0
|
||||
fi
|
||||
VMCMD_CONFIG_DIR=/$SYSFSDIR/firmware/vmcmd
|
||||
|
||||
. $DUMP_CONFIG_FILE
|
||||
}
|
||||
|
||||
printhelp()
|
||||
{
|
||||
cat <<EOF
|
||||
Usage: dumpconf [OPTIONS]
|
||||
|
||||
This script can be used to configure the dump device which is used by the
|
||||
Linux kernel in case of a kernel panic.
|
||||
|
||||
It uses the configuration file /etc/sysconfig/dumpconf as input.
|
||||
|
||||
Options:
|
||||
|
||||
-h, --help print this help
|
||||
-v, --version print version information
|
||||
start enable configuration defined in /etc/sysconfig/dumpconf
|
||||
stop disable dump on panic
|
||||
status show current dump on panic configuration
|
||||
EOF
|
||||
}
|
||||
|
||||
printversion()
|
||||
{
|
||||
cat <<EOF
|
||||
dumpconf: zSeries dump configuration script version 1.1
|
||||
Copyright IBM Corp. 2006, 2009
|
||||
EOF
|
||||
}
|
||||
|
||||
print_invalid_option()
|
||||
{
|
||||
cat <<EOF
|
||||
dumpconf: invalid option -- $1
|
||||
Try 'dumpconf --help' for more information.
|
||||
EOF
|
||||
}
|
||||
|
||||
cleanup_pidfile()
|
||||
{
|
||||
if [ $(ps $1 | grep $CMD | wc -l) -eq 0 ]; then
|
||||
rm -f $PIDFILE
|
||||
fi
|
||||
}
|
||||
|
||||
handle_stop_request()
|
||||
{
|
||||
rm -f $PIDFILE 2>/dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
delay_activation()
|
||||
{
|
||||
# Open lock file with file descriptor 123
|
||||
exec 123>$LOCKFILE
|
||||
if flock -n -x 123; then
|
||||
if [ -f $PIDFILE ]; then
|
||||
# concurrent process was faster
|
||||
exit 0
|
||||
fi
|
||||
trap handle_stop_request TERM
|
||||
echo $$ > $PIDFILE
|
||||
else
|
||||
# Nothing to do, "dumpconf start" is already in progress
|
||||
exit 0
|
||||
fi
|
||||
# Close file descriptor 123
|
||||
exec 123>&-
|
||||
# Do multiple sleeps in order to be interruptible
|
||||
for ((i=0; i < $DELAY_MINUTES * 60; i++)); do
|
||||
sleep 1
|
||||
done
|
||||
rm -f $PIDFILE
|
||||
}
|
||||
|
||||
# $1: dump device bus id (e.g. 0.0.4711)
|
||||
verify_ccw_dump_device()
|
||||
{
|
||||
line=$(lsdasd -c $1)
|
||||
if [ $? -ne 0 ]; then
|
||||
line=$(lsdasd $1)
|
||||
fi
|
||||
if [ "$line" == "" ]; then
|
||||
pr_info "WARNING: device $1 not found!"
|
||||
return 1
|
||||
fi
|
||||
found=false
|
||||
for i in $line
|
||||
do
|
||||
if [ $found == true ]; then
|
||||
break
|
||||
fi
|
||||
if [ "$i" == "is" ]; then
|
||||
found=true
|
||||
fi
|
||||
done
|
||||
zgetdump -d /dev/$i > /dev/null 2>&1
|
||||
if [ $? == 0 ]; then
|
||||
return 0
|
||||
else
|
||||
pr_info "WARNING: $1 is no valid dump device!"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Helper function to check a device string.
|
||||
#------------------------------------------------------------------------------
|
||||
function CheckDeviceString() {
|
||||
local X
|
||||
|
||||
X=$(
|
||||
echo "$1" |
|
||||
awk --posix -F. '
|
||||
function PrintBusID(css, grp, devno) {
|
||||
while(length(devno) < 4)
|
||||
devno = "0" devno
|
||||
print css "." grp "." devno
|
||||
}
|
||||
NF == 1 && $1 ~ /^[0-9a-fA-F]{1,4}$/ {
|
||||
PrintBusID("0","0", $1)
|
||||
next
|
||||
}
|
||||
NF != 3 || $1 !~ /^[0-9a-fA-F]{1,2}$/ {
|
||||
next
|
||||
}
|
||||
$2 !~ /^[0-9a-fA-F]{1,2}$/ {
|
||||
next
|
||||
}
|
||||
$3 !~ /^[0-9a-fA-F]{1,4}$/ {
|
||||
next
|
||||
}
|
||||
{
|
||||
PrintBusID($1, $2, $3)
|
||||
}
|
||||
'
|
||||
)
|
||||
|
||||
if [ "$X" != "" ]; then
|
||||
echo $X
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
setup_device()
|
||||
{
|
||||
DEV="$(CheckDeviceString $DEVICE)"
|
||||
if [ "$DEV" != "" ]; then
|
||||
echo $DEV > $1/$2/device
|
||||
else
|
||||
RETVAL=1
|
||||
pr_error "ERROR: Invalid DEVICE '$DEVICE'." $ERRMSG
|
||||
return
|
||||
fi
|
||||
if [ $2 == "fcp" ]; then
|
||||
echo $WWPN > $1/fcp/wwpn 2>/dev/null || RETVAL=1
|
||||
if [ $RETVAL -eq 1 ]; then
|
||||
pr_error "ERROR: Invalid WWPN '$WWPN'." $ERRMSG
|
||||
return
|
||||
fi
|
||||
echo $LUN > $1/fcp/lun 2>/dev/null || RETVAL=1
|
||||
if [ $RETVAL -eq 1 ]; then
|
||||
pr_error "ERROR: Invalid LUN '$LUN'." $ERRMSG
|
||||
return
|
||||
fi
|
||||
echo $BOOTPROG > $1/fcp/bootprog 2>/dev/null || RETVAL=1
|
||||
if [ $RETVAL -eq 1 ]; then
|
||||
pr_error "ERROR: Invalid BOOTPROG '$BOOTPROG'." $ERRMSG
|
||||
return
|
||||
fi
|
||||
echo $BR_LBA > $1/fcp/br_lba 2>/dev/null || RETVAL=1
|
||||
if [ $RETVAL -eq 1 ]; then
|
||||
pr_error "ERROR: Invalid BR_LBA '$BR_LBA'." $ERRMSG
|
||||
return
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
setup_nss_device()
|
||||
{
|
||||
echo $NSS_NAME > $1/nss/name || RETVAL=1
|
||||
}
|
||||
|
||||
setup_reipl()
|
||||
{
|
||||
if [ "$REIPL_TYPE" == "" ]; then
|
||||
pr_info "reipl on panic configured: Using default reipl values."
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "$REIPL_TYPE" == "ccw" ] || [ "$REIPL_TYPE" == "fcp" ]; then
|
||||
setup_device $REIPL_CONFIG_DIR $REIPL_TYPE
|
||||
elif [ "$REIPL_TYPE" == "nss" ]; then
|
||||
setup_nss_device $REIPL_CONFIG_DIR
|
||||
else
|
||||
pr_error "ERROR: Unknown reipl type '$REIPL_TYPE'." $ERRMSG
|
||||
RETVAL=1
|
||||
return
|
||||
fi
|
||||
|
||||
echo $REIPL_TYPE > $REIPL_CONFIG_DIR/reipl_type || RETVAL=1
|
||||
|
||||
if [ $RETVAL -eq 1 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
pr_info "$REIPL_TYPE reipl device configured."
|
||||
}
|
||||
|
||||
setup_dump()
|
||||
{
|
||||
if [ "$DUMP_TYPE" == "ccw" ] || [ "$DUMP_TYPE" == "fcp" ]; then
|
||||
setup_device $DUMP_CONFIG_DIR $DUMP_TYPE
|
||||
elif [ "$DUMP_TYPE" != "none" ]; then
|
||||
pr_error "ERROR: Unknown dump type '$DUMP_TYPE'." $ERRMSG
|
||||
RETVAL=1
|
||||
return
|
||||
fi
|
||||
|
||||
echo $DUMP_TYPE > $DUMP_CONFIG_DIR/dump_type || RETVAL=1
|
||||
|
||||
if [ $RETVAL -eq 1 ]; then
|
||||
echo none > $DUMP_CONFIG_DIR/dump_type
|
||||
return
|
||||
fi
|
||||
|
||||
pr_info "$ON_PANIC on panic configured: Using $DUMP_TYPE dump device."
|
||||
}
|
||||
|
||||
setup_on_panic_vmcmd()
|
||||
{
|
||||
for I in "$VMCMD_1" "$VMCMD_2" "$VMCMD_3" "$VMCMD_4" "$VMCMD_5" "$VMCMD_6" "$VMCMD_7" "$VMCMD_8";
|
||||
do
|
||||
if [ "$I" != "" ]; then
|
||||
if [ "$VMCMD" != "" ]; then
|
||||
VMCMD="$VMCMD\\n$I"
|
||||
else
|
||||
VMCMD=$I
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ ! -d $VMCMD_CONFIG_DIR ]; then
|
||||
pr_error "ERROR: No vmcmd support. Are you running on LPAR?"
|
||||
RETVAL=1
|
||||
elif [ "$VMCMD" == "" ]; then
|
||||
pr_error "ERROR: No VMCMD_x keyword specified." $ERRMSG
|
||||
RETVAL=1
|
||||
else
|
||||
echo -en "$VMCMD" | cat > $VMCMD_CONFIG_DIR/on_panic || RETVAL=1
|
||||
fi
|
||||
|
||||
if [ $RETVAL -eq 0 ]; then
|
||||
pr_info "vmcmd on panic configured:"
|
||||
pr_info -e "$VMCMD"
|
||||
fi
|
||||
}
|
||||
|
||||
print_fcp_device()
|
||||
{
|
||||
DEVICE=$(cat $1/fcp/device) || RETVAL=1
|
||||
pr_info "device..: $DEVICE"
|
||||
WWPN=$(cat $1/fcp/wwpn) || RETVAL=1
|
||||
pr_info "wwpn....: $WWPN"
|
||||
LUN=$(cat $1/fcp/lun) || RETVAL=1
|
||||
pr_info "lun.....: $LUN"
|
||||
BOOTPROG=$(cat $1/fcp/bootprog) || RETVAL=1
|
||||
pr_info "bootprog: $BOOTPROG"
|
||||
BR_LBA=$(cat $1/fcp/br_lba) || RETVAL=1
|
||||
pr_info "br_lba..: $BR_LBA"
|
||||
}
|
||||
|
||||
print_ccw_device()
|
||||
{
|
||||
DEVICE=$(cat $1/ccw/device) || RETVAL=1
|
||||
pr_info "device..: $DEVICE"
|
||||
}
|
||||
|
||||
print_nss_name()
|
||||
{
|
||||
NAME=$(cat $1/nss/device) || RETVAL=1
|
||||
pr_info "device..: $NAME"
|
||||
}
|
||||
|
||||
status_dump()
|
||||
{
|
||||
CONF_DUMP_TYPE=$(cat $DUMP_CONFIG_DIR/dump_type) || RETVAL=1
|
||||
if [ "$CONF_DUMP_TYPE" == "none" ]; then
|
||||
pr_info "type....: no dump device configured"
|
||||
elif [ "$CONF_DUMP_TYPE" == "ccw" ]; then
|
||||
pr_info "type....: ccw"
|
||||
print_ccw_device $DUMP_CONFIG_DIR
|
||||
verify_ccw_dump_device $(cat $DUMP_CONFIG_DIR/ccw/device)
|
||||
elif [ "$CONF_DUMP_TYPE" == "fcp" ]; then
|
||||
pr_info "type....: fcp"
|
||||
print_fcp_device $DUMP_CONFIG_DIR
|
||||
else
|
||||
pr_error "ERROR: Unknown dump device type '$CONF_DUMP_TYPE'!"
|
||||
pr_error " Please check if you have the latest dumpconf package!"
|
||||
fi
|
||||
}
|
||||
|
||||
status_reipl()
|
||||
{
|
||||
REIPL_TYPE=$(cat $REIPL_CONFIG_DIR/reipl_type) || RETVAL=1
|
||||
pr_info "type....: $REIPL_TYPE"
|
||||
if [ "$REIPL_TYPE" == "ccw" ]; then
|
||||
print_ccw_device $REIPL_CONFIG_DIR
|
||||
elif [ "$REIPL_TYPE" == "fcp" ]; then
|
||||
print_fcp_device $REIPL_CONFIG_DIR
|
||||
elif [ "$REIPL_TYPE" == "nss" ]; then
|
||||
print_nss_name $REIPL_CONFIG_DIR
|
||||
else
|
||||
pr_error "ERROR: Unknown reipl device type '$REIPL_TYPE'!"
|
||||
pr_error " Please check if you have the latest dumpconf package!"
|
||||
fi
|
||||
}
|
||||
|
||||
status_dump_reipl()
|
||||
{
|
||||
pr_info -e "\ndump:"
|
||||
status_dump
|
||||
pr_info -e "\nreipl:"
|
||||
status_reipl
|
||||
}
|
||||
|
||||
|
||||
status_vmcmd()
|
||||
{
|
||||
VMCMD=$(cat $VMCMD_CONFIG_DIR/on_panic) || RETVAL=1
|
||||
if [ "$VMCMD" == "" ]; then
|
||||
pr_info "WARNING: No VM command specified!"
|
||||
else
|
||||
pr_info "---------------"
|
||||
pr_info "$VMCMD"
|
||||
fi
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
if [ "$1" == "background" ]; then
|
||||
BACKGROUND=1
|
||||
fi
|
||||
test -n "$DELAY_MINUTES" || DELAY_MINUTES=0
|
||||
test "$DELAY_MINUTES" -ge 0 2>/dev/null || RETVAL=1
|
||||
if [ $RETVAL -eq 1 ]; then
|
||||
pr_error "ERROR: Invalid DELAY_MINUTES parameter" \
|
||||
"'$DELAY_MINUTES'." $ERRMSG
|
||||
return
|
||||
fi
|
||||
if [ "$ON_PANIC" != "stop" -a $DELAY_MINUTES -gt 0 ]; then
|
||||
if [ -f $PIDFILE ]; then
|
||||
pr_info "A delayed instance of" $CMD \
|
||||
"is already active."
|
||||
return
|
||||
fi
|
||||
if [ $BACKGROUND -eq 1 ]; then
|
||||
delay_activation
|
||||
else
|
||||
pr_info "The activation of dumpconf is being delayed" \
|
||||
"for" $DELAY_MINUTES "minutes"
|
||||
$CMDFULL start background > /dev/null 2>&1 &
|
||||
return
|
||||
fi
|
||||
fi
|
||||
if [ "$ON_PANIC" == "" ]; then
|
||||
ON_PANIC="$(cat $ON_PANIC_CONFIG_FILE)"
|
||||
fi
|
||||
|
||||
case "$ON_PANIC" in
|
||||
reipl)
|
||||
setup_reipl
|
||||
;;
|
||||
dump|dump_reipl)
|
||||
setup_dump
|
||||
;;
|
||||
vmcmd)
|
||||
setup_on_panic_vmcmd
|
||||
;;
|
||||
stop)
|
||||
pr_info "stop on panic configured."
|
||||
;;
|
||||
*)
|
||||
pr_error "ERROR: Unknown 'on panic'" \
|
||||
"type '$ON_PANIC'." $ERRMSG
|
||||
RETVAL=1
|
||||
;;
|
||||
esac
|
||||
if [ $RETVAL -eq 1 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -f $ON_RESTART_CONFIG_FILE ]; then
|
||||
echo $ON_PANIC > $ON_RESTART_CONFIG_FILE 2> /dev/null || RETVAL=1
|
||||
fi
|
||||
echo $ON_PANIC > $ON_PANIC_CONFIG_FILE 2> /dev/null || RETVAL=1
|
||||
|
||||
# check for errors
|
||||
|
||||
if [ $RETVAL -eq 1 ]; then
|
||||
echo stop > $ON_PANIC_CONFIG_FILE
|
||||
pr_error "ERROR: $ON_PANIC not supported by hardware!"
|
||||
fi
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
if [ -f $PIDFILE ]; then
|
||||
PID=$(cat $PIDFILE)
|
||||
kill -TERM $PID 2> /dev/null
|
||||
rm -f $PIDFILE
|
||||
fi
|
||||
echo none > $DUMP_CONFIG_DIR/dump_type || RETVAL=1
|
||||
if [ -f $ON_RESTART_CONFIG_FILE ]; then
|
||||
echo stop > $ON_RESTART_CONFIG_FILE 2> /dev/null || RETVAL=1
|
||||
fi
|
||||
echo stop > $ON_PANIC_CONFIG_FILE || RETVAL=1
|
||||
if [ $RETVAL -eq 0 ]; then
|
||||
pr_info "Dump on panic is disabled now"
|
||||
else
|
||||
pr_error "Disabling dump on panic failed"
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
status()
|
||||
{
|
||||
ON_PANIC=$(cat $ON_PANIC_CONFIG_FILE) || RETVAL=1
|
||||
if [ -f $PIDFILE ]; then
|
||||
pr_info "on_panic: $ON_PANIC - dumpconf activation is being" \
|
||||
"delayed for $DELAY_MINUTES minutes"
|
||||
else
|
||||
pr_info "on_panic: $ON_PANIC"
|
||||
fi
|
||||
case "$ON_PANIC" in
|
||||
vmcmd)
|
||||
status_vmcmd
|
||||
;;
|
||||
reipl)
|
||||
status_reipl
|
||||
;;
|
||||
dump)
|
||||
status_dump
|
||||
;;
|
||||
dump_reipl)
|
||||
status_dump_reipl
|
||||
;;
|
||||
stop)
|
||||
;;
|
||||
*)
|
||||
pr_error "ERROR: Unknown on_panic type '$ON_PANIC'"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
-h|--help)
|
||||
printhelp
|
||||
exit 0
|
||||
;;
|
||||
-v|--version)
|
||||
printversion
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
check_environment
|
||||
|
||||
# If system crashed, an invalid $PIDFILE might still exist
|
||||
if [ -f $PIDFILE ]; then
|
||||
cleanup_pidfile $(cat $PIDFILE)
|
||||
fi
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
restart|reload|force-reload|try-restart)
|
||||
stop
|
||||
DELAY_MINUTES=0
|
||||
start
|
||||
;;
|
||||
start)
|
||||
start $2
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status
|
||||
;;
|
||||
*)
|
||||
print_invalid_option $1
|
||||
RETVAL=1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
Executable
+161
@@ -0,0 +1,161 @@
|
||||
#!/bin/bash
|
||||
### BEGIN INIT INFO
|
||||
# Provides: mon_statd
|
||||
# Required-Start: $local_fs $remote_fs
|
||||
# Required-Stop: $local_fs $remote_fs
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: 2 3 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Configure the mon_fsstatd and mon_procd daemons.
|
||||
# Description: Configures the mon_fsstatd and mon_procd daemons. It uses the
|
||||
# configuration file /etc/sysconfig/mon_statd.
|
||||
### END INIT INFO
|
||||
|
||||
# chkconfig: 235 01 99
|
||||
|
||||
DAEMON=mon_statd
|
||||
FSSTATD=mon_fsstatd
|
||||
PROCD=mon_procd
|
||||
FSSTATD_PATH=/usr/sbin/$FSSTATD
|
||||
PROCD_PATH=/usr/sbin/$PROCD
|
||||
CONFIG_FILE=/etc/sysconfig/$DAEMON
|
||||
FSSTATD_PID_FILE=/var/run/$FSSTATD.pid
|
||||
PROCD_PID_FILE=/var/run/$PROCD.pid
|
||||
|
||||
# source function library
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
# Source config file
|
||||
if [ -f $CONFIG_FILE ]; then
|
||||
. $CONFIG_FILE
|
||||
fi
|
||||
|
||||
UDEVSETTLE=/sbin/udevadm
|
||||
if [ ! -e $UDEVSETTLE ]
|
||||
then
|
||||
UDEVSETTLE=/sbin/udevsettle
|
||||
UDEVSETTLE_CALL="$UDEVSETTLE --timeout=10"
|
||||
else
|
||||
UDEVSETTLE_CALL="$UDEVSETTLE settle --timeout=10"
|
||||
fi
|
||||
|
||||
load_kernel_module()
|
||||
{
|
||||
if [ ! -e /dev/monwriter ]; then
|
||||
echo "Loading monwriter module..."
|
||||
modprobe monwriter 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
if [ -e $UDEVSETTLE ]
|
||||
then
|
||||
$UDEVSETTLE_CALL
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
start_daemon()
|
||||
{
|
||||
local daemon_name=$1
|
||||
local daemon_interval=$2
|
||||
local daemon_pid_file=$3
|
||||
local daemon_path=$4
|
||||
|
||||
if [ ! -f $daemon_pid_file ]; then
|
||||
load_kernel_module
|
||||
echo -n "Starting $daemon_name:"
|
||||
$daemon_path -i $daemon_interval
|
||||
if [ $? -eq 0 ]; then
|
||||
log_success_msg
|
||||
else
|
||||
log_failure_msg
|
||||
fi
|
||||
else
|
||||
echo "$daemon_name (pid $(cat $daemon_pid_file)) is already running..."
|
||||
fi
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
if [ "$FSSTAT" = "yes" ]; then
|
||||
start_daemon $FSSTATD $FSSTAT_INTERVAL $FSSTATD_PID_FILE \
|
||||
$FSSTATD_PATH
|
||||
fi
|
||||
|
||||
if [ "$PROC" = "yes" ]; then
|
||||
start_daemon $PROCD $PROC_INTERVAL $PROCD_PID_FILE \
|
||||
$PROCD_PATH
|
||||
fi
|
||||
}
|
||||
|
||||
stop_daemon()
|
||||
{
|
||||
local daemon_name=$1
|
||||
local daemon_pid_file=$2
|
||||
local daemon_path=$3
|
||||
|
||||
echo -n "Stopping $daemon_name:"
|
||||
if [ -f $daemon_pid_file ]; then
|
||||
killproc $daemon_path -TERM
|
||||
log_success_msg
|
||||
rm -f $daemon_pid_file
|
||||
else
|
||||
log_failure_msg
|
||||
fi
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
if [ "$FSSTAT" = "yes" ]; then
|
||||
stop_daemon $FSSTATD $FSSTATD_PID_FILE $FSSTATD_PATH
|
||||
fi
|
||||
if [ "$PROC" = "yes" ]; then
|
||||
stop_daemon $PROCD $PROCD_PID_FILE $PROCD_PATH
|
||||
fi
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
status_daemon()
|
||||
{
|
||||
local daemon_name=$1
|
||||
local daemon_pid_file=$2
|
||||
local daemon_interval=$3
|
||||
|
||||
if [ ! -f $daemon_pid_file ]; then
|
||||
echo "$daemon_name is not running."
|
||||
else
|
||||
echo "$daemon_name (pid $(cat $daemon_pid_file), interval: $daemon_interval) is running."
|
||||
fi
|
||||
}
|
||||
|
||||
status()
|
||||
{
|
||||
status_daemon $FSSTATD $FSSTATD_PID_FILE $FSSTAT_INTERVAL
|
||||
status_daemon $PROCD $PROCD_PID_FILE $PROC_INTERVAL
|
||||
}
|
||||
|
||||
# How are we called?
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status
|
||||
;;
|
||||
restart|reload|force-reload)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $DAEMON {start|stop|status|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# Apply control program identification (CPI) settings
|
||||
#
|
||||
# The system and sysplex names consist of up to eight characters of
|
||||
# the following set: A-Z, 0-9, $, @, #, and blank.
|
||||
|
||||
#
|
||||
# CPI system name
|
||||
#
|
||||
CPI_SYSTEM_NAME=""
|
||||
|
||||
#
|
||||
# CPI sysplex name
|
||||
#
|
||||
CPI_SYSPLEX_NAME=""
|
||||
@@ -0,0 +1,61 @@
|
||||
#
|
||||
# s390 dump config
|
||||
#
|
||||
# Configures the actions which should be performed after a kernel panic
|
||||
# and on PSW restart.
|
||||
#
|
||||
# The following actions are supported:
|
||||
#
|
||||
# * stop: Stop Linux (default)
|
||||
# * dump: Dump Linux with stand-alone dump tool
|
||||
# * vmcmd: Issue z/VM CP commands
|
||||
# * reipl: Re-IPL Linux using setting under /sys/firmware/reipl
|
||||
# * dump_reipl: First dump Linux with stand-alone dump tool, then re-IPL Linux
|
||||
# using setting under /sys/firmware/reipl
|
||||
#
|
||||
|
||||
# For the actions "reipl" and "dump_reipl" the DELAY_MINUTES keyword may
|
||||
# be used to delay the activation of dumpconf.
|
||||
# Thus potential reipl loops caused by kernel panics
|
||||
# which persistently occur early in the boot process can be prevented.
|
||||
|
||||
# Dump on CCW device (DASD) and re-IPL after dump is complete.
|
||||
# The re-IPL device, as specified under "/sys/firmware/reipl", is used.
|
||||
# The activation of dumpconf is delayed by 5 minutes.
|
||||
#
|
||||
# ON_PANIC=dump_reipl
|
||||
# DUMP_TYPE=ccw
|
||||
# DEVICE=0.0.4e13
|
||||
# DELAY_MINUTES=5
|
||||
|
||||
#
|
||||
# Dump on fcp device (SCSI Disk)
|
||||
#
|
||||
# ON_PANIC=dump
|
||||
# DUMP_TYPE=fcp
|
||||
# DEVICE=0.0.4711
|
||||
# WWPN=0x5005076303004711
|
||||
# LUN=0x4711000000000000
|
||||
# BOOTPROG=0
|
||||
# BR_LBA=0
|
||||
|
||||
#
|
||||
# Use VMDUMP
|
||||
#
|
||||
# ON_PANIC=vmcmd
|
||||
# VMCMD_1="MESSAGE * Starting VMDUMP"
|
||||
# VMCMD_2="VMDUMP"
|
||||
# VMCMD_3="IPL 4711"
|
||||
|
||||
#
|
||||
# Stop Linux (default)
|
||||
#
|
||||
# ON_PANIC=stop
|
||||
|
||||
#
|
||||
# Re-IPL Linux
|
||||
# The re-IPL device, as specified under "/sys/firmware/reipl", is used.
|
||||
# Since the DELAY_MINUTES keyword is omitted, there is no delay and
|
||||
# dumpconf becomes active immediately during system startup.
|
||||
#
|
||||
# ON_PANIC=reipl
|
||||
@@ -0,0 +1,9 @@
|
||||
## Path: System/Monitoring/s390-tools/mon_fsstatd
|
||||
## Description: Linux - z/VM Monitor Daemon for process and filesystem data.
|
||||
|
||||
## Type: integer(1:)
|
||||
## Default: 60
|
||||
#
|
||||
# Monitor interval in seconds for filesystem monitoring.
|
||||
#
|
||||
FSSTAT_INTERVAL=60
|
||||
@@ -0,0 +1,9 @@
|
||||
## Path: System/Monitoring/s390-tools/mon_procd
|
||||
## Description: Linux - z/VM Monitor Daemon for process and filesystem data.
|
||||
|
||||
## Type: integer(1:)
|
||||
## Default: 60
|
||||
#
|
||||
# Monitor interval in seconds for process monitoring.
|
||||
#
|
||||
PROC_INTERVAL=60
|
||||
@@ -0,0 +1,28 @@
|
||||
## Path: System/Monitoring/s390-tools/mon_statd
|
||||
## Description: Linux - z/VM Monitor Daemon for process and filesystem data.
|
||||
|
||||
## Type: integer(1:)
|
||||
## Default: 60
|
||||
#
|
||||
# Monitor interval in seconds for filesystem monitoring.
|
||||
#
|
||||
FSSTAT_INTERVAL=60
|
||||
|
||||
## Type: integer(1:)
|
||||
## Default: 60
|
||||
#
|
||||
# Monitor interval in seconds for process monitoring.
|
||||
#
|
||||
PROC_INTERVAL=60
|
||||
|
||||
## Type: yesno
|
||||
## Default: no
|
||||
#
|
||||
# Set this to "yes" if you want to enable filesystem monitoring.
|
||||
FSSTAT="no"
|
||||
|
||||
## Type: yesno
|
||||
## Default: no
|
||||
#
|
||||
# Set this to "yes" if you want to enable process monitoring.
|
||||
PROC="no"
|
||||
@@ -0,0 +1,6 @@
|
||||
#
|
||||
# Rule for z90crypt character device node permissions
|
||||
# This file should be installed in /etc/udev/rules.d
|
||||
#
|
||||
|
||||
KERNEL=="z90crypt", MODE="0666"
|
||||
@@ -0,0 +1 @@
|
||||
SUBSYSTEM=="ccwgroup", ACTION=="change", RUN+="/usr/bin/killall -SIGUSR1 osasnmpd"
|
||||
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# Rules for unique DASD device nodes created in /dev/disk/
|
||||
# This file should be installed in /etc/udev/rules.d
|
||||
#
|
||||
|
||||
SUBSYSTEM!="block", GOTO="dasd_symlinks_end"
|
||||
KERNEL!="dasd*", GOTO="dasd_symlinks_end"
|
||||
|
||||
ACTION!="change", GOTO="dasd_block_end"
|
||||
# by-id (hardware serial number)
|
||||
KERNEL=="dasd*[!0-9]", ATTRS{status}=="online", IMPORT{program}="/sbin/dasdinfo -a -e -b $kernel"
|
||||
KERNEL=="dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
|
||||
KERNEL=="dasd*[!0-9]", ENV{ID_UID}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_UID}"
|
||||
KERNEL=="dasd*[!0-9]", ENV{ID_XUID}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_XUID}"
|
||||
|
||||
LABEL="dasd_block_end"
|
||||
|
||||
ACTION!="change|add", GOTO="dasd_symlinks_end"
|
||||
|
||||
# for partitions import parent information
|
||||
KERNEL=="dasd*[0-9]", IMPORT{parent}=="ID_*"
|
||||
|
||||
KERNEL=="dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
|
||||
KERNEL=="dasd*[0-9]", ENV{ID_UID}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_UID}-part%n"
|
||||
KERNEL=="dasd*[0-9]", ENV{ID_XUID}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_XUID}-part%n"
|
||||
|
||||
LABEL="dasd_symlinks_end"
|
||||
|
||||
# on device add set request queue scheduler to deadline
|
||||
SUBSYSTEM!="block", GOTO="sched_end"
|
||||
|
||||
ACTION!="change", GOTO="sched_end"
|
||||
KERNEL=="dasd*[!0-9]", TEST=="queue/scheduler", ATTR{queue/scheduler}="deadline"
|
||||
|
||||
LABEL="sched_end"
|
||||
@@ -0,0 +1,18 @@
|
||||
#
|
||||
# Rules to set an increased default max readahead size
|
||||
# This file should be installed in /etc/udev/rules.d
|
||||
#
|
||||
|
||||
SUBSYSTEM!="block", GOTO="ra_end"
|
||||
|
||||
ACTION!="add", GOTO="ra_change"
|
||||
# on device add set initial readahead to 512 (instead of in kernel 128)
|
||||
KERNEL=="sd*[!0-9]", WAIT_FOR="queue/read_ahead_kb", ATTR{queue/read_ahead_kb}="512"
|
||||
|
||||
LABEL="ra_change"
|
||||
|
||||
ACTION!="change", GOTO="ra_end"
|
||||
# on device change set initial readahead to 512 (instead of in kernel 128)
|
||||
KERNEL=="dasd*[!0-9]", TEST=="queue/read_ahead_kb", ATTR{queue/read_ahead_kb}="512"
|
||||
|
||||
LABEL="ra_end"
|
||||
Reference in New Issue
Block a user