mirror of
https://github.com/ceph/ceph
synced 2025-01-10 05:00:59 +00:00
39 lines
935 B
Plaintext
39 lines
935 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
# Adapted from ceph repo src/script/kcon_most.sh
|
||
|
|
||
|
p() {
|
||
|
echo "$*" > /sys/kernel/debug/dynamic_debug/control
|
||
|
}
|
||
|
|
||
|
usage() {
|
||
|
echo "usage: $0 [on|off]"
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
|
if [ $# != "1" ];
|
||
|
then
|
||
|
usage
|
||
|
fi
|
||
|
|
||
|
if [ "$1" != "on" -a "$1" != "off" ];
|
||
|
then
|
||
|
usage
|
||
|
fi
|
||
|
|
||
|
if [ $1 = "on" ];
|
||
|
then
|
||
|
p 'module ceph +p'
|
||
|
p 'module libceph +p'
|
||
|
p 'module rbd +p'
|
||
|
p 'file net/ceph/messenger.c -p'
|
||
|
p 'file' `grep -- --- /sys/kernel/debug/dynamic_debug/control | grep ceph | awk '{print $1}' | sed 's/:/ line /'` '+p'
|
||
|
p 'file' `grep -- === /sys/kernel/debug/dynamic_debug/control | grep ceph | awk '{print $1}' | sed 's/:/ line /'` '+p'
|
||
|
else
|
||
|
p 'module ceph -p'
|
||
|
p 'module libceph -p'
|
||
|
p 'module rbd -p'
|
||
|
p 'file' `grep -- --- /sys/kernel/debug/dynamic_debug/control | grep ceph | awk '{print $1}' | sed 's/:/ line /'` '-p'
|
||
|
p 'file' `grep -- === /sys/kernel/debug/dynamic_debug/control | grep ceph | awk '{print $1}' | sed 's/:/ line /'` '-p'
|
||
|
fi
|