Skip to content

Commit

Permalink
Fix to drop checking disk space on every tick
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Jun 26, 2024
1 parent 4e59886 commit f4b47c9
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 29 deletions.
2 changes: 0 additions & 2 deletions lang/en
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,6 @@ theme_xhred_nice_size_GB=GB
theme_xhred_nice_size_MB=MB
theme_xhred_nice_size_kB=kB
theme_xhred_nice_size_b=bytes
settings_sysinfo_real_time_status_disk=Enable for disks
settings_sysinfo_real_time_status_disk_description=It might be useful to disable real-time monitoring for disks on slow/large file systems
theme_xhred_title_locale_non_ui_config=Server generated date format


Expand Down
22 changes: 0 additions & 22 deletions stats-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -195,28 +195,6 @@ sub stats
}
}

# Disk space
if (acl_system_status('disk')) {
if (foreign_check("mount") && get_stats_option('status_disk')) {
foreign_require("mount");

my @disk_space = defined(&mount::local_disk_space) ? mount::local_disk_space() : ();
if (@disk_space) {
$data{'disk'} = [];

if (@disk_space && $disk_space[0] && $disk_space[0] > 0) {
my $disk = int(($disk_space[0] - $disk_space[1]) / $disk_space[0] * 100);
$data{'disk'} = [$disk,
text('body_used_and_free',
nice_size($disk_space[0]),
nice_size($disk_space[1]),
nice_size($disk_space[0] - $disk_space[1])
)];
}
}
}
}

# Network I/O
if (acl_system_status('load')) {
my $network = network_stats('io');
Expand Down
2 changes: 0 additions & 2 deletions tconfig-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ sub theme_settings_raw
'settings_sysinfo_hidden_panels_user',
'settings_sysinfo_max_servers',
'settings_sysinfo_real_time_status',
'settings_sysinfo_real_time_status_disk',
'settings_sysinfo_real_time_stored',
] }
],
Expand Down Expand Up @@ -256,7 +255,6 @@ sub theme_settings_filter
'settings_sysinfo_easypie_charts_scale',
'settings_sysinfo_max_servers',
'settings_sysinfo_real_time_status',
'settings_sysinfo_real_time_status_disk',
'settings_sysinfo_real_time_stored',
'settings_leftmenu_section_hide_refresh_modules',
'settings_leftmenu_section_hide_unused_modules',
Expand Down
2 changes: 1 addition & 1 deletion theme.info
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ bootstrap=3
spa=1
nomodcall=xnavigation=1
version=21.20-RC2
mversion=02
mversion=03
bversion=00
webmin=1
usermin=1
Expand Down
2 changes: 1 addition & 1 deletion unauthenticated/js/bundle.min.js

Large diffs are not rendered by default.

Binary file modified unauthenticated/js/bundle.min.js.gz
Binary file not shown.
1 change: 0 additions & 1 deletion unauthenticated/js/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ var
settings_sysinfo_easypie_charts_scale = 10,
settings_sysinfo_max_servers = 10,
settings_sysinfo_real_time_status = 1,
settings_sysinfo_real_time_status_disk = true,
settings_sysinfo_real_time_stored = true,
settings_sysinfo_real_time_stored_duration = 600,

Expand Down

0 comments on commit f4b47c9

Please sign in to comment.