Compare commits
3 Commits
09f73bb770
...
21f481076c
Author | SHA1 | Date | |
---|---|---|---|
21f481076c | |||
fc60587252 | |||
d1afa8e0ad |
@ -19,6 +19,7 @@ cp -rf /root/.ssh/config /opt/configs/conf/
|
||||
cp -rf /etc/samba/smb.conf /opt/configs/conf/
|
||||
cp -rf /etc/network/interfaces /opt/configs/conf/
|
||||
cp -rf /root/.acme.sh/*ecc /opt/configs/acme/
|
||||
cp -rf /root/.acme.sh/rustle.cc_ecc/rustle.cc.{key,cer} /opt/apps/syncthing/data/common/A_Program/nginx-1.24.0/certs/
|
||||
cp -rf /opt/apps/syncthing/data/common/A_Program/FRP/* /opt/apps/frp/frpc-xtcp-visitor/
|
||||
|
||||
cd /opt && t=`date +%Y%m%dT%H%M%S`
|
||||
|
41
update/chatbot_suqian.sh
Normal file
41
update/chatbot_suqian.sh
Normal file
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
function sendMsg() {
|
||||
|
||||
# 个人测试
|
||||
# curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ddea3f5f-fbfc-4c21-994a-71e9fc50e4ef' \
|
||||
# -H 'Content-Type: application/json' \
|
||||
# -d '
|
||||
# {
|
||||
# "msgtype": "markdown",
|
||||
# "markdown": {
|
||||
# "content": "**'"$alarmTitle"'**\n
|
||||
# > <font color=\"warning\">'"$alarmInfo"'</font>"
|
||||
# }
|
||||
# }' > /dev/null 2>&1
|
||||
|
||||
# 群hook
|
||||
curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=924c62e3-1bb8-4d17-84b1-e543eb27ba1e' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '
|
||||
{
|
||||
"msgtype": "text",
|
||||
"text": {
|
||||
"content": "'"$alarmTitle"':\n'"$alarmInfo"'",
|
||||
"mentioned_list":["@all"]
|
||||
}
|
||||
}' > /dev/null 2>&1
|
||||
}
|
||||
|
||||
|
||||
isFriday=$(date +%A)
|
||||
time_opt=$1
|
||||
alarmTitle="每日/周工作记录提醒"
|
||||
|
||||
if [[ $isFriday == 'Friday' ]]; then
|
||||
alarmInfo='周五了[庆祝][庆祝][庆祝],请各位及时填写周报,感谢大家本周的辛苦付出,别忘了还有今日工作内容安排记录,以及问题进展跟新~~~'
|
||||
else
|
||||
alarmInfo='大家记得写每日工作内容安排,上午10点之前写完,工作期间可以补充内容,下班前17点左右完善一下,争取日事日毕~[拳头][拳头][拳头]\n有事没事找找客户经理,发个信息啥的也可~~\n客户走访记录,问题解决以及客户经理需求记录,也要记得跟进更新闭环~~~'
|
||||
fi
|
||||
|
||||
sendMsg $alarmTitle $alarmInfo
|
@ -11,7 +11,7 @@ done
|
||||
|
||||
fmt="%-9s%-9s\033[1;34m%-6s\033[0m%-6s%-8s%-10s\n"
|
||||
awk -v fmt=$fmt 'BEGIN{printf fmt, "PID","PPID","%CPU","%MEM","RSS","COMM"}' > /tmp/cpu.top
|
||||
ps -eo pid,ppid,pcpu,pmem,rss,comm | sort -nrk 3 | grep -Ev "grep|ps" | head -n 20 | awk -v fmt=$fmt '{printf fmt, $1,$2,$3,$4,int($5/1024)"M",$6}' >> /tmp/cpu.top
|
||||
ps -eo pid,ppid,pcpu,pmem,rss,comm | sort -nrk 3 | grep -Ev "grep|ps|utool" | head -n 20 | awk -v fmt=$fmt '{printf fmt, $1,$2,$3,$4,int($5/1024)"M",$6}' >> /tmp/cpu.top
|
||||
|
||||
paste /tmp/mem.top /tmp/deli.top /tmp/cpu.top | column -t
|
||||
rm -rf /tmp/{mem.top,cpu.top,deli.top}
|
||||
|
Loading…
x
Reference in New Issue
Block a user