srcstr := filecontent[i-1]
srcstr = strings.TrimRight(srcstr, "\r\n")
srcstr = strings.TrimRight(srcstr, "\n")
h := md5.New()
h.Write([]byte(srcstr))
md5str := base64.URLEncoding.EncodeToString(h.Sum(nil))
md5str = strings.TrimRight(md5str, "==")
md5str = strings.Replace(md5str, "_", "/", -1)
md5str = strings.Replace(md5str, "-", "+", -1)
执行 lsof +L1 rsyslogd 2163711 root 38w REG 253,1 28035581675 0 395729 /var/log/messages-202210071665085022 (deleted) 这个rsyslogd 占了20多G的日志 执行systemctl stop rsyslog 解决
评论
发表评论