05-22-2024 12:57 PM
Greetings,
I've written a script to pull the host list from the activity monitor, put that host list output into a file and then I run nbhostmgmt against that host list output file. My issue is when nbhostmgmt is looking for a host that doesn't have a client installed or no longer exists, the command appears to hang and I have to kill the process. Is there a way to wrap nbhostmgmt in a timer wrapper that when it doesn't respond back in 15 seconds, it will kill that nbhostmgmt process and move on to the next host in the list?
Ideas? Tips? Pointers?
05-22-2024 09:01 PM
05-22-2024 10:50 PM - edited 05-22-2024 10:52 PM
Hi @DPeaco
I'm curious about a couple of things - the nbhostmgmt command as far as I understand doesn't talk to any client, it queries the master for the information on the client listed (so a server without the client binaries installed or no longer existing shouldn't cause any delays).
For instance in a lab I have I can run the nbhostmgmt command (-li -host <host>) for a host that no longer has a DNS entry, but remains in the primary server's host (and certificate) list because it did exist in the past. The command returns with a screenful of information straightaway. This is with NetBackup version 10.2.0.1
As @quebek says, the timeout command in linux is the way to manage the "hangs".
Do you mind sharing the command line options you are using with nbhostmgmt? Also what are you trying to achieve - what info are you extracting from nbhostmgmt output? I have a script that gets a unique list of clients (bpplclients - rather than scraping the activity monitor), then tries to ping each and run bptestbpcd against each (with a timeout) to check connectivity.
Cheers
David
Cheers
David
05-27-2024 05:17 AM
Check out man page for timeout command on Linux.
3 weeks ago
Here is the command info that I've been using. It appears to be querying the client as it pauses on hosts that also pause/take longer in Host Properties in the GUI.