-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstart-container.sh
More file actions
executable file
·34 lines (27 loc) · 1.01 KB
/
start-container.sh
File metadata and controls
executable file
·34 lines (27 loc) · 1.01 KB
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
#!/bin/bash
#
#
. envvars.appdynamics.sh >> envvars.log
export APPD_LOGS_DIR="$HOME/logs"
mkdir -p $APPD_LOGS_DIR
# Install and Start the AppDynamics Machine Agent
pkill -f ".*machineagent.jar"
HTTP_LISTENER_OPTS=" -Dmetric.http.listener=true -Dmetric.http.listener.port=8081 "
export APPD_MACHINE_AGENT_DIR="$HOME/Agents/macagent"
mkdir -p $APPD_MACHINE_AGENT_DIR
unzip -no $HOME/Agents/$APPDYNAMICS_MACHINE_AGENT_ZIP_FILE -d Agents/macagent
nohup $APPD_MACHINE_AGENT_DIR/bin/machine-agent $HTTP_LISTENER_OPTS 2>&1 > $APPD_LOGS_DIR/macagent.log &
# Install AppD-StatsD-Backend into statsd package
npm install . --verbose --prefix statsd/ 2>&1 > $APPD_LOGS_DIR/npminstall.log
# Start StatsD
nohup node statsd/stats.js AppDynamics-Config.js 2>&1 >> $APPD_LOGS_DIR/statsd.log &
# Start the load generator of metrics into StatsD
nohup ./test1.py 2>&1 >> $APPD_LOGS_DIR/test1.log &
# Hold container open
count=999999
interval=15
for i in $(seq $count )
do
echo "$i `date`" >> /tmp/container.log
sleep $interval;
done;