kafka监控脚本

#!/bin/bash
#-*- coding: utf-8 -*-
#Date: 2018/08/15
#Author: Mr.yang

ps
-ef |grep kafka |grep -v grep |grep -v kafka.sh > /dev/null if [ $? -eq 0 ];then cd /database/kafka/bin/ timeout 10s sh kafka-producer-perf-test.sh --topic t1 --num-records 10 --record-size 2 --throughput 50 --producer-props bootstrap.servers=192.168.0.184:9092 > /dev/null if [ $? -ne 0 ];then echo 1 else echo 0 fi elif [ $? -ne 0 ];then echo 1 fi

原创文章,转载请注明:
转载自纯种黄牛博客

猜你喜欢

转载自www.cnblogs.com/Huang-Niu/p/9993803.html