Chinaunix首页 | 论坛 | 博客
  • 博客访问: 285227
  • 博文数量: 81
  • 博客积分: 2098
  • 博客等级: 大尉
  • 技术积分: 955
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-24 14:29
文章分类

全部博文(81)

文章存档

2012年(2)

2011年(1)

2010年(20)

2009年(20)

2008年(38)

我的朋友

分类: LINUX

2008-12-18 10:29:22

  一 系统性能监测
 
性能监测,主要包括对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 可以按时间对连接进行分类
阅读(540) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~