[Devel] [PATCH libvzctl v2] scripts: vz_ -- Checkpoint and restore AIO staistics
Cyrill Gorcunov
gorcunov at virtuozzo.com
Sat Apr 9 09:35:00 PDT 2016
To checkpoint and restore fs.aio-max-nr sysctl entry.
https://jira.sw.ru/browse/PSBM-45644
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
scripts/vz-cpt.in | 2 ++
scripts/vz-rst-action.in | 1 +
scripts/vz-rst.in | 1 +
3 files changed, 4 insertions(+)
diff --git a/scripts/vz-cpt.in b/scripts/vz-cpt.in
index 8ecb33b..08ae911 100755
--- a/scripts/vz-cpt.in
+++ b/scripts/vz-cpt.in
@@ -50,6 +50,8 @@ 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_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..be1a8d1 100755
--- a/scripts/vz-rst-action.in
+++ b/scripts/vz-rst-action.in
@@ -70,6 +70,7 @@ 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_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..18229c1 100755
--- a/scripts/vz-rst.in
+++ b/scripts/vz-rst.in
@@ -61,6 +61,7 @@ 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_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