mirror of
https://github.com/webmin/webmin.git
synced 2025-07-20 16:48:46 +00:00
Add check if some IOs related functions supported
This commit is contained in:
@ -189,5 +189,19 @@ if (!$?) {
|
||||
return ( $w[-3], $w[-2], $w[-1], 0, 0, $bi, $bo );
|
||||
}
|
||||
|
||||
# has_disk_stats()
|
||||
# Returns 1 if disk I/O stats are available
|
||||
sub has_disk_stats
|
||||
{
|
||||
return &has_command("iostat") ? 1 : 0;
|
||||
}
|
||||
|
||||
# has_network_stats()
|
||||
# Returns 1 if network I/O stats are available
|
||||
sub has_network_stats
|
||||
{
|
||||
return &has_command("netstat") ? 1 : 0;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
@ -716,5 +716,19 @@ if (&has_command("vmstat")) {
|
||||
return undef;
|
||||
}
|
||||
|
||||
# has_disk_stats()
|
||||
# Returns 1 if disk I/O stats are available
|
||||
sub has_disk_stats
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
# has_network_stats()
|
||||
# Returns 1 if network I/O stats are available
|
||||
sub has_network_stats
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
Reference in New Issue
Block a user