chore: initial commit

This commit is contained in:
你的用户名
2025-11-01 21:58:31 +08:00
commit 0406b5664f
101 changed files with 20458 additions and 0 deletions

30
view_stats.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
# 机器人统计查看脚本
echo "=========================================="
echo "📊 机器人使用统计"
echo "=========================================="
echo ""
echo "1⃣ 访问用户列表:"
grep -oE "用户 [0-9]+" logs/*.log 2>/dev/null | grep -oE "[0-9]+" | sort -u | nl
echo ""
echo "2⃣ 最近20条用户活动"
grep -E "用户 [0-9]+|新用户访问" logs/integrated_bot_detailed.log 2>/dev/null | tail -20
echo ""
echo "3⃣ 今日搜索统计:"
today=$(date +%Y-%m-%d)
grep "$today" logs/*.log 2>/dev/null | grep -c "镜像.*已转发" || echo "0"
echo ""
echo "4⃣ 缓存统计:"
sqlite3 cache.db "SELECT COUNT(*) FROM cache;" 2>/dev/null || echo "无缓存数据"
echo ""
echo "5⃣ 机器人运行时长:"
ps -p $(pgrep -f integrated_bot_ai.py) -o etime= 2>/dev/null || echo "未运行"
echo ""
echo "=========================================="