- 10
- 0
- 约 16页
- 2017-10-07 发布于河南
- 举报
系统日志的管理(linux)(System log management (Linux))
系统日志的管理(linux)(System log management (Linux))
Linux system log management
Log classification:
1. log of connection time
The connection time log is usually recorded by the two files, /var/log/wtmp and /var/run/utmp, but this
The two file cannot be viewed directly by cat, and the file is automatically updated by the system, as follows:
W/who/finger/id/last/lastlog/ac for review
[root@xhot who ~]#
Root tty1 2010-10-06 22:56
Root pts/0 2010-10-06, 22:26 ()
Root pts/1 2010-10-06, 23:41 ()
Root pts/3 2010-10-06, 23:18 ()
[root@xhot w ~]#
01:01:02, up, 2:36, 4, users, load, average: 0.15, 0.03, 0.01
USER, TTY, FROM, LOGIN@, IDLE, JCPU, PCPU, WHAT
Root tty1 - 22:56, 1:20m, 0.16s, 0.16s, -bash
Root, pts/0, , 22:26, 2:05m, 0.18s, 0.18s, -bash
Root, pts/1, , 23:41, 0.00s, 0.41s, 0.00s, w
Root, pts/3, , 23:18, 1:38m, 0.03s, 0.03s, -bash
[root@xhot AC -p / / ~]# connection time view each user
U51 1.23
U55 0.04
Root 95.21 / root connection can be seen for the longest time.
Xhot 0.06
User1 3.93
Total 100.48
[root@xhot -a / / AC connection time ~]# view all users
Total 100.49
[root@xhot -d / / AC connection time ~]# view user every day
Sep 24 total 0.14
Sep 25 total 14.60
Sep 26 total 13.71
Sep 27 total 21.47
Sep 28 total 11.74
Sep 29 total 6.60
Sep 30 total 8.81
Oct 1 total 9.04
Oct 2 total 0.47 / / I can see 3, 4, 5, the national day to go out to play
Oct 6 total 8.62
Today total 5.29
Several other orders are not specifically introduced
2. process monitoring log
The process statistics monitor log is very effective in monitoring users operation instructions. When servers are discovered recently, often
You can use the process statistics log to log off without any reason to shutdown or delete files without reason:
[root@xhot Accton /var/account/pacct / / ~]# open process log monitoring statistics
[root@xhot lastcomm / / ~]# view process log statistics
Accton, S, root, pts/1, 0, secs, Thu, Oct, 7, 01:20
Accton, root, pts/1 0, secs, Thu, Oct, 7, 01:20
AC, root, pts/1 0, secs, Thu, Oct
您可能关注的文档
- 用户信息反馈讨论(User information feedback discussion).doc
- 用水总量控制管理办法(Measures for the control and control of total water consumption).doc
- 用流利的英语介绍中国的特色(Introduce Chinese characteristics in fluent English).doc
- 用爱诠释教育(Interpreting education with love).doc
- 用电检查题库(Electricity examination question bank).doc
- 用知识武装自己的计算机(Arm yourself with knowledge of your computer).doc
- 用单片机做智能台灯(Using singlechip to make intelligent desk lamp).doc
- 用经济学原理分析身边的现象(Analyze the phenomena around you with the principle of Economics).doc
- 用移动硬盘装系统(俩种理解)(Use mobile hard disk to install system (two kinds of understanding)).doc
- 用能单位能源审计规范(Energy unit audit standards).doc
- 某镇领导班子2025年度民主生活会对照检查材料.docx
- 高级中学党政办公室主任2025年度述职述廉报告.docx
- 在镇“锤炼作风提效能,凝心聚力建新功”主题春训活动动员部署会上的讲话.docx
- 在2026年春季开学教职工会议上的讲话.docx
- 公司党支部2025年度组织生活会对照检查材料.docx
- 在树立和践行正确政绩观学习教育动员部署会议上的讲话.docx
- 专题党课:筑牢作风“防火墙” 展现司法新担当.docx
- 在树立和践行正确政绩观学习教育专题研讨会上的发言材料.docx
- 在公司2026年度党建暨党风廉政大会上的讲话.docx
- 在县委党的建设工作领导小组会议上关于开展树立和践行正确政绩观学习教育部署工作的讲话.docx
原创力文档

文档评论(0)