02-20-2015 05:29 PM
Hello Experts,
We have put many clients on offline mode. So is there any command that can show how many clients are in offline?
Because in GUI to check in client attributes its taking time :(
Thanks,
Solved! Go to Solution.
02-22-2015 02:01 PM
02-20-2015 08:16 PM
02-21-2015 12:47 AM
sorry, i misunderstood it for SEP.
02-22-2015 02:01 PM
02-26-2015 01:07 PM
c:\Program Files\Veritas\NetBackup\bin\admincmd>bpclient -All -L | find /i /c "o
ffline"
68
its showing only count not the name :)
02-26-2015 06:04 PM
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.