first commit
This commit is contained in:
31
Man_tool/command_loop.sh
Executable file
31
Man_tool/command_loop.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
#if [ $# -lt 1 ]
|
||||
#then
|
||||
# echo "Syntax: ./$(basename $0) <file name>"
|
||||
# exit
|
||||
#fi
|
||||
|
||||
for csv in $(cat $1)
|
||||
do
|
||||
|
||||
HOST=$(echo $csv |cut -d "," -f1)
|
||||
HASH=$(echo $csv |cut -d "," -f2)
|
||||
|
||||
# echo -e $host "root:$HASH/"
|
||||
echo $HOST "vgs"
|
||||
|
||||
|
||||
#scp root@$host:/var/log/glusterfs/glustershd.log .
|
||||
#ssh -o ConnectTimeout=10 -n root@$host "tail -n 100 /var/log/glusterfs/glustershd.log" > gluster/$host
|
||||
|
||||
done
|
||||
|
||||
#cat gluster/*| grep "All subvolumes are down" | grep "0-vol"|cut -d " " -f7|sort|uniq
|
||||
|
||||
|
||||
#cat gluster/*| grep "failed" | grep "0-vol"|cut -d " " -f 7,8|sort|uniq
|
||||
|
||||
#rm gluster/*
|
||||
#cat bricks_down |sort|uniq
|
Reference in New Issue
Block a user