Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
getty
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wei.xuan
getty
Commits
fcc07cef
Commit
fcc07cef
authored
Sep 10, 2016
by
alexstocks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete target
parent
884e61cc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
176 deletions
+0
-176
echo_client-0.3.04-20160910-1539-test.tar.gz
...rget/windows/echo_client-0.3.04-20160910-1539-test.tar.gz
+0
-0
load.sh
...windows/echo_client-0.3.04-20160910-1539-test/bin/load.sh
+0
-132
config.toml
...ws/echo_client-0.3.04-20160910-1539-test/conf/config.toml
+0
-44
echo_client.exe
...cho_client-0.3.04-20160910-1539-test/sbin/echo_client.exe
+0
-0
No files found.
echo/client/target/windows/echo_client-0.3.04-20160910-1539-test.tar.gz
deleted
100644 → 0
View file @
884e61cc
File deleted
echo/client/target/windows/echo_client-0.3.04-20160910-1539-test/bin/load.sh
deleted
100644 → 0
View file @
884e61cc
#!/usr/bin/env bash
# ******************************************************
# DESC : getty app devops script
# AUTHOR : Alex Stocks
# VERSION : 1.0
# LICENCE : LGPL V3
# EMAIL : alexstocks@foxmail.com
# MOD : 2016-05-13 02:01
# FILE : load.sh
# ******************************************************
APP_NAME
=
"echo_client"
APP_ARGS
=
""
PROJECT_HOME
=
""
OS_NAME
=
`
uname
`
if
[[
${
OS_NAME
}
==
"Linux"
]]
;
then
PROJECT_HOME
=
`
pwd
`
PROJECT_HOME
=
${
PROJECT_HOME
}
"/"
fi
export
APP_CONF_FILE
=
${
PROJECT_HOME
}
"conf/config.toml"
export
APP_LOG_CONF_FILE
=
${
PROJECT_HOME
}
"conf/log.xml"
usage
()
{
echo
"Usage:
$0
start"
echo
"
$0
stop"
echo
"
$0
term"
echo
"
$0
restart"
echo
"
$0
list"
exit
}
start
()
{
APP_LOG_PATH
=
${
PROJECT_HOME
}
"logs/"
mkdir
-p
${
APP_LOG_PATH
}
APP_BIN
=
${
PROJECT_HOME
}
sbin/
${
APP_NAME
}
chmod
u+x
${
APP_BIN
}
# CMD="nohup ${APP_BIN} ${APP_ARGS} >>${APP_NAME}.nohup.out 2>&1 &"
CMD
=
"
${
APP_BIN
}
"
eval
${
CMD
}
PID
=
`
ps aux |
grep
-w
${
APP_NAME
}
|
grep
-v
grep
|
awk
'{print $2}'
`
if
[[
${
OS_NAME
}
!=
"Linux"
]]
;
then
PID
=
`
ps aux |
grep
-w
${
APP_NAME
}
|
grep
-v
grep
|
awk
'{print $1}'
`
fi
if
[
"
${
PID
}
"
!=
""
]
;
then
for
p
in
${
PID
}
do
echo
"start
${
APP_NAME
}
( pid ="
${
p
}
")"
done
fi
}
stop
()
{
PID
=
`
ps aux |
grep
-w
${
APP_NAME
}
|
grep
-v
grep
|
awk
'{print $2}'
`
if
[[
${
OS_NAME
}
!=
"Linux"
]]
;
then
PID
=
`
ps aux |
grep
-w
${
APP_NAME
}
|
grep
-v
grep
|
awk
'{print $1}'
`
fi
if
[
"
${
PID
}
"
!=
""
]
;
then
for
ps
in
${
PID
}
do
echo
"kill -SIGINT
${
APP_NAME
}
( pid ="
${
ps
}
")"
kill
-2
${
ps
}
done
fi
}
term
()
{
PID
=
`
ps aux |
grep
-w
${
APP_NAME
}
|
grep
-v
grep
|
awk
'{print $2}'
`
if
[[
${
OS_NAME
}
!=
"Linux"
]]
;
then
PID
=
`
ps aux |
grep
-w
${
APP_NAME
}
|
grep
-v
grep
|
awk
'{print $1}'
`
fi
if
[
"
${
PID
}
"
!=
""
]
;
then
for
ps
in
${
PID
}
do
echo
"kill -9
${
APP_NAME
}
( pid ="
${
ps
}
")"
kill
-9
${
ps
}
done
fi
}
list
()
{
PID
=
`
ps aux |
grep
-w
${
APP_NAME
}
|
grep
-v
grep
|
awk
'{printf("%s,%s,%s,%s\n", $1, $2, $9, $10)}'
`
if
[[
${
OS_NAME
}
!=
"Linux"
]]
;
then
PID
=
`
ps aux |
grep
-w
${
APP_NAME
}
|
grep
-v
grep
|
awk
'{printf("%s,%s,%s,%s,%s\n", $1, $4, $6, $7, $8)}'
`
fi
if
[
"
${
PID
}
"
!=
""
]
;
then
echo
"list
${
APP_NAME
}
"
if
[[
${
OS_NAME
}
==
"Linux"
]]
;
then
echo
"index: user, pid, start, duration"
else
echo
"index: PID, WINPID, UID, STIME, COMMAND"
fi
idx
=
0
for
ps
in
${
PID
}
do
echo
"
${
idx
}
:
${
ps
}
"
((
idx ++
))
done
fi
}
opt
=
$1
case
C
"
$opt
"
in
Cstart
)
start
;;
Cstop
)
stop
;;
Cterm
)
term
;;
Crestart
)
term
start
;;
Clist
)
list
;;
C
*
)
usage
;;
esac
echo/client/target/windows/echo_client-0.3.04-20160910-1539-test/conf/config.toml
deleted
100644 → 0
View file @
884e61cc
# toml configure file
# toml中key的首字母可以小写,但是对应的golang中的struct成员首字母必须大写
# host
LocalHost
=
"127.0.0.1"
# server
ServerHost
=
"192.168.35.1"
ServerPort
=
10000
ProfilePort
=
10080
# connection pool
# 连接池连接数目
ConnectionNum
=
2
# 当连接失败或者连接断开时,连接池中重连的间隔时间
ConnectInterval
=
"5s"
# session
# client与server之间连接的心跳周期
HeartbeatPeriod
=
"10s"
# client与server之间连接的超时时间
SessionTimeout
=
"20s"
# client
# client echo request string
EchoString
=
"Hello, getty!"
# 发送echo请求次数
EchoTimes
=
100000
# app fail fast
FailFastTimeout
=
"3s"
# tcp
[GettySessionParam]
TcpNoDelay
=
true
TcpKeepAlive
=
true
TcpRBufSize
=
262144
TcpWBufSize
=
65536
PkgRQSize
=
512
PkgWQSize
=
256
TcpReadTimeout
=
1e9
TcpWriteTimeout
=
5e9
WaitTimeout
=
1e9
//
1
s
SessionName
=
"echo-client"
echo/client/target/windows/echo_client-0.3.04-20160910-1539-test/sbin/echo_client.exe
deleted
100644 → 0
View file @
884e61cc
File deleted
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment