3 prog=profile-kpios-post.sh
16 RUN_REGION_NOISE=${10}
18 RUN_THREAD_DELAY=${12}
22 PROFILE_KPIOS_PIDS_BIN=/home/behlendo/src/zfs/scripts/profile-kpios-pids.sh
23 PROFILE_KPIOS_PIDS_LOG=${RUN_LOG_DIR}/${RUN_ID}/pids-summary.csv
25 PROFILE_KPIOS_DISK_BIN=/home/behlendo/src/zfs/scripts/profile-kpios-disk.sh
26 PROFILE_KPIOS_DISK_LOG=${RUN_LOG_DIR}/${RUN_ID}/disk-summary.csv
28 PROFILE_KPIOS_ARC_LOG=${RUN_LOG_DIR}/${RUN_ID}/arcstats
29 PROFILE_KPIOS_VDEV_LOG=${RUN_LOG_DIR}/${RUN_ID}/vdev_cache_stats
31 KERNEL_BIN="/lib/modules/`uname -r`/kernel/"
32 SPL_BIN="${SPLBUILD}/modules/spl/"
33 ZFS_BIN="${ZFSBUILD}/lib/"
35 OPROFILE_SHORT_ARGS="-a -g -l -p ${KERNEL_BIN},${SPL_BIN},${ZFS_BIN}"
36 OPROFILE_LONG_ARGS="-d -a -g -l -p ${KERNEL_BIN},${SPL_BIN},${ZFS_BIN}"
38 OPROFILE_LOG=${RUN_LOG_DIR}/${RUN_ID}/oprofile.txt
39 OPROFILE_SHORT_LOG=${RUN_LOG_DIR}/${RUN_ID}/oprofile-short.txt
40 OPROFILE_LONG_LOG=${RUN_LOG_DIR}/${RUN_ID}/oprofile-long.txt
41 PROFILE_PID=${RUN_LOG_DIR}/${RUN_ID}/pid
43 if [ "${RUN_PHASE}" != "post" ]; then
47 # opcontrol --stop >>${OPROFILE_LOG} 2>&1
48 # opcontrol --dump >>${OPROFILE_LOG} 2>&1
50 kill -s SIGHUP `cat ${PROFILE_PID}`
53 # opreport ${OPROFILE_SHORT_ARGS} >${OPROFILE_SHORT_LOG} 2>&1
54 # opreport ${OPROFILE_LONG_ARGS} >${OPROFILE_LONG_LOG} 2>&1
56 # opcontrol --deinit >>${OPROFILE_LOG} 2>&1
58 cat /proc/spl/kstat/zfs/arcstats >${PROFILE_KPIOS_ARC_LOG}
59 cat /proc/spl/kstat/zfs/vdev_cache_stats >${PROFILE_KPIOS_VDEV_LOG}
61 # Summarize system time per pid
62 ${PROFILE_KPIOS_PIDS_BIN} ${RUN_LOG_DIR} ${RUN_ID} >${PROFILE_KPIOS_PIDS_LOG}
64 # Summarize per device performance
65 ${PROFILE_KPIOS_DISK_BIN} ${RUN_LOG_DIR} ${RUN_ID} >${PROFILE_KPIOS_DISK_LOG}