dev
This commit is contained in:
parent
f0e4250488
commit
2a9efb194b
|
@ -85,12 +85,12 @@ func getSrvStatus(srv string) PsTable {
|
|||
var status string = " - "
|
||||
binExists := utils.PathExists(env.MeshEnv.Prefix + srv)
|
||||
if binExists {
|
||||
status = "Running"
|
||||
status = "\033[32mRunning\033[0m\n"
|
||||
}
|
||||
|
||||
isRun := checkProcessRunning(srv)
|
||||
if binExists && !isRun {
|
||||
status = "Stop"
|
||||
status = "\033[31mStop\033[0m\n"
|
||||
}
|
||||
|
||||
return PsTable{
|
||||
|
@ -140,7 +140,7 @@ func getProcessInfo(processName string) string {
|
|||
pid := fields[0] // PID(进程标识)
|
||||
cpuUsage := fields[1] // CPU使用情况
|
||||
memoryUsage := fields[2] // 内存使用情况
|
||||
info = fmt.Sprintf("PID:%s / CPU:%s / MEM:%s", pid, cpuUsage, memoryUsage)
|
||||
info = fmt.Sprintf("PID:%s / CPU:%s%% / MEM:%s%%", pid, cpuUsage, memoryUsage)
|
||||
return info
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue