修改log内容

This commit is contained in:
lwch
2022-08-03 17:04:25 +08:00
parent 4d49e927e1
commit b341340474
2 changed files with 8 additions and 8 deletions

View File

@@ -89,22 +89,22 @@ func limitDiskV1(group cgroups.Cgroup, limits diskLimits) {
}
if disk.ReadBytes > 0 {
block.ThrottleReadBpsDevice = write(disk.ReadBytes, block.ThrottleReadBpsDevice)
logging.Info(" - set read_bytes limit by mount_point %s: %s",
logging.Info(" - set read_bytes limit by dev [%s]: %s",
disk.Dev, humanize.IBytes(disk.ReadBytes))
}
if disk.WriteBytes > 0 {
block.ThrottleWriteBpsDevice = write(disk.WriteBytes, block.ThrottleWriteBpsDevice)
logging.Info(" - set write_bytes limit by mount_point %s: %s",
logging.Info(" - set write_bytes limit by dev [%s]: %s",
disk.Dev, humanize.IBytes(disk.WriteBytes))
}
if disk.ReadIOPS > 0 {
block.ThrottleReadIOPSDevice = write(disk.ReadIOPS, block.ThrottleReadIOPSDevice)
logging.Info(" - set read_iops limit by mount_point %s: %s",
logging.Info(" - set read_iops limit by dev [%s]: %s",
disk.Dev, humanize.IBytes(disk.ReadIOPS))
}
if disk.WriteIOPS > 0 {
block.ThrottleWriteIOPSDevice = write(disk.WriteIOPS, block.ThrottleWriteIOPSDevice)
logging.Info(" - set write_iops limit by mount_point %s: %s",
logging.Info(" - set write_iops limit by dev [%s]: %s",
disk.Dev, humanize.IBytes(disk.WriteIOPS))
}
}

View File

@@ -71,22 +71,22 @@ func limitDiskV2(group *v2.Manager, limits diskLimits) {
}
if disk.ReadBytes > 0 {
write(v2.ReadBPS, disk.ReadBytes)
logging.Info(" - set read_bytes limit by mount_point %s: %s",
logging.Info(" - set read_bytes limit by dev [%s]: %s",
disk.Dev, humanize.IBytes(disk.ReadBytes))
}
if disk.WriteBytes > 0 {
write(v2.WriteBPS, disk.WriteBytes)
logging.Info(" - set write_bytes limit by mount_point %s: %s",
logging.Info(" - set write_bytes limit by dev [%s]: %s",
disk.Dev, humanize.IBytes(disk.WriteBytes))
}
if disk.ReadIOPS > 0 {
write(v2.ReadIOPS, disk.ReadIOPS)
logging.Info(" - set read_iops limit by mount_point %s: %s",
logging.Info(" - set read_iops limit by dev [%s]: %s",
disk.Dev, humanize.IBytes(disk.ReadIOPS))
}
if disk.WriteIOPS > 0 {
write(v2.WriteIOPS, disk.WriteIOPS)
logging.Info(" - set write_iops limit by mount_point %s: %s",
logging.Info(" - set write_iops limit by dev [%s]: %s",
disk.Dev, humanize.IBytes(disk.WriteIOPS))
}
}