Skip to content

Commit

Permalink
[INLONG-10756][Agent] Report file metrics for backend problem analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
justinwwhuang committed Aug 6, 2024
1 parent 9a327f6 commit 039509d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public String getFieldsString() {

private static AgentStatusManager manager = null;
private final AgentConfiguration conf;
private final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 设置格式
private final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private Runtime runtime = Runtime.getRuntime();
final long GB = 1024 * 1024 * 1024;
private OperatingSystemMXBean osMxBean;
Expand All @@ -140,7 +140,7 @@ public String getFieldsString() {
public static AtomicLong sendDataLen = new AtomicLong();
public static AtomicLong sendPackageCount = new AtomicLong();
private String processStartupTime = format.format(runtimeMXBean.getStartTime());
private String systemStartupTime = ExcuteLinux.exeCmd("who -b|awk '{print $(NF-1), $NF}'").replaceAll("\r|\n", "");
private String systemStartupTime = ExcuteLinux.exeCmd("uptime -s").replaceAll("\r|\n", "");

private AgentStatusManager(AgentManager agentManager) {
this.agentManager = agentManager;
Expand Down

0 comments on commit 039509d

Please sign in to comment.