trace
This commit is contained in:
@@ -601,7 +601,7 @@ func ToHtml(path string, timestamp string, port string, ipDaTA []byte) {
|
|||||||
encodedStr := hex.EncodeToString(ipDaTA)
|
encodedStr := hex.EncodeToString(ipDaTA)
|
||||||
// [72 101 108 108 111]
|
// [72 101 108 108 111]
|
||||||
log.Trace(encodedStr)
|
log.Trace(encodedStr)
|
||||||
command := fmt.Sprintf("/usr/local/bin/ipdata2html -f %s -t %s -i %s -d %s", path, timestamp, port, encodedStr)
|
command := fmt.Sprintf("/usr/local/bin/data2html -f %s -t %s -i %s -d %s", path, timestamp, port, encodedStr)
|
||||||
log.Trace("commm:", command)
|
log.Trace("commm:", command)
|
||||||
cmd := exec.Command("sh", "-c", command)
|
cmd := exec.Command("sh", "-c", command)
|
||||||
_, err := cmd.CombinedOutput()
|
_, err := cmd.CombinedOutput()
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ func ParseRawMsg2Html(w http.ResponseWriter, r *http.Request) {
|
|||||||
if traceData.DecMsg == "" {
|
if traceData.DecMsg == "" {
|
||||||
htmlFile := fmt.Sprintf("traceDecMessage-%d-%d.html", traceData.TaskID, traceData.ID)
|
htmlFile := fmt.Sprintf("traceDecMessage-%d-%d.html", traceData.TaskID, traceData.ID)
|
||||||
filePath = config.GetYamlConfig().OMC.FrontTraceDir + "/" + htmlFile
|
filePath = config.GetYamlConfig().OMC.FrontTraceDir + "/" + htmlFile
|
||||||
command := fmt.Sprintf("ipdata2html -f %s -t %d -i N%d -d %x", filePath, traceData.Timestamp, traceData.IfType, traceData.RawMsg)
|
command := fmt.Sprintf("/usr/local/omc/bin/data2html -f %s -t %d -i N%d -d %x", filePath, traceData.Timestamp, traceData.IfType, traceData.RawMsg)
|
||||||
out, err := run.ExecCmd(command, "/")
|
out, err := run.ExecCmd(command, "/")
|
||||||
log.Tracef("Exec output: %v", string(out))
|
log.Tracef("Exec output: %v", string(out))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user