NetWorker:dbg命令失敗,並顯示「無法開啟暫存檔案『/nsr/tmp/lgdbg.tmp』」

Summary: 未以 root 身分登入時,dbg命令失敗並顯示「Can open temporary file '/nsr/tmp/lgdbg.tmp』」。使用 su [替代使用者] 或 sudo [超級使用者執行] 執行命令。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

識別到的問題

可使用 dbgcommand 未以根使用者身分登入時失敗。

Cannot open temporary file '/nsr/tmp/lgdbg.tmp'.

錯誤訊息

錯誤訊息指出 dbgcommand 無法開啟暫存檔案。

[USERNAME@HOSTNAME logs]$ dbgcommand -n nsrsnmd Debug=1
Process ID List : 2454232
Processing PID:2454232
Cannot open temporary file '/nsr/tmp/lgdbg.tmp'.

Cause

問題的根本原因

此問題的根本原因是 dbgcommand 若未以根使用者身分執行,則會失敗。

這是因為 dbgcommand 嘗試存取暫存檔”/nsr/tmp/lgdbg.tmp',當由非 root 使用者名運行時,它無法打開。

特定條件

當 dbgcommand 是從沒有根許可權的使用者名執行的。

相關錯誤訊息

錯誤訊息「Cannot open temporary file '/nsr/tmp/lgdbg.tmp'“是問題根本原因的關鍵指標。
此外,當使用者嘗試使用 sudo 執行命令時,錯誤訊息當不在 sudo 目錄

$ sudo dbgcommand -n nsrsnmd Debug=1

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for DELLEMC:
DELLEMC is not in the sudoers file.  This incident will be reported.

Resolution

若要解決此問題,請執行 dbgcommand 具有提升權限,使用 susudo 命令為貴組織設定主要和次要 IT 連絡人。

$ whoami
$ su -
Password: 
# dbgcommand -n nsrsnmd Debug=1

或者,如果使用者在 sudo'ers 清單中,則使用者可以使用 sudo 命令以執行 dbgcommand

$ sudo dbgcommand -n nsrsnmd Debug=1
注意:如果使用者不在 sudoers 檔中,使用者會收到一條錯誤消息,並將報告事件。

驗證解決方案

執行 dbgcommand 使用提升的許可權,通過檢查命令的輸出來驗證問題是否已解決。此外,透過檢視精靈紀錄 nsr_render_log 對於消息”nsrsnmd SYSTEM notice Changing Debug level from 0 to 1

Additional Information

Affected Products

NetWorker

Products

NetWorker Family
Article Properties
Article Number: 000331479
Article Type: Solution
Last Modified: 25 مايو 2026
Version:  3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.