-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart_profiles_local.sh
executable file
·59 lines (49 loc) · 1.88 KB
/
start_profiles_local.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
SCRIPT_ROOT=`dirname "$0"`
source $SCRIPT_ROOT/conf.sh
OZONE_DN_PID=`pgrep -f HddsDatanodeService `
OZONE_OM_PID=`pgrep -f OzoneManagerStarter `
OZONE_SCM_PID=`pgrep -f StorageContainerManagerStarter `
OZONE_RECON_PID=`pgrep -f ReconServer `
HDFS_NN_PID=`pgrep -f NameNode`
HDFS_DN_PID=`pgrep -f DataNode`
IMPALAD_PID=`pgrep impalad`
HBASE_REGIONSERVER_PID=`pgrep -f HRegionServer`
YCSB_PID=`pgrep -f site.ycsb.Client`
PROFILER_OPTIONS=" -e cpu"
if [ ! -z "$OZONE_DN_PID" ]; then
echo "Ozone DN PID=$OZONE_DN_PID"
/opt/async-profiler-2.8.1-linux-x64/profiler.sh start $OZONE_DN_PID $PROFILER_OPTIONS
fi
if [ ! -z "$OZONE_OM_PID" ]; then
echo "Ozone OM PID=$OZONE_OM_PID"
/opt/async-profiler-2.8.1-linux-x64/profiler.sh start $OZONE_OM_PID $PROFILER_OPTIONS
fi
if [ ! -z "$OZONE_SCM_PID" ]; then
echo "Ozone SCM PID=$OZONE_SCM_PID"
/opt/async-profiler-2.8.1-linux-x64/profiler.sh start $OZONE_SCM_PID $PROFILER_OPTIONS
fi
if [ ! -z "$OZONE_RECON_PID" ]; then
echo "Ozone Recon PID=$OZONE_RECON_PID"
/opt/async-profiler-2.8.1-linux-x64/profiler.sh start $OZONE_RECON_PID $PROFILER_OPTIONS
fi
if [ ! -z "$HDFS_NN_PID" ]; then
echo "HDFS NN PID=$HDFS_NN_PID"
/opt/async-profiler-2.8.1-linux-x64/profiler.sh start $HDFS_NN_PID $PROFILER_OPTIONS
fi
if [ ! -z "$HDFS_DN_PID" ]; then
echo "HDFS DN PID=$HDFS_DN_PID"
/opt/async-profiler-2.8.1-linux-x64/profiler.sh start $HDFS_DN_PID $PROFILER_OPTIONS
fi
if [ ! -z "$IMPALAD_PID" ]; then
echo "Impalad PID=$IMPALAD_PID"
/opt/async-profiler-2.8.1-linux-x64/profiler.sh start $IMPALAD_PID $PROFILER_OPTIONS
fi
if [ ! -z "$HBASE_REGIONSERVER_PID" ]; then
echo "HBase RegionServer PID=$HBASE_REGIONSERVER_PID"
/opt/async-profiler-2.8.1-linux-x64/profiler.sh start $HBASE_REGIONSERVER_PID $PROFILER_OPTIONS
fi
if [ ! -z "$YCSB_PID" ]; then
echo "YCSB PID=$YCSB_PID"
/opt/async-profiler-2.8.1-linux-x64/profiler.sh start $YCSB_PID $PROFILER_OPTIONS
fi