mirror of
https://github.com/fankes/komari-agent.git
synced 2025-10-19 02:59:23 +08:00
fix: 排除hugetlbfs
This commit is contained in:
@@ -77,6 +77,7 @@ func isPhysicalDisk(part disk.PartitionStat) bool {
|
|||||||
"/dev/mqueue",
|
"/dev/mqueue",
|
||||||
"/etc/resolv.conf",
|
"/etc/resolv.conf",
|
||||||
"/etc/host", // /etc/hosts,/etc/hostname
|
"/etc/host", // /etc/hosts,/etc/hostname
|
||||||
|
"/dev/hugepages",
|
||||||
}
|
}
|
||||||
for _, mp := range mountpointsToExclude {
|
for _, mp := range mountpointsToExclude {
|
||||||
if mountpoint == mp || strings.HasPrefix(mountpoint, mp) {
|
if mountpoint == mp || strings.HasPrefix(mountpoint, mp) {
|
||||||
@@ -100,6 +101,7 @@ func isPhysicalDisk(part disk.PartitionStat) bool {
|
|||||||
"sysfs",
|
"sysfs",
|
||||||
"cgroup",
|
"cgroup",
|
||||||
"mqueue",
|
"mqueue",
|
||||||
|
"hugetlbfs",
|
||||||
}
|
}
|
||||||
for _, fs := range fstypeToExclude {
|
for _, fs := range fstypeToExclude {
|
||||||
if fstype == fs || strings.HasPrefix(fstype, fs) {
|
if fstype == fs || strings.HasPrefix(fstype, fs) {
|
||||||
|
Reference in New Issue
Block a user