This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
galaxy-tsg-olap-dll-multipo…/external-flume/conf/security/count_flume.sh
2020-05-14 13:34:58 +08:00

16 lines
401 B
Bash
Executable File

#!/bin/sh
BASE_DIR=$(cd $(dirname $0); pwd)
JAR_NAME=`ls ${BASE_DIR} | grep ^k2* | grep .properties$`
NUM1=`ps -ef | grep ${JAR_NAME} | grep -v grep | wc -l`
pids1=$(ps -ef | grep ${JAR_NAME} | grep -v grep | awk '{print $2}')
echo 'flume '${JAR_NAME}' total process-->'${NUM1}
if [ "${NUM1}" -ge "1" ];then
for pid1 in $pids1
do
echo 'flume '${JAR_NAME}' process-->'$pid1
done
fi