|
|
@@ -238,6 +238,7 @@ func (r *Registry) handleEvents(ch <-chan ebpftracer.Event) {
|
|
|
Sn: c.AppInfo.Sn,
|
|
|
Sport: c.AppInfo.Sport,
|
|
|
RegisterAt: time.Unix(c.AppInfo.RegisterAt, 0).Format("060102 15:04:05"),
|
|
|
+ Status: c.AppInfo.Status,
|
|
|
}
|
|
|
if c.AppInfo.UpdateAt != 0 {
|
|
|
detail.UpdateAt = time.Unix(c.AppInfo.UpdateAt, 0).Format("060102 15:04:05")
|
|
|
@@ -534,6 +535,8 @@ func (r *Registry) getOrCreateContainer(pid uint32) *Container {
|
|
|
}
|
|
|
|
|
|
func calcId(cg *cgroup.Cgroup, md *ContainerMetadata, pid uint32) (ContainerID, map[string]string) {
|
|
|
+ // 卡一下防止概率性获取为bash
|
|
|
+ time.Sleep(1 * time.Millisecond)
|
|
|
extensionTag := map[string]string{Namespace: "", Workload: "", PodName: "", ProcessName: ""}
|
|
|
if cg.ContainerType == cgroup.ContainerTypeSystemdService {
|
|
|
if strings.HasPrefix(cg.ContainerId, "/system.slice/crio-conmon-") {
|
|
|
@@ -544,7 +547,7 @@ func calcId(cg *cgroup.Cgroup, md *ContainerMetadata, pid uint32) (ContainerID,
|
|
|
if cg.ContainerType == cgroup.ContainerTypeStandaloneProcess {
|
|
|
procName := proc.GetProcName(pid)
|
|
|
extensionTag[ProcessName] = procName
|
|
|
- return ContainerID(fmt.Sprintf("/%s/%s/%d", "standalone", proc.GetProcName(pid), pid)), extensionTag
|
|
|
+ return ContainerID(fmt.Sprintf("/%s/%s/%d", "standalone", procName, pid)), extensionTag
|
|
|
}
|
|
|
switch cg.ContainerType {
|
|
|
case cgroup.ContainerTypeDocker, cgroup.ContainerTypeContainerd, cgroup.ContainerTypeSandbox, cgroup.ContainerTypeCrio:
|