From b3413404744ad530ffc3f2de831b71d56712bc33 Mon Sep 17 00:00:00 2001 From: lwch Date: Wed, 3 Aug 2022 17:04:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9log=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- limit/cgroups_v1.go | 8 ++++---- limit/cgroups_v2.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/limit/cgroups_v1.go b/limit/cgroups_v1.go index 74a293b..26a0f05 100644 --- a/limit/cgroups_v1.go +++ b/limit/cgroups_v1.go @@ -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)) } } diff --git a/limit/cgroups_v2.go b/limit/cgroups_v2.go index aaefc46..c2a9aa6 100644 --- a/limit/cgroups_v2.go +++ b/limit/cgroups_v2.go @@ -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)) } }