Merge 092a53720959859b8f1a71913c0fb4f3d9c89cbb into acef6b00a6ad062c0e99286ea136d1a246def644

This commit is contained in:
Adam Xiao Han 2023-11-16 11:06:04 -06:00 committed by GitHub
commit 9b0c0c367b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -308,14 +308,14 @@ get_system_info() {
df -t simfs -t ext2 -t ext3 -t ext4 -t btrfs -t xfs -t vfat -t ntfs --total 2>/dev/null | grep total | awk '{ print $2 }'
)
swap_total_size=$(free -k | grep Swap | awk '{print $2}')
zfs_total_size=$(to_kibyte "$(calc_sum "$(zpool list -o size -Hp 2> /dev/null)")")
zfs_total_size=$(to_kibyte "$(calc_sum $(zpool list -o size -Hp 2> /dev/null))")
disk_total_size=$(calc_size $((swap_total_size + in_kernel_no_swap_total_size + zfs_total_size)))
in_kernel_no_swap_used_size=$(
LANG=C
df -t simfs -t ext2 -t ext3 -t ext4 -t btrfs -t xfs -t vfat -t ntfs --total 2>/dev/null | grep total | awk '{ print $3 }'
)
swap_used_size=$(free -k | grep Swap | awk '{print $3}')
zfs_used_size=$(to_kibyte "$(calc_sum "$(zpool list -o allocated -Hp 2> /dev/null)")")
zfs_used_size=$(to_kibyte "$(calc_sum $(zpool list -o allocated -Hp 2> /dev/null))")
disk_used_size=$(calc_size $((swap_used_size + in_kernel_no_swap_used_size + zfs_used_size)))
tcpctrl=$(sysctl net.ipv4.tcp_congestion_control | awk -F ' ' '{print $3}')
}