mirror of https://github.com/mikaku/Monitorix.git
fixed a bad memory scaling in *BSD systems
This commit is contained in:
parent
ef11f447fb
commit
622289f9d9
1
Changes
1
Changes
|
@ -3,6 +3,7 @@
|
||||||
- Added a new option called 'graph_mode' to view the memory graph in two
|
- Added a new option called 'graph_mode' to view the memory graph in two
|
||||||
different modes: 'real' (being the default) and 'interpreted'.
|
different modes: 'real' (being the default) and 'interpreted'.
|
||||||
(suggested by Łukasz "Cyber Killer" Korpalski, cyberkiller8 AT gmail.com)
|
(suggested by Łukasz "Cyber Killer" Korpalski, cyberkiller8 AT gmail.com)
|
||||||
|
- Fixed a bad memory scaling in *BSD systems.
|
||||||
|
|
||||||
|
|
||||||
3.10.0 - 25-Sep-2017
|
3.10.0 - 25-Sep-2017
|
||||||
|
|
|
@ -456,6 +456,7 @@ sub system_cgi {
|
||||||
} elsif(grep {$_ eq $config->{os}} ("FreeBSD", "OpenBSD", "NetBSD")) {
|
} elsif(grep {$_ eq $config->{os}} ("FreeBSD", "OpenBSD", "NetBSD")) {
|
||||||
$total_mem = `/sbin/sysctl -n hw.physmem`; # in bytes
|
$total_mem = `/sbin/sysctl -n hw.physmem`; # in bytes
|
||||||
chomp($total_mem);
|
chomp($total_mem);
|
||||||
|
$total_mem = int($total_mem / 1024); # in KB
|
||||||
}
|
}
|
||||||
$total_mem_bytes = int($total_mem * 1024); # in bytes
|
$total_mem_bytes = int($total_mem * 1024); # in bytes
|
||||||
$total_mem = int($total_mem / 1024); # in MB
|
$total_mem = int($total_mem / 1024); # in MB
|
||||||
|
|
Loading…
Reference in New Issue