1. CPU高不等于load高,load高不等于CPU高,怎么解释?
load的就是一定时间内计算机有多少个active_tasks,也就是说是计算机的任务执行队列的长度,cpu计算的队列。
当有多个task处于I/O等待状态时,可能出现task任务过多,load高,而CPU不高;
当I/O状态的task很少,大部分都是耗CPU的task,就可能出现CPU高,而load不高
2. .What is a login or non-login shell?
When you login (eg: type username and password) via console, either physically sitting
at the machine when booting, or remotely via ssh:
.bash_profile is executed to configure things before the initial command prompt.
But, if you've already logged into your machine and open a new terminal window (xterm) inside Gnome or KDE,
then .bashrc is executed before the window command prompt. .bashrc is also run
when you start a new bash instance by typing /bin/bash in a terminal.
故:
- 查看当前用户loing shell `echo /etc/passwd grep tiemei`
- login shell方式进入shell,执行`~/.bash_profile`,不存在,执行`~/.profile`
- 如果non-login shell方式登入shell,执行`~/.bashrc`
- 不同的登录方式,执行的文件并不相同。当然,.bash_profile默认也会调用执行.bashrc
- 如果我用的笔记本是Ubuntu 12.04,我打开gnome的terminal,是以non-login shell方式,执行.bashrc文件;
- 如果我通过putty连接远程的linux主机,执行.bash_profile文件
参考:
[Difference between .bashrc and .bash_profile](http://superuser.com/questions/183870/difference-between-bashrc-and-bash-profile/183980#183980)
3. linux目录结构
/proc
/proc/cpuinfo `cpu信息(几个cpu,都怎样)`
/etc
/etc/wgetrc
/home
/home/tiemei/.wgetrc `wget命令配置`