Unable to connect morethan a server via remotely and get the result
Hello
Have a question. Please refer my code #!/bin/sh i=1 while read line do echo "$i:$line";ssh $line 'nvidia-smi |grep -i MB | cut -c40-55' let i++ done < ~/hostnames There are ~100 server , i want remotely loginto all servers one by one and get the nvidia details, when i execute the above scrips it just fetch the details from one server post it quite, it does not heading to second server listed in hostnames file. Please correct where i was wrong and wt should i do to fulfill my request |
Please post a fragment of the output, and the hostnames file (in [CODE] [/CODE] tags please, to preserve formatting for those who will test the data).
--- rod. |
Output should be as follows
1 144MB / 511MB 2 144MB / 511MB 3 144MB / 511MB here is the hostname file MM31.hyd MM16.hyd MM54.hyd MM86.hyd |
Quote:
And again, please use CODE tags. |
Does it quit after displaying output of first server, or stuck after that? Perhaps, it's not able to connet to second server...
Once add set -xv to debug the code, as: Code:
#!/bin/sh |
All times are GMT -5. The time now is 06:18 AM. |