linux系统监测与维护,linux系统性能维护

一 系统性能监测

性能监测,主要包括对cpu使用率,内存使用率,磁盘空间,系统负载的查询与检测

1 查看系统内核信息   cd /proc

ls

2 查看进程的信息   ps aux | grep 进程名

3 查询cpu信息

cpuinfo  处理器的信息                            cat cpuinfo

interrupts   可以查看当前系统使用的中断号          cat  interrupts

filesystems文件 当前系统支持的文件系统类型          cat filesystems

meminfo     内存使用情况     eg  查询内存使用情况  cat meminfo

uptime  系统运行的时间        eg                  uptime

4 系统模块信息   查看系统当前加载了哪些模块            cat modules

5 查看系统的版本信息  cat version   or     uname -a

6 查看系统分区       cat partitions

[root@localhost proc]# cat partitions

major minor  #blocks  name

3    64   15007608 hdb

3    65     200781 hdb1

3    66    1020127 hdb2

3    67   10233405 hdb3

3    68     297202 hdb4

[root@localhost proc]#

二  用户统计

1 who  显示当前有哪些用户在系统中

[root@localhost proc]# who

root     pts/1        2008-12-18 18:23 (ist03-hf.agbnielsen.org)

root     pts/2        2008-12-18 18:24 (ist03-hf.agbnielsen.org)

2 w   和 w 指定用户(eg w root)

[root@localhost proc]# w

19:21:47 up 8 days,  1:30,  2 users,  load average: 0.00, 0.00, 0.00

USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT

root     pts/1    ist03-hf.agbniel 18:23   57:21   0.01s  0.00s mysql -h localh

root     pts/2    ist03-hf.agbniel 18:24    0.00s  0.01s  0.00s w

You have new mail in /var/spool/mail/root

[root@localhost proc]# w root

19:22:59 up 8 days,  1:31,  2 users,  load average: 0.00, 0.00, 0.00

USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT

root     pts/1    ist03-hf.agbniel 18:23   58:33   0.01s  0.00s mysql -h localh

root     pts/2    ist03-hf.agbniel 18:24    0.00s  0.01s  0.00s w root

[root@localhost proc]#

3 last  可以查看最近有哪些用户使用过系统

4 ac 查看系统总的连接时间  默认时间为h

ac -p 可以列出所有用户的连接时间

ac -d 可以按时间对连接进行分类

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值