免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 606 | 回复: 0
打印 上一主题 下一主题

linux_admin [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-24 20:28 |只看该作者 |倒序浏览
1.Monitoring the system
pstree  Processes and parent-child relationships
top     Show top processes
iostat  Report CPU statistics and input/output statistics for devices and partitions.
ps -auxw  process status
uname -a  print system information
cat /proc/version  Display Linux kernel version in use.
cat /etc/redhat-release  Display Red Hat Linux Release. (also /etc/issue)
uptime  Tell how long the system has been running. Also number of users and system's load average.
w  Show who is logged on and what they are doing.
/sbin/lsmod  List all currently loaded kernel modules.
Same as cat /proc/modules
/sbin/runlevel  Displays the system's current runlevel.
hostname  Displays/changes the system's node name. (Must also manually change hostname setting in /etc/sysconfig/network. Command will change entry in /etc/hosts)
service Red Hat/Fedora command to display status of system services.
Example: service --status-all
Help: service --help

2.Memory Usage
vmstat  Monitor virtual memory
free  Display amount of free and used memory in the system. (Also: cat /proc/meminfo)
pmap  Display/examine memory map and libraries (so). Usage: pmap pid
top  Show top processes
sar -B Show statistics on page swapping.
time -v date  Show system page size, page faults, etc of a process during execution. Note you must fully qualify the command as "/usr/bin/time" to avoid using the bash shell command "time".
cat /proc/sys/vm/freepages Display virtual memory "free pages".
One may increase/decrease this limit: echo 300 400 500 > /proc/sys/vm/freepages
cat /proc/meminfo  Show memory size and usage.
3.User Info:
Commands:
who  Displays currently logged in users.
Use who -uH for idle time and terminal info.
users  Show all users logged in.  
w  Displays currently logged in users and processes they are running.  
whoami  Displays user id.
groups  Display groups you are part of.
Use groups user-id to display groups for a given user.  
set  Display all environment variables in your current environment.  
id  Display user and all group ids.
Use id user-id to display info for another user id.
last  Listing of most recent logins by users. Show where from, date and time of login (ftp, ssh, ...) Also see lastlog command.
Show last 100 logins: last -100
history  Shell command to display previously entered commands.  


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/1073/showart_449357.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP