mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-04-25 20:10:42 +00:00
~统一缩进
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
|
||||
running_status(){
|
||||
VmRSS=$(awk '/^VmRSS:/ {printf "%.2f MB\n", ($2 * 1024) / 1000000}' /proc/$PID/status)
|
||||
#获取运行时长
|
||||
touch "$TMPDIR"/crash_start_time #用于延迟启动的校验
|
||||
start_time=$(cat "$TMPDIR"/crash_start_time)
|
||||
if [ -n "$start_time" ]; then
|
||||
time=$(($(date +%s) - start_time))
|
||||
day=$((time / 86400))
|
||||
[ "$day" = "0" ] && day='' || day="$dayD"
|
||||
time=$(date -u -d @${time} +%H:%M:%S)
|
||||
fi
|
||||
VmRSS=$(awk '/^VmRSS:/ {printf "%.2f MB\n", ($2 * 1024) / 1000000}' /proc/$PID/status)
|
||||
#获取运行时长
|
||||
touch "$TMPDIR"/crash_start_time #用于延迟启动的校验
|
||||
start_time=$(cat "$TMPDIR"/crash_start_time)
|
||||
if [ -n "$start_time" ]; then
|
||||
time=$(($(date +%s) - start_time))
|
||||
day=$((time / 86400))
|
||||
[ "$day" = "0" ] && day='' || day="$dayD"
|
||||
time=$(date -u -d @${time} +%H:%M:%S)
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user