Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
9db22c33
Commit
9db22c33
authored
Mar 14, 2012
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 22: correctly display openvz swap usage
parent
322ce4c4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
OpenVZ.pm
PVE/OpenVZ.pm
+7
-4
changelog.Debian
debian/changelog.Debian
+6
-0
defines.mk
defines.mk
+1
-1
No files found.
PVE/OpenVZ.pm
View file @
9db22c33
...
...
@@ -114,7 +114,8 @@ sub get_rootdir {
sub
read_user_beancounters
{
my
$ubc
=
{};
if
(
my
$fh
=
IO::
File
->
new
("
/proc/user_beancounters
",
"
r
"))
{
if
(
my
$fh
=
IO::
File
->
new
("
/proc/bc/resources
",
"
r
"))
{
my
$vmid
;
while
(
defined
(
my
$line
=
<
$fh
>
))
{
if
(
$line
=~
m|\s*((\d+):\s*)?([a-z]+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)$|
)
{
...
...
@@ -240,15 +241,17 @@ sub vmstatus {
}
}
my
$maxpages
=
(
$res_unlimited
/
4096
);
my
$ubchash
=
read_user_beancounters
();
foreach
my
$vmid
(
keys
%
$ubchash
)
{
my
$d
=
$list
->
{
$vmid
};
my
$ubc
=
$ubchash
->
{
$vmid
};
if
(
$d
&&
defined
(
$d
->
{
status
})
&&
$ubc
)
{
$d
->
{
failcnt
}
=
$ubc
->
{
failcntsum
};
$d
->
{
mem
}
=
int
(
$ubc
->
{
privvmpages
}
->
{
held
}
*
4096
);
my
$phy
=
int
(
$ubc
->
{
physpages
}
->
{
held
}
*
4096
);
$d
->
{
swap
}
=
$phy
>
$d
->
{
maxmem
}
?
$phy
-
$d
->
{
maxmem
}
:
0
;
$d
->
{
mem
}
=
$ubc
->
{
physpages
}
->
{
held
}
*
4096
;
if
(
$ubc
->
{
swappages
}
->
{
held
}
<
$maxpages
)
{
$d
->
{
swap
}
=
$ubc
->
{
swappages
}
->
{
held
}
*
4096
}
$d
->
{
nproc
}
=
$ubc
->
{
numproc
}
->
{
held
};
}
}
...
...
debian/changelog.Debian
View file @
9db22c33
pve-manager (2.0-40) unstable; urgency=low
* fix bug 22: correctly display openvz swap usage
-- Proxmox Support Team <support@proxmox.com> Wed, 14 Mar 2012 16:00:32 +0100
pve-manager (2.0-39) unstable; urgency=low
* add Spanish translation
...
...
defines.mk
View file @
9db22c33
...
...
@@ -2,7 +2,7 @@ RELEASE=2.0
VERSION=2.0
PACKAGE=pve-manager
PACKAGERELEASE=
39
PACKAGERELEASE=
40
BINDIR=${DESTDIR}/usr/bin
PERLLIBDIR=${DESTDIR}/usr/share/perl5
...
...
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