DOYENSYS Knowledge Portal

We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal

Thursday, March 31, 2016

Script to check Disk space in all remonte servers in network

# ssh password less login is required

# mention below remote server seperated by space

remote_srv=(  )

do_ssh() {
    ssh $s "$@"
    echo -e

header() {
    echo "#==================={$@}==========================#"

n=${#remote_srv[@]} # number of ip's in array

for (( i=0;i<$n;i++)); do
            echo -e
            echo "$(tput bold)$(tput setaf 2)* Connected Server: ${remote_srv[$i]}  @@ $(date) @@"
            echo "* Fetching info...$(tput sgr 0)"

            header "Disk Usage"
            do_ssh df -h

## EOF

1 comment:

Sridevi K said...

Sridevi Koduru (Senior Oracle Apps Trainer
LinkedIn profile -
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at | +91 - 9581017828.