![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to include RETURN KEY with Background process "&" in Shell Script | racbern | Shell Programming and Scripting | 1 | 03-11-2008 03:30 AM |
| #!/bin/sh script fails at StringA | tr "[x]" "[y]" | by_tg | UNIX for Dummies Questions & Answers | 3 | 02-22-2008 08:17 AM |
| passing a list of dynamic names to a "PS" command in shell script? | sachin.tendulka | Shell Programming and Scripting | 3 | 11-21-2007 12:18 AM |
| Q: Recording shell script screen output using "script" command ? | lalfonso.gomez | Shell Programming and Scripting | 4 | 01-18-2007 05:31 PM |
| No utpmx entry: you must exec "login" from lowest level "shell" | peterpan | UNIX for Dummies Questions & Answers | 0 | 01-18-2006 12:15 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Shell Script fails with "can't connect to client"
Hi Unix Gurus,
I have written a shell script to unfreeze all frozen media in NetBackup. Here is the script written on HP-UX using ksh: *********************************************** set -x cd $HOME rm -f frozentest rm -f mediaserver cd /usr/openv/netbackup/bin/admincmd pbrun ./bpmedialist -summary | grep FROZEN | awk '{print $1 $2}' | grep FROZEN | cut -c 1-6 >>$HOME/frozentest for i in `cat $HOME/frozentest` do pbrun ./bpmedialist -m $i | grep Server | cut -f 4 -d " " > $HOME/mediaserver for j in `cat $HOME/mediaserver` do pbrun ./bpmedia -unfreeze -m $i -h $j echo "$i of $j has been unfreezed" done done *********************************************** This script should find all the frozen media and unfreeze them automatically. However the script is not working as expected. While running the last command (pbrun ./bpmedia -unfreeze -m $i -h $j) it is getting failed with "can't connect to client" error. I have written one more script using different logic even that is also getting failed with the same error. I am sure that there is no syntax errors in my logic and it could be something else which is failing the script. I am using ksh. Please let me know what could be the problem. Any suggestions on this would be greatly appreciated. Thanks in Advance, Srinivas Rao S. |
| Forum Sponsor | ||
|
|
|
|||
|
Hi blowtorch,
I appreciate your earliest response. I am running this script on the master server and this script doesn't depend on any clients because no media database is stored on clients. This script picks all frozen media from media database located on media servers and unfreezes them. We are using a dedicated backup lan and the connectivity between the master and media servers is perfectly working fine. I am running this command as an ordinary user and hence I have used pbrun in my script. I have also tried running this script as a super user with my Unix admin help and it worked perfectly. As per my Unix admin this could be due to permissions. He suggested me using "while" loop instead of "for" loop in the script and this may resolve the issue(not sure) because "for" loop issues the commands parallely but "while" issues commands one at a time. Appreciate your suggestions on this to run my script successfully. Thanks in Advance, Srinivas Rao S. |
|||
| Google UNIX.COM |