فهرست منبع

chore: 添加监控打开文件脚本

weijianghai 2 سال پیش
والد
کامیت
feeb39d035
2فایلهای تغییر یافته به همراه12 افزوده شده و 0 حذف شده
  1. 5 0
      build-dir/stopWatch.sh
  2. 7 0
      build-dir/watchPm5gOpenFile.sh

+ 5 - 0
build-dir/stopWatch.sh

@@ -0,0 +1,5 @@
+#!/bin/bash
+
+for i in $(pgrep -f watchPm5gOpenFile.sh); do
+  kill -9 "$i"
+done

+ 7 - 0
build-dir/watchPm5gOpenFile.sh

@@ -0,0 +1,7 @@
+#!/bin/bash
+
+# 监控pm5g打开文件
+while true; do
+  sleep 1
+  date +'%Y-%m-%d %H:%M:%S' >>watch.log && lsof -p "$(pgrep -f pmInterface5g.jar)" | wc -l >>watch.log
+done &