首页 > 解决方案 > spindump 命令在 mac 上询问 OD 用户名

问题描述

我写了下面的shell脚本来收集mac机器上的spindumps。

  #!/bin/sh    
    while :
    do
        echo "Dump collection started..."
        current_time=$(date "+%Y.%m.%d-%H.%M.%S")
        new_fileName="my_dump_".$file_name.$current_time."dmp"
        spindump -o $new_fileName 
        echo "Dump collection done."
        echo “Waiting for 1 minutes”
        sleep 60
    done

我期望在没有任何交互的情况下运行这个脚本。但是在某些间隔spindump命令要求之后OD username,我必须按回车键。

我怎样才能摆脱这个OD用户名问?

bash-3.2# ./spin.sh 
Dump collection started...
Sampling all processes for 10 seconds with 10 milliseconds of run time between samples
Sampling completed, processing symbols...
BulkSymbolication requires OD credentials (enter a blank line to skip)
OD username:

标签: macosshellshmacos-catalina

解决方案


推荐阅读