[Devel] [PATCH libvzctl] scripts: vz_ -- Checkpoint and restore AIO staistics
Cyrill Gorcunov
gorcunov at virtuozzo.com
Sat Apr 9 02:52:45 PDT 2016
To checkpoint and restore fs.aio-nr fs.aio-max-nr
sysctl entries.
https://jira.sw.ru/browse/PSBM-45644
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
scripts/vz-cpt.in | 3 +++
scripts/vz-rst-action.in | 2 ++
scripts/vz-rst.in | 2 ++
3 files changed, 7 insertions(+)
diff --git a/scripts/vz-cpt.in b/scripts/vz-cpt.in
index 8ecb33b..e4902aa 100755
--- a/scripts/vz-cpt.in
+++ b/scripts/vz-cpt.in
@@ -50,6 +50,9 @@ function cg_dump_props {
# Save monotonic offsets for next restore
cgget -n -v -r ve.clock_bootbased $VEID > $1/vz_clock_bootbased.img
cgget -n -v -r ve.clock_monotonic $VEID > $1/vz_clock_monotonic.img
+ # AIO statistics
+ cgget -n -v -r ve.aio_nr $VEID > $1/vz_aio_nr.img
+ cgget -n -v -r ve.aio_max_nr $VEID > $1/vz_aio_max_nr.img
fi
return 0
}
diff --git a/scripts/vz-rst-action.in b/scripts/vz-rst-action.in
index 8c7f9b2..0e05921 100755
--- a/scripts/vz-rst-action.in
+++ b/scripts/vz-rst-action.in
@@ -70,6 +70,8 @@ case "$CRTOOLS_SCRIPT_ACTION" in
if [ -n "$VEID" ]; then
[ -n "$VE_CLOCK_BOOTBASED" ] && cgset -r ve.clock_bootbased="$VE_CLOCK_BOOTBASED" $VEID
[ -n "$VE_CLOCK_MONOTONIC" ] && cgset -r ve.clock_monotonic="$VE_CLOCK_MONOTONIC" $VEID
+ [ -n "$VE_AIO_NR" ] && cgset -r ve.aio_nr="$VE_AIO_NR" $VEID
+ [ -n "$VE_AIO_MAX_NR" ] && cgset -r ve.aio_max_nr="$VE_AIO_MAX_NR" $VEID
cgset -r ve.state="START $pid" $VEID || exit
cgset -r ve.pseudosuper="0" $VEID
fi
diff --git a/scripts/vz-rst.in b/scripts/vz-rst.in
index 9ef5c56..b430535 100755
--- a/scripts/vz-rst.in
+++ b/scripts/vz-rst.in
@@ -61,6 +61,8 @@ extra_args_path="$VE_DUMP_DIR/restore-extra-args"
if [ -n "$VEID" ]; then
export VE_CLOCK_BOOTBASED=`cat $VE_DUMP_DIR/vz_clock_bootbased.img`
export VE_CLOCK_MONOTONIC=`cat $VE_DUMP_DIR/vz_clock_monotonic.img`
+ export VE_AIO_NR=`cat $VE_DUMP_DIR/vz_aio_nr.img`
+ export VE_AIO_MAX_NR=`cat $VE_DUMP_DIR/vz_aio_max_nr.img`
fi
# Setup default log name if not explicitly specified
--
2.5.5
More information about the Devel
mailing list