Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-strategy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e42b2da1
authored
Jan 07, 2026
by
春觉晓
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
初始化策略中心
1 parent
93539963
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
278 additions
and
0 deletions
diamond_config_data.log
rpc-dj-strategy/src/main/webapp/WEB-INF/bin/dump.sh
rpc-dj-strategy/src/main/webapp/WEB-INF/bin/restart.sh
rpc-dj-strategy/src/main/webapp/WEB-INF/bin/server.sh
rpc-dj-strategy/src/main/webapp/WEB-INF/bin/start.sh
rpc-dj-strategy/src/main/webapp/WEB-INF/bin/stop.sh
diamond_config_data.log
0 → 100644
View file @
e42b2da
File mode changed
rpc-dj-strategy/src/main/webapp/WEB-INF/bin/dump.sh
0 → 100644
View file @
e42b2da
#!/bin/bash
cd
`
dirname
$0
`
BIN_DIR
=
`
pwd
`
cd
..
DEPLOY_DIR
=
`
pwd
`
CONF_DIR
=
$DEPLOY_DIR
/classes
SERVER_NAME
=
`
sed
'/application.name/!d;s/.*=//'
classes/config/application.properties | tr -d
'\r'
`
#LOGS_FILE=`sed '/log4j.appender.logToFile.File/!d;s/.*=//' classes/log4j.properties | tr -d '\r'`
LOGS_FILE
=
`
sed
'/name="LOG_PATH"/!d;s/.*value="\(.*\)".*/\1/g'
classes/logback.xml
`
if
[
-z
"
$SERVER_NAME
"
]
;
then
SERVER_NAME
=
`
hostname
`
fi
PIDS
=
`
ps --no-heading -C java -f --width 1000 | grep
"
$CONF_DIR
"
|awk
'{print $2}'
`
if
[
-z
"
$PIDS
"
]
;
then
echo
"ERROR: The
$SERVER_NAME
does not started!"
exit
1
fi
LOGS_DIR
=
""
if
[
-n
"
$LOGS_FILE
"
]
;
then
LOGS_DIR
=
`
dirname
$LOGS_FILE
`
else
LOGS_DIR
=
$DEPLOY_DIR
/logs
fi
if
[
! -d
$LOGS_DIR
]
;
then
mkdir
$LOGS_DIR
fi
DUMP_DIR
=
$LOGS_DIR
/dump
if
[
! -d
$DUMP_DIR
]
;
then
mkdir
$DUMP_DIR
fi
DUMP_DATE
=
`
date +%Y%m%d%H%M%S
`
DATE_DIR
=
$DUMP_DIR
/
$DUMP_DATE
if
[
! -d
$DATE_DIR
]
;
then
mkdir
$DATE_DIR
fi
echo
-e
"Dumping the
$SERVER_NAME
...
\c
"
for
PID
in
$PIDS
;
do
jstack
$PID
>
$DATE_DIR
/jstack-
$PID
.dump 2>&1
echo
-e
".
\c
"
jinfo
$PID
>
$DATE_DIR
/jinfo-
$PID
.dump 2>&1
echo
-e
".
\c
"
jstat -gcutil
$PID
>
$DATE_DIR
/jstat-gcutil-
$PID
.dump 2>&1
echo
-e
".
\c
"
jstat -gccapacity
$PID
>
$DATE_DIR
/jstat-gccapacity-
$PID
.dump 2>&1
echo
-e
".
\c
"
jmap
$PID
>
$DATE_DIR
/jmap-
$PID
.dump 2>&1
echo
-e
".
\c
"
jmap -heap
$PID
>
$DATE_DIR
/jmap-heap-
$PID
.dump 2>&1
echo
-e
".
\c
"
jmap -histo
$PID
>
$DATE_DIR
/jmap-histo-
$PID
.dump 2>&1
echo
-e
".
\c
"
if
[
-r /usr/sbin/lsof
]
;
then
/usr/sbin/lsof -p
$PID
>
$DATE_DIR
/lsof-
$PID
.dump
echo
-e
".
\c
"
fi
done
if
[
-r /bin/netstat
]
;
then
/bin/netstat -an >
$DATE_DIR
/netstat.dump 2>&1
echo
-e
".
\c
"
fi
if
[
-r /usr/bin/iostat
]
;
then
/usr/bin/iostat >
$DATE_DIR
/iostat.dump 2>&1
echo
-e
".
\c
"
fi
if
[
-r /usr/bin/mpstat
]
;
then
/usr/bin/mpstat >
$DATE_DIR
/mpstat.dump 2>&1
echo
-e
".
\c
"
fi
if
[
-r /usr/bin/vmstat
]
;
then
/usr/bin/vmstat >
$DATE_DIR
/vmstat.dump 2>&1
echo
-e
".
\c
"
fi
if
[
-r /usr/bin/free
]
;
then
/usr/bin/free -t >
$DATE_DIR
/free.dump 2>&1
echo
-e
".
\c
"
fi
if
[
-r /usr/bin/sar
]
;
then
/usr/bin/sar >
$DATE_DIR
/sar.dump 2>&1
echo
-e
".
\c
"
fi
if
[
-r /usr/bin/uptime
]
;
then
/usr/bin/uptime >
$DATE_DIR
/uptime.dump 2>&1
echo
-e
".
\c
"
fi
echo
"OK!"
echo
"DUMP:
$DATE_DIR
"
rpc-dj-strategy/src/main/webapp/WEB-INF/bin/restart.sh
0 → 100644
View file @
e42b2da
#!/bin/bash
ENV
=
$1
if
[
-z
"
$ENV
"
]
;
then
echo
"ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo
"app exit"
exit
1
fi
cd
`
dirname
$0
`
./stop.sh
./start.sh
$ENV
\ No newline at end of file
rpc-dj-strategy/src/main/webapp/WEB-INF/bin/server.sh
0 → 100644
View file @
e42b2da
#!/bin/bash
cd
`
dirname
$0
`
if
[
"
$1
"
=
"start"
]
;
then
ENV
=
$2
if
[
-z
"
$ENV
"
]
;
then
echo
"ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo
"app exit"
exit
1
fi
./start.sh
$ENV
else
if
[
"
$1
"
=
"stop"
]
;
then
./stop.sh
else
if
[
"
$1
"
=
"debug"
]
;
then
ENV
=
$2
if
[
-z
"
$ENV
"
]
;
then
echo
"ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo
"app exit"
exit
1
fi
./start.sh
$ENV
debug
else
if
[
"
$1
"
=
"restart"
]
;
then
ENV
=
$2
if
[
-z
"
$ENV
"
]
;
then
echo
"ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo
"app exit"
exit
1
fi
./restart.sh
$ENV
else
if
[
"
$1
"
=
"dump"
]
;
then
./dump.sh
else
echo
"ERROR: Please input argument: start or stop or debug or restart or dump"
exit
1
fi
fi
fi
fi
fi
rpc-dj-strategy/src/main/webapp/WEB-INF/bin/start.sh
0 → 100644
View file @
e42b2da
#!/bin/bash
JAVA_HOME
=
"/app/soft/jdk1.8.0_20"
ENV
=
$1
if
[
-z
"
$ENV
"
]
;
then
echo
"ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo
"app exit"
exit
1
fi
cd
`
dirname
$0
`
BIN_DIR
=
`
pwd
`
cd
..
DEPLOY_DIR
=
`
pwd
`
CONF_DIR
=
$DEPLOY_DIR
/classes
SERVER_NAME
=
`
sed
'/server.display-name/!d;s/.*=//'
classes/config/application.properties | tr -d
'\r'
`
SERVER_PORT
=
`
sed
'/server.port/!d;s/.*=//'
classes/config/application.properties | tr -d
'\r'
`
#LOGS_FILE=`sed '/log4j.appender.logToFile.File/!d;s/.*=//' classes/log4j.properties | tr -d '\r'`
LOGS_FILE
=
`
sed
'/logging.path/!d;s/.*=//'
classes/config/application.properties | tr -d
'\r'
`
if
[
-z
"
$SERVER_NAME
"
]
;
then
SERVER_NAME
=
`
hostname
`
fi
echo
"server name is
$SERVER_NAME
"
echo
"server port is
$SERVER_PORT
"
PIDS
=
`
ps --no-heading -C java -f --width 1000 | grep
"
$CONF_DIR
"
|awk
'{print $2}'
`
if
[
-n
"
$PIDS
"
]
;
then
echo
"ERROR: The
$SERVER_NAME
already started!"
echo
"PID:
$PIDS
"
exit
1
fi
if
[
-n
"
$SERVER_PORT
"
]
;
then
SERVER_PORT_COUNT
=
`
netstat -tln | grep
$SERVER_PORT
| wc -l
`
if
[
$SERVER_PORT_COUNT
-gt 0
]
;
then
echo
"ERROR: The
$SERVER_NAME
port
$SERVER_PORT
already used!"
exit
1
fi
fi
LOGS_DIR
=
""
if
[
-n
"
$LOGS_FILE
"
]
;
then
LOGS_DIR
=
`
dirname
$LOGS_FILE
`
else
LOGS_DIR
=
$DEPLOY_DIR
/logs
fi
if
[
! -d
$LOGS_DIR
]
;
then
mkdir
$LOGS_DIR
fi
STDOUT_FILE
=
$LOGS_DIR
/stdout.log
LIB_DIR
=
$DEPLOY_DIR
/lib
LIB_JARS
=
`
ls
$LIB_DIR
|grep .jar|awk
'{print "'
$LIB_DIR
'/"$0}'
|tr
"
\n
"
":"
`
JAVA_OPTS
=
" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true "
JAVA_DEBUG_OPTS
=
""
if
[
"
$2
"
=
"debug"
]
;
then
JAVA_DEBUG_OPTS
=
" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n "
fi
JAVA_JMX_OPTS
=
""
if
[
"
$2
"
=
"jmx"
]
;
then
JAVA_JMX_OPTS
=
" -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false "
fi
JAVA_MEM_OPTS
=
""
BITS
=
`
file
$JAVA_HOME
/bin/java | grep 64-bit
`
if
[
-n
"
$BITS
"
]
;
then
JAVA_MEM_OPTS
=
" -server -Xmx1g -Xms1g -Xmn256m -XX:PermSize=128m -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 "
else
JAVA_MEM_OPTS
=
" -server -Xms1024m -Xmx1024m -XX:PermSize=128m -XX:SurvivorRatio=2 -XX:+UseParallelGC "
fi
echo
-e
"Starting the
$SERVER_NAME
...
\c
"
nohup
$JAVA_HOME
/bin/java
$JAVA_OPTS
$JAVA_MEM_OPTS
$JAVA_DEBUG_OPTS
$JAVA_JMX_OPTS
-classpath
$CONF_DIR
:
$LIB_JARS
org.oreframework.boot.bootstrap.OreBootApplication
env
=
$ENV
>
$STDOUT_FILE
2>&1 &
COUNT
=
0
while
[
$COUNT
-lt 1
]
;
do
echo
-e
".
\c
"
sleep 1
if
[
-n
"
$SERVER_PORT
"
]
;
then
COUNT
=
`
netstat -an | grep
$SERVER_PORT
| wc -l
`
else
COUNT
=
`
ps --no-heading -C java -f --width 1000 | grep
"
$DEPLOY_DIR
"
| awk
'{print $2}'
| wc -l
`
fi
if
[
$COUNT
-gt 0
]
;
then
break
fi
done
echo
"OK!"
PIDS
=
`
ps --no-heading -C java -f --width 1000 | grep
"
$DEPLOY_DIR
"
| awk
'{print $2}'
`
echo
"PID:
$PIDS
"
echo
"STDOUT:
$STDOUT_FILE
"
rpc-dj-strategy/src/main/webapp/WEB-INF/bin/stop.sh
0 → 100644
View file @
e42b2da
#!/bin/bash
cd
`
dirname
$0
`
BIN_DIR
=
`
pwd
`
cd
..
DEPLOY_DIR
=
`
pwd
`
CONF_DIR
=
$DEPLOY_DIR
/classes
SERVER_NAME
=
`
sed
'/application.name/!d;s/.*=//'
classes/config/application.properties | tr -d
'\r'
`
if
[
-z
"
$SERVER_NAME
"
]
;
then
SERVER_NAME
=
`
hostname
`
fi
PIDS
=
`
ps --no-heading -C java -f --width 1000 | grep
"
$CONF_DIR
"
|awk
'{print $2}'
`
if
[
-z
"
$PIDS
"
]
;
then
echo
"ERROR: The
$SERVER_NAME
does not started!"
exit
1
fi
#if [ "$1" != "skip" ]; then
#$BIN_DIR/dump.sh
#fi
echo
-e
"Stopping the
$SERVER_NAME
...
\c
"
for
PID
in
$PIDS
;
do
kill
$PID
> /dev/null 2>&1
done
COUNT
=
0
while
[
$COUNT
-lt 1
]
;
do
echo
-e
".
\c
"
sleep 1
COUNT
=
1
for
PID
in
$PIDS
;
do
PID_EXIST
=
`
ps --no-heading -p
$PID
`
if
[
-n
"
$PID_EXIST
"
]
;
then
COUNT
=
0
break
fi
done
done
echo
"OK!"
echo
"PID:
$PIDS
"
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment