简单轻量的服务器监测工具Ward

本文最后更新于:2024年6月30日 晚上

又一款服务器监控工具

Ward 是一个简单又简约的服务器监测工具。 Ward 支持适应性设计的系统。 此外,它支持暗色主题。 它只显示了可以使用的主要信息,如果你想看看好看的仪表板,而不是寻找一堆数字和图表。 Ward 可以良好的运行在所有流行的操作系统,因为它使用了 .

安装方法参考项目说明

Create your own .jar

• Clone the project
• Import project in your IDE as Maven project
• Run command mvn clean package

Run .jar file

• Download latest .jar from releases section
• Execute jar on Windows or Linux with administrative rights
• Enter localhost:4000 and set up application

再附上一份 jar 包运行控制脚本

startjar.shview raw
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
cd `dirname $0`

# Your jar package
APP_NAME=myapp.jar
# Optional
JVM="-Dfile.encoding=utf-8 -server -Xmx1g"
ARGS="--spring.profiles.active=dev --server.port=8080"
LOG_FILE=running.log

help(){
echo "Usage: [start|stop|restart|status]"
exit 1
}

is_exist(){
pid=`ps -ef|grep $APP_NAME|grep -v grep|awk '{print $2}'`
# if progress is exist then return 1,else return 0
if [ -z "${pid}" ]; then
return 1
else
return 0
fi
}

start(){
is_exist
if [ $? -eq 0 ]; then
echo "${APP_NAME} is already running. pid=${pid}"
else
nohup java ${JVM} -jar ./${APP_NAME} ${ARGS} > ${LOG_FILE} 2>&1 &
echo "${APP_NAME} is start successfully, use 'log' option to print more info."
fi
}

stop(){
is_exist
if [ $? -eq "0" ]; then
kill -9 $pid
echo "${APP_NAME} is stoped"
else
echo "${APP_NAME} is not running"
fi
}

status(){
is_exist
if [ $? -eq "0" ]; then
echo "${APP_NAME} is running. Pid is ${pid}"
else
echo "${APP_NAME} is NOT running."
fi
}

restart(){
stop
sleep 2
start
}

log(){
tail -n 100 -f server.log
}

case "$1" in
"start")
start
;;
"stop")
stop
;;
"status")
status
;;
"restart")
restart
;;
"log")
log
;;
*)
help
;;
esac

简单轻量的服务器监测工具Ward
https://blog.doracoin.cc/posts/days/57857.html
作者
Doracoin
发布于
2023年8月3日
更新于
2024年6月30日
许可协议