Forum Discussion

Puffy's avatar
Puffy
Level 6
16 years ago

Command to get active drives

I know this command vmoprcmd to get active drives. I am writing a script so I prefer the output to be more condensed like bpdbjobs -summary.

 

Any other commands to use ? Basically I need to get the number of active drives.

 

Or I will need to work on the output.

Message Edited by Puffy on 10-05-2008 06:36 AM

5 Replies

  • search for GNUWin32 utils there you can get Ggrep, Gawk, Gsed then you can run all kind of scripts I will recomend you to use vmoprcmd -shmdrive because it shows all the data regarding every single drive, the bad part is that is hard to understand because there is not much support, but there are some posts out there where shows what the out means.

     

    hope this helps.

    regards

  • Hi

     

    There's always findstr

    @echo off
    SET VOLMGR_BIN_PATH="D:\Program Files\Veritas\Volmgr\bin\"
    SET NBU_BIN_PATH="D:\Program Files\Veritas\Netbackup\bin\admincmd\"
    SET LOG="E:\User_logs\Drive_info\drive_info_log.txt"
    echo === %DATE% %TIME%  =============================================================== >> %LOG%
    %NBU_BIN_PATH%\bpdbjobs -L -summary  | findstr Queued  >> %LOG%
    %NBU_BIN_PATH%\bpdbjobs -L -summary  | findstr Active   >> %LOG%
    echo --------------------------------   >> %LOG%
    %VOLMGR_BIN_PATH%\vmoprcmd -h media_server  -dp | findstr a_string_common _to_media_server_names   >> %LOG%

     

    Run this every 10 or so mins via the widnows scheduler.  I analyse with a cygwin bash script that dimps it to a csv file.