mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-05 03:01:16 +00:00
style: log format
This commit is contained in:
1 parent
1d0b2886a8
commit
08d5b7b20a
4 files changed
+5
-5
No files matched your search
@@ -43,7 +43,7 @@ public class DiskFileSystem implements Comparable<DiskFileSystem> {
|
||||
var usage = usage();
|
||||
if (usage >= 0.8) {
|
||||
var temp = this.toGB();
|
||||
return StringUtils.format("df - disk[name:{}] space too high[size:{}GB][available:{}GB][usage:{}][{}]"
|
||||
return StringUtils.format("df - disk:[{}] space too high size:[{}]GB available:[{}]GB usage:[{}][{}]"
|
||||
, name, temp.getSize(), temp.getAvailable(), OSUtils.toPercent(usage), TimeUtils.timeToString(timestamp));
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Memory implements Comparable<Memory> {
|
||||
var usage = 1D * (total - available) / total;
|
||||
if (usage >= 0.8) {
|
||||
var temp = this.toGB();
|
||||
return StringUtils.format("free - memory usage too high[total:{}GB][available:{}GB][usage:{}][{}]"
|
||||
return StringUtils.format("free - memory usage too high total:[{}]GB available:[{}]GB usage:[{}][{}]"
|
||||
, temp.getTotal(), temp.getAvailable(), OSUtils.toPercent(usage), TimeUtils.timeToString(timestamp));
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
|
||||
@@ -58,11 +58,11 @@ public class Sar implements Comparable<Sar> {
|
||||
|
||||
public String pressure() {
|
||||
if (rxpck >= 5_0000) {
|
||||
return StringUtils.format("sar - NIC traffic[interface:{}] [rxpck:{}] [txpck:{}] [rxBytes:{}] [txBytes:{}] [inErrors:{}] [outErrors:{}] [inDrops:{}] [collisions:{}] [{}]", performance impact: CRITICAL"
|
||||
return StringUtils.format("sar - NIC traffic [interface:{}] [rxpck:{}] [txpck:{}] [rxBytes:{}] [txBytes:{}] [inErrors:{}] [outErrors:{}] [inDrops:{}] [collisions:{}] [{}] performance impact: CRITICAL"
|
||||
, name, rxpck, txpck, rxBytes, txBytes, inErrors, outErrors, inDrops, collisions, TimeUtils.timeToString(timestamp));
|
||||
}
|
||||
if (inErrors > 0 || outErrors > 0 || inDrops > 0 || collisions > 0) {
|
||||
return StringUtils.format("sar - NIC traffic[interface:{}] [rxpck:{}] [txpck:{}] [rxBytes:{}] [txBytes:{}] [inErrors:{}] [outErrors:{}] [inDrops:{}] [collisions:{}] [{}]", performance impact: LOW"
|
||||
return StringUtils.format("sar - NIC traffic[interface:{}] [rxpck:{}] [txpck:{}] [rxBytes:{}] [txBytes:{}] [inErrors:{}] [outErrors:{}] [inDrops:{}] [collisions:{}] [{}] performance impact: LOW"
|
||||
, name, rxpck, txpck, rxBytes, txBytes, inErrors, outErrors, inDrops, collisions, TimeUtils.timeToString(timestamp));
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<net:address name="firstZookeeper" url="127.0.0.1:2181"/>
|
||||
</net:registry>
|
||||
|
||||
<!--1.声明自己是个消费�2.消费的接�是�务�供者是myProvider1�供的具体实�->
|
||||
<!--1.声明自己是个消费者 2.消费的接口是服务提供者是myProvider1提供的具体实现-->
|
||||
<net:consumers>
|
||||
<net:consumer consumer="provider1"/>
|
||||
</net:consumers>
|
||||
|
||||
Reference in new issue
Block a user