Forum Discussion

5 Replies

  • Read up in Commands manual about bpclient command. Similar to the GUI where you need to select each client name, bpclient command also needs client name. In this case the GUI will probably be faster because you can see the list of client names. PS: If you are managing a large environment, there should be a change control system in place where all changes are recorded along with reasons and expected outcome.
  • unix: bpclient -All -L | grep -i "offline" | wc -l windows bpclient -All -L | find /i /c "offline"
  • c:\Program Files\Veritas\NetBackup\bin\admincmd>bpclient -All -L | find /i /c "o
    ffline"
    68

    its showing only count not the name :)

  • Drop the following in to a file named, e.g., "list-offline-clients.bat", and either double click it, or run it from a DOS/cmd box.

    @echo off
    setlocal enabledelayedexpansion
    
    set z_path=%~dp0
    set z_name=%~n0
    
    set z_file_log=!z_path!!z_name!.log
    set z_file_tmp=!z_path!!z_name!.tmp
    
    call :log ""
    call :log ""
    call :log "Script started..."
    
    set z_bpclient_exe=C:\Program Files\Veritas\NetBackup\bin\admincmd\bpclient.exe
    
    if not exist "!z_bpclient_exe!" (
      call :log "Unable to locate executable `!z_bpclient_exe!`..."
      goto :end
    )
    
    "!z_bpclient_exe!" -All -L >"!z_file_tmp!"
    
    set /a z_count_offline=0
    
    for /f "tokens=1,2,3" %%a in ('type "!z_file_tmp!"') do (
      if /i "%%a %%b"=="Client Name:"  set z_client_name=%%c
      if /i "%%a %%b"=="Offline: Yes" (
        set /a z_count_offline+=1
        call :log "Offline client:  !z_client_name!"
      )
    )
    
    call :log ""
    call :log "Found `!z_count_offline!` offline clients..."
    
    :end
    call :log ""
    call :log "Script completed..."
    echo+
    pause
    exit /b
    
    :log
    (echo !date! !time:~0,8!  %~1)
    (echo !date! !time:~0,8!  %~1)>>"!z_file_log!"
    goto :eof
    
    

    HTH.