Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
e6aeb612
You need to sign in or sign up before continuing.
Commit
e6aeb612
authored
Sep 11, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add vz utils: load_svg, move_vz
parent
b8f807e4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
load_avg.sh
vz/load_avg.sh
+10
-0
move_vz.sh
vz/move_vz.sh
+21
-0
No files found.
vz/load_avg.sh
0 → 100755
View file @
e6aeb612
#!/bin/sh
for
id
in
$(
vzlist |
sed
-e
"s| *
\(
[0-9]*
\)
.*|
\1
|g"
)
;
do
CONF
=
/etc/vz/conf/
$id
.conf
test
-r
$CONF
||
continue
eval
`
cat
$CONF
|
grep
^HOSTNAME |
sed
-e
"s|office.etersoft.ru||g"
`
printf
"%s (%20s):"
$id
$HOSTNAME
vzctl
exec
$id
uptime
done
echo
"---"
uptime
vz/move_vz.sh
0 → 100755
View file @
e6aeb612
#!/bin/sh
FROM
=
/var/lib/vz/private
TO
=
/mnt/tmp/private
for
i
in
$(
echo
$FROM
/
*)
;
do
#for i in 160 ; do
VEID
=
$(
basename
$i
)
echo
$i
$VEID
if
mount |
grep
/dev/mapper |
grep
-q
"
$FROM
/
$VEID
"
;
then
echo
already moved
continue
fi
rsync
-avP
$FROM
/
$VEID
/
$TO
/
$VEID
/
||
exit
vzctl stop
$VEID
||
exit
rsync
-avP
--delete-after
$FROM
/
$VEID
/
$TO
/
$VEID
/
||
exit
mount
$TO
/
$VEID
$FROM
/
$VEID
--bind
||
exit
vzctl start
$VEID
||
exit
echo
"Done for
$i
"
>>
$0
.log
done
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment