未归档笔记

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命令配置`


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值