translated

This commit is contained in:
child 2013-11-19 15:11:46 +08:00
commit cf41d1e76e
26 changed files with 1096 additions and 358 deletions

View File

@ -1,14 +1,14 @@
10年 Xen从恐龙进化到鸟类
Xen的十年:从恐龙进化到鸟类
================================================================================
Xen Hypervisor 项目原来是上世纪90年代末[剑桥大学][1] [Xenoserver][2] 项目的子项目。Xenoserver 有一个宏大的目标
Xen Hypervisor 项目原来是上世纪90年代末[剑桥大学][1] [Xenoserver][2] 项目的子项目。Xenoserver 有一个宏大的目标
这个宏大目标就是建立一个大规模的分布式计算系统的公共基础框架。想像一下,当 Xenoserver 执行平台布署在全世界范围内,所有人都可以共享可执行代码,代码贡献者可以按代码被执行时产生的硬件消耗收取一定的费用。这将会鼓励负载均衡、消除单点瓶颈,甚至可以在这个平台上实现营利。
在今天,这种模式被称为“云计算”。而 Xen Hypervisor (确切来说是现在的 Xen Hypervisor是最大的云平台。不仅亚马逊 Web 服务AWS和 Rackspace 公有云是基于 Xen 的,就连最近的大规模云平台[Verizon公有云][3]也将 Xen 作为他们的服务供应
在今天,这种模式被称为“云计算”。而 Xen Hypervisor (确切来说是现在的 Xen Hypervisor是最大的云平台。不仅亚马逊 Web 服务AWS和 Rackspace 公有云是基于 Xen 的,就连最近的大规模云平台[Verizon公有云][3]也将 Xen 作为他们的服务供应基础
### 10周岁生日快乐 ###
2003年10月21日Xen Hypervisor 在[第19届 ACM 计算机原理研讨会][4]上作为一个开源项目首次出现在大众眼前。距今刚好过10年在这里祝 Xen 项目生日快乐!
2003年10月21日Xen Hypervisor 在[第19届 ACM 计算机原理研讨会][4]上作为一个开源项目首次出现在大众眼前。距今已经10年在这里祝 Xen 项目生日快乐!
### 业界第一的劣势:像恐龙一样,不适者淘汰 ###
@ -18,7 +18,7 @@ Xen Hypervisor 项目原来是上世纪90年代末[剑桥大学][1] [Xenoserver]
### 快速转型:从恐龙进化到鸟类 ###
像 Xen 一样能够从众多错误中回过神来的开源项目并不多,而 Xen 通过一系列措施做到了这一点。提出有效的管理方法、努力与其他开源项目合作、重启市场营销力量、踏踏实实与用户和开发者一起工作,这些努力终于让 Xen 获得新生。换句话说Xen 已经完成从恐龙到鸟类的进化。如果你想知道我们是如何做到这点的,何不加入到我的 Linux 大会欧洲站的课题[Xen 项目:收获的教训][5]?其他你可能感兴趣的课题有[加强你的 Xen 云的安全][6]和[Xen专为云设计的开源虚拟机管理程序][7]。
像 Xen 一样能够从众多错误中回过神来的开源项目并不多,而 Xen 通过一系列措施做到了这一点。提出有效的管理方法、努力与其他开源项目合作、重启市场营销力量、踏踏实实与用户和开发者一起工作,这些努力终于让 Xen 获得新生。换句话说Xen 已经完成从恐龙到鸟类的进化。如果你想知道我们是如何做到这点的,何不加入到我的 Linux 大会欧洲站的课题[Xen 项目:收获的教训][5]?其他你可能感兴趣的课题有[加强你的 Xen 云的安全][6]和[Xen专为云设计的开源虚拟机管理程序][7]。
![](http://www.linux.com/images/stories/41373/Xen-flying-Panda.jpg)
@ -36,7 +36,7 @@ Xen Hypervisor 项目原来是上世纪90年代末[剑桥大学][1] [Xenoserver]
via: http://www.linux.com/news/enterprise/cloud-computing/743330-10-years-of-xen-transforming-a-dinosaur-into-a-bird/
译者:[bazz2](https://github.com/bazz2) 校对:[校对者ID](https://github.com/校对者ID)
译者:[bazz2](https://github.com/bazz2) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -7,7 +7,7 @@
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/10/linux_accessing_cloud_ubuntu_one.jpg)
使用这种方式的明显好处就是你可以通过使用他们各自的官方应用访问你的各种云存储。目前提供官方Linux客户端的服务提供商有[SpiderOak](1), [Dropbox](2), [Ubuntu One](3),[Copy](5)。[Ubuntu One](3)虽不出名但的确是[一个不错的云存储竞争着](4)。[Copy][5]是提供比Dropbox更多空间是[Dropbox的替代选择](6)。使用这些官方Linux客户端可以保持你的电脑与他们的服务器之间的通信还可以让你进行属性设置如选择性同步。
使用这种方式的明显好处就是你可以通过使用他们各自的官方应用访问你的各种云存储。目前提供官方Linux客户端的服务提供商有[SpiderOak](1), [Dropbox](2), [Ubuntu One](3),[Copy](5)。[Ubuntu One](3)虽不出名但的确是[一个不错的云存储竞争着](4)。[Copy][5]则提供比Dropbox更多的空间是[Dropbox的替代选择之一](6)。使用这些官方Linux客户端可以保持你的电脑与他们的服务器之间的通信还可以让你进行属性设置如选择性同步。
对于普通桌面用户使用官方客户端是最好的选择因为官方客户端可以提供最多的功能和最好的兼容性。使用它们也很简单只需要下载他们对应你的发行版的软件包然后安装安装完后在运行一下就Ok了。安装客户端时它一般会指导你完成这些简单的过程。
@ -27,7 +27,7 @@
这些一旦完成,你就可以这个脚本执行各种任务了,例如上传、下载、删除、移动、复制、创建文件夹、查看文件、共享文件、查看文件信息和取消共享。对于全部的语法解释,你可以查看一下[这个页面](9)。
###[Storage Made Easy](7)将SkyDrive带到Linux上
###通过[Storage Made Easy](7)将SkyDrive带到Linux上
微软并没有提供SkyDrive的官方Linux客户端这一点也不令人惊讶。但是你并不意味着你不能在Linux上访问SkyDrive记住SkyDrive的web版本是可用的。
@ -35,11 +35,11 @@
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/10/linux_accessing_cloud_configure_skydrive.jpg)
为了使用Stroage Made Easy你首先需要创建一个他们的账号。完成账号创建后你需要回到控制界面选择“Add a Cloud Provider”。在这儿你可以选择SkyDrive API 然后填入登陆信息。添加完登陆信息后点击授权按钮以便给予必要的授权。然后你就可以下载它的Linux客户端并安装它了。
为了使用Stroage Made Easy你首先需要创建一个他们的账号。完成账号创建后你需要回到控制界面选择“Add a Cloud Provider”。在这儿你可以选择SkyDrive API 然后填入登录信息。添加完登录信息后点击授权按钮以便给予必要的授权。然后你就可以下载它的Linux客户端并安装它了。
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/10/linux_accessing_cloud_storagemadeeasy.jpg)
第一次启动时。它会要求你登还有询问你要把云存储挂载到什么地方。在你做完了这些后你就可以浏览你选择的文件夹你还可以访问你的Storage Made Easy空间以及你的SkyDrive空间了!这种方法对于那些想在Linux上使用SkyDrive的人来说非常好对于想把他们的多个云存储服务整合到一个地方的人来说也很不错。这种方法的缺点是你无法使用他们各自官方客户端中可以使用的特殊功能。
第一次启动时。它会要求你登还有询问你要把云存储挂载到什么地方。在你做完了这些后你就可以浏览你选择的文件夹你还可以访问你的Storage Made Easy空间以及你的SkyDrive空间了这种方法对于那些想在Linux上使用SkyDrive的人来说非常好对于想把他们的多个云存储服务整合到一个地方的人来说也很不错。这种方法的缺点是你无法使用他们各自官方客户端中可以使用的特殊功能。
因为现在在你的Linux桌面上也可以使用SkyDrive接下来你可能需要阅读一下我写的[SkyDrive与Google Drive的比较](8)以便于知道究竟哪种更适合于你。

View File

@ -1,7 +1,7 @@
如何在linux上通过GRUB添加内核参数
================================================================================
我们可以在linux内核启动时为其提供各种各样的参数。这些参数可以自定义内核默认的行为或者通知内核关于硬件的配置信息。内核参数应在内核启动时通过引导装载程序如GRUB或LILO传递给内核。
我们可以在linux内核启动时为其提供各种各样的参数。这些参数可以自定义内核默认的行为或者通知内核关于硬件的配置信息。内核参数应在内核启动时通过引导装载程序如GRUB或LILO传递给内核。
在本教程中,我将会描述**如何在linux上通过GRUB添加内核参数**。
@ -9,11 +9,11 @@
### 在Debian或Ubuntu上添加内核启动参数###
在基于Debian的系统上如果你想在系统启动时添加内核参数你可以编辑 /etc/default/grub 目录下的GRUB配置模板。在 GRUB_CMDLINE_LINUX_DEFAULT 变量中以 “name=value” 的格式添加内核参数。
在基于Debian的系统上如果你想在系统启动时添加内核参数你可以编辑 /etc/default/grub 目录下的GRUB配置模板。在 GRUB\_CMDLINE\_LINUX\_DEFAULT 变量中以 “name=value” 的格式添加内核参数。
$ sudo -e /etc/default/grub
> GRUB_CMDLINE_LINUX_DEFAULT="...... name=value"
> GRUB\_CMDLINE\_LINUX\_DEFAULT="...... name=value"
然后运行下面的命令来生成一个GRUB的配置文件。
@ -25,11 +25,11 @@
### 在Fedora上添加内核启动参数 ###
在Fedora上想要在启动时添加内核参数你可以编辑 /etc/default/grub目录下的 GRUB 配置模板。在 GRUB_CMDLINE_LINUX 变量中以 “name=value” 的格式添加内核参数。
在Fedora上想要在启动时添加内核参数你可以编辑 /etc/default/grub目录下的 GRUB 配置模板。在 GRUB\_CMDLINE\_LINUX 变量中以 “name=value” 的格式添加内核参数。
$ sudo -e /etc/default/grub
> GRUB_CMDLINE_LINUX="...... name=value"
> GRUB\_CMDLINE\_LINUX="...... name=value"
然后运行下面的命令生成 GRUB2 配置文件。
@ -47,7 +47,7 @@
via: http://xmodulo.com/2013/11/add-kernel-boot-parameters-via-grub-linux.html
译者:[Linchenguang](https://github.com/Linchenguang) 校对:[校对者ID](https://github.com/校对者ID)
译者:[Linchenguang](https://github.com/Linchenguang) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,8 +1,8 @@
让Linux更友好
让Linux更加可用Accessibility
================================================================================
一个令人吃惊的事实是,多于十亿人多多少少有着某种程度的残疾。就是说全球大约15%的人在生理上、感知上、心智上有缺陷,导致他们难以活动、看和听,以及学习。世界上3.5亿人有不同程度的视觉障碍。计算机技术发展地越快,这些人就越会被疏远,除非计算机软件的开发可以满足他们的需求。
一个令人吃惊的事实是,至少十亿人或多或少有着某种程度的残疾。就是说全球大约15%的人在生理上、感知上、心智上会有缺陷,导致他们难以活动、观看、收听以及学习。世界上3.5亿人有不同程度的视觉障碍。计算机技术发展地越快,这些人就越会被疏远,除非计算机软件的开发可以满足他们的需求。
可用性是表示一个产品、设备、服务或者环境在不考虑具体细节的情况下能被多少人使用的程度。可用性可以被看作接触和利用一个系统或者实体的能力。可用性至关重要社会和谐不是一个慈善行动,而是人类基本的权利。
可用性是表示一个产品、设备、服务或者环境在不考虑具体细节的情况下能被多少人使用的程度。可用性可以被看作接触和利用一个系统或者实体的能力。可用性至关重要社会和谐不是一个慈善行动,而是人类基本的权利。
我们见证了Linux软件和发行版本在使每个人融入社会方面做的突出贡献。举个例子来说GNOME Accessibility Project 为图形界面用户开发了开源的可用性解决方案。Ubuntu有一个可用性团队致力于使Ubuntu能被更广范围的人使用。不得不提的是Vinux Project一个基于Ubuntu的发行版本针对失明和视力有障碍的用户进行了优化。
@ -13,20 +13,20 @@
### 通用辅助 ###
- [Easystroke][1] Gesture recognition program
- [Simon][2] Flexible speech recognition software
- [Orca Screen Reader][3] Scriptable screen reader
- [Julius][4] Two-pass large vocabulary continuous speech recognition engine
- [Florence Virtual Keyboard][5] Extensible scalable virtual keyboard
- [Caribou][6] Configurable on screen keyboard with scanning mode
- [Dasher][7] Graphical predictive text input system
- [xvkbd][8] Virtual (graphical) keyboard program
- [Easystroke][1] 笔画识别软件
- [Simon][2] 灵活的语音识别软件
- [Orca Screen Reader][3] 可编程的屏幕阅读器
- [Julius][4] Two-pass策略的大词汇持续语音识别引擎
- [Florence Virtual Keyboard][5] 扩展的可伸缩虚拟键盘
- [Caribou][6] 可配置的带有扫描模式的屏幕键盘
- [Dasher][7] 图形化的预测文本输入系统
- [xvkbd][8] 虚拟(图形)键盘系统
--------------------------------------------------------------------------------
via: http://www.linuxlinks.com/article/20131109042823957/UniversalAccess.html
译者:[boredivan](https://github.com/boredivan) 校对:[校对者ID](https://github.com/校对者ID)
译者:[boredivan](https://github.com/boredivan) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,35 @@
米科·哈普宁:开源软件将使世界更安全
================================================================================
安全专家米科·哈普宁(Mikko Hypponen)于上周在爱丁堡举行的[LinuxCon and CloudOpen Europe][1]会议上的主题演讲中说:“开源软件可以作为一个方法来打击全球监视无辜居民的行为。”
![](http://www.linux.com/images/stories/41373/Mikko-Hypponen-3.jpg)
*米科·哈普宁芬兰F-Secure的首席研究员在爱丁堡举行的LinuxCon and CloudOpen Europe 2013会议上讲话。*
计算和全球网络增加的进步使得存储和传输数据变得便宜且简单。哈普宁说这创造了无比的连通性、进步和创新但是同样使得大规模的数据被访问到就像NSA的棱镜项目揭示的那样这事件随着前美国政府员工爱德华·斯诺登(Edward Snowden)泄漏的一系列顶级机密文件而公开。
哈普宁芬兰F-Secure的首席研究员说“前几年我们已经意识到数据是廉价的。我们永远不必再删除任何数据。这促成了很多伟大的事情但同样也引发了大规模地毯式的监视。”
哈普宁说:“这些监视会访问我们的个人数据,包括电话记录、地理位置、电子邮件和搜索引擎请求,有些可能是被授权的。”
他说:“我相信一些监控是好的。如果有一项研究来找出校园枪击者或者毒枭或者恐怖组织成员等等,我们应该已经有技术手段这么做,但是我们首先必须持有怀疑。”
哈普宁说:“但是收集通信和每个人的个人数据不仅是对隐私的侵犯,还是对民主的威胁。”
他说“即使你如今对政府的行为认可但是我们不知道政府会在今后的20年怎么样。如果他们有你20年的搜索数据他们会找出一些非法的或者令人尴尬的理由来扭曲你的手。”
哈普宁说“虽然泄漏事件使得一些IT专家质疑他们的数据存储的安全性和经由美国服务商的的路由但绕开这些公司和服务不能解决问题。同样不能每个国家都花费和金钱来建造他们自己的替代品。”
哈普宁说:“要跨越国际边际地工作,开发者应该团结起来建造一个安全和可靠的软件和服务来防止后门篡改和用户隐私。”
他说:“我建议开源软件对这个问题提供一个解决方案。那么国家就不必独自做这件事。这将会变得安全、开放和免费。”
--------------------------------------------------------------------------------
via: http://www.linux.com/news/featured-blogs/200-libby-clark/745585-mikko-hypponen-open-source-software-will-make-the-world-more-secure
译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://events.linuxfoundation.org/events/linuxcon-europe

View File

@ -0,0 +1,114 @@
戴文的Linux内核专题08 配置内核(5)
================================================================================
Linux内核拥有许多可以配置的特性接下来我们还有许多要配置。
下一个可以配置的特性是x86的随机数生成器(x86 architectural random number generator (ARCH_RANDOM))。记住我们现在配置的是针对AMD64系统的内核代码。这个随机数生成器使用Intel x86的RDRAND指令。这并不通用所以为了一个更轻量的内核我禁用了它。
接着,我们可以启用或者禁用"Supervisor Mode Access Prevention (X86\_SMAP)"。这是Intel处理器使用的安全特性。SMAP在一些条件下只允许内核访问用户空间。这个有助于保护用户空间。如果启用这里有一点性能和内核大小的开销但是开销很小。由于我是用的是AMD系统所以我禁用了这个特性。
开发者可以启用"EFI runtime service support (EFI)"。只有在有EFI固件的系统上启用它。拥有这个特性内核可以使用的EFI服务。EFI是一个操作系统和硬件如何交流的规范所以EFI固件是使用这个规范的硬件代码。因为我没有EFI固件所以我禁用了它。
这是一个应该被启用的有用的安全方式(Enable seccomp to safely compute untrusted bytecode (SECCOMP))。这个安全特性在使用非可信的字节码的数值计算(执行大量计算的软件)中使用。字节码(可移植代码)是一种被解释器有效读取的代码。字节码不是源代码,但它也不是汇编或者二进制代码。非可信的代码是一种可能导致系统/数据损坏的代码。可能会破坏系统或者毁坏数据的非可信的代码通过seccomp被隔离在独立的地址空间中。这是通过文件描述符传输的方法。通常上最好启用这个安全特性即使会有一些性能开销除非你在制作一个需要榨干性能的内核。
这里是另外一个安全特性(Enable -fstack-protector buffer overflow detection (CC\_STACKPROTECTOR))。缓冲溢出是数据被写在超出了它的内存界限而进入了邻近的内存中。这是一个安全威胁。一些恶意软件使用缓冲区溢出来破坏系统。启用这个会使用GCC选项 "-fstack-protector"。GCC是一个Linux编译器在你配置完成后用它来编译内核。这个编译器参数会在返回地址前在栈上加入一个canary值(特殊的安全代码)。这个值会在返回前被验证。当内存溢出发生时canary值会得到覆盖消息。这时会导致内核崩溃。如许多人知道的那样内核错误意味着系统将要崩溃但是这比系统被入侵或者数据永久损害的好。发生内核错误系统会重启但是如果缓冲溢出则可能导致系统被入侵。一个简单的重启无法修复破坏译注但也不会更坏。你必须用GCC 4.2或者更高版本支持这个参数的GCC来编译内核。
提示:要知道你使用的版本号,在命令行内键入"gcc --version"。
在这之后我们可以配置定时器频率。配置工具建议使用250Hz所以我们使用这个值。
Timer frequency
1\. 100 HZ (HZ\_100)
\>2\. 250 HZ (HZ\_250)
3\. 300 HZ (HZ\_300)
4\. 1000 HZ (HZ\_1000)
choice[1-4?]: 2
使用1000Hz通常来讲对许多系统而言太快了。定时器频率决定着定时器中断被使用的频率。这有助于在时间线上的系统操作。程序并不是随机地执行一条命令相反它们会等到定时器中断结束。这保持着有组织和结构的处理。频率为100Hz的定时器中断之间的时间是10ms250Hz是4ms1000Hz是1ms。现在许多开发者会马上想到1000Hz是最好的。好吧这取决于你对开销的要求。一个更大的定时器频率意味着更多的能源消耗和更多的能源被利用(在定时器上),产生更多的热量。更多的热量意味着硬件损耗的更快。
注意:如果某个特定的特性对你并不重要或者你不确定该选择什么,就使用配置工具选择的默认值。比如,就我现在正在配置的内核而言,使用哪个定时器对我并不重要。总的来说,如果你没有特别的原因去选择任何一个选项时,就使用默认值。
下面这个有趣的系统调用可能会对一些用户有用(kexec system call (KEXEC))。kexec调用会关闭当前内核去启动另外一个或者重启当前内核。硬件并不会关闭并且这个调用可以无需固件的帮助工作。bootloader是不执行的(bootloader是启动操作系统的软件) 。这个重启发生在操作系统级别上而不是硬件上。使用这个系统调用会快于执行一个标准的关机或者重启,这会保持硬件在加电状态。这个系统调用并不能工作在所有系统上。为了更高性能,启用这个热启动功能。
为了使用kexec对重启后要使用的内核使用如下命令替换"<kernel-image>"。同样,使用之前我们讲过的内核参数替换"<command-line-options>" (我会在以后的文章中更深入的讨论。)
kexec -l <kernel-image> --append="<command-line-options>
特别地,我这里输入:
kexec -l /boot/vmlinuz-3.8.0-27-generic append="root=/dev/sda1"
注意硬件有时不需要重置所以这不依赖于kexec。
下面我们有一个适用于kexec的调试特性(kernel crash dumps (CRASH\_DUMP))。当kexec被调用时一个崩溃信息(crash dump)会生成。除非你有必要调试kexec否则这个并不必要。我禁用了这个特性。
再者我们有另外一个kexec特性(kexec jump (KEXEC_JUMP))。kexec跳允许用户在原始内核和kexec启动的内核之间切换。
最好对内核启动地址使用默认值(Physical address where the kernel is loaded (PHYSICAL\_START) [0x1000000])。
下一个内核选项(Build a relocatable kernel (RELOCATABLE))允许内核放在内存的任何地方。内核文件会增大10%但是超出部分会在执行时从内存移除。许多人也许想知道这为什么很重要。在2.6.20内核前,救援内核(rescue kernel)必须被配置和编译运行在不同的内存地址上。当这个特性发明后,开发者不必再编译两个内核。救援内核不会在第一个已加载的内核的地方加载,因为该块内存已被占用或者发生了错误。(如果你正在使用救援内核,那么明显第一个内核发生了错误)
下面这个特性应该在可以增加CPU数量的系统中启用除非你有特别的理由不去这么做(Support for hot-pluggable CPUs (HOTPLUG\_CPU))。配置工具会自动启用这个特性。在这个特性下,你可以在一个拥有很多处理器的系统上激活/停用一个CPU这并不是说在系统中插入新的CPU所有的CPU必须已经安装在系统中。
下面的选项会让我们选择设置上面的特性是否默认启用(Set default setting of cpu0_hotpluggable (BOOTPARAM\_HOTPLUG\_CPU0))。为了性能最好禁用这个特性直到需要的时候。
接着的这个调试特性允许开发者调试CPU热插拔特性(Debug CPU0 hotplug (DEBUG\_HOTPLUG\_CPU0))。我禁用了它。
为了兼容旧版本的glibc(<2.3.3)可以启用这个特性(Compat VDSO support (COMPAT\_VDSO))。这适用于通过映射32位在VDSO(虚拟动态链接共享对象)的旧式地址Glibc是GNC C库这是GNU工程实现的C标准库
如果系统内核被用于一个缺乏完整功能的bootloader上那么启用这个特性(Built-in kernel command line (CMDLINE_BOOL))。这允许用户在内核自身上使用一条命令行译注及其参数那么管理员可以修复内核问题。如果bootloader已经有了一条命令行(像grub),那么这个特性不必启用。
现在我们可以配置ACPI和电源了。首先,我们被要求选择系统是否可以挂起到内存(Suspend to RAM and standby (SUSPEND))。高级配置和电源接口(ACPI)是一种对于设备配置和电源管理的开放标准。挂起系统会将数据放在内存上,同时硬件进入一种低功耗的状态。系统不会完全关机。如果用户需要计算机进入一个低功耗的状态,但是希望保留当前已打开程序时是非常有用的。关闭一个系统会完全关闭系统电源并且清理内存。
下面,我们可以启用睡眠(Hibernation (aka 'suspend to disk') (HIBERNATION))。睡眠就像挂起模式,但是内存中所有数据被保存到硬盘上,并且设备完全关闭。这允许用户在电源恢复后继续使用他们已打开的程序。
这里,我们可以设置默认的恢复分区(Default resume partition (PM\_STD\_PARTITION))。很少有开发者和管理员需要这个特性。当系统从睡眠中恢复时,他会加载默认的恢复分区。
在这之后,我们可以启用"Opportunistic sleep (PM\_AUTOSLEEP)"。这会让内核在没有活跃的唤醒调用被调用时进入挂起或者睡眠状态。这意味着空闲的系统将会进入挂起模式以节省电源。我启用了这个特性。
接下来,是询问关于"User space wakeup sources interface (PM\_WAKELOCKS)"。启用这个特性将会允许唤醒源对象被激活、停用并通过基于sysfs接口由用户空间创建。唤醒源对象会追踪唤醒事件源。
sysfs是位于/sys/的虚拟文件系统。这个虚拟文件系统包含了关于设备的信息。当进入/sys/时,它似乎是硬盘的一部分,但是这个并不是一个真正的挂载点。这些文件实际存在于内存中。这与/proc/是同一个概念。
注意:"/sysfs/"是一个文件夹,而"/sysfs"则可以是一个根目录下名为"sysfs"的文件。许多Linux用户会混淆这两种命名约定。
如果启用了上面的选项,那么你可以设置"Maximum number of user space wakeup sources (0 = no limit) (PM\_WAKELOCKS\_LIMIT)"。最好选择默认,那么你就可以启用垃圾收集器(Garbage collector for user space wakeup sources (PM\_WAKELOCKS\_GC))。垃圾收集是一种内存管理方式。
注意: 在需要更多内存的系统中,通常最好在大多数情况下尽可能启用垃圾收集。不然内存会消耗得更快且杂乱。
下一个电源选项关于IO设备(Run-time PM core functionality (PM\_RUNTIME))。这个选项允许IO硬件在运行时进入低功耗状态。硬件必须支持这个才行不是所有硬件都支持。
与其他许多内核组件一样,如果启用了(Power Management Debug Support),电源管理代码同样有调试支持。我禁用了这个选项。
注意: 注意这些我引用/显示的配置工具上的选项或问题不再显示选项代码(括号间所有的大写字母)。这是因为我没有使用基于ncurses的配置工具(make menuconfig)而是使用默认工具去得到选项、设置和问题。记住,"make config"缺乏保存当前进度的能力。
在这之后,配置工具会启用"ACPI (Advanced Configuration and Power Interface) Support"。最好允许这个电源管理规范。通常配置工具会启用这个特性。
为了允许向后兼容,启用"Deprecated /proc/acpi files"。新的实现使用更新的在/sys下的实现。我禁用了这个选项。一个相似的问题询问关于"Deprecated power /proc/acpi directories"。通常上,如果你禁用了这些文件你不再需要这些文件夹所以我禁用了他们。一些旧的程序可能会使用这些文件和文件夹。如果你在给旧的的Linux系统上编译一个新的内核最好启用这个选项。
下面,我们有另外一个文件接口可以启用或者禁用(EC read/write access through)。这会在/sys/kernek/debug/ec下创建一个嵌入式控制器接口。嵌入式控制器通常在笔记本中读取传感器内核代码通过系统的BIOS表提供的ACPI代码访问嵌入式控制器。
这里有另外一个可以启用或者禁用的向后兼容特性 (Deprecated /proc/acpi/event support)。acpi守护进程可能会读取/proc/api/event来管理ACPI生成的驱动。不同于这个接口守护进程使用netlink事件或者输入层来得到送给用户空间的事件acpi守护进程管理ACPI事件。
下一个选项允许开发者启用一个特性,它会通知内核现在使用的是交流电源(AC Adapter)还是电池。下一个选项从/proc/acpi/battery/ (Battery)中提供电池信息。
为了内核在电源/睡眠按钮按下或者盖子合上时不同表现,启用这个“按钮”选项(Button)。这些事件在/proc/acpi/event/中控制。比如这样的行为,如果在用户账户的电源选项启用了挂起,当笔记本电脑的盖子关闭后系统将会挂起。
下一个ACPI扩展是针对显卡的(Video)。
ACPI风扇控制可以被启用/禁用(Fan)。最好启用ACPI风扇管理这有助于节能。
我们正在进一步配置内核中,但在接下来的文章中还有更多要做。
--------------------------------------------------------------------------------
via: http://www.linux.org/threads/the-linux-kernel-configuring-the-kernel-part-5.4424/
译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,234 @@
10 Lesser Known Commands for Linux Part 3
================================================================================
![](http://www.tecmint.com/wp-content/uploads/2013/11/10-Lesser-Known-Linux-Commands.png)
We have come up with the third article of this series which includes few other lesser known Linux commands, worth knowing. May be you are already aware of these commands, no doubt you are an experienced Linux user and loves exploration.
### 22. ^foo^bar Command ###
Run the last command with modification, in a single instance. Suppose I need to run a command **ls -l** to long list the content of a directory say **Desktop**. Accidentally, you type **lls -l**. So now you will have to retype the whole command or edit the previous command using navigation key. That is painful when the command is long.
avi@localhost:~/Desktop$ lls -l
bash: lls: command not found
avi@localhost:~/Desktop$ ^lls^ls
ls -l
total 7489440
drwxr-xr-x 2 avi avi 36864 Nov 13 2012 101MSDCF
-rw-r--r-- 1 avi avi 206833 Nov 5 15:27 1.jpg
-rw-r--r-- 1 avi avi 158951 Nov 5 15:27 2.jpg
-rw-r--r-- 1 avi avi 90624 Nov 5 12:59 Untitled 1.doc
**Note**: In the above replacement we used “**^typo(to be replaced)^original_command**”. This command may be very dangerous if you knowingly or unknowingly replaced the typo with system command or anything risky say **rm -rf**.
### 23. > file.txt Command ###
This command flush the contents of a file without the need of removing and creating the same file again. This command is very useful in scripting language when we need an output or log on the same file again and again.
I have a file say **test.txt** on my **Desktop** with a lot of text.
avi@localhost:~/Desktop$ cat test.txt
Linux
GNU
Debian
Fedora
kali
ubuntu
git
Linus
Torvalds
avi@localhost:~/Desktop$ > test.txt
avi@localhost:~/Desktop$ cat test.txt
**Note**: Again, this command can be dangerous, dont ever try to flush the contents of a system file or configuration file. If you do so, you will be in serious trouble.
### 24. at Command ###
The **at** command is similar to [cron command][1] and can be used for scheduling a task or command to run at specified time.
avi@localhost:~/Desktop$ echo "ls -l > /dev/pts/0" | at 14:012
OR
avi@localhost:~/Desktop$ echo "ls -l > /dev/pts/0" | at 2:12 PM
**Sample Output**
-rw-r--r-- 1 avi avi 220492 Nov 1 13:49 Screenshot-1.png
-rw-r--r-- 1 root root 358 Oct 17 10:11 sources.list
-rw-r--r-- 1 avi avi 4695982080 Oct 10 20:29 squeeze.iso
..
..
-rw-r--r-- 1 avi avi 90624 Nov 5 12:59 Untitled 1.doc
-rw-r--r-- 1 avi avi 96206 Nov 5 12:56 Untitled 1.odt
-rw-r--r-- 1 avi avi 9405 Nov 12 23:22 Untitled.png
**Note**: echo “**ls -l**” : This string echos the command (here **ls -l**) on standard terminal. You can replace **ls -l** with any command of your need and choice.
> : redirects the output
The **/dev/pts/0** : This is the output device and/or file, where output is sought, here the output is at terminal.
In my case, my **tty** is at **/dev/pts/0**, at that time. You can check your **tty** by running command **tty**.
avi@localhost:~/Desktop$ tty
/dev/pts/0
**Note**: The **at** command execute the task as soon as the system clock matches the specified time.
### 25. du -h max-depth=1 Command ###
The below command outputs the size of sub-folders within the current directory, in human readable format.
avi@localhost:/home/avi/Desktop# du -h --max-depth=1
38M ./test
1.1G ./shivji
42M ./drupal
6.9G ./101MSDCF
16G .
**Note**: The above command can be very much useful in [checking system disk usage][2].
### 26. expr Command ###
The **expr** command is not that much lesser known command. This command is very much useful in carrying out simple mathematical calculation in terminal.
avi@localhost:/home/avi/Desktop# expr 2 + 3
5
avi@localhost:/home/avi/Desktop# expr 6 3
3
avi@localhost:/home/avi/Desktop# expr 12 / 3
4
avi@localhost:/home/avi/Desktop# expr 2 \* 9
18
### 27. look Command ###
Check for words from English dictionary in case of confusion, from the terminal itself. Viz., I am a bit confused if the spelling is carrier or carieer.
avi@localhost:/home/avi/Documents# look car
Cara
Cara's
...
carps
carpus
carpus's
carrel
carrel's
carrels
carriage
carriage's
carriages
carriageway
carriageway's
carried
carrier
carrier's
carriers
carries
...
caryatids
The above command showed all the words from dictionary starting with string car. I got what I was searching for.
### 28. yes Command ###
Another command which is not used frequently on regular basis, normally but is very useful in scripting language and for system Administrators.
This command continues to print a given string, till interrupt instruction is given by you.
avi@localhost:~/Desktop$ yes "Tecmint is one of the best site dedicated to Linux, how to"
Tecmint is one of the best site dedicated to Linux, how to
Tecmint is one of the best site dedicated to Linux, how to
Tecmint is one of the best site dedicated to Linux, how to
Tecmint is one of the best site dedicated to Linux, how to
...
Tecmint is one of the best site dedicated to Linux, how to
Tecmint is one of the best site dedicated to Linux, how to
Tecmint is one of the best site dedicated to Linux, how to
### 29. factor Command ###
The factor command is actually a command of mathematical origin. This command outputs all the factors of a given number.
avi@localhost:~/Desktop$ factor 22
22: 2 11
avi@localhost:~/Desktop$ factor 21
21: 3 7
avi@localhost:~/Desktop$ factor 11
11: 11
### 30. ping -i 60 -a IP_address ###
All of us use ping command to check is server is live or not. And I usually ping google, to check if I am connected to internet or not.
It is sometimes irritating, when you wait and keep watching your terminal to get reply of ping command or say, wait for server to get connected.
How about an audible sound as soon as the server comes live.
avi@localhost:~/Desktop$ ping -i 60 -a www.google.com
PING www.google.com (74.125.200.103) 56(84) bytes of data.
64 bytes from www.google.com (74.125.200.103): icmp_req=1 ttl=44 time=105 ms
64 bytes from 74.125.200.103: icmp_req=2 ttl=44 time=281 ms
Let me tell you one thing, before you report that the command didnt return any audible sound. Make sure your system audio is not mute, sound theme must be enabled in **sound preferences** and make sure **Enable window and window sound** is checked.
### 31. tac Command ###
This command is very interesting which prints the content of a text file in **reverse order**, i.e., from last line to first line.
I have a text file 35.txt in my Documents directory, under home folder. Checking its content using [cat command][3].
avi@localhost:~/Documents$ cat 35.txt
**Sample Output**
> 1. Linux is built with certain powerful tools, which are unavailable in windows.
> 2. One of such important tool is Shell Scripting. Windows however comes with such a tool but as usual it is much weak as compared to it's Linux Counterpart.
> 3. Shell scripting/programming makes it possible to execute command(s), piped to get desired output in order to automate day-to-day usages.
Now reverse the content of file using tac command.
avi@localhost:~/Documents$ tac 35.txt
**Sample Output**
> 3. Shell scripting/programming makes it possible to execute command(s), piped to get desired output in order to automate day-to-day usages.
> 2. One of such important tool is Shell Scripting. Windows however comes with such a tool but as usual it is much weak as compared to it's Linux Counterpart.
> 1. Linux is built with certain powerful tools, which are unavailable in windows.
Thats all for now. If you are aware of other lesser known Linux commands, you can put a comment, so that we can include those in our future articles.
Dont forget to provide us with your value-able comment. Ill be soon coming with another interesting article, very soon. Till then stay tuned and connected to **Tecmint**.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/10-lesser-known-commands-for-linux-part-3/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/
[2]:http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/
[3]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/

View File

@ -0,0 +1,101 @@
11 Basic Linux Interview Questions and Answers
================================================================================
Theories apart, we are proud to announce a new section on Tecmint, dedicated to Linux Interview. Here we will bring to you Linux Interview Questions and all other aspects of Linux, which is must for a professional in this cut-throat competition world.
![](http://www.tecmint.com/wp-content/uploads/2013/11/Basic-Interview-Questions.png)
A new article in this section (**Linux Interview**) will be posted on every weekend. The initiative taken by **Tecmint** is first of its kind among other **Linux Dedicated** websites, along with quality and unique articles.
We will start with **Basic Linux Interview Question** and will go advance article by article, for which your response is highly appreciated, which put us on a higher note.
#### Q.1: What is the core of Linux Operating System? ####
- Shell
- Kernel
- Command
- Script
- Terminal
> **Answer** : Kernel is the core of Linux Operating System. Shell is a command Line Interpreter, Command is user Instruction to Computer, Script is collection of commands stored in a file and Terminal is a command Line Interface
#### Q.2: What Linus Torvalds Created? ####
- Fedora
- Slackware
- Debian
- Gentoo
- Linux
> **Answer** : Linux Torvalds created Linux, which is the kernel (heart) of all of the above Operating System and all other Linux Operating System.
#### Q.3: Torvalds, Wrote most of the Linux Kernel in C++ programming Language, do you agree? ####
> **Answer** : No! Linux Kernel contains 12,020,528 Lines of codes out of which 2,151,595 Lines are comments. So remaining 9,868,933 lines are codes and out of 9,868,933 Lines of codes 7,896,318 are written in C Programming Language.
The remaining Lines of code 1,972,615 is written in C++, Assembly, Perl, Shell Script, Python, Bash Script, HTML, awk, yacc, lex, sed, etc.
**Note** : The Number of Lines of codes varies on daily basis and an average of more than 3,509 lines are being added to Kernel.
#### Q.4: Linux initially was developed for intel X86 architecture but has been ported to other hardware platform than any other Operating System. Do you agree?. ####
> **Answer** : Yes, I do agree. Linux was written for x86 machine, and has been ported to all kind of platform. Todays more than 90% of supercomputers are using Linux. Linux made a very promising future in mobile phone, Tablets. In-fact we are surrounded by Linux in remote controls, space science, Research, Web, Desktop Computing. The list is endless.
#### Q.5: Is it legal to edit Linux Kernel? ####
> **Answer** : Yes, Kernel is released under General Public Licence (GPL), and anyone can edit Linux Kernel to the extent permitted under GPL. Linux Kernel comes under the category of Free and Open Source Software (FOSS).
#### Q.6: What is the basic difference between UNIX and Linux Operating System. ####
> **Answer** : Linux Operating System is Free and Open Source Software, the kernel of which is created by Linus Torvalds and community. Well you can not say UNIX Operating System doesnt comes under the category of Free and Open Source Software, BSD, is a variant of UNIX which comes under the category of FOSS. Moreover Big companies like Apple, IBM, Oracle, HP, etc. are contributing to UNIX Kernel.
#### Q. 7: Choose the odd one out. ####
- HP-UX
- AIX
- OSX
- Slackware
- Solaris
> **Answer** : Slackware is the odd in the above list. HP-UX, AIX, OSX, Solaris are developed by HP, IBM, APPLE, Oracle respectively and all are UNIX variant. Slackware is a Linux Operating System.
#### Q.8: Is Linux Operating system Virus free? ####
> **Answer** : No! There doesnt exist any Operating System on this earth that is virus free. However Linux is known to have least number of Viruses, till date, yes even less than UNIX OS. Linux has had about 60-100 viruses listed till date. None of them actively spreading nowadays. A rough estimate of UNIX viruses is between 85 -120 viruses reported till date.
#### Q.9: Linux is which kind of Operating System? ####
- Multi User
- Multi Tasking
- Multi Process
- All of the above
- None of the above
> **Answer** : All of the Above. Linux is an Operating System which supports Multi User, Running a Number of Processes performing different tasks simultaneously.
#### Q.10: Syntax of any Linux command is: ####
- command [options] [arguments]
- command options [arguments]
- command [options] [arguments]
- command options arguments
> **Answer** : The correct Syntax of Linux Command is Command [options] [arguments].
#### Q.11: Choose the odd one out. ####
- Vi
- vim
- cd
- nano
> **Answer** : The odd one in the above list is cd. Vi, vim and nano are editors which is useful in editing files, while cd command is used for changing directory.
Thats all for now. How much you learned for the above questions? How it helped you in your Interview? We would like to hear all these from you in our comment section. Wait till the next weekend, for new set of questions. Till then stay healthy, tuned and connected to **Tecmint**.
--------------------------------------------------------------------------------
via: http://www.tecmint.com/basic-linux-interview-questions-and-answers/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,3 +1,5 @@
翻译中 by小眼儿
Apache OpenOffice vs. LibreOffice
================================================================================
> The two open source office productivity suites are similar, yet one appears to have a slight advantage.
@ -76,4 +78,4 @@ via: http://www.datamation.com/applications/apache-openoffice-vs.-libreoffice-1.
[1]:http://www.openoffice.org/
[2]:http://www.libreoffice.org/
[3]:https://en.wikipedia.org/wiki/Go-oo
[3]:https://en.wikipedia.org/wiki/Go-oo

View File

@ -0,0 +1,41 @@
Canonical Dev Calls Linux Mint Vulnerable, Wouldnt Use it For Online Banking
================================================================================
**Users of the popular Ubuntu-based operating system Linux Mint should not use it for online banking, a Canonical [engineer has advised][1].**
Mints decision to prevent packages with known security issues from updating from the kernel and browser to the boot-loader and Xorg display server leaves its users with a “vulnerable system”, says Oliver Grawert.
> “Instead of just integrating changes properly with the packages in the ubuntu archive they instead suppress doing (security) updates at all for them. i would say forcefully keeping a vulnerable kernel browser or xorg in place instead of allowing the provided security updates to be installer makes it a vulnerable system, (sic)”.
>
> “I personally wouldnt do online banking with it.”
Grawert certainly isnt alone in considering Mint a sub-par choice for the security conscious. Mozilla contributor and former Ubuntu member **Benjamin Kerensa*** feels the same:
> “It is unclear why Linux Mint disables all of their security updates. I can say that it took them many months to get a fixed version of Firefox packaged while Ubuntu and Debian had already had security fixes in their package.
>
> This puts Linux Mint users at risk and is one of the key reasons I never suggest Linux Mint to anyone as an alternative to Ubuntu.”
Oliver Grawert is no fly-by-night contributor. As one of Canonicals Ubuntu Engineering bods hes better placed than most to know what hes talking about.
**But are Mint users in actual risk? Yes and no…**
But are Mint users in actual risk?
Yes and no. The majority of security “holes” (for want of a better word) of the kind present in the packages that Mints developers steadfastly refuse to update are both documented and known, but rarely exploited by those of a nefarious breed. As such the “actual threat” posed to users remains, at least for now, largely a theoretical one.
Thats to say that there are no known incidents of identify theft or worse resulting from use of Mint (or any other Ubuntu-based distribution with unpatched packages) through any of the exploits referenced by Grawert on the Ubuntu Dev Mailing List.
But just because no-one has entered through the window left ajar thus far, isnt to say someone wont ever do it.
**After seeing Ubuntu given a long and sustained kicking about its own (largely theoretical) privacy issues, it will be interesting to see if, now the boot is placed firmly on the other foot, the vehement concern for users wellbeing will extend to other distributions. **
*Notice: We reached out to Linux Mint for comment & clarification but received no reply.*
--------------------------------------------------------------------------------
via: http://www.omgubuntu.co.uk/2013/11/canonical-dev-dont-use-linux-mint-online-banking-unsecure
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2013-November/014770.html

View File

@ -1,3 +1,4 @@
crowner的坑
Daily Ubuntu Tips Change Samba Workgroup And Computer Name
================================================================================
Heres another question new users to Ubuntu asked the most. The answer to the question is simple but when youre new to anything, it takes time to fully understand it.

View File

@ -0,0 +1,41 @@
Daily Ubuntu Tips Create Virtual Network Cards In Ubuntu Linux
================================================================================
This tutorial is for users who want to experiment a bit with Ubuntu Linux. It not for everyone, especially those with machines that are used in production.
If you know a thing or two about networking and IP networks, then you know that in most cases, each network card will only be assigned one IP address. Its a one to one thing and thats what were used to.
The thing with one network card and one IP address is, you can only host or run in single network service/port on a machine with one nic card and IP address. For example, if you wish to run a web server, on port 80, only one web server will listen on that one IP address and that port #. Thats how its designed to work.
So, instead of the one-to-one relation with network cards and IP addresses, you can create virtual network cards that can be assigned individual IP addresses. So, a single physical network card can host unlimited sub-nic cards or virtual nic. Each can then be assigned their own IP addresses with assigned ports.
This brief tutorial is going to show you how to do that in Ubuntu. Its a great way to run and test multiple network services with single port # on a single computer with one network card.
To get started, run the commands to open the network interfaces file.
sudo gedit /etc/network/interfaces
Then add as many virtual network cards as you want by following the steps in the picture below. By default, Linux machine assigned eth0 name to the first network card. So if your machine has one network card, it will be named eth0.
To add virtual network cards, create more static cards and name them eth0:1, eth0:2, eth0:3, etc. (eth0 followed by colon and a number).
![](http://www.liberiangeek.net/wp-content/uploads/2013/11/virtualnetworkcardubuntu.png)
Also, for each network card you create, make sure each network is in a separate subnet.. this is networking 101.
When youre done, save the file and reset the networking service by running the commands below.
sudo service networking restart
Thats it!
![](http://www.liberiangeek.net/wp-content/uploads/2013/11/virtualnetworkcardubuntu1.png)
Enjoy!
--------------------------------------------------------------------------------
via: http://www.liberiangeek.net/2013/11/daily-ubuntu-tips-create-virtual-network-cards-in-ubuntu-linux/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,35 @@
Daily Ubuntu TipsLike GNOME Classic Menu? Get Classic Menu Indicator
================================================================================
Daily Ubuntu TipsLike GNOME Classic Menu? Get Classic Menu Indicator
For those who have been following Ubuntu OS from the beginner, theyve seen almost if not all the changes Ubuntu have gone through. There have been a lot of changes, especially on the desktop side. From the classic GNOME desktop environment to Unity, Ubuntu have completely been redesigned.
For some new users, all they know is the Unity desktop environment and just a few have heard of or seen the original GNOME desktop environment that powered Ubuntu previously. Ubuntu is completely different from what it used to be and some are having hard time coping with the way things have changed.
If youre an old timer who wish to get back GNOME Classic Menu in Ubuntu Unity, installing Classic Menu Indicator will do the trick. This nifty package get installed in the notification area of the top panel and brings back GNOME Classic Menu experience in Ubuntu.
Like the classic GNOME Menu, it includes all the applications and structure of the classic menu. Its easy to navigate and access applications for those who are used to it. For new users, its also easy to catch on.
This brief tutorial is going to show you how install this package in Ubuntu.
To get started, press **Ctrl Alt T** on your keyboard to open the terminal. When it opens, run the commands below to add its PPA archive.
sudo apt-add-repository ppa:diesch/testing
Next, run the commands below to install it.
sudo apt-get update && sudo apt-get install classicmenu-indicator
After installing it, go and launch the application from Unity Dash. Its called Classic Menu Indicator. When you launch it, it will automatically dock at the top panel as shown below.
![](http://www.liberiangeek.net/wp-content/uploads/2013/11/classic-menu-indicator.png)
Thats it, use it and enjoy!
--------------------------------------------------------------------------------
via: http://www.liberiangeek.net/2013/11/daily-ubuntu-tipslike-gnome-classic-menu-get-classic-menu-indicator/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,32 +0,0 @@
Deciphering Top
================================================================================
When curious about the performance of a server, one of the first places I stop is "top". Top is not perfect, not by a long shot, but it does provide a decent point in time snapshot of the server, and attempts to answer the question of "what is going on right now?". Unfortunatly, the output of top can easily be misinterpreted if you do not have a good understanding of the different fields of data presented.
I'm not going to go through the [man page][2] for top, when you have the time and inclination it is always there waiting for you. What I would like to do is point out a few highlights of how I use it to get a quick overview of the system and hopefully get a direction I should go next. Top is often my first stop in troubleshooting, but it is rarely my only stop.
[![](http://farm4.staticflickr.com/3827/10847969205_c1b75f9fa2_m.jpg)][1]
The very first thing I look at in top is the load average, in the top right hand corner of the screen. The load average is computed based on a number of statistics gathered, but can generally be thought of as the amount of work the CPU is being asked to do. If your machine has a single CPU core, than a load average of one would mean that the machine was perfectly loaded and had sufficient power to accomplish all tasks during the time it was sampled. Likewise, if the load average is two, the single CPU machine was overloaded, and would have needed two available cores to accomplish the work it was being asked to do in the same amount of time. With todays 8, 16, and 32 core servers shipping, I need to think twice when considering the load average. If I need to check, I press "1" in top, which will drop down a list of all CPU cores so I can get a quick count for comparison.
The second item I check is the first process listed, and the ninth column over, labled "%CPU". The explanation for this column is novel:
> The task's share of the elapsed CPU time since the last screen update, expressed as a percentage of total CPU time. In a true SMP environment, if 'Irix mode' is Off, top will operate in 'Solaris mode' where a task's cpu usage will be divided by the total number of CPUs. You toggle 'Irix/Solaris' modes with the 'I' interactive command.
Clear as mud, right? The main idea to keep in mind is that if a single process has gone berzerk for one reason or antoher, it will probably show up listed first in top, with a rather extreme number for %CPU.
The next area I glance at is the "Cpu(s):" line, in the center of the header block. Specifically, I'm interested in the %us, which is user processes, %sy, for system processes, %id, which is idle time, and %wa, which is the percent of time the CPU had processes that were waiting on a response from an I/O stream to execute. This percentage should always be close to zero, and anything higher than 5% should be looked at closer.
Lastly, I like to check the system up time, shown in the top left hand corner. If I'm having problems with a server, and the server was recently rebooted, there may be a correlation there, perhaps a daemon that didn't start.
All of these checks take only a few seconds. I may leave top running for a few minutes and watch the processes, CPU, and load if I'm just observing, but normally I'm in and out of top fairly quickly. Top is one of those fantastic sysadmin tools that is built to give you a quick overview of the health of your system, and allow you to quickly diagnose potential problems.
--------------------------------------------------------------------------------
via: http://ostatic.com/blog/deciphering-top
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.flickr.com/photos/51724787@N06/10847969205/
[2]:http://www.linuxmanpages.com/man1/top.1.php

View File

@ -0,0 +1,89 @@
How to install Ghost blogging platform on Linux
================================================================================
[Ghost][1] is a relatively new blog publishing platform which started out as a [£25,000 Kickstarter project][2]. While WordPress is still the dominant blogging tool on the web, it has now evolved into a general content management platform with tons of third party developed features, and over time has become increasingly cumbersome and complex to maintain. On the other hand, now only a couple of months old, Ghost promises to remain as a pure blogging platform with slick user-centric publishing interface.
In this tutorial, I will describe **how to set up Ghost blogging platform on Linux**.
### Install Ghost on Linux ###
Ghost is powered by Node.js. Therefore, first [install Node.js][3] on your Linux system. Make sure that the version of Node.js is 0.10 or higher.
Next, log in to [http://ghost.org][1] (sign-up needed), and download the source code of Ghost. Then follow the procedure below to install Ghost.
$ sudo mkdir -p /var/www/ghost
$ sudo unzip ghost-0.3.3.zip -d /var/www/ghost
$ cd /var/www/ghost
$ sudo npm install --production
### Configure Ghost Before Launching ###
Before launching Ghost, create its configuration file located at /var/www/ghost/config.js as follows. Replace "YOUR_IP" with the IP address of your host.
$ cd /var/www/ghost
$ sudo cp config.example.js config.js
$ sudo sed -i 's/127.0.0.1/YOUR_IP/g' config.js
### Test-Run Ghost in Development Mode ###
At this point, you are ready to launch Ghost.
Note that Ghost can run in two different modes: "development" and "production" modes. For safety, Ghost maintains configuration info of two modes separately in its configuration file (/var/www/ghost/config.js). For example, the two different modes use different database files (i.e., ghost-dev.db and ghost.db located in /var/www/ghost/content/data).
Use the following commands to launch Ghost. Ghost runs in development mode by default.
$ cd /var/www/ghost
$ sudo npm start
If Ghost is launched successfully, you should see the following output in the terminal, indicating that Ghost is running on <YOUR_IP>:2368.
[![](http://farm8.staticflickr.com/7317/10881189204_d714f11321_z.jpg)][4]
Go to http://<YOUR_IP>:2368 on your web browser, and verify that you can see the following initial Ghost page.
[![](http://farm4.staticflickr.com/3750/10881348733_f77d220de6_z.jpg)][5]
### Launch Ghost in Production Mode ###
After you have verified that Ghost runs okay, stop Ghost in development mode by pressing Ctrl+C. Now it is time to launch Ghost in production mode.
When you run Ghost in production mode, you can use Node.js module called forever, which allows you to daemonize Ghost, and run it as a background process.
To install forever module:
$ sudo npm install forever -g
Finally, launch Ghost in production mode as follows:
$ cd /var/www/ghost
$ sudo NODE_ENV=production forever start index.js
Verify that Ghost's database is successfully created in production mode (/var/www/ghost/content/data/ghost.db).
You can also check a list of active forever processes.
$ sudo forever list
> info: Forever processes running
> data: uid command script forever pid logfile uptime
> data: [0] cH0O /usr/bin/nodejs index.js 15355 15357 /home/dev/.forever/cH0O.log 0:0:0:37.741
If you see output like the above, it means that Ghost is running in the background successfully.
To stop Ghost daemon, run the following command.
$ cd /var/www/ghost
$ sudo forever stop index.js
--------------------------------------------------------------------------------
via: http://xmodulo.com/2013/11/install-ghost-blogging-platform-linux.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://ghost.org/
[2]:http://www.kickstarter.com/projects/johnonolan/ghost-just-a-blogging-platform
[3]:http://ask.xmodulo.com/install-node-js-linux.html
[4]:http://www.flickr.com/photos/xmodulo/10881189204/
[5]:http://www.flickr.com/photos/xmodulo/10881348733/

View File

@ -1,124 +0,0 @@
翻译中 by小眼儿
How to set up web-based network traffic monitoring system on Linux
================================================================================
When you are tasked with monitoring network traffic on the local network, you can consider many different options to do it, depending on the scale/traffic of the local network, monitoring platforms/interface, types of backend database, etc.
[ntopng][1] is an open-source (GPLv3) network traffic analyzer which provides a web interface for real-time network traffic monitoring. It runs on multiple platforms including Linux and MacOS X. ntopng comes with a simple RMON-like agent with built-in web server capability, and uses [Redis][2]-backed key-value server to store time series statistics. You can install ntopng network traffic analyzer on any designated monitoring server connected to your network, and use a web browser to access real-time traffic reports available on the server.
In this tutorial, I will describe **how to set up a web-based network traffic monitoring system on Linux by using ntopng.**
### Features of ntopng ###
- Flow-level, protocol-level real-time analysis of local network traffic.
- Domain, AS (Autonomous System), VLAN level statistics.
- Geolocation of IP addresses.
- Deep packet inspection (DPI) based service discovery (e.g., Google, Facebook).
- Historical traffic analysis (e.g., hourly, daily, weekly, monthly, yearly).
- Support for sFlow, NetFlow (v5/v9) and IPFIX through nProbe.
- Network traffic matrix (whos talking to who?).
- IPv6 support.
### Install ntopng on Linux ###
The official website offers binary packages for [Ubuntu][3] and [CentOS][4]. So if you use either platform, you can install these packages.
If you want to build the latest ntopng from [its source][5], follow the instructions below.
To build ntopng on Debian, Ubuntu or Linux Mint:
$ sudo apt-get install libpcap-dev libglib2.0-dev libgeoip-dev redis-server wget
$ tar xzf ntopng-1.0.tar.gz
$ cd ntopng-1.0/
$ ./configure
$ make geoip
$ make
In the above steps, “make geoip” will automatically download a free version of GeoIP databases with wget from maxmind.com. So make sure that your system is connected to the network.
To build ntopng on Fedora:
$ sudo yum install libpcap-devel glib2-devel GeoIP-devel
libxml2-devel redis wget
$ tar xzf ntopng-1.0.tar.gz
$ cd ntopng-1.0/
$ ./configure
$ make geoip
$ make
To install ntopng on CentOS or RHEL, first [set up EPEL repository][6], and then follow the same instructions as in [Fedora][7] above.
### Configure ntopng on Linux ###
After building ntopng, create a configuration directory for ntopng, and prepare default configuration files as follows. I assume that “192.168.1.0/24″ is the CIDR address prefix of your local network.
$ sudo mkir /etc/ntopng -p
$ sudo -e /etc/ntopng/ntopng.start
> --local-networks "192.168.1.0/24"
>
> --interface 1
$ sudo -e /etc/ntopng/ntopng.conf
> -G=/var/run/ntopng.pid
Before running ntopng, make sure to first start redis, which is a key-value store for ntopng.
To start ntopng on Debian, Ubuntu or Linux Mint:
$ sudo /etc/init.d/redis-server restart
$ sudo ./ntopng
To start ntopng on Fedora, CentOS or RHEL:
$ sudo service redis restart
$ sudo ./ntopng
By default, ntopng listens on TCP/3000 port. Verify this is the case using the command below.
$ sudo netstat -nap|grep ntopng
> tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 29566/ntopng
### Monitor Network Traffic in Web-Based Interface ###
Once ntopng is successfully running, go to http://<ip-address-of-host>:3000 on your web browser to access the web interface of ntopng.
You will see the login screen of ntopng. Use the default username and password: “admin/admin” to log in.
Here are a few screenshots of ntopng in action.
Real-time visualization of top flows.
[![](http://farm4.staticflickr.com/3830/10487165303_8bf0b25668_z.jpg)][8]
Live statistics of top hosts, top protocols and top AS numbers.
[![](http://farm3.staticflickr.com/2886/10486988416_7c8770e823_z.jpg)][9]
Real time report of active flows with DPI-based automatic application/service discovery.
Historic traffic analysis.
[![](http://farm8.staticflickr.com/7379/10486995114_f0b58243a8_z.jpg)][10]
--------------------------------------------------------------------------------
via: http://xmodulo.com/2013/10/set-web-based-network-traffic-monitoring-linux.html
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.ntop.org/products/ntop/
[2]:http://redis.io/
[3]:http://apt.ntop.org/
[4]:http://rpm.ntop.org/
[5]:http://sourceforge.net/projects/ntop/files/ntopng/
[6]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html
[7]:http://xmodulo.com/go/fedora_guide
[8]:http://www.flickr.com/photos/xmodulo/10487165303/
[9]:http://www.flickr.com/photos/xmodulo/10486988416/
[10]:http://www.flickr.com/photos/xmodulo/10486995114/

View File

@ -0,0 +1,58 @@
Linux Mint 16 “Petra” Cinnamon RC Has Been Released!
================================================================================
After six months of incremental development on top of stable and reliable technologies the Linux Mint developer team has announced the release of [Linux Mint 16 Petra Cinnamon Edition][1]. This new release of Linux Mint includes updated software, new features and many fixes.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/linux_mint16.png)
This release which is the fruit of hard work for six months, comes with two distinct flavors, **Cinnamon** and **MATE**. But, what are some new features in this Linux Mint edition?
According to the official release announcement, the following are new the features in Linux Linux Mint 16 Petra Cinnamon Edition:
- Cinnamon 2.0
- Login Screen
- USB Stick support
- Performance improvements
- Software Manager
- System Improvements
- Artwork Improvements
- Main Components
### Cinnamon 2.0 ###
Cinnamon 2.0 features many improvements, a lot of bug fixes and new features. Cinnamon is now able to play sounds when you perform common events such as closing windows, switching workspaces and you can also set the volume for these sounds independently of the main sound volume. Cinnamon 2.0 introduces a new applet which makes session and account related tasks very easy.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/thumb_cinnamon_account_details.png)
### Account Details ###
System administrators can administrate users and groups with the “Users and Groups” configuration tool and you can change your password from the new “Account Details” configuration screen.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/thumb_cinnamon_user_applet.png)
### Software Manager ###
Fast! This is the best word to describe the Software Manager in this release of Linux Mint. A nice thing that everyone will like is that this Software Manager uses less memory than before and applications can now show multiple screenshots. Fast to **search**, fast to **start**.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/software_manager1.png)
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/software_manager2-e1384689990357.png)
### System Improvements ###
Do you use the terminal for performing your daily tasks in your Linux Mint machine? Cool, Linux Mint 16 Petra Cinnamon Edition offers a better terminal experience than before and it includes “ll” as an alias to “ls -al”. Why do “ls -al” when you can just do “ll” and be faster than ever while listing files in the working directory?
Linux Mint 16 Petra Cinnamon Edition thinks about **gamers** too! It now offers better support to Steam and its addition in the repositories and the featured section of the Software Manager.
What about **privacy**? Linux Mint 16 offers additional private/secure search engines for you guys that take secure browsing very seriously.
Better help support, safer kernel updates, faster boot sequence and faster login. What about apple fans? Yes, **apple**. We are linux guys, but sharing and caring is the most important thing to us. Linux Mint 16 includes out of the box support for iOS devices, this will make apple fans very happy.
--------------------------------------------------------------------------------
via: http://www.unixmen.com/linux-mint-16-petra-cinnamon-rc-released/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://blog.linuxmint.com/?p=2477

View File

@ -1,6 +1,13 @@
<<<<<<< HEAD
延伸项目为Linux内核寻找新的女性实习生
===
作为[FOSS针对女性的延伸项目][1]这个夏季工作在Linux基金会的实习生们有着多样的背景和水平也高低不等但是她们至少有一件事情是相同的除去她们的性别之外。她们可以在自己的履历中添加一项“Linux内核工作者”。
=======
翻译中 by Linux-pdz
Outreach Program for Women Seeks New Linux Kernel Interns
================================================================================
The interns who worked with The Linux Foundation as part of the [FOSS Outreach Program for Women][1] this summer come from diverse backgrounds and levels of experience, but they now have at least one thing in common (besides their gender). They can all add “Linux kernel hacker” to their resume.
>>>>>>> 580c8e9dc6b7eb6242523c497d19cecb4c8738bd
![](http://www.linux.com/images/stories/41373/OPW-kernel-contributions-9.jpg)

View File

@ -0,0 +1,25 @@
Play A Crossword Game With Adobes Leaked Passwords
================================================================================
A **crossword** game with **Adobes** Leaked Passwords is now available for playing at [http://zed0.co.uk/crossword/][1]. The author of this game, created the crossword to highlight how insecure most common memorable passwords are and how little you should trust that corporations, such as Adobe, are following best practice when it comes to storing them.
The crossword uses 1000 most common passwords from the Adobes recent password leak in order to inform you about weak password. If your password is in the crossword then you should go change it immediately if you use the same password anywhere else. You have a very bad password! Go and change it, before it is too late.
The author of this nice helpful game, explains for the reader that he got the idea from [xkcd #1286: Encryptic][2] and also tells us that releasing these passwords is not a huge security risk as many people have already guessed them long ago.
You still dont know anything about the Adobe cloud security breach?
Lately Adobe has been a target for cyber criminals. The Adobe security team has discovered a sophisticated attack on Adobes network which involves the illegal access of customer information as well as source code for numerous Adobe products. According to the security announcement on Adobes blog the attackers accessed Adobe customer IDs and encrypted passwords, but members at Adobes Security Team dont believe any decrypted credit or debit card number is removed from the system.
You can read more about this security announcement [here][3].
--------------------------------------------------------------------------------
via: http://www.unixmen.com/play-crossword-game-adobes-leaked-passwords/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://zed0.co.uk/crossword/
[2]:http://www.xkcd.com/1286/
[3]:http://www.unixmen.com/illegal-access-adobe-source-code/

View File

@ -0,0 +1,105 @@
VidMasta: A Desktop Application For Searching Movies And TV Shows
================================================================================
Ever wanted to search for a Movie or a TV shows from your desktop or searching for a application to do it for you whenever you want? Here is a application to fulfil your needs.
[**VidMasta**][1] is free, cross-platform, federated search desktop application to read about, preview, watch, and download any movie or television titles that are being shared online. It will run on Linux, Windows and Mac OS X.
### Features ###
Using VidMasta, you can do the following:
- Watch or download movie and television titles in any format.
- Supported formats are: TV, DVD, 720p, 1080i/p.
- Anonymity via automatic filtering of untrusted IPs, the use of proxies, and encryption.
- “Deep Search, Best Source” algorithm for superior video download links.
- “Popular Movies” and “Popular TV Shows” options to display recent movies/tv shows that have been downloaded the most.
- Download video subtitles.
- Set the number of results per search.
- Set the minimum and maximum size of a video file that can be downloaded.
- Set the video file extensions that can be downloaded.
- Search for movie and television titles by name, release date, genre, rating, country, and language.
- Automatic ordering of search results by popularity.
- Hear and read small summaries of titles.
- View trailers of titles.
- View release dates and ratings of titles.
- Multithreading for fast load times of search results and links.
- Detection of video box sets.
- [PeerBlock][2] integration (only available for Windows 2000, XP, Vista, and 7).
- No additional software is needed beyond [Java][3] (version 6 or greater).
- Automatic (silent) updating of the application.
### Install VidMasta On Linux ###
Before installing VidMasta you should have install the latest Java in your Linux Desktop.
Download the latest version from [**here**][4]. Go the folder where you downloaded the file and install it using the following command:
sudo java -jar vidmasta-setup-16.7.jar
The following screen should appear. Click Next to continue.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/Installation-of-VidMasta_001.jpg)
Select the installation path and click Next.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/Installation-of-VidMasta_002.jpg)
After completing the installation, click Next.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/Installation-of-VidMasta_004.jpg)
Setup the shortcuts.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/Installation-of-VidMasta_007.jpg)
Finally click Done to finish the installation.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/Installation-of-VidMasta_008.jpg)
After completing the installation, VidMasta will automatically open. This is how default interface of VidMasta looks.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/VidMasta_009.jpg)
### Search Movies & TV Shows ###
Searching Movies and TV shows are pretty easy. Enter the movie title in the Title box. Select the Movie Genre and the Movie format such as “Any”, “DVD”, “720HD” or “1080 HD” etc. Then hit Enter to start search. Also you an filter the movie results with ratings. If you dont know the movie name, check the box “Any” Menu bar.
For example here i am searching “Adventure” genre movies with 720 HD quality which are released between November 1st, 2012 to today. Once you hit Search button, VidMasta will fetch the results from [www.imdb.com][5] website and display the results as per your search criteria. Below is the sample output.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/VidMasta_012.jpg)
You can watch trailer or read the movie summary before downloading it. To view the movie summary, select any movie, right click on it and click Read Summary. Also you can use the buttons below the search results to Read Summary, Watch Trailer, Download or Watch Full movie.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/VidMasta_013.jpg)
Moreover, you can watch the Trailer before downloading the movie. Click on the Watch Trailer button. The Trailer will be opened in a new browser window as shown below.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/%E2%96%B6-Django-Unchained-Official-Trailer-HD-YouTube-Mozilla-Firefox_014.jpg)
If you like the movie, click on the Download links(Download link 1 or Download link 2) to get the movie.
### Popular Movies & Popular TV Shows ###
So you dont know which movie or TV show is being mostly watched all time. Dont worry, VidMata has a option to watch the Popular movies or TV shows. Just click on the Popular Movies or Popular TV Shows button to find out.
![](http://180016988.r.cdn77.net/wp-content/uploads/2013/11/VidMasta_015.jpg)
Cool, isnt it?
Please note that i couldnt not watch or download recent movies. May be copy rights or geographical problems. Also you should install the latest Java and disable ad-block programs to play and download movies.
What are you waiting for? Go, get it and have fun!
--------------------------------------------------------------------------------
via: http://www.unixmen.com/vidmasta-desktop-application-searching-movies-tv-shows/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:https://sites.google.com/site/algwares/vidmasta
[2]:http://www.peerblock.com/
[3]:http://www.java.com/
[4]:http://sourceforge.net/projects/vidmasta/
[5]:http://www.unixmen.com/vidmasta-desktop-application-searching-movies-tv-shows/www.imdb.com

32
translated/Deciphering Top.md Executable file
View File

@ -0,0 +1,32 @@
解密"top"
================================================================================
当对服务器的性能好奇时,我第一个想到的是"top"命令。top不是最好的它不是一个长期的快照但是它提供了服务器的一个像样的时间点的快照并且尝试回答了问题"现在在发生什么?"。不幸地top的输出很容易被误解如果你没有很好地理解数据显示的不同域。
我不会完整解读top命令的[man page][2]当你和时间和意愿时它一直在那等着你。我想要做的是指出一些我如何得到系统的快速概况的几个要点并希望得到我接下来该怎么做。top是我在故障排除时的第一站但这很少是我唯一的一站。
[![](http://farm4.staticflickr.com/3827/10847969205_c1b75f9fa2_m.jpg)][1]
top命令我第一个看的是平均负载(load average),它在右上角的屏幕上。平均负载的计算是基于统计搜集的数量但是可以通常地认为是CPU被请求工作的数量。如果你的机器有一个单核CPU那么平均负载是1就意味着机器是被完全加载的并且有充分的能力去完成在采样时间内的任务。同样地如果平均负载是2那单核的CPU是超载的并需要2个可用内核去完成在同样采样时间内被要求完成的任务。随着8、16、32核的发售我会在考虑平均负载的时候再三考虑。如果我需要去检测我会在top里按了"1"这会列出所有CPU核列表这样我就可以得到一个快速计数用于比较。
我检查的第二项是第一步列出来的在第9列标记着"%CPU"。这一列的解释是新奇的:
> 任务共享上次屏幕刷新后的CPU运行时间以完全的CPU时间百分比表示。在一个完全SMP环境中如果'Irix mode'是关闭的top会在'Solaris mode'下操作这里一个任务的cpu使用率将被全部的CPU分割。你可以用'I'这个交互命令触发Irix或Solaris模式。
一点也不清楚,是么?这里要记住的主要意思是如果单个进程由于某个原因或者其他因素占用率升高,那么他很有可能会以%CPU很高的数字显示在top的第一行。
我下一个看到的区域是"Cpu(s):"这一行,这头部的中间。特别地,我对%us、sy%、%id、和%wa感兴趣它们分别是用户进程、系统进程、空闲时间和CPU用于等待I/O流执行的时间比例。这个百分比应该接近于0高于5%时需要密切关注。
最后我想要检测系统up时间这显示在左上角。如果我对一台服务器有疑问并且这台服务器最近重启过这里或许有一个关联或许是一个守护进程没有启动。
这些测试只需要几秒。如果我只是观察我可能让top运行几分钟并观察进程、CPU和负载但是通常地我很快地进入和退出top。top是给你一个系统健康概况的那些奇妙系统管理员工具之一并允许你快速诊断潜在的问题。
--------------------------------------------------------------------------------
via: http://ostatic.com/blog/deciphering-top
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.flickr.com/photos/51724787@N06/10847969205/
[2]:http://www.linuxmanpages.com/man1/top1.php

View File

@ -0,0 +1,119 @@
如何在Linux上配置基于Web的网络流量监控系统
================================================================================
当你在本地网络监控网络流量,根据流量大小、监控平台/接口、数据库类型等等,可以有许多不同的选择。
[ntopng][1]是一套开源遵循GPLv3协议网络流量分析解决方案提供基于web界面的实时网络流量监控。支持跨平台包括Linux和MacOS X。ntopng类似于RMON远端网络监控代理具有内置的Web服务能力使用[Redis][2]键值服务按时间序列存储统计信息。你可以在任何指定的监控服务器上安装ntopng只需使用任一web浏览器就能实时访问服务器上的流量报告了。
本教程就来介绍**如何使用ntopng在Linux上配置基于Web的网络流量监控系统**
###ntopng的特性###
- 从数据流级别与协议级别对本地网络流量进行实时分析
- 支持域、AS自制系统与VLAN级别的统计分析
- 支持IP地址地理定位
- 支持基于“服务探索”例如Google、Facebook的深度报文检测DPI
- 历史流量分析(例如分别按照小时、日、周、月、年进行分析)
- 支持sFlow、NetFlowv5/v9版以及基于nProbe的IPFIX
- 网络流量矩阵(谁正在和谁谈话?)
- 支持IPv6
###在Linux上安装ntopng
官方网页上提供了针对[Ubuntu][3]和[CentOS][4]的二进制安装包。如果你使用的恰好是以上二者其一,并且懒得用源码安装,可以直接到官网下载二进制文件包安装,并忽略这一小节下面的内容。
如果你想通过[源码][5]安装最新的ntopng请继续往下看
如果你是Debian、Ubuntu或Linux Mint执行以下命令
$ sudo apt-get install libpcap-dev libglib2.0-dev libgeoip-dev redis-server wget
$ tar xzf ntopng-1.0.tar.gz
$ cd ntopng-1.0/
$ ./configure
$ make geoip
$ make
上面的几个步骤中“make geoip”将会自动通过wget从maxmind.com下载一个免费版的GeoIP数据库因此这里最好确保你的系统能联网。
如果你是Fedora
$ sudo yum install libpcap-devel glib2-devel GeoIP-devel
libxml2-devel redis wget
$ tar xzf ntopng-1.0.tar.gz
$ cd ntopng-1.0/
$ ./configure
$ make geoip
$ make
如果你是CentOS或RHEL首先[设置EPEL repository][6],然后再执行上面和[Fedora][7]一样的命令就可以。
###在Linux上配置ntopng###
ntopng安装完毕之后接下来新建一个ntopng配置目录然后按照下列命令准备默认的配置文件。这里我假设你的本地网络地址为C类“192.168.1.0/24”。
$ sudo mkir /etc/ntopng -p
$ sudo -e /etc/ntopng/ntopng.start
> --local-networks "192.168.1.0/24"
>
> --interface 1
$ sudo -e /etc/ntopng/ntopng.conf
> -G=/var/run/ntopng.pid
在运行ntopng之前要确认先启动redis刚才不说了redis为ntopng提供键值存储嘛~
在Debian、Ubuntu和Linux Mint上这样启动
$ sudo /etc/init.d/redis-server restart
$ sudo ./ntopng
在Fedora、CentOS和RHEL上这样启动
$ sudo service redis restart
$ sudo ./ntopng
ntopng默认监听TCP的3000端口使用下列命令加以确认。
$ sudo netstat -nap|grep ntopng
> tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 29566/ntopng
###基于Web界面的网络流量监控###
一旦ntopng成功运行就可以打开浏览器访问地址http://<你的主机IP地址>:3000
这时你会看到ntopng的登录界面。使用默认帐密“admin/admin”。
下面是一些截图。
top流的实时可视化图像
[![](http://farm4.staticflickr.com/3830/10487165303_8bf0b25668_z.jpg)][8]
top主机的实时统计包括top协议和top AS数量
[![](http://farm3.staticflickr.com/2886/10486988416_7c8770e823_z.jpg)][9]
基于DPI的自动程序/服务探索生成的的实时数据报告
历史流量数据分析
[![](http://farm8.staticflickr.com/7379/10486995114_f0b58243a8_z.jpg)][10]
--------------------------------------------------------------------------------
via: http://xmodulo.com/2013/10/set-web-based-network-traffic-monitoring-linux.html
译者:[Mr小眼儿](http://blog.csdn.net/tinyeyeser) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.ntop.org/products/ntop/
[2]:http://redis.io/
[3]:http://apt.ntop.org/
[4]:http://rpm.ntop.org/
[5]:http://sourceforge.net/projects/ntop/files/ntopng/
[6]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html
[7]:http://xmodulo.com/go/fedora_guide
[8]:http://www.flickr.com/photos/xmodulo/10487165303/
[9]:http://www.flickr.com/photos/xmodulo/10486988416/
[10]:http://www.flickr.com/photos/xmodulo/10486995114/

View File

@ -1,35 +0,0 @@
米科·哈普宁:开源软件使世界更安全
================================================================================
安全专家米科·哈普宁(Mikko Hypponen)于上周在爱丁堡举行的[LinuxCon and CloudOpen Europe][1]会议上的主题演讲中说:"开源软件可以作为一个方法来打击全球监视无辜居民的行为。"
![](http://www.linux.com/images/stories/41373/Mikko-Hypponen-3.jpg)
*米科·哈普宁芬兰F-Secure的首席研究员在爱丁堡举行的LinuxCon and CloudOpen Europe 2013会议上讲话。*
计算和全球网络增加的进步使得存储和传输数据变得便宜且简单。哈普宁说这创造了无比的连通性、进步和创新。但是同样使得大规模的数据被访问到就像NSA的棱镜项目演示的那样这事件随着前美国政府员工爱德华·斯诺登(Edward Snowden)泄漏的一系列顶级机密文件而公开。
哈普宁芬兰F-Secure的首席研究员说:"前几年我们已经意识到数据是廉价的。我们永远不必再删除任何数据。这促成了很多伟大的事情但同样也引发了大规模地毯式的监视。"
哈普宁说:"这些监视会访问我们的个人数据,包括电话记录、地理位置、电子邮件和搜索引擎请求,有些可能是被授权的。"
他说:"我相信一些监控是好的。如果有有一项研究来找出校园枪击者或者毒枭或者恐怖组织成员等等。我们应该已经有技术手段这么做。但是我们首先必须必须持有怀疑。"
哈普宁说:"但是收集通信和每个人的个人数据不仅是对隐私的侵犯还是对民主的威胁。"
他说:"即使你如今对政府认为没问题但是我们不知道政府会在今后的20年怎么样。如果他们有你20年的搜索数据他们会找出一些非法的或者令人尴尬的理由来扭曲你的手。"
哈普宁说:"虽然泄漏事件使得一些IT专家质疑他们的数据存储的安全性和经由美国服务商的的路由但避免这些公司和服务不能解决问题。同样不能每个国家都花费和金钱来建造他们自己的替代品。"
哈普宁说:"要跨越国际边际地工作,开发者应该团结起来建造一个安全和可靠的软件和服务来放置后门篡改和用户隐私。"
他说:"我建议开源软件对这个问题提供一个解决方案。那么国家就不必独自工作。这将会变得安全、开放和免费。"
--------------------------------------------------------------------------------
via: http://www.linux.com/news/featured-blogs/200-libby-clark/745585-mikko-hypponen-open-source-software-will-make-the-world-more-secure
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://events.linuxfoundation.org/events/linuxcon-europe

View File

@ -2,11 +2,11 @@
===
![](http://linoxide.com/wp-content/uploads/2013/11/yum-package-install.png)
**YUM**是RHEL系统中提供的一个安装,卸载和搜索软件包的工具。它能做的不仅仅是安装、卸载软件包,它能做的还有更多,下面我们将在本文中为你展示。
**YUM**是RHEL系统中提供的一个安装卸载和搜索软件包的工具。它能做的不仅仅是安装、卸载软件包它能做的还有更多下面我们将在本文中为你展示。
YUM可以自动安装软件包的依赖例如当你使用yum安装http时它还会自动安装https apache服务以及它依赖的软件包。通过rpm软件包安装时就没有这么方便咯译注就是不会自动处理软件包依赖问题咯你必须下载所有它依赖的软件包然后依序安装它们。
YUM可以自动安装软件包的依赖例如当你使用yum安装httpd时它还会自动安装https apache server以及它依赖的软件包。通过rpm软件包安装时就没有这么方便咯译注就是不会自动处理软件包依赖问题咯你必须下载所有它依赖的软件包然后依序安装它们。
yum工具从远端服务器上的软件仓库通常由系统提供商提供)内获取软件包的信息。一个软件仓库基本上是被认为能在特定架构上运行的一系列rpm软件包的集合。例如对于32位和64位系统各有一个软件仓库还有针对RHEL5以及RHEL6的软件仓库。你也可以建立一个本地仓库配置你的yum让其从你的本地仓库里搜索安装软件包。在接下来的例子中我将想你展示一些yum除了在安装和卸载软件之外可以做的其它事情。为了理解起见我将在我的Amazon EC2 RHEL 6.4服务器上使用httpd软件包为例
yum工具从远端服务器上的软件仓库通常由OS提供商提供获取软件包的信息。一个软件仓库是能在特定架构上运行的一系列rpm软件包的集合。例如对于32位和64位系统各有一个软件仓库还有针对RHEL5以及RHEL6的软件仓库。你也可以建立一个本地仓库配置你的yum让其从你的本地仓库里搜索安装软件包。在接下来的例子中我将向你展示除了安装和卸载软件yum还可以做的其它事情。为方便理解我将在我的Amazon EC2 RHEL 6.4服务器上使用httpd软件包为例。
###从软件仓库里搜索软件包
# yum search httpd
@ -30,13 +30,13 @@ yum工具从远端服务器上的软件仓库通常由系统提供商提供
Repo : rhui-REGION-rhel-server-releases
Matched from:
*yum provides httpd*在软件仓库里搜索含有httpd的软件包
*yum provides httpd*在软件仓库里搜索含有httpd的软件包
###提供所有软件组列表
# yum grouplist
以上命令将为你显示已经安装的以及可用的软件组。你可以安装一个的软件组并可对组内软件进行选择。例如我们将安装一个PHP支持的软件组。这个软件组内包含PHP需要的软件包。
以上命令将为你显示已经安装的以及可用的软件组。你可以使用软件组安装选项来安装其中一个软件组。例如我们将安装一个PHP Support的软件组。这个软件组内包含需要的PHP软件包。
# yum groupinstall PHP Support
@ -126,7 +126,7 @@ yum工具从远端服务器上的软件仓库通常由系统提供商提供
###使用YUM安装软件包
可以使用yum命令安装软件包如下所示
可以使用**yum install**命令安装软件包,如下所示:
# yum install httpd
@ -167,11 +167,11 @@ yum工具从远端服务器上的软件仓库通常由系统提供商提供
Installed size: 3.6 M
Is this ok [y/N]: y
如你所见在安装httpd时yum安装了额外的软件包。这叫做被yum完成的依赖解析。
如你所见在安装httpd时yum安装了额外的软件包。这称为yum完成的依赖包解析。
假如你不想让yum弹出[y/N]选项,可以使用**yum install -y httpd**
**使用yum命令更新一个已存在的软件包**
**使用yum update 命令更新一个已存在的软件包**
# yum update httpd
Loaded plugins: amazon-id, rhui-lb, security
@ -180,11 +180,11 @@ yum工具从远端服务器上的软件仓库通常由系统提供商提供
这意味着你系统中安装的httpd软件包已经是yum软件仓库里的最新版本的了。
**更新系统中所有的软件包**
**更新服务器上所有的软件包**
# yum update
以上命令将根系你系统上的所有软件包到最新版本,包括内核软件包,这意味着你的系统更新到了RHEL提供的最新版本了。
以上命令将系统上的所有软件包更新到最新版本,包括内核软件包,这意味着你的OS更新到了RHEL提供的最新版本了。
###下载RPM软件包但是不安装
@ -235,7 +235,7 @@ yum工具从远端服务器上的软件仓库通常由系统提供商提供
# yum install httpd-devel -downloadonly -downloaddir=/opt
假如你有一个rpm软件包但是没有它所依赖的软件包你不知道到哪去得到它所依赖的软件包。你仍然可以通过yum安装这个rpm软件包然后从软件仓库里得到它所依赖的软件包。让我们安装刚刚下载的httpd-devel-2.2.15-29.el6_4.x86_64 RPM软件包。
假如你有一个rpm软件包但是没有它所依赖的软件包你不知道到哪去得到它所依赖的软件包。你仍然可以通过yum安装这个rpm软件包,并从软件仓库里得到它所依赖的软件包。让我们安装刚刚下载的httpd-devel-2.2.15-29.el6_4.x86_64 RPM软件包。
# yum localinstall /opt/httpd-devel-2.2.15-29.el6_4.x86_64.rpm
@ -345,7 +345,7 @@ yum工具从远端服务器上的软件仓库通常由系统提供商提供
###使用yum卸载软件包
格式为yum remove 要卸载的软件包。举例如下:
使用 yum remove 卸载软件包。举例如下:
# yum remove httpd
Failed to set locale, defaulting to C
@ -400,7 +400,7 @@ yum工具从远端服务器上的软件仓库通常由系统提供商提供
###列出所有安装的软件包
假如你要列出你系统上安装的所有软件包,你可以使用命令yum list installed。这条命令结合grep命令是非常有用的可以用来检查某个特定的软件包是否已被安装。这与使用rpm -qa命令询问已经安装的软件包相似。
假如你要列出你系统上安装的所有软件包你可以使用yum list installed命令。这条命令结合grep命令是非常有用的可以用来检查某个特定的软件包是否已被安装。这与使用rpm -qa命令询问已经安装的软件包相似。
# yum list installed
Loaded plugins: amazon-id, downloadonly, rhui-lb, security
@ -426,7 +426,7 @@ yum工具从远端服务器上的软件仓库通常由系统提供商提供
.
Output Truncated.
###列出用于搜索、安装和更新软件包的可用软件
###列出可用软件库,软件包从这里查询,安装并更新
# yum repolist
@ -441,6 +441,6 @@ yum工具从远端服务器上的软件仓库通常由系统提供商提供
via: http://linoxide.com/linux-command/package-management-yum-redhat-linux/
译者:[Linux-pdz](https://github.com/Linux-pdz) 校对:[校对者ID](https://github.com/校对者ID)
译者:[Linux-pdz](https://github.com/Linux-pdz) 校对:[jasminepeng](https://github.com/jasminepeng)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,110 +0,0 @@
09 Linux内核: 配置内核 (Part 5)
================================================================================
![](http://www.linux.org/attachments/slide-jpeg.428/)
Linux内核拥有许多特性可以被配置。还有许多的特性要配置。
下一个可以配置的特性是x86的随机数生成器(x86 architectural random number generator (ARCH_RANDOM))。记住我们现在配置的是AMD64系统的内核代码。这个随机数生成器使用Intel x86的RDRAND指令。这并不通用所以为了一个更轻量的内核我禁用了它。
接着,我们可以启用或者禁用"Supervisor Mode Access Prevention (X86_SMAP)"。这是Intel处理器使用的安全特性。SWAP在一些实例中只会允许内核访问用户空间。这个有助于保护用户空间。如果启用这里有一点性能和大小的开销但是开销很小。由于我是用的是AMD系统所以我禁用了这个特性。
开发者可以启用"EFI runtime service support (EFI)"。只有在有EFI固件的系统上启用它。拥有这个特性内核可以使用可用的EFI服务。EFI是一个操作系统和硬件如何交流的规范所以EFI固件是使用这个规范的硬件代码。因为我没有EFI固件所以我禁用了它。
这是一个应该被启用的有用的安全方式(Enable seccomp to safely compute untrusted bytecode (SECCOMP))。这个安全特性在使用不受信任的字节码的数值计算(执行大量计算的软件)中使用。字节码(可移植代码)是一种被解释器有效读取的代码。字节码不是源代码,但它也不是汇编或者二进制代码。不受信任的代码是一种可能导致系统/数据损坏的代码。可能会破坏系统或者毁坏数据的不受信任的代码通过seccomp被隔离在独立的地址空间中。这是通过文件描述符传输的方法。通常上最好启用这个安全特性即使会有一些性能开销除非你在制作一个需要惊人性能的内核。
这里是另外一个安全特性(Enable -fstack-protector buffer overflow detection (CC_STACKPROTECTOR))。缓冲溢出是数据被写超出了它的内存界限并且进入了邻近的内存中。这是一个安全威胁。一些恶意软件使用缓冲区溢出来利用系统。启用这个会使用GCC选项 "-fstack-protector"。GCC是一个Linux编译器。这个编译器会在你配置完成后编译内核。这个编译器参数会在返回地址前在栈上加入一个canary值(特殊的安全代码)。这个值会在返回前被验证。当内存溢出发生时canary值会得到覆盖消息。当这个发生时会触发一个内存错误(kernel panic)。如许多人知道的那样内核错误意味着系统将要崩溃但是这比系统或者数据永久损害的好。发生内核错误系统会重启但是如果缓冲移除得到了一个损坏系统的机会一个简单的重启无法修复破坏。你必须用GCC 4.2或者更高版本支持这个参数的GCC来编译内核。
注意:为了得到你使用的版本号,在命令行内键入"gcc --version"。
在这之后我们可以配置定时器频率。配置工具建议使用250Hz所以我们使用这个值。
Timer frequency
1. 100 HZ (HZ_100)
> 2. 250 HZ (HZ_250)
3. 300 HZ (HZ_300)
4. 1000 HZ (HZ_1000)
choice[1-4?]: 2
使用1000Hz通常来讲对许多系统而言太快了。定时器频率决定着定时器中断被使用的频率。这有助于在时间线上的系统操作。程序并不是随机地执行一条命令。相反它们会等到定时器中断结束。这保持着有组织和结构的处理。频率为100Hz的定时器中断之间的时间是10ms250Hz是4ms1000Hz是1ms。现在许多开发者会马上想到1000Hz是最好的。好吧这取决于你对开销的要求。一个大的定时器频率意味着更多的能源消耗和更多的能源被利用(在定时器上),产生更多的热量。更多的热量意味着硬件损耗的更快。
注意:如果某个特定的特性对你并不重要或者你不确定该选择什么,就使用配置工具选择的默认值。比如,就我现在正在配置的内核而言,使用哪个定时器对我并不重要。总的来说,如果你没有特别的原因去选择任何一个选项时,就使用默认值。
这个有趣的系统调用可能会对一些用户有用(kexec system call (KEXEC))。kexec调用会关闭当前内核去启动另外一个或者重启当前内核。硬件并不会关闭并且这个调用可以无需固件的帮助工作。bootloader没有被执行。(bootloader是启动操作系统的软件) 这个重启发生在操作系统级别上而不是硬件上。使用这个系统调用会快于执行一个标准的关机或者重启。这保持硬件在开启状态。这个系统调用并不能工作在所有系统上。为了高性能,启用热插拔。
To use kexec, use the command below replacing “<kernel-image>” with the kernel that will be used after reboot. Also, replace “<command-line-options>” with some of those kernel parameters we had discussed previously. (I will go into greater depth in a later article.)
为了使用kexec对重启后要使用的内核使用如下命令替换"<kernel-image>"。同样,使用之前我们讲过的内核参数替换"<command-line-options>" (我会在以后的文章中更深入的讨论。)
kexec -l <kernel-image> --append="<command-line-options>
Specifically, I would type “kexec -l /boot/vmlinuz-3.8.0-27-generic append="root=/dev/sda1””
特别地,我这里输入"kexec -l /boot/vmlinuz-3.8.0-27-generic append="root=/dev/sda1""
注意硬件有时不必重启所以这不依赖于kexec。
下面我们有一个适用于kexec的调试特性(kernel crash dumps (CRASH_DUMP))。当kexec被调用时一个崩溃信息(crash dump)会生成。除非你有必要调试kexec否则这个并不必要。我禁用了这个特性。
再者我们有另外一个kexec特性(kexec jump (KEXEC_JUMP))。kexec跳允许用户在原始内核和kexec启动的内核之间切换。
最好对内核启动地址使用默认值(Physical address where the kernel is loaded (PHYSICAL_START) [0x1000000])。
下一个内核选项(Build a relocatable kernel (RELOCATABLE))允许内核可以放在内存的任何地方。内核文件会增大10%但是超出部分会在执行时从内存移除。许多人也许想知道这为什么很重要。在2.6.20内核前,救援内核(rescue kernel)不得不被配置和编译运行在不同的内存地址上。当这个特性发明后,开发者不必再编译两个内核。救援内核不会在第一个已加载的内核地地方加载因为内存部分已被占用或者损坏。(如果你正在使用救援内核,那么明显第一个内核发生了错误)
这个特性应该在可以增加CPU的系统中启用除非你有特别的理由不去这么做(Support for hot-pluggable CPUs (HOTPLUG_CPU))。配置工具会自动启用这个特性。在这个特性下,你可以在一个拥有很多处理器的系统上激活/停用一个CPU。这并不意味着在系统中加入新的CPU。所有的CPU必须已经在系统中。
下面的选项会让我们选择设置上面的特性是否默认启用(Set default setting of cpu0_hotpluggable (BOOTPARAM_HOTPLUG_CPU0))。为了性能最好禁用这个特性直到需要的时候。
这个调试特性允许开发者调试CPU热插拔特性(Debug CPU0 hotplug (DEBUG_HOTPLUG_CPU0))。我禁用了它。
为了兼容旧版本的glibc(<2.3.3),启用这个特性(Compat VDSO support (COMPAT_VDSO))这适用于通过映射32位在VDSO(虚拟动态链接共享对象)的旧式地址Glibc是GNC C库;这是GNU工程实现的C标准库
如果系统内核被用于一个缺乏完整功能的bootloader上,那么启用这个特性(Built-in kernel command line (CMDLINE_BOOL))。这允许用户在内核自身上使用一条命令行,那么管理员可以修复内核问题。如果bootloader已经有了一条命令行(像grub),那么这个特性不必启用。
现在我们可以配置ACPI和电源了。首先,我们被要求选择系统是否可以挂起内存(Suspend to RAM and standby (SUSPEND))。高级配置和电源接口(ACPI)是一种对于设备配置和电源管理的开放标准。挂起系统会将数据放在内存上同时硬件进入一种低功耗的状态。系统不会完全关机。如果用户需要计算机进入一个低功耗的状态但是希望保留当前已打开程序时是非常有用的。关闭一个系统会完全关闭系统电源并且清理内存。
下面,我们可以启用睡眠(Hibernation (aka 'suspend to disk') (HIBERNATION))。睡眠就像挂起模式,但是内存中所有数据被保存到硬盘上并且设备完全关闭。这允许用户在电源恢复后继续使用他们已打开的程序。
这里,我们可以设置默认的恢复分区(Default resume partition (PM_STD_PARTITION))。非常少的开发者和管理员需要这个特性。当系统从睡眠中恢复时,他会加载默认的恢复分区。
在这之后,我们可以启用"Opportunistic sleep (PM_AUTOSLEEP)"。这会让内核在没有活跃的唤醒调用被调用时进入挂起或者睡眠状态。这意味着空闲系统将会进入挂起模式以节省电源。我启用了这个特性。
接下来,我们被询问关于"User space wakeup sources interface (PM_WAKELOCKS)"。启用这个特性将会允许激活源对象被激活,停用,并通过基于sysfs接口由用户空间创建。激活源对象会追踪唤醒事件源。
sysfs是位于/sys的虚拟文件系统。这个虚拟文件系统包含了关于设备的信息。当进入/sys时,它似乎是硬盘的一部分,但是这个并不是一个真正的挂载点。这些文件实际存在于内存中。这与/proc是同一个概念。
注意:"/sysfs"是一个文件夹而"/sysfs"或许是一个根目录下名为"sysfs"的文件。许多Linux用户会混淆这两种命名约定。
如果启用了上面的选项,那么你可以设置Maximum number of user space wakeup sources (0 = no limit) (PM_WAKELOCKS_LIMIT)"。最好选择默认。那么你就可以启用垃圾收集器(Garbage collector for user space wakeup sources (PM_WAKELOCKS_GC))。垃圾收集是一种内存管理方式。
注意: 在需要更多内存的系统中,通常最好在大多数情况下尽可能启用垃圾收集。不然内存会消耗得更快且杂乱。
下一个电源选项关于IO设备(Run-time PM core functionality (PM_RUNTIME))。这个选项允许IO硬件在运行时进入低功耗状态。硬件必须支持这个才行,不是所有硬件都会这么做。
与其他许多内核组件一样,如果启用了(Power Management Debug Support),电源管理代码同样有调试支持。我禁用了这个选项。
注意: 注意这些我引用/显示的配置工具上的选项/问题不再显示选项代码(括号间所有的大写字母)。这是因为我没有使用基于ncurses的配置工具(make menuconfig)而是使用默认工具去得到选项/设置/问题。记住,"make config"缺乏保存当前进度的能力。
在这之后,配置工具会启用"ACPI (Advanced Configuration and Power Interface) Support"。最好允许这个电源管理规范。通常上,配置工具会启用这个特性。
为了允许向后兼容,启用"Deprecated /proc/acpi files"。新的实现使用更新的在/sys下的实现。我禁用了这个选项.一个相似的问题询问关于"Deprecated power /proc/acpi directories"。通常上,如果你禁用了这些文件,你不再需要这些文件夹,所以我禁用了他们。一些旧的程序可能会使用这些文件和文件夹。如果你在给旧的的Linux系统上编译一个新的内核,最好启用这个选项。
下面,我们有另外一个文件接口可以启用或者禁用(EC read/write access through)。这会创建一个嵌入式控制器接口在/sys/kernek/debug/ec下。嵌入式控制器通常在笔记本中读取传感器。内核代码通过系统的BIOS表提供的ACPI代码访问嵌入式控制器。
这里有另外一个可以启用或者禁用的向后兼容特性 (Deprecated /proc/acpi/event support)。acpi守护进程可能会读取/proc/api/event来管理ACPI生成的驱动。不同于这个接口,守护进程使用netlink事件或者输入层来得到送给用户空间的事件。acpi守护进程管理ACPI事件。
下一个选项允许开发者启用一个特性,它会通知内核现在使用的是AC(AC Adapter)还是电池。下一个选项从/proc/acpi/battery/ (Battery)中提供电池信息。
为了内核在电源/睡眠按钮按下或者盖子合上时表现不同,启用这个选项(Button)。这些事件在/proc/acpi/event/中控制。比如,这样的行为如果在用户账户电源选项启用时,当笔记本电脑的盖子关闭后系统将会挂起。
下一个ACPI扩展是对视频适配器的(Video)。
ACPI风扇可以被启用/禁用(Fan)。最好启用ACPI风扇管理。这有助于保存能源。
我们正在进一步配置内核中,但在接下来的文章中还有更多要做。
--------------------------------------------------------------------------------
via: http://www.linux.org/threads/the-linux-kernel-configuring-the-kernel-part-5.4424/
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -1,11 +1,11 @@
ncdu-基于Ncurses的磁盘实用工具
===
几天前,我们谈论了[gt5][1](一个具有图形前端的磁盘实用工具)。接着上次,继续介绍可供选择的磁盘实用工具我们今天要讨论的是一个基于ncurese的磁盘实用工具可以远程运行但没有图形界面。我们要介绍的这个命令行工具叫做**ncdu**。
几天前,我们讨论了[gt5][1](一个具有图形前端的磁盘实用工具)。接着上次,继续介绍这个命令系列-du可选命令我们今天要讨论的是一个基于ncurese的磁盘实用工具可以远程运行但没有图形环境。我们要介绍的这个命令行工具叫做**ncdu**。
###ncdu-基于Ncurses的du可选程序
这个命令行工具是一个基于curses版本的标准du命令。它可帮你在没有安装图形环境的情况下快速查看系统的磁盘使用统计
这个命令行工具是一个基于curses版本的标准du命令。它可帮你在没有安装图形环境的情况下快速查看系统的磁盘使用统计
![](http://mylinuxbook.com/wp-content/uploads/2013/10/ncdu-main.png)
@ -14,13 +14,13 @@ ncdu-基于Ncurses的磁盘实用工具
- Shell Bash 4.2.45
- 应用 ncdu 1.9
###一个简要手册
###简明教程
这儿是一些ncdu命令的例子
以下是一些ncdu命令的例子
**1. 默认输出**
执行以下**ncdu**命令,你会观察到,它会先扫描磁盘然后以递减的顺序显示各个目录下的空间使用情况。
执行以下**ncdu**命令,你会观察到,它会先扫描磁盘然后序显示各个目录下的空间使用情况。
**> 扫描**
@ -60,11 +60,11 @@ ncdu-基于Ncurses的磁盘实用工具
![](http://mylinuxbook.com/wp-content/uploads/2013/10/ncdu-4.png)
如你所见,在输出结果的第二竖列显示了每个目录占用的空间占总的磁盘空间的百分比。
如你所见,在输出结果的第二竖列显示了每个目录占用的空间占总的磁盘空间的百分比。
**5. 获悉有关所有可使用快捷键的**
按****可获得有关快捷键,格式以及有关ncdu版本的信息。
按****可获得相关快捷键、格式以及有关ncdu版本的信息。
下面给出一些例子:
@ -74,14 +74,14 @@ ncdu-基于Ncurses的磁盘实用工具
![](http://mylinuxbook.com/wp-content/uploads/2013/10/ncdu-5-3.png)
想知道有关命令行选项以及其信息,可前往[ncdu命令的Man页面][2]。
想知道有关命令行选项以及其信息,可前往[ncdu命令的Man页面][2]。
###下载/安装/配置
这儿是一些有关ncdu命令的重要链接
以下是一些有关ncdu命令的重要链接
- [Home Page][3]
- [Download Link][4]
- [主页][3]
- [下载链接][4]
当然你也可以通过命令方式下载安装比如apt-getyum等。另外Ubuntu用户可使用Ubuntu软件中心下载安装这个工具。
@ -105,11 +105,11 @@ ncdu-基于Ncurses的磁盘实用工具
via: http://mylinuxbook.com/ncdu-ncurses-based-disk-usage-utility/
译者:[Linux-pdz](https://github.com/Linux-pdz) 校对:[校对者ID](https://github.com/校对者ID)
译者:[Linux-pdz](https://github.com/Linux-pdz) 校对:[Caroline](https://github.com/carolinewuyan)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://mylinuxbook.com/gt5-a-graphical-alternative-to-du/
[2]:http://linux.die.net/man/1/ncdu
[3]:http://dev.yorhel.nl/ncdu
[4]:http://dev.yorhel.nl/ncdu
[4]:http://dev.yorhel.nl/ncdu