momo zone

调核人的blog

Monthly Archives: 一月 2015

ipv6 相关RFC汇总

RFC 1886   DNSv6

RFC 1981   路径MTU 发现

RFC 2080   RIPng

RFC 2373   IPv6 地址结构

RFC 2374   可聚合全球单播地址格式

RFC 2375   IPv6组播地址分配

RFC 2401   IP 安全架构

RFC 2402   IP认证头

RFC 2404   HMAC/ESP AH

RFC 2406   ESP

RFC 2407   ISAKMP

RFC 2408   ISAKMP

RFC 2409   IKE

RFC 2427   FR上的多协议互联

RFC 2428   FTP为IPv6做的扩展和NAT

RFC 2460   IPv6规范

RFC 2462   IPv6无状态地址自动配置

RFC 2463   ICMPv6

RFC 2464   以太网上的IPv6包传送

RFC 2467   FDDI上的IPv6包传送

RFC 2472   PPP上的IPv6包传送

RFC 2473   IPv6的GPT隧道规范

RFC 2474   IPv4/6报头DS字段定义

RFC 2475   区分服务框架结构

RFC 2492   ATM上的IPv6

RFC 2545   利用BGP4多协议扩展提供IPv6域间路由

RFC 2590   FR上的IPv6包传送

RFC 2597   AF PHB

RFC 2598   EF PHB

RFC 2640   FTP的国际化

RFC 2684   AAL5上的多协议封装

RFC 2697   单速三色标记

RFC 2698   双速三色标记

RFC 2710   IPv6 MLD

RFC 2711   IPv6 路由器报警选项

RFC 2732   URL中IPv6地址文字格式

RFC 2765   无状态IP/ICMP翻译算法(SIIT)

RFC 2766   NAT-PT

RFC 2858   MP-BGP 扩展

RFC 2893   IPv6主机和路由器转换机制

RFC 3056   跨IPv4的IPv6域互联

RFC 3068   6to4代理路由器的任意播地址前缀

RFC 3095   ROHC:框架等

RFC 3107   BGPv4携带标签

RFC 3137   OSPF末节路由器通告

RFC 3147   CLNS上的GRE

RFC 3152   IPv6 ARPA

RFC 3162   RADIUS and IPv6

RFC 3315   DHCPv6

RFC 3319   DHCPv6 的SIP选项

RFC 3392   BGPv4的通告能力

RFC 3414   USM of SNMPv3

RFC 3484   IPv6的默认地址选择

RFC 3515   IPv6地址结构

RFC 3576   授权变更

RFC 3587   IPv6单播地址结构

RFC 3590   MLD源地址选择

RFC 3596   支持IPv6的DNS扩展

RFC 3633   DHCPv6前缀代表

RFC 3646   DHCPv6的DNS配置选项

RFC 3697   IPv6流标签规范

RFC 3736   DHCPv6无状态服务

RFC 3756   IPv6邻居发现信任模式和安全风险

RFC 3759   ROHC:术语和通道映射

RFC 3775   IPv6的移动特性

RFC 3810   MLDv2

RFC 3846   携带网络访问ID的移动IPv4扩展

RFC 3879   本站点地址的解释

RFC 3898   DHCPv6的NIS选项

RFC 3954   Cisco NetFlow Service Export Version 9

RFC 3956   IPv6地址嵌入RP地址

RFC 3963   NEMO

RFC 3971   安全邻居发现(SEND)

RFC 3972   CGA

RFC 4007   IPv6地址作用域架构

RFC 4075   IPv6的SNTP选项

RFC 4087   IP tunnel MIB

RFC 4091   ANAT SDP

RFC 4092   SIP中ANAT SDP用法

RFC 4109   IKEv1

RFC 4191   默认优选路由和更具体路由

RFC 4193   本地IPv6单播地址的唯一性

RFC 4214    ISATAP

RFC 4242   DHCPv6的信息刷新时间选项

RFC 4282   网络访问ID

RFC 4283   移动IPv6的移动节点ID选项

RFC 4285   移动IPv6的认证协议

RFC 4291   IPv6地址架构

RFC 4292   IP转发表MIB

RFC 4293   IP MIB

RFC 4302   AH

RFC 4306   IKEv2

RFC 4308   IPSec 加密栈

RFC 4364   BGP MPLS/IP VPN

RFC 4382   MPLS/BGP L3 VPN MIB

RFC 4443   ICMPv6规范

RFC 4552   OSPFv3的认证和机密性

RFC 4594   区分服务Class配置指南

RFC 4601   PIM-SM 协议规范

RFC 4610   anycast-RP PIM

RFC 4649   DHCPv6 代理remote-id 选项

RFC 4659   BGP-MPLS IP VPN为IPv6 VPN做的扩展

RFC 4724   BGP的优雅重启(GR)机制

RFC 4798   使用6PE跨IPv4 MPLS 连接IPv6网络

RFC 4861   IPv6 邻居发现

RFC 4862   IPv6无状态地址自动配置

RFC 4884   支持multi-part信息的ICMP扩展

RFC 4885   网络移动性支持术语

RFC 4887   网络移动性home network模型

RFC 5015   BIDIR-PIM

RFC 5059   PIM的BSR机制

RFC 5072   IPv6在PPP上运行

RFC 5095   对IPv6类型0路由报头的解释

RFC 5120   M-ISIS

RFC 5187   OSPFv3 GR

RFC 5308   ISISv6

RFC 5340   OSPFv3

RFC 5460   DHCPv6 Bulk Leasequery

RFC 5838   OSPFv3支持address family

RFC 5881   支持IPv4和IPv6(单跳)的BFD

RFC 5905   NTPv4:协议和算法规范

RFC 5969   6RD协议规范

Advertisements

systemd journal 介绍

Lennart Poettering 发表长篇文档介绍 systemd 即将添加的新功能:Journal。

介绍 Journal

今天将为您介绍在过去的几周我们在致力实现一个 systemd 的新功能。这项新功能同时将帮助我们显著的简化最小化安装的 Linux 系统,同时带来一些新的概念,也会取代一个经典 Unix 系统中的部件。因此它需要一个比较长的介绍。所以请准备好一杯热巧克力,慢慢阅读。

背景:syslog

长久以来 syslog 是每一个 Unix 系统中的重要部件。在漫长的历史中在各种 Linux 发行版中都有不同的实现去完成类似的工作,它们采取的是逻辑相近,并使用基本相同的文件格式。

如其名所述,syslog 守护进程的任务是系统记录。它从应用程序和服务中获取格式各异的日志消息并保存到磁盘上。通常,这些消息唯一的元数据是组件名、优先级、时间戳、进程标签和 PID。这些属性由客户端传入,不经过验证就直接原样保存。很多这些属性都是可选的,不同的实现中具体的格式也是有很大变化的。有个 RFC 尝试逐渐改进和规范化消息格式,但是最重要的实现(比如 glibc’s syslog() 调用)基本无视了这些改进。

现实中,宽松的 syslog 日志消息格式带来了灵活和强大,但同时也成为它最大的不足。因为没有定义结构化的格式,系统的分析和日志消息处理变得十分混乱:在将其翻译为人类语言的过程中大量与消息生成源相关的上下文都丢失了。而且还有很多日志分析器会尝试通过分析人类语言来重构上下文。

Syslog 已经存在了差不多 30 年了,由于它的简单和普遍,成为系统管理员的一个重要工作。但是它切实存在的局限开始导致一些严重的问题:

  1. 消息的内容无法验证。每一个本地进程都可以声称自己是 Apache PID 4711,而 syslog 也就相信并保存到磁盘上。
  2. 数据格式散漫。自动化的日志分析器需要分析人类语言字符串来 a) 识别消息类型;b)分析其中的参数。这会导致灾难性的运用正则表达式,同时也意味着需要不断的跟进上游开发者,以免他在新版本中改变了哪怕一点点人类语言日志字符串。于是在这种方式下,为了不影响用户自定义的正则表达式,所有的日志消息将成为软件的 ABI,而这通常并不是开发者所期望的。
  3. 时间戳并不包含时区信息,尽管一些较新的实现提供对它的支持。
  4. Syslog 只是系统上众多日志系统的之一。其他的日志包括 utmp/wtmp, lastlog, audit, 内核日志, 固件日志, 和很多应用程序特定格式的日志。这不仅是毫无必要的复杂,并且掩盖了各个子系统之间日志的关系。
  5. 阅读日志文件很简单但是很低效,很多日志操作的复杂性为 O(n),进行索引基本不可能。
  6. syslog 的网络协议很简单但有限。由于它一般仅支持文件推送传输模式,没有保存和转发,所以同时有大量进程响应(Thundering Herd)或者包丢失将严重影响它的使用。
  7. 日志文件很容易被骇客篡改,容易将攻击信息从系统管理员眼皮底下掩盖起来。
  8. 没有访问控制。除非由系统管理员手动脚本控制,一个用户要不然拥有日志文件的完整权限,要不就一点儿都没有。
  9. 日志项目保存的元数据很有限,缺少一些关键信息,比如服务名、授权进程或者稳定的时间戳。
  10. 日志的自动化滚动是存在的,但是在大多数实现中都不甚理想:并不是持续监视磁盘使用上限,而是在固定时间点上执行滚动操作,因此遗留了 DoS 攻击的可能。
  11. 在一些实现中有更新速度限制,但是一般来说并不会考虑所建议的磁盘使用和服务指派信息。
  12. 一般都有磁盘上日志结构的压缩,但仅仅在滚动时生效,并且又增加了已经比较糟糕的日志操作复杂性。
  13. 经典的 Syslog 传统上并不处理系统启动早期和关机晚期的日志,尽管在最近的改进中(比如 systemd )增添了此功能。
  14. 无法记录二进制数据,在一些情况下恰好是必要的(比如 ATA SMART、SCSI 数据、固件转储)。

很多这些问题在最近变得十分明显,例如觉察修改了日志文件的入侵行为通常仅能靠运气。此外,由于 syslog 的功能所限,目前部分用户常常要依靠一些闭源的组件来处理收集到的日志信息,使其变得有意义,访问更便捷。

日志是服务管理中关键的一部分。在 Unix 系统上,绝大多数的运行服务都连接到 syslog 来写入日志消息。在 systemd 中,我们将日志做为服务管理的核心部分:从 Fedora 16 开始所有启动的服务都将把标准输出和错误输出自动连接到 syslog 上。 不管服务是在启动早期还是正常操作中,它的输出结果都会保存到系统日志中。因此,由于日志如此重要,于是需要特别配置才能禁用它,将原先的“可选记录”策略转变为“可选不记录”策略。信息透明不再是明智的选择,而是默认选择。

在开发 systemd 的过程中 syslog 的局限变得愈加明显。例如:我们非常想添加的的一个简化系统管理工作的功能是当使用 “systemctl status foo.service”时,在通常服务信息的下面显示最近的 10 条日志信息。若是使用经典的 syslog 这个实现将是难以忍受的低效率、不可靠和不安全:需要对于所有日志文件的线性搜索(可能涉及实时解压的操作),并且存储的数据也是被修改过的,无法快捷的和 systemd 的服务名和运行环境匹配。

如果用一句话代替这些内容:传统的 syslog 在 30 年的发展中演变成为有很多严重局限的强大工具。

现在,我们将如何改变这个状况?

Journal

您可能已经从如上的描述中猜出了:我们正在开发一个解决已有日志问题,弥补以上不足并且增添了一些新功能的工具:Journal。

当然,构建一个全新的系统核心组件时,设计目标必须要明确:

  1. 简单性:代码少,依赖少,抽象开销最小。
  2. 零维护:日志是除错和监控系统的核心功能,因此它自己不能再是产生问题,在严酷的环境下也要能工作。举例说,这意味着系统要合理的应对如有限磁盘空间或者 /var 不可用等问题,避免自己引发磁盘空间问题(例如在扩展日志文件时在守护进程正确的实现日志文件滚动)。
  3. 健壮性:由 Journal 生成的数据文件应该可以由管理员直接访问,并且在使用 “scp” 或 “rsync” 之类的工具复制到其他主机上的时候依然可用。合理的处理不完整拷贝的情况。Journal 文件浏览客户端应该可以在没有 Journal 守护进程的情况下工作。
  4. 移植性:Journal 文件应该在所有类型的 Linux 系统上可用,无论它使用的何种 CPU 或者字节序。在嵌入式 ARM 系统上生成的 Journal 文件应该可以在 x86 的桌面系统上可以读取,如同本地生成的一般。
  5. 性能:以复杂性为前提,添加和浏览 Journal 操作应该足够快。最好实现 O(log n) 或者更快,即便在大型组织内的日志监控也有良好性能。
  6. 整合性:因为日志是服务的基础之一,Journal 应该和系统的其他部分紧密的整合起来,所以需要特别的声明才能不使用它。日志是服务管理器的核心责任,所以应该通过整合来反映这一点。
  7. 最小资源占用:Journal 数据文件需要较小,特别是和经典的 syslog 生成的数据相比时。
  8. 通用的事件存储:Journal 应该可以用来进行任何 Journal 条目的存储,无论其格式、元数据还是大小。
  9. 统一化:各种不同的日志存储技术应该统一起来,将所有的可记录事件保存在同一个数据存储中。所以 Journal 内容的全局上下文都会被保存并且可供日后查询。例如一条固件记录后通常会跟随一条内核记录,最终还会有一条用户态记录。重要的是当保存到硬盘上时这三者之间的关系不会丢失。
  10. 高级别工具的基础:Journal 应该提供一个通用的 API ,以便状态监控器、恢复工具、崩溃报告生成器和其他高级别的工作来访问 Journal 数据。
  11. 扩展性:和 Linux 的适用范围从嵌入式设备跨越到超级计算机集群一样,Journal 也应该可以有广泛。日志对于开发嵌入式设备和维护集群一样重要。为了保持较小占用,Journal 需要着重于常见的一般使用模式,同时对于一些特定的变化做一定考量。
  12. 通用性:做为操作系统的基础模块,Journal 应该可以通用,并能扩展以满足于一些应用程序特定的需求。格式应该是可扩展的,并且提供 API。
  13. 集群和网络:今日计算机很少是独立工作的了。所以有必要从 Journal 文件和工具的设计初始就考虑对于多主机安装配置的支持。
  14. 安全性:Journal 文件应该是可以验证的,让无法检测的修改不再可能。

说了很多设计目标,下面是一些我们实现过程的技术概览,并介绍新系统是如何工作的:

受 udev 事件启发,Journal 条目与环境组块相似。一个键值域,按照换行符分开,使用大写的变量名。和 udev 设备事件和真实环境组块相比,有一个主要不同:尽管毫无疑问主要值会是 ASCII 格式的字符串,也支持以二进制为值 — 某些情况下可以用来添加 ATA SMART 健康信息、SCSI 数据、内核转储或固件转储。由代码生成的 Journal 条目可以包含多个域,既可以是已知的类型,也可以是服务/子系统/驱动特定的。

应用程序和服务可以通过将项目域传递给 systemd journald 服务来生成项目。该服务可以为项目增加一定数量的元数据。这些受信任域的值由 Journal 服务来决定且无法由客户端来伪造。一旦牵扯到硬件和内核设备,Journal 服务将为日志项目添加从 udev 数据库获得的当前设备信息,其中包含了所有设备名和符号链接,以及与 Journal 条目关联的其他设备数据。

由 Journal 守护进程添加的域将具有下划线前缀(“_”), 用来标示该区域是可信的,而不是由未知客户端提供的。应用程序自身无法传递以下划线开头的的域名称。这是一个样例展示在客户端传输基础上添加内容的日志条目展示:

_SERVICE=systemd-logind.service

MESSAGE=User harald logged in

MESSAGE_ID=422bc3d271414bc8bc9570f222f24a9

_EXE=/lib/systemd/systemd-logind

_COMM=systemd-logind

_CMDLINE=/lib/systemd/systemd-logind

_PID=4711

_UID=0

_GID=0

_SYSTEMD_CGROUP=/system/systemd-logind.service

_CGROUPS=cpu:/system/systemd-logind.service

PRIORITY=6

_BOOT_ID=422bc3d271414bc8bc95870f222f24a9

_MACHINE_ID=c686f3b205dd48e0b43ceb6eda479721

_HOSTNAME=waldi

LOGIN_USER=500

该样例条目是由 systemd logind 守护进程在用户 “harald” 登录时创建的。如您所见它自动添加了相当复杂的数据,包括一些重要的执行进程参数。更加详细的定义的域说明请参考:

Well Known Journal Fields

原生的 Journal 文件格式从经典的日志文件和 Git 仓库获得启发。它被设计来只将日志数据添加到末尾(用来保证基于 mmap() 的访问的健壮和原子性),以及一些在用来反映新添加内容的文件头元数据变更。这些用来组成项目的域以独立对象的方式保存在 Journal 文件中,当需要时被项目所引用。这将节省大量的磁盘空间,因为日志项目通常会有很多的重复(试想:每个本地的消息都会包含相同的 HOSTNAME=MACHINE_ID= 域)。数据域还会被压缩来节省磁盘空间。直接效果就是尽管 Journal 相比经典的 Syslog 明显记录了更多的元数据信息,但是磁盘占用却无明显变化。

磁盘上使用特定的 64位 LE(从小到大)偏移,目的是简化操作并保证我们可以存储大小可观的二进制数据。日志浏览工具和 journald 之间的无需同步,需要浏览 Journal 文件的客户端可以简单的使用 mmap() 访问文件,并使用文件变化通知来告知更新。

提供用于客户端访问 Journal 文件的库,用来实现对项目任意域的索引,以及通过单调化或者时序化时间戳的随机访问。客户端库会自动合并多个 Journal 文件使其看起来好像是一个统一的 Journal 项目流。这用来隐藏底层细节譬如已经归档的文件,或属于多个用户的 Journal 文件。在浏览接口上透明化的 Journal 文件合并是完全动态的:当创建新的 Journal 文件或者删除旧的文件时都会自动更新浏览视图。事实上,Journal 浏览期望做到即时性的,从而实现对 Journal 来源的实时监控。

Journal 客户端库头文件

从非特权登录用户发来的消息将按照每用户分割为独立的 Journal 文件。使用 POSIX ACL 来实现读取权限控制,保证用户可以访问他自己的 Journal 文件。系统服务生成的 Journal 条目默认情况下无法被一般用户访问,除非他们属于一个特殊的 Unix 用户组。值得注意的是文件的分割是用来协助合适的访问控制的,但是全局的上下文并未因此丢失。客户端会通过所有消息强制按照统一的排序的方式将 Journal 文件合并起来,从而保证自动分配的序列号码的全局顺序。这意味着可以在不影响用户条目上下文的情况下实现访问控制。

Journal 的核心思路就是统一目前所用的各类日志记录技术。因此它将成为 wtmp 的替代品,启动早期记录器甚至授权记录后端。数据将从各种不同的来源生成:printk() 生成的内核消息,syslog(3) 生成的用户态消息,使用原生 API 生成的用户态条目,通过 /proc/proc/sys/kernel/core_pattern 生成的核心转储及更多。以后我们希望能有固件消息(UEFI 日志)的钩子,并扩展基于内核的日志来支持内核中结构化日志。因为在 Journal 数据结构中所有的域都是隐式的索引过的,所以跟 wtmp 相比从 Journal 的中提取用户数据是个很简单的操作。启动早期和运行时日志时统一的。只要 /var 不可用,所有的 Journal 条目便会自动保存在 /run 下,等待 /var 可用时再立刻写入。这意味着最终所有系统生成的消息,不管是在 POST 中由固件,还是在内核初始化,启动早期还是运行时,都将保存到索引的 Journal 文件中。

为了让条目可以被客户端工具识别出来,Journal 条目可选包含一个 128 位的标示符,由生成消息的服务设定于 MESSAGE_ID= 中。这个 ID 应该由开发者在开发过程中随机生成的。例如,一个 ID 表示“用户登出”而另外一个 ID 表示“用户登入”。所有这些事件的条目都分别包含 128 位的 ID,因此将很容易辨识出来并索引。这个 ID 完全可以和 RFC4122 UUID 类型四保持兼容,但是这严格的来说并不需要故也不强求。该设计会和其他采用 UUID 标示消息类型的日志系统保持兼容,比如 UEFI 固件日志。考虑到128 位 ID 的全局错误代码的随机本质,它们并不需要一个集中式的标准化机构来为某个特定的消息类型指定 ID。指定消息 ID 是完全可选的,我们认为只要少量的 Journal 的条目会包括它,比如那些需要被用户态识别出来的部分。如果一个开发者需要为他新引入的消息类型指定一个新 128 位 ID 的话,只需要运行 “cat /proc/sys/kernel/random/uuid” 即可,它会在每次运行的时候返回一个新的 UUID。这 128 位的 ID 亦可用于实现本地化的消息 UI,按照他在 UI 工具中寻找翻译过的消息,然后呈现给用户。

所有的条目都用现实时间和单调时间打上时间戳。为了使单调时间戳有意义,所有的消息同时也包含运行的 Linux 内核的启动 ID (比如 /proc/sys/kernel/random/boot_id)。精确度是 1 微妙,现实时间采用 UTC 计时以避免遭受和 syslog 类似的时区问题。

Journal 文件可以回滚、删除、复制到其他机器、合并或者更改。为了保证应用程序、同步公布和网络服务可靠的识别条目,所有 Journal 条目都可以用一个指针字符串标识。一个这样的字符串可以标识一个特定的消息,甚至在条目丢失或不可用时也保持不变,于是可以用来定位最近的下一个条目。

如果超过某个限额的话,journald 会自动回滚 Journal 文件。这被内建在磁盘空间分配的逻辑中,目的是避免单纯基于时间回滚的漏洞。回滚不仅考虑最大磁盘利用限制,并且还将监视通常的磁盘使用水平来保证磁盘上至少预留有一定空间。

由客户端发送的条目隐含的受到速率限制,避免未信任的客户端通过大量发送自身数据的方式冲掉 Journal 中的相关数据。这个速率依照可用磁盘空间调整,于是在磁盘空间富裕的时候速率会高些,而磁盘空间低时将会强制为较低的速率。

在初始版本的 journald 中对于网络支持会非常简陋:要在网络中分享 Journal 文件的话,使用比如 scp、rsync 或者 NFS 复制到一个集中化主机上。Journal 浏览器客户端将会透明化的合并这些文件,如果需要的话进行交叉存储。在稍候的版本中我们计划最低限度的扩展 Journal 来支持实时远程日志,通过用本地 Journal 文件做为缓存的存储-转发逻辑来实现 PUSH 和 PULL 两种模式。不管使用何种模式,Journal 的底层格式设计适用于扩展到大规模主机环境,所有的条目都会用机器 ID 和主机名来标示。目的是实现一种有效的 Journal 监控工具完成透明化、实时的多重主机日志浏览任务,并且留给管理员按照自己需要调整传输方式的空间,比如是否实时功能比避免大量进程响应(Thundering Herd)更重要等。

互联网是个险象丛生的地方。对于重要网站的入侵已经变得愈加常见。在成功的渗透之后,攻击者通常会通过编辑日志文件的方式掩藏他的踪迹。 这类修改在传统的 syslog 下很难检测:因为它用的是没有加密认证的纯文本,所以无法获知变更。从 Git 中获得启发,Journal 中的所有条目都是加密哈希过的,且在文件中包含先前条目的哈希值。这样的结果是一个条目链,每一个条目都可以认证之前的全部。如果最顶端的哈希通常都保存在一个只读的位置,整个链条都可以通过它认证。检测攻击者的修改将变得十分容易。

如上所述日志是服务管理的必要部分。这不仅意味着服务本身的日志输出将传递到 Journal,并且将为额外的服务事件生成 Journal 条目,比如当服务开始、错误推出、停止或崩溃之时。

Journal 的守护进程 journald 首先将取代目前 systemd 分发的两个日志相关迷你守护进程(systemd-kmsg-syslogd and systemd-stdout-syslog-bridge)。长期目标是在多种安装配置中取代传统的 syslog 守护进程,而不造成冲突。由于运行服务的减少(由 3 降为 1)以及相比全尺寸的 syslog 守护进程少很多代码的 journald,Linux 系统的资源消耗将会减低。

当前状态

目前为止,核心的功能和和全部重要的算法已经实现并放置在 systemd git 的 Journal 分支中。但是代码目前还不完善,缺少一些上面提到的功能。

这篇博文是用来澄清一些社区中对于我们计划、选择和原因的误解。

我们计划在 Fedora 17 中初步实现,不过在首次亮相中只选择与极少几个部件关联。rsyslog 会和它一起运行,用户可能会很难注意到它,除了 “systemctl status” 将会显示所有服务的最近日志信息,以及尝试使用我们的客户端工具,比如 “journalctl” 来搜索索引的 Journal 时。

常见问题及回答

我们一直在和不同知识背景的人讨论,收集想法、建议和批评。有一些问题经常被重复提到,下面就是我们的回答:

Journal 很酷,但是 systemd 很糟糕。我可以不用 systemd 而单独使用 journald 么?

不行。日志是服务管理的核心部分。Journal 和 systemd 紧密结合从而保证系统的每一个部分都可以监控,查询和除错。生成的 Journal 项目是从 systemd 的不同部分查询出来的。实际上,systemd 和 journald 是如此紧密耦合以至于拆分开的举动毫无意义。不过正如所说,这是自由软件,您可以随自己愿望修改代码。最后,您认为 systemd 很糟糕的想法是错误的。

运行 Journal 会破坏 rsyslog/syslog-ng 么?

不会。您可以同时运行 rsyslog 或 syslog-ng 及 journald,syslog 消息会双双记录在 rsyslog/syslog-ng 和 Journal 中。但是,Journal 将记录一些纯文本的 syslog 所不具备的丰富元信息。

我的应用程序需要在磁盘保存传统的纯文本日志。我可以配置 Journald 生成么?

不能。如果您需要这样做的话,只要和 Journal 同时运行一个传统的 syslog 实现如 rsyslog, 即可帮助您生成想要的文件。

为什么 Journal 不生成传统的日志文件?

简单来说,传统的日志文件无法索引,并且其速度随着复杂度按照函数 O(n) 降低。原生的 Journal 文件格式下关键操作速度随着复杂度按照 O(log(n)) 降低,性能更佳。更多原因请参考上面章节。

我可以连接一个 syslog 协议兼容的远程 RFC 到 Journal 么?

在目前您不可以,并且 Journal 也不太可能会默认支持这个。但是编写一个可行的转换器或者网关应该不困难。

我在嵌入式设备上使用 systemd 于是对永久性保存日志不感兴趣,我可以移除 Journal 么?

不可以。但是您可以告诉 systemd 您不需要永久性日志。通过移除(或者一开始就不创建)/var/log/journal 目录,在这种情况下 journald 仅会将记录到 /run/log/journal (如同在早期启动的情况下)。/run 是临时的并且会在重启时丢失,和 /var 不同。在此之上您可以将 Journal 使用的最大磁盘空间设置为一个很小的值。

人人都说 UUID 是有问题的。为何还要用 UUID 来表示消息呢?

UUID 规格的确是奇形怪状且不必要的复杂。因此我们推荐只要和 UUID 类型4保持一致即可,不用理会 RFC 4122。实际上 UUID 已经在 Linux 上成功的应用了很长时间,所有发行版默认都是依据文件系统 UUID 来执行挂载的。

但是 UUID 从来没正常工作过!比如 MAC 地址是重复的并且所有我的 USB 设备都使用的同一个。为什么要坚持使用它呢?

我们实际上一直在使用它,比如像上面说的在文件系统中,它工作的很好。硬件都包含有序列号,不少厂商初始化为 1-2-3-4-5,但是它和 UUID 没什么关系。设备序列号并不是 UUID,不要混淆!

另外,我们并没有强制使用它们。如上所述它是完全可选的,并且只需要并赋予到需要后来识别出来的消息上即可。

但我在代码中引入了一个 UUID 来标识一个消息类型,其他人使用了该段代码做为别的工作的模板,那么 Journal 就会坏掉了。

不,这不对。为什么?很简单,因为同样的 128位 ID 将会用来指定同一个错误/条件/项目类型,不管来源是什么。比如同样的 128位 ID 将会用来标识“在块设备上存在坏扇区”,而不管是哪个设备或驱动器生成了这个消息。如果用户态软件需要在不同的服务、驱动或设备之间区分开 Journal 项的话,请使用其他额外的匹配服务/设备/驱动的 Journal 信息域。

不过从另一个角度讲,您指出的实际上是个好事情。我们特别鼓励人们在他们的软件中重用消息 ID,而不是创造新的。

但是 printf()/printk() 格式化字符串是标识消息类型的更好选择!

现实并不是这样的。格式化字符串到头来不过只是人类语言的模板。将人类语言用于消息类型识别是不可靠的:每个修正的错误拼写都会影响消息类型,并且导致 Journal 客户端识别消息错误。每次对一个 Journal 消息进行扩充或者重写的时候,将会导致 ABI 破坏。让人类语言变为 ABI 是致命的错误。事实上,将所有消息类型变为 ABI 的方式在经典的正则表达式匹配条件下风险很大。OTOH 消息标识可以在改变人类语言字符串时保持不变,因此很好的将 ABI 和人类语言分割开了。

你们一点儿都不懂!你们应该使用源代码文件名和位置作为消息的标识符!

这并不可行,因为这将使源代码位置变为 ABI:问一次开发者在头文件中增加一行将导致全部消息 ID 的改变。这将是个大问题。

谁会来组织和管理 UUID 的命名空间并生成 UUID?Who would organize and manage the UUID namespace and generate UUIDs? 认真点儿,我们不需要更多官僚机制的人!

128 位随机 ID 的好处之一就是它的命名空间并不需要管理。所有人都可以从 /proc/sys/kernel/random/uuid 里取出一个随机 UUID 为他所用。只要需要,开发者可以生成任意多的 UUID 而不需要询问任意集中管理体制。UUID 允许我们拥有一个共同点的命名空间而无需官僚机制。

但是 UUID?你是认真的么?你是哪个星球来的!?人人都知道像 LANANA 这样的中介是为应用程序指定全球唯一消息标识 ID 的理想选择!

Linux 并不是一个孤岛。我们需要在 Journal 中与其他基础架构中所使用消息 ID 无缝整合起来。因此我们选择了有用途的并且已经在他处实践过的。同样,UUID 只不过是为了无需集中管理的唯一标识符。为什么要在没必要的时候选择一个人手不足的官僚的集中注册中心的?

喏,你应该使用逆序的域名表示消息类型,像 Java 一样!

实质上,比较字符串要比比较固定长度的 ID 更加复杂。并且,实事求是的说这不能解决命名空间的问题,因为估计有 90% 的消息类型将在同个命名空间内:org.freedesktop resp. org.kernel.

但是 ASN.1 OID 可以成为很好的消息类型区分符!

兄弟,没搞错吧?

现在我有了更好的主意,不如用 URL 做为类型 ID 吧?

实际上相比逆序域名的方式它并未好多少,不是么?

但是如果你们在每个项目上都要生成一个 UUID 的话,很快便会穷尽我的熵池的!

再度一遍博文,很显然您并没有仔细阅读。 128 位的消息 ID 是由开发者在开发过程中指定的,并不是在运行时。大多数项目在整个开发过程中几乎不可能生成超过 30 个,这个数量哪怕在 10 年前的机器的熵池中都是微不足道的。

你们这些用户态的小屁孩们,先是强迫我在系统中使用 20 个 CPU 进程分组,现在又要强迫我在系统中使用恶心的 UUID?

先不谈我们并没有强迫您使用 20 个进程分组的事实,您几乎肯定已经在使用 UUID 了,因为您的文件系统是在启动过程中依据 UUID 加载的。将这些当作是实现的具体细节,而您并不喜欢它,那么您就没必要在消息中添加它。影响的只是消息无法被再度识别,除非使用极度复杂的正则表达式。不过或许这就是您想要的?无论怎样,我们没有强迫任何人做任何事。

所以你们是依照发送用户的 ID 来分割 Journal 项目的了。那么你怎么能保证用户不会伪装身份呢?

幸运的是,Linux 内核支持 SCM_CREDENTIALS,可以提供我们无法伪造的消息发送者信息。

Journal 文件格式会标准化么?哪里可以找到磁盘上数据结构的说明?

截至目前我们还没有打算要将格式其标准化,保留在需要时进行变更的权力。我们会逐步完善磁盘上格式的文档,但是目前我们不希望能有程序直接读取、写入和修改 Journal 文件。对其的访问可以通过一个共享库和命令行程序实现。(不过再一次,这是自由软件,您随时可以阅读源代码!)

为什么你们这些人又搞重复发明?为什么不只把你们想要的增加到已有的 syslog?如果您只想清理日志格式的话,syslog 足够了。

有些情况下改进现有方案是一种方式,但是当需要的变化太大时,有正确的原因并且对以前解决方案提供了良好的兼容性的重新发明却是更好的选择。我们相信我们有着正确的原因,并且我们在努力提供最大可能的兼容性。

不,仅仅修复日志格式没法带来很多变革。不仅无法实现最基本的二进制文件或敏感的结构化日志,也没有索引或者访问控制。

是不是 Journal 将完全抛弃 syslog ?

不,首先,syslog API syslog(3) 作为写入日志的第一级别接口被支持,并且将持续用作主要的简单文本日志 API。但是只要元数据(特别是二进制元数据)被加入到条目中,便会转而使用原生的 Journal API。

其次,Journal 是个全新的产物。从另一个方面说,Syslog 是一个工业标准(尽管是定义的相当孱弱,日志格式几乎都没有统一),并且被广泛接受,存在于为数众多的操作系统、应用程序和设备中。因此,syslog 依然是很重要的并且将继续存在于许多安装配置中。Journal 守护进程并不使用 RFC syslog 协议,将来也不太可能会。当需要一个 syslog 兼容协议的地方,依然需要使用经典的 syslog 实现方案。为了保证此项工作,我们确保 Journal 的实现可以和本地的 syslog 守护进程协作,且将需要的消息转发给 syslog,使其可以像如同没有 journald 中介一般的工作。

需要您的加入!

在决定这个设计之前,我们了解一些高负荷的日志用户,包括那些拥有超过 100 台活跃主机的用户。我们也和一些可能成为主要 Journal 用户的工程师聊过。我们对于使用惯例和扩展性问题尤其感兴趣。但是,每一个安装配置都有自己的需求,因此,如果您在上面的设计描述中看到了某个用于您特定需要的重要功能没有实现的话,我们希望您能和我们去的联系。上面的设计着重于日志记录的底层。目前我们并不负责特定的 UI,所以如果有这方面的需求话请稍候再留下意见。另外,现在还没到圣诞节,因此我们无法实现所有愿望(请不要失望),但是我们很在意的去了解它们,甚至可以保证至少我们会去考虑它们!先谢过了!

[转载]修复常见ACPI问题(DSDT等)

参考文章:
http://forums.gentoo.org/viewtopic.php?t=122145
http://bbs.gter.net/bbs/viewthread.php?tid=1093610

1. 定义

1.1 ACPI 机器语言(AML,Acpi Machine Language)
参照ACPI Spec(ACPI规范,2011年12月6日第五版),第17页:
Pseudo-code for a virtual machine supported by an ACPI-compatible OS and in which ACPI control methods and objects are written. The AML encoding definition is provided in section 19, “ACPI Machine Language (AML) Specification.”
大致是说AML是一种虚拟程序码,用于ACPI兼容操作系统支持的虚拟机,程序码内部写有ACPI控制方法和对象。AML的编码定义在第19章“ACPI机器语言(AML)规范”提供。
也就是说AML是DSDT编译后的程序码。一台ACPI兼容操作系统必须能够理解AML。我们没有必要理解。
AML是一种BYTECODE,类似JAVA BYTECODE。也就是说,他并不是直接在机器上执行的2进制代码,而是需要OS来解释后执行。这样做的好处是方便错误检查,减少由于代码没写好而带来的负面影响。

1.2 ACPI 源语言 (ASL,Acpi Source Language)
还是参照ACPI规范,第18页:
The programming language equivalent for AML. ASL is compiled into AML images. The ASL statements are defined in section 18, “ACPI Source Language (ASL) Reference.”
用于AML的编程语言。ASL被编译为AML文件。ASL语句在第18章中“ACPI源语言(ASL)参考”中定义。ASL是写DSDT的语言。如果你需要修复你的DSDT,你必须至少会写一点ASL。
1、ACPI 的NAMESPACE与一般的常量,变量的区别。
一般的编程语言中操作的是常量和变量。这些变量之间一般没啥关系,可以说是一堆平行(有序或者随机排列的)的内存地址而已。而在ACPI中,这个发生了明显变化。ACPI引入了一个NAMESPACE的观念。也就是说所有的OBJECT之间是有等级关系的。类似一个文件或者注册表系统,各个ACPI OBJECT(类似常量)之间都存在于一个路径下面,其中的根目录就是以符号“\”来表示。然后上下级目录之间用“.”来连接起来。
比如\_SB_. FOO.BAR 就表示根目录下的_SB_这个OBJECT下的FOO OBJECT下的BAR OBJECT。
因此,在ACPI中,很多操作都是作用在这个NAME SPACE 中的某个OBJECT上面。并由此引入了一系列相关概念。比如SCOPE。
为什么要这样设计呢?因为ACPI本身是一个针对性很强的规范,就是电源管理和硬件配置。因此把这些常用的OBJECT排列好,分类好。处理起来也方便。灵活性比一般的编程语言差了,但是简单,并且能满足设计要求。

2、ASL中有大量的OPERATOR(操作符)。
基本上看一段ASL代码,其中操作符占掉了大部分。比如ASL中很多都是如下形式:Device(PCI0)。一般在小括号前面的都是操作符,也就是预先定义好的。这也是因为ASL本身的目的就很简单,所以很多东西可以先定好。

看完了第一篇中关于 ASL的简单介绍之外,现在来看个具体的例子把. (PS: 俺喜欢栗子.) 本人最近对S3, S4 sleep 比较感兴趣,于是找出相应的代码看了下。去哪里找代码?如果你是在公司里干活的开发人员,那么恭喜你,你应该已经有源代码了。如果你是像我一样的外行,那么可以看看 COREBOOT (WWW.COREBOOT.ORG)。 COREBOOT 是一个开源的BIOS。支持的板子不多,比较老,但是开源,免费。。。
目前的COREBOOT也不是所有板子都支持了ACPI,只有一部分支持。我现在看的是 ASUS M2V-MX_SE的这块。在LINUX下,GREP 下他的源文件,就可以发现下面在mainboard/asus/m2v-mx_se/dsdt.asl 里有几行和 SLEEP 有关的定义:
Name (\_S0, Package () { 0x00, 0x00, 0x00, 0x00 })
Name (\_S3, Package () { 0x01, 0x01, 0x00, 0x00 })
Name (\_S5, Package () { 0x02, 0x02, 0x00, 0x00 })
这是什么意思呢?我们来具体看下。本系列的第一篇说了,ASL里面有“一堆”的操作符,一般都在小括号前面。比如上面代码里的Name就是一个操作符。
啰嗦一下,这个ASL里面的操作符看着很奇怪。一般的C语言里,操作符也就是+,-,*,/ 等这么几个。到了 ASL, 这个Name看上去很像一个C函数,但是又没有具体实现的地方。我觉得可以理解成ASL内部实现了的一个函数。。。
好了,言归正传,既然Name是个操作符,那么就是ASL 本身已经定义好的。查下ACPI SPEC 就可以找到他的含义了。如下 (ACPI 4.0 Page 620):
18.5.80
Name (Declare Named Object)
Syntax:
Name (ObjectName, Object)
Arguments:
Creates a new object named ObjectName. Attaches Object to ObjectName in the Global ACPI namespace.
Description:
Creates ObjectName in the namespace, which references the Object.
Example:
The following example creates the name PTTX in the root of the namespace that references a package.
Name (\PTTX, // Port to Port Translate Table
Package () {Package () {0x43, 0x59}, Package) {0x90, 0xFF}}
)
The following example creates the name CNT in the root of the namespace that references an integer data object with the value 5.
Name (\CNT, 5)
简单的说Name就是定义了一个Object和他的名字。可以想象成是一个常量和这个常量的名字。在他的具体定义里,又包括了一个Package的定义。于是用同样的方法查下Package的定义( ACPI SPEC 4.0 PAGE 625). 就知道他的含义了。就是把一堆Object放在一起,类似一个C语言里的结构体。

1.3 系统差异描述表(DSDT)

参考ACPI规范,第19页:
An OEM must supply a DSDT to an ACPI-compatible OS. The DSDT contains the Differentiated Definition Block, which supplies the implementation and configuration information about the base system. The OS always inserts the DSDT information into the ACPI Namespace at system boot time and never removes it.
初始设备制造厂家(OEM)必须提供一个DSDT给ACPI兼容操作系统。DSDT包含差异定义块,它提供关于基本系统(base system)的执行和配置信息。操作系统总是在系统启动时将DSDT信息插入到ACPI命名空间并且从不移除。
基本上,可以把DSDT归结为来描述你的系统配置的。它包括所有ACPI支持的设备的定义并描述它们的兼容性。例如,它描述电池、交流适配器、嵌入式控制器、风扇、发热区。它以分级形式呈现这些信息,所以ACPI(和兼容操作系统)能够了解系统硬件之间的依存关系。DSDT在启动时加载。基本上,它告诉ACPI驱动要注意些什么。
简单说DSDT就是包含了所有和基本系统(base system)不同的设备的信息,base system每台机器都是一样的,这个是在ACPI规范里指定的,但是每台机器都是不相同的,所以不相同的设备大都是由DSDT表来描述。它包含了很多AML代码。标准的DSDT编译器是英特尔的iASL,而很多DSDT是由微软的编译器编译出来了。问题是,微软的DSDT编译器对源代码的更加宽松(比如说iASL的很多Error到微软这里就只是Warning了),从而导致一个不标准的、充满bug的DSDT。因此这些DSDT可以在Windows下正常工作,而到了Mac OS、Linux就不行了。

1.4 系统描述从表(SSDT)
参见ACPI规范,第22页:
SSDTs are a continuation of the DSDT. Multiple SSDTs can be used as part of a platform description. After the DSDT is loaded into the ACPI Namespace, each secondary description table listed in the RSDT/XSDT with a unique OEM Table ID is loaded. This allows the OEM to provide the base support in one table, while adding smaller system options in other tables.
SSDT是DSDT的延续。多个SSDT可以用来作为平台描述的一部分。在DSDT被加载到ACPI命名空间后,每个RSDT/XSDT列举的SSDT和它唯一的OEM表识别号被加载。这允许OEM在一个表里提供基本支持,同时添加在其他表里添加小的系统选项。
注意:附加的表只能添加数据,不能覆盖之前表里的数据。一台电脑可能有多个SSDT表。也就是说,DSDT可能只含有设备(device)的基本信息,然后将详细信息放在具有唯一识别号的SSDT中,这也是为什么我们有时候需要让变色龙加载SSDT实现CPU变频或者将SSDT信息添加到DSDT中去实现一些功能。

2. 问题描述

ACPI规范对DSDT的要求(和其它的内容)进行了定义而且非常严格。英特尔的编译器iASL用于将DSDT从ASL编译为AML,如果基本的ASL有错误,编译器会给出错误(error)和警告(warning)。不幸的是微软的ASL编译器允许很多这样的错误和警告通过。结果就是很多OEM厂商写有错误的DSDT,而且结果是Windows对于这些微软的编译器产生的这些DSDT中的错误非常宽容(一点都不奇怪)。
这也就是说一个不符合ACPI规范的DSDT会在Windows下工作,即便它不应该工作。当你试图在Linux、MacOS下使用时,ACPI的开发者期望DSDT是按照标准(并且用英特尔的ASL编译器)编写的,DSDT中的错误部分就不被支持。如果你有一个有错误的DSDT,ACPI可能识别设备的存在。或者能够识别,但不支持所有的功能。如果你遇到这些症状(/proc/acpi缺失或者不完全支持),那么这可能是一个有错误的DSDT引起的。
你可以通过在dmesg中查看DSDT相关行是否有“MSFT”来确定你的DSDT是否通过微软的编译器编译。
ACPI: RSDP (v000 GBT ) @ 0x000f6d20
ACPI: RSDT (v001 GBT AWRDACPI 0x42302e31 AWRD 0x01010101) @ 0x3fff3000
ACPI: FADT (v001 GBT AWRDACPI 0x42302e31 AWRD 0x01010101) @ 0x3fff3040
ACPI: MADT (v001 GBT AWRDACPI 0x42302e31 AWRD 0x01010101) @ 0x3fff7080
ACPI: DSDT (v001 GBT AWRDACPI 0x00001000 MSFT 0x0100000c) @ 0x00000000 /*这一行有MSFT*/
理想情况下,我们可以相信我们最爱的电脑制作商来修复他们的DSDT。那是个好主意,但是我们在如地狱般的漫长等待中,我们也可以自己来修复我们的DSDT。
我们可以手动修复这些bug使之兼容MAC系统。DSDT在bios里是以编译后的aml文件存在,需要把它解出来,反编译成aml代码形式(dsl文件,文本文件),代码修改完毕再重新编译,替换掉bios里原来的dsdt表。不过PC-EFI,Chameleon的出现,使得我们不再需要冒险刷bios,只要把制作好的DSDT.aml文件放在根目录或者/Extra文件夹里,启动的时候就会自动使用这个DSDT.aml,从而达到修复ACPI系统bug的作用。

3. 免责声明
这里列举的一些方法应该可以解决Linux(Mac OS)下ACPI相关的很多问题。然而,它们不一定会解决你所有的ACPI问题。不幸的是,有很多ACPI引起的故障。如果在尝试这些修复后,你的ACPI问题依然存在,那你可能在你的ACPI驱动代码中有错误(MacOS不支持硬件)。你可能会遇到不可预测的系统问题,包括硬件和软件。对此你需要自行承担风险。我们概不负责。
好了,关于不能解决的先说这么多,下面我们来看看我们能做的。第一件事情,获取你电脑的DSDT。有很多方法可以获取到DSDT,比如通过变色龙官方偏好面板、AIDA64(Everest)、Chameleon Wizard等。推荐在Windows下使用AIDA64获取,方法不再赘述。

4. 修复DSDT你需要什么
在开始修复你的DSDT之前,你需要准备:
1、已经提取的DSDT文件(SSDT文件)。
2、英特尔iASL编译器。
3、一些常见的DSDT修复代码(参考HJMac UDT)。

5. 诊断一个有错误的DSDT
很明显,修复DSDT你需要先知道DSDT是不是有错。所以我们要做的第一件事就是找出DSDT是否有错。最简单的办法是将DSDT重新编译(反编译后再编译),然后看我们是不是能从英特尔的编译器得到报错。你需要一个英特尔的iASL编译器来做这个工作。(可以直接用iASLMe,将aml文件拖到窗口上会反编译,将asl文件拖放到窗口上会编译。)
如果你的DSDT有错误,重新编译时你会看到相应的错误和/或警告提示。举例来说,从我的笔记本上,我在重新编译时得到下面的信息:
Intel ACPI Component Architecture
ASL Optimizing Compiler / AML Disassembler version 20030228 [Feb 28 2003]
Copyright (C) 2000 – 2003 Intel Corporation

Supports ACPI Specification Revision 2.0b

dsdt.dsl 163: Method (_WAK, 1, NotSerialized)
Warning 2026 – ^ Reserved method must return a value (_WAK)

dsdt.dsl 2626: Field (ECR, DWordAcc, Lock, Preserve)
Error 1048 – ^ Host Operation Region requires ByteAcc access

dsdt.dsl 2672: Method (_GLK, 1, NotSerialized)
Warning 2024 – ^ Reserved method has too many arguments ( _GLK requires 0)

ASL Input: dsdt.dsl – 3759 lines, 123154 bytes, 1862 keywords
Compilation complete. 1 Errors, 2 Warnings, 0 Remarks, 390 Optimizations
一个错误,两个警告。在这种情况下,我们可以来修复DSDT中的错误。

6. 修复DSDT

The first thing that you should do if you have a buggy DSDT is to head over to theDSDT repository at acpi.sourceforge.net. They have fixed DSDTs for a number of laptops, so your model may already have a fix available. If there is a fix there, then just download it, extract it, recompile the asl using iasl as above, and proceed to Section 9. If there isn’t already a fixed DSDT available, then you will have to try to fix your DSDT yourself. Read on for an example from my machine.

Unfortunately, this step will differ for every system. In my case, the fix was simple and self-evident, but I can’t guarantee that that will be the case with you. You can find solutions to common DSDT compilation errorshere. At the end of the document, I’ll have a list of useful resources in case you get stuck. OK – on to the fixing!

In order to fix the DSDT, you’ll have to edit the dsdt.dsl file that we created in the diagnosis. Let’s use mine as an example. Unless you also have a Gateway 200X, your process will be different (and if you do have a 200X, then you can get the fixed DSDThere). However, this should at least give you an overview of the process.

As you may recall, when I compiled my DSDT, I got one error:

代码:
dsdt.dsl 2626: Field (ECR, DWordAcc, Lock, Preserve)
Error 1048 – ^ Host Operation Region requires ByteAcc access

This tells me the following:
– The error is on line 2626
– The region in question requires ByteAcc Access

Since I see that this line has a DWordAcc value specified, I assume that that is what is causing the problem. So, I opened dsdt.dsl in a text editor and fixed that line:

Edit dsdt.dsl
代码:
vi dsdt.dsl
Change any lines that are raising errors. I changed line 2626 from this
代码:
Field (ECR, DWordAcc, Lock, Preserve)
to this
代码:
Field (ECR, ByteAcc, Lock, Preserve)

Save and close the file. Now that we’ve made the change, we have to recompile to see if we actually fixed the problem.

Recompile dsdt.dsl
代码:
./iasl -tc dsdt.dsl
Now, when I recompile, I get the following:
代码:
Intel ACPI Component Architecture
ASL Optimizing Compiler / AML Disassembler version 20030228 [Feb 28 2003]
Copyright (C) 2000 – 2003 Intel Corporation
Supports ACPI Specification Revision 2.0b

dsdt.dsl 163: Method (_WAK, 1, NotSerialized)
Warning 2026 – ^ Reserved method must return a value (_WAK)

dsdt.dsl 2672: Method (_GLK, 1, NotSerialized)
Warning 2024 – ^ Reserved method has too many arguments ( _GLK requires 0)

ASL Input: dsdt.dsl – 3759 lines, 123153 bytes, 1862 keywords
AML Output: DSDT.aml – 14600 bytes 499 named objects 1363 executable opcodes

Compilation complete. 0 Errors, 2 Warnings, 0 Remarks, 390 Optimizations

Alright! The error is gone. The warnings are still there, though. Let’s get rid of them now, too.

Repeat steps 1-3 for the warnings

The second warning seems to be the easier one:
代码:
dsdt.dsl 2672: Method (_GLK, 1, NotSerialized)
Warning 2024 – ^ Reserved method has too many arguments ( _GLK requires 0)

So, the _GLK method has too many arguments. Let’s get rid of them. We can fix this by changing line 2672 from this:
代码:
Method (_GLK, 1, NotSerialized)
to this:
代码:
Method (_GLK)

Recompiling now only gives me the one warning:
代码:
dsdt.dsl 163: Method (_WAK, 1, NotSerialized)
Warning 2026 – ^ Reserved method must return a value (_WAK)

From this HOWTO, I see that the solution is to add the following line to the end of the _WAK method:
代码:
Return(Package(0x02){0x00, 0x00})

What does this line mean? A little digging into the ACPI spec (Section 7.3.5) yields some information about the _WAK method.

代码:
Arguments:
0 The value of the sleeping state (1 for S1, 2 for S2, and so on).
Result Code (2 DWORD package):
Status Bit field of defined conditions that occurred during sleep.
0x00000000 Wake was signaled and was successful
0x00000001 Wake was signaled but failed due to lack of power.
0x00000002 Wake was signaled but failed due to thermal condition.
Other Reserved
PSS If non-zero, the effective S-state the power supply really entered.

This value is used to detect when the targeted S-state was not entered because of too much current being drawn from the power supply. For example, this might occur when some active device’s current consumption pushes the system’s power requirements over the low power supply mark, thus preventing the lower power mode from being entered as desired.

OK, so the _WAK method accepts one argument, which is the number of the sleep state that was requested. It returns its result as a package of 2 DWORDs. The first value is a code that tells whether the wake was successful (0 on success, nonzero on failure) and, if not, why. The second value is also zero on success and on failure returns the value of the sleep state that was actually entered. So basically, it’s a success/failure code.

In Chapter 16, we can find out how to define a Package.
代码:
PackageTerm := Package(
NumElements //Nothing |
//ByteConstExpr |
//TermArg=>Integer
) {PackageList} => Package

The first argument of the package declaration specifies the number of elements in the package, and the second is the package itself. So, the declaration above simply defines a two element package, where each of the elements is zero. This is necessary because the spec requires that the _WAK method return two values.

So, what this really boils down to is a dummy return value that satisfies the spec (thus eliminating the warnings), but doesn’t really do anything. It just always returns a “Success” condition.

OK, now that that is cleared up, I add that line, recompile, and…. (drum roll please)

代码:
Intel ACPI Component Architecture
ASL Optimizing Compiler / AML Disassembler version 20030228 [Feb 28 2003]
Copyright (C) 2000 – 2003 Intel Corporation
Supports ACPI Specification Revision 2.0b

ASL Input: dsdt.dsl – 3760 lines, 123177 bytes, 1863 keywords
AML Output: DSDT.aml – 14606 bytes 499 named objects 1364 executable opcodes

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 392 Optimizations

Excellent! No errors, no warnings. We now have a “fixed” DSDT (remember, the _WAK method isn’t really fixed, we’ve just shut up the warning on compile;)). Many of the suggestions in the DSDT HOWTOs that I found are really just workarounds, not proper fixes. If you would like a more thorough analysis of your DSDT, you may want to ask the folks on the acpi-devel mailing list. If you succesfully used this process to fix your DSDT, please considerposting the fix to the DSDT repository, so that others can benefit from your work.

All that remains now is to convince our kernel to use the new DSDT.

As stated above, this will create two files, dsdt.hex andDSDT.aml. You will need to use one or the other of these files in the next step, depending on which method you use to override your DSDT. If you use the static DSDT override method, then you will needdsdt.hex. If you use the initrd method, then you will needDSDT.aml.

8. Incorporating the fixed DSDT into the kernel

There are two ways to incorporate your new DSDT into the kernel. The first way is to include it statically at compile time. The second is to pass it to the kenel at boot time as an initrd. The initrd approach is probably preferable, especially if you need to make a lot of changes to your DSDT, because it doesn’t require that you recompile your kernel for each new DSDT. The static method does. Each method requires a kernel patch. Let’s start with the static method first:

9a. Static DSDT override
To statically override your DSDT at kernel compile time, you will have to apply a patch to your kernel to have it read in the new DSDT, and then copy your fixed DSDT .hex file(dsdt.hex) to the kernel source tree for inclusion in the kernel.

So, first things first, let’s patch the kernel.

Obtain DSDT override patch from here
Save the file to your machine. Let’s call it dsdt_override.diff.
Patch your kernel. I’m assuming that the kernel sources are located in /usr/src/linux-2.4.23, since that’s the version I used. If yours are elsewhere, then modify the paths accordingly.
代码:
cd /usr/src/linux-2.4.23
patch -p1 < /path/to/dsdt_override.diff

If you don’t get any errors, then the patch succeeded. The patch expects to find the fixed DSDT in the linux source tree, under includes/acpi. It expects it to be named dsdt_table.h. So, let’s give it what it wants.

Copy dsdt.hex to the kernel source tree.
代码:
cp /path/to/dsdt.hex /usr/src/linux-2.4.23/include/acpi/dsdt_table.h
Recompile your kernel.

That ought to do it. After recompiling, move your new kernel image to /boot (maybe don’t overwrite your current kernel – just to be safe;)), and reboot. If any of your acpi problems were caused by the buggy DSDT, then they should be fixed. /proc/acpi/dsdt should now contain your new fixed DSDT, so you can always cat that back out and recompile it to make sure that you are getting what you expect (i.e. no errors).

Remember, if you make more changes to your DSDT, then you’ll have to recopy it to /include/acpi/dsdt_table.h and recompile your kernel.

9b. initrd DSDT override
The initrd method requires about the same amount of setup as the static method for the initial DSDT, but any subsequent changes can be incorporated much more easily. Basically, you will have to patch your kernel, copy your fixed DSDT .aml file(DSDT.aml) to /boot, and direct the kernel to incorporate it as an initrd. If you are already using an initrd for something, then there is a bit more work involved. I’ll go over that after describing the basic case.

So, again, the first thing we have to do is patch the kernel.
Get the appropriate initrd patch for your kernel from here
Apply the patch to your kernel (in my case, I tested this on 2.6.0)
代码:
cd /usr/src/linux-2.6.0
patch -p1 < /path/to/acpi-dsdt-initrd-patch-v0.4-2.6.0.diff Make sure that ramdisk and initrd support are compiled statically into the kernel 代码: Device Drivers —>
Block Devices —>
<*> RAM disk support
[*] Initial RAM disk (initrd) support
Make sure that the new “Read DSDT from initrd” option is selected under the ACPI menu
代码:
Power management options (ACPI, APM) —>
ACPI (Advanced Configuration and Power Interface) Support —>
[*] Read DSDT from initrd
Recompile the kernel

Great! Now the kernel is ready to accept a DSDT as an initrd. Next, we need to copy the fixed DSDT.aml file to /boot and edit our grub.conf to point to the DSDT.

Copy the fixed DSDT.aml to /boot:
代码:
mount /boot
cp /path/to/DSDT.aml /boot
Edit grub.conf to use the new DSDT as an initrd. For example, mine looks like this:
代码:
title=Gentoo Linux (2.6.0 – DSDT initrd)
root (hd0,5)
kernel (hd0,5)/boot/linux-2.6.0-dsdt-initrd root=/dev/hd8
initrd=/boot/DSDT.aml
The important line is the “initrd=” line. Please remember to use your actual paths for root and kernel – don’t just copy this into your grub.conf verbatim.

When you reboot, the new kernel should pick up the DSDT from the /boot partition and load it up as directed by the initrd parameter. You should see a message in dmesg that says “Looking for DSDT in initrd …”

Now, if you make changes to your dsdt, all you have to do is copy the new DSDT.aml to /boot and reboot to incorporate those changes. No kernel recompile required.

9c. initrd override with bootsplash

If you are already using an initrd for something, like bootsplash, you can still use this method. You just have to create the initrd a bit differently. Instead of simply copying DSDT.aml to /boot and using it as the initrd, you have to cat a signature for the DSDT into your existing initrd, and then cat the DSDT into it as well. For example, my bootsplash initrd is currently called initrd-1024×768. So, here’s what I did to add the DSDT.

Make a copy of /boot/initrd-1024×768 for use with the DSDT
代码:
cp /boot/initrd-1024×768 /boot/initrd-1024×768-dsdt
Append the DSDT signature to the initrd
代码:
echo “INITRDDSDT123DSDT123” >> /boot/initrd-1024×768-dsdt
cat the fixed DSDT.aml into the initrd
代码:
cat /path/to/DSDT.aml >> /boot/initrd-1024×768-dsdt
Modify grub.conf to use the new initrd on boot:
代码:
title=Gentoo Linux (2.6.0 gentoo – bootsplash + DSDT initrd)
root (hd0,5)
kernel (hd0,5)/boot/linux-2.6.0-gentoo-dsdt root=/dev/hd8 video=vesa:ywrap,mtrr vga=0x317
initrd=/boot/initrd-1024×768-dsdt

Voila! When you boot up, you should now get your lovely bootsplash screen and your new dsdt, both incorporated from the initrd.

If you make changes to the DSDT, you just have to rebuild your initrd as above (which is a good reason to make a copy of your existing one, rather than appending to it directly).

9. My DSDT is fixed, but I still have ACPI errors. Now what?

10a. Windows-only DSDT functionality
You may find that you have no errors in your DSDT, but there are still errors in dmesg, or missing ACPI functionality. This may be because your DSDT is testing for the name of your OS. Many DSDTs do this, and enable certain functionality only if you are running a particular OS (usually, of course, Windows XP). To test for this, look for lines in your DSDT that check the value or length of the “_OS” variable. For example, you may find lines like this:

代码:
If (LEqual (SizeOf (_OS), 0x14))

This is checking for an OS name with a length of 20 (0x14) characters. Some examples are “Microsoft Windows NT” or “Microsoft Windows XP”. You could try to rewrite your DSDT to skip these checks, or to provide the missing functionality for other OSes, but this is tedious and error-prone. Fortunately, there is a simpler way. There is a boot parameter that you can pass to the kernel to tell ACPI to pretend that you are running Windows to restore the missing functionality, rather than rewriting your DSDT. The parameter is called acpi_os_name. So, in grub.conf, you would just add this parameter to the kernel line, like this:

代码:
acpi_os_name=”Microsoft Windows XP”

This should restore any functionality that is dependent on your OS identifying itself as Windows XP. Other common _OS length checks are:

0x11: “Microsoft Windows”
0x27: “Microsoft WindowsME: Millennium Edition”

NOTE
These tests are also sometimes used to disable certain functionality for certain Windows OSes. So, you may want to take a few minutes to try to work out what your DSDT is doing before fudging the OS name. You should probably take note of what works and what doesn’t before and after trying this, just in case you end up turning something off.:)

10b. Missing ECDT

If your problem isn’t that the DSDT is checking whether or not you are running Windows, then you may have a missing ECDT. The ECDT is used to provide some minimal information about the Embedded Controller to the ACPI drivers before the Embedded Controller region has actually been parsed from the DSDT. This is frequently necessary before initializing the battery and ac adapter, so if you have errors in dmesg from the battery, adapter or EmbeddedControl, the ECDT is the likely culprit. For instance, after fixing my DSDT, I had the following errors in dmesg:

代码:
evregion-0251 [22] ev_address_space_dispa: No handler for Region [ECR_] (df5ec688) [EmbeddedControl]
exfldio-0284 [21] ex_access_region : Region EmbeddedControl(3) has no handler
dswexec-0435 [14] ds_exec_end_op : [LEqual]: Could not resolve operands, AE_NOT_EXIST
dswstate-0273 [16] ds_result_pop_from_bot: No result objects! State=df5fb428
dsutils-0525 [16] ds_create_operand : Missing or null operand, AE_AML_NO_RETURN_VALUE
psparse-1120: *** Error: Method execution failed [\_SB_.ADP1._STA] (Node df5f42c8), AE_AML_NO_RETURN_VALUE
evregion-0251 [22] ev_address_space_dispa: No handler for Region [ECR_] (df5ec688) [EmbeddedControl]
exfldio-0284 [21] ex_access_region : Region EmbeddedControl(3) has no handler
dswexec-0435 [14] ds_exec_end_op : [LEqual]: Could not resolve operands, AE_NOT_EXIST
dswstate-0273 [16] ds_result_pop_from_bot: No result objects! State=df5fb428
dsutils-0525 [16] ds_create_operand : Missing or null operand, AE_AML_NO_RETURN_VALUE
psparse-1120: *** Error: Method execution failed [\_SB_.BAT1._STA] (Node df5f4848), AE_AML_NO_RETURN_VALUE

EmbeddedControl is obviously the embedded controller. ADP1 is the ac adapter and BAT1 is the battery. After booting, my /proc/acpi/ac_adapter and /proc/acpi/battery directories were empty. All of this was caused by the missing ECDT.

A couple of patches have been proposed to correct this behavior. So far, the most promising one ishere. This defers the Embedded Controller’s initialization until it has actually been parsed from the DSDT. This patch restored my missing ECDT-related functionality (battery and adapter), and has been reported to do the same for a number of different systems. It may be applied to both the 2.4 and 2.6 kernel sources.

10c. My power and/or sleep buttons don’t work

The ACPI spec defines two types of power and sleep buttons. They are called fixed-feature (FF) buttons and control method (CM) buttons. The difference between the two is that FF buttons are defined at a lower level than the DSDT, in the FADT. CM buttons are defined in the DSDT. It is possible for your system to have both types of button. You can tell which you have by the presence of an “FF” or “CM” next to the button alert in dmesg. For example, my dmesg gives the following:

代码:
ACPI: Power Button (FF) [PWRF]
ACPI: Lid Switch [LID0]
ACPI: Sleep Button (CM) [SLPB]

So, acpi is detecting an FF power button and a CM sleep button. I actually also have a CM power button defined in my DSDT. However, in accordance with the ACPI spec, if the linux drivers detect an FF button, the CM button is ignored. Unfortunately, the FF power button does not generate an ACPI event in my case. However, the CM sleep button does generate events.

I opened a bug for this behavior. However, it is unlikely that the behavior will change, since it would contradict the spec to give CM buttons precedence over FF buttons. So, I posted apatch to provide a workaround for the problem on the 2.6 kernels.

The patch allows you to provide a new boot parameter, called ignore_ff_buttons. It accepts one of three values, PWRF (to ignore only the FF power button), SLPF (to ignore only the FF sleep button), or BOTH (to ignore both FF buttons).

In my case, I just want to ignore the FF power button, since I am already using the CM sleep button. So, I modified my grub.conf as below:

代码:
title=Gentoo Linux (2.6.1 – all ACPI patches)
root (hd0,5)
kernel (hd0,5)/boot/linux-2.6.1 root=/dev/hda8 ignore_ff_buttons=PWRF
initrd=/boot/DSDT.aml

Now, when I reboot, dmesg shows me the following buttons:

代码:
ACPI: Lid Switch [LID0]
ACPI: Sleep Button (CM) [SLPB]
ACPI: Power Button (CM) [PWRB]

And I get ACPI events from my power button.

NOTE
If you decide to use this patch, please be careful. I haven’t created a kernel patch before. This one doesn’t do much, so it should be pretty safe, but I highly recommend that you back up your kernel tree before applying it. Also, if you do decide to use it, I would be very interested to hear whether or not it works for you. Of course, I’m sure that I’ll hear if it doesn’t, but if it does, I would also like to know.:)

10d. My BIOS is blacklisted

Some BIOSes have been blacklisted by the ACPI developers because they have known problems. These problems are usually related to the DSDT, so you might be able to repair these problems using the above techniques. Unfortunately, if the ACPI code detects that you have a blacklisted BIOS, it will disable ACPI even if you have fixed your DSDT. If you have a blacklisted BIOS, you will see a message like this on boot:

代码:
ACPI: Vendor “PTLTD ” System ” DSDT ” Revision 0x6040000 has a known ACPI BIOS problem.
ACPI: Reason: Multiple problems. This is a non-recoverable error
ACPI: BIOS listed in blacklist, disabling ACPI support

To get around this, you’ll have to comment out the line in the ACPI code that causes your BIOS to short circuit the ACPI startup process. The file that sets the blacklisted BIOSes is/usr/src/linux/drivers/acpi/blacklist.c. To prevent your blacklisted BIOS from causing trouble, open up the file and comment out the appropriate line instatic struct acpi_blacklist_item acpi_blacklist[]. For example, in the above case, the line to comment is:

代码:
{“PTLTD “, ” DSDT “, 0x06040000, ACPI_DSDT, less_than_or_equal, “Multiple problems”, 1},

Once you’ve commented out the line that corresponds to your BIOS, recompile your kernel and reboot. The ACPI drivers should now initialize, and the messages about the blacklisted BIOS should go away. You may also have to boot with “acpi=force” on the kernel line of your grub.conf to get this to work (thanks to sleek for clarifying).

10e. I have an Asus laptop

If you have an Asus laptop, you may want to check out the acpi4asus project. This is a driver that provides ACPI support on linux for most Asus laptops, including special keys and LEDs. The driver is being actively developed, so if you have a recent Asus laptop that isn’t yet supported by the driver, support may be coming soon.

10f. It’s still not working!

If, at this point, you are still having errors, there are one or two more things to try. If ACPI refuses to initialize, you can try booting with “acpi=force” in your grub.conf. This is sometimes necessary in order to force the ACPI drivers to initialize with older BIOSes. If you still have ACPI-related errors on boot and have a single-processor machine, then try disabling multiprocessor support, local apic support and IO-apic support in your kernel. You can also try booting with the “pci=noacpi” or “noapic” options. The apic code still seems to be a bit finicky; many people have reported problems with it.

If none of the above recommendations helps, then I would strongly suggest contacting the ACPI developers. You have likely found a bug in the ACPI code. In particular, if you are having suspend/resume problems, you are far from alone. This code is still being worked out. Give the acpi-devel mailing list a shot. You can also, of course, post your errors here, and I’ll try to see what I can do to help, but the acpi gurus are likely to be a better resource.

10. Useful ACPI resources

There are a number of good ACPI resources, in case you get stuck. The ones that I found most helpful were:
bugzilla.kernel.org
acpi.sourceforge.net
acpi-devel and acpi-bugzilla mailing lists
http://www.acpi.info (theACPI spec is here, including ASL documentation, which is the language used for the DSDT)
The Intel ACPI downloads page – get the iasl compiler here.
HOWTO fix common DSDT errors
DSDT fixes for the Thinkpad T31
DSDT repository at acpi.sourceforge.net
DSDT submission page at acpi.sourceforge.net.
Documentation for the static DSDT override
Documentation for the initrd DSDT override
ECDT initialization patch
FF button patch
acpi4asus homepage

11. Acknowledgements

I’d like to thank the ACPI developers, expecially Luming Yu and Bruno Ducrot. All of them have been very helpful and very responsive. In general, the ACPI mailing lists and bugzilla are wonderful resources for ACPI help.

systemd的一些总结

systemd的设计目标:

  • 改进效能。使用二进制代码替换松散的SYSV启动脚本,减少频繁的进程创建,库加载,内核/用户切换。
  • 利用Dbus进程间通讯与socket激活机制,解决任务启动时的依赖问题,实现启动并行化。
  • 实现任务(daemons)的精确控制。使用内核的cgroup机制,不依赖pid来追踪进程,即使是两次fork之后生成的守护进程也不会脱离systemd的控制。
  • 统一任务定义。用户不需要自行编写shell脚本,而仅依据systemd制定的unit规则。

systemd的结构:

Systemd_components.svg

 

尽管底层要求内核cgroup,autofs但却不需要以往的用户空间库文件。说明systemd自己可以按需直接访问这些组件。kdbus目前用的还不多,很多发行版内核暂没有并入kdbus的代码。值得注意的是如果启动了kdbus,那个他的pid将是1!

systemd libraries是systemd依赖的库。systemd core是systemd自己的库。systemd daemons 和 systemd targets是自带的一些基本unit,target,作用与定位类似sysV自带的脚本。

 

Linux_kernel_unified_hierarchy_cgroups_and_systemd.svg

 

注意上图systemd pid1里面的内容,systemd已经可以废掉以往一大堆传统的系统服务,比如consolekit(replace by logind),syslog(replace by journal),getty,crond(replace by timer unit)等等。看到这里很多人害怕了,一夜回到解放前,以前的技能都白练了。

systemd的主命令是systemctl,可以man systemctl查看详细。

systemctl可以添加参数-H <username>@<password>进行远程管理,该过程依赖ssh。

opensuse13.2提供systemd-ui的rpm包,其中包含systemadm图形界面。

服务/任务单元(unit):

unit类型:

一个unit文件可以描述如下内容之一:系统服务(.service)、挂载点(.mount)、sockets(.sockets) 、系统设备(.device)、交换分区(.swap)、文件路径(.path)、启动目标(.target)、由 systemd 管理的计时器(.timer)。详情参阅 man 5 systemd.unit

unit文件:

使用 systemctl 控制单元时,通常需要使用单元文件的全名,包括扩展名(例如 sshd.service)。但是有些单元可以在systemctl中使用简写方式。

  • 如果无扩展名,systemctl 默认把扩展名当作 .service。例如 netcfgnetcfg.service 是等价的。
  • 挂载点会自动转化为相应的 .mount 单元。例如 /home 等价于 home.mount
  • 设备会自动转化为相应的 .device 单元,所以 /dev/sda2 等价于 dev-sda2.device

有一些单元的名称包含一个 @ 标记, (e.g. name@string.service): 这意味着它是模板单元 name@.service的一个 实例。 string 被称作实例标识符, 在 systemctl 调用模板单元时,会将其当作一个参数传给模板单元,模板单元会使用这个传入的参数代替模板中的 %I 指示符。

在实例化之前,systemd 会先检查 name@string.suffix 文件是否存在(如果存在,应该就是直接使用这个文件,而不是模板实例化了)。大多数情况下,包换 @ 标记都意味着这个文件是模板。如果一个模板单元没有实例化就调用,该调用会返回失败,因为模板单元中的 %I 指示符没有被替换。

  • 书写unit的时候开头的#属于合法的,末尾加入#是非法的。
  • 使用systemd时,可通过正确编写单元配置文件来解决其依赖关系。典型的情况是,单元A要求单元BA启动之前运行。在此情况下,向单元A配置文件中的 [Unit] 段添加 Requires=BAfter=B 即可。若此依赖关系是可选的,可添加 Wants=BAfter=B。请注意 Wants=Requires= 并不意味着 After=,即如果 After= 选项没有制定,这两个单元将被并行启动。依赖关系通常被用在服务(service)而不是目标(target)上。例如, network.target 一般会被某个配置网络接口的服务引入,所以,将自定义的单元排在该服务之后即可,因为 network.target 已经启动。
  • unit文件位于/usr/lib/systemd/system,/usr/lib/systemd/user(安装应用的时候都放这里)以及/etc/systemd/system,/etc/systemd/user后面两个的优先级高于前面两个的。

编写自定义的 service 文件时,可以选择几种不同的服务启动方式。启动方式可通过配置文件 [Service] 段中的 Type= 参数进行设置。具体的参数说明请参阅 man systemd.service

  • Type=simple(默认值):systemd认为该服务将立即启动。服务进程不会fork。如果该服务要启动其他服务,不要使用此类型启动,除非该服务是socket激活型。
  • Type=forking:systemd认为当该服务进程fork,且父进程退出后服务启动成功。对于常规的守护进程(daemon),除非你确定此启动方式无法满足需求,使用此类型启动即可。使用此启动类型应同时指定 PIDFile=,以便systemd能够跟踪服务的主进程。
  • Type=oneshot:这一选项适用于只执行一项任务、随后立即退出的服务。可能需要同时设置 RemainAfterExit=yes 使得 systemd 在服务进程退出之后仍然认为服务处于激活状态。
  • Type=notify:与 Type=simple 相同,但约定服务会在就绪后向 systemd 发送一个信号。这一通知的实现由 libsystemd-daemon.so 提供。
  • Type=dbus:若以此方式启动,当指定的 BusName 出现在DBus系统总线上时,systemd认为服务就绪。
  • Type=idle: idle类型和 Type=simple 类似,但是,它会在所有任务(jobs)都处理后,才会执行。这种方式可以避免不同shell服务输出到控制台的状态信息出现交错的情况。

unit控制:

  • 输出激活的单元:systemctl 或 systemctl list-units
  • 输出运行失败的单元:systemctl –failed
  • 输出已安装的unit:systemctl list-unit-files
  • 启动unit:systemctl start <unit>
  • 停止unit:systemctl stop <unit>
  • 重启unit:systemctl restart <unit>
  • 查看unit状态:systemctl status <unit>
  • 开机自动激活unit:systemctl enable <unit>
  • 取消开机自动激活unit:systemctl disable <unit>
  • 重新载入systemd,扫描有变动的unit:systemctl daemon-reload

目标(target):

创建一个新的目标 /etc/systemd/system/<新目标>(可以参考 /usr/lib/systemd/system/graphical.target),创建 /etc/systemd/system/<新目标>.wants 目录,向其中加入额外服务的链接(指向 /usr/lib/systemd/system/ 中的单元文件)。

 

SysV 启动级别 Systemd 目标 注释
0 runlevel0.target, poweroff.target 中断系统(halt)
1, s, single runlevel1.target, rescue.target 单用户模式
2, 4 runlevel2.target, runlevel4.target, multi-user.target 用户自定义启动级别,通常识别为级别3。
3 runlevel3.target, multi-user.target 多用户,无图形界面。用户可以通过终端或网络登录。
5 runlevel5.target, graphical.target 多用户,图形界面。继承级别3的服务,并启动图形界面服务。
6 runlevel6.target, reboot.target 重启
emergency emergency.target 急救模式(Emergency shell)

切换目标:systemctl isolate graphical.target

修改默认目标:

  1. 内核参数:systemd.unit=rescue.target
  2. systemctl set-default multi-user.target

 

临时文件

/usr/lib/tmpfiles.d//etc/tmpfiles.d/ 中的文件描述了 systemd-tmpfiles 如何创建、清理、删除临时文件和目录,这些文件和目录通常存放在 /run/tmp 中。配置文件名称为 /etc/tmpfiles.d/<program>.conf。此处的配置能覆盖 /usr/lib/tmpfiles.d/ 目录中的同名配置。

临时文件通常和服务文件同时提供,以生成守护进程需要的文件和目录。例如 samba服务需要目录 /run/samba 存在并设置正确的权限位,就象这样:

/usr/lib/tmpfiles.d/samba.conf
D /run/samba 0755 root root

此外,临时文件还可以用来在开机时向特定文件写入某些内容。比如,要禁止系统从USB设备唤醒,利用旧的 /etc/rc.local 可以用 echo USBE > /proc/acpi/wakeup,而现在可以这么做:

/etc/tmpfiles.d/disable-usb-wake.conf
w /proc/acpi/wakeup - - - - USBE
注意: 该方法不能向 /sys 中的配置文件添加参数,因为 systemd-tmpfiles-setup 有可能在相关模块加载前运行。这种情况下,需要首先通过 modinfo <模块名> 确认需要的参数,并在/etc/modprobe.d的下文件中设置改参数。另外,还可以使用udev,在设备就绪时设置相应属性。

日志:

systemd 提供了自己日志系统(logging system),称为 journal. 使用 systemd 日志,无需额外安装日志服务(syslog)。读取日志的命令:

# journalctl

默认情况下(当 Storage= 在文件 /etc/systemd/journald.conf 中被设置为 auto),日志记录将被写入 /var/log/journal/。该目录是 system软件包的一部分。若被删除,systemd 不会自动创建它,直到下次升级软件包时重建该目录。如果该目录缺失,systemd 会将日志记录写入 /run/systemd/journal。这意味着,系统重启后日志将丢失。

显示本次启动后的所有日志:journalctl -b

显示上次启动到本次启动间的日志:journalctl -b -1

显示从指定时间开始:journalctl –since=”2012-10-30 18:17:16″

显示指定最后一段时间的日志:journalctl –since “20 min ago”

显示最新日志:journalctl -f

显示指定进程的日志:journalctl /usr/lib/systemd/systemd

显示指定pid的日志:journalctl _PID=1

显示指定unit的日志:journalctl -u netcfg

将日志重定向到tty:编辑/etc/systemd/journald.conf:

ForwardToConsole=yes
TTYPath=/dev/tty10
MaxLevelConsole=info

systemctl restart system-journald

电源管理 :

安装了polkit后才能用一般用户权限进行电源管理。

重启:systemctl reboot

关机:systemctl poweroff

待机:systemctl suspend

休眠:systemctl hibernate

混合待机休眠:systemctl hybrid-sleep

 

 

 

调试systemd:

启动调试终端:systemctl start debug-shell.service

其实就是在tty9开一个虚拟终端,而且不需要任何身份验证。

 

关于并行化的一些实现:

并行化Socket服务

同步过程导致了启动过程的串行化。能否摆脱同步与串行化的缺点呢?答案是能够! 首先我们要理解 daemon 对彼此的真正依赖是什么,为什么它们在启动时被延迟了。 对于传统的 Unix daemon,答案是:它们在所需要的服务所提供的 socket 准备好连接之前一直处于等待状态。 常见的是 AFUNIX,但也可能是 AFINET。比如,需要DBus服务的客户程序将在 /var/run/dbus/systembussocket 可以被连接之前等待,syslog 服务的客户程序将在 /dev/log 上等待…而这是它们唯一需求的内容!(意指只要这一条件满足,客户程序即无需等待,不论实际的服务是否已经启动。下文详细介绍)

以上就是等待的真正含义。如果能尽早建立客户程序所必须的 socket 而令客户程序处于等待状态而不是在服务程序完全启动后再启动客户程序,我们就能加快启动进程,进一步并行化进程启动。如何做到这一点?在 Unix 族系统上非常简单:在真正需要启动服务之前先监听其 socket,然后将 socket 传递给 exec() (此处直译,含义不懂),如此,在 init 系统中第一步就可建立所有 daemon 所需的所有 socket,在第二步中一次运行所有的 daemon。如果一个服务需要另一个,但被需者未完全启动号,也完全没有问题在被需者查询 socket,处理请求之前,客户进程将因这个请求而被阻塞,但仅有被这个请求阻塞的客户进程被阻塞。并且服务之间的依赖关系将不再需要(手动)配置:如果一次建立所有服务所必须的所有 socket(及启动所有相关服务),则所有服务的所有需求一定在最后会被满足。

下列所说将是重点:如果同时启动了 syslog 和多个其客户进程(意指syslog尚未启动准备好处理请求),而客户进程开始发送请求,则请求会被写入 /dev/log 的Socket 缓存中。除非缓存填满,否则客户进程无需任何等待即可继续完成其启动过程。当 syslog 启动完全后,处理器所有的消息。另一个例子:DBus与其客户进程一起启动,当同步请求发出但没有接受到预想的回应,客户进程将阻塞。当 DBus 启动完成后处理请求,客户进程继续。

内核的socket 缓存将辅助达成最大的并行化。因为内核完成了同步,不再需要用户空间的任何的额外管理!如果在 daemon 启动前所有必须的 socket 都已经可用,依赖关系就变得多余(至少是次要了)。daemon A 需要另一个 daemon B,简单的连接到B。若B已经启动,A的请求成功。若B未完成启动,假如A发出的不是一个同步请求,甚至无需理会(B没有完全启动)。甚至即使B完全没有执行(比如crash了)时再重启B也为时不晚对于A而言二者没有任何分别。借此可达成最佳的并行化和随意的需求时(on-demand)加载。而且在此基础上能够更加鲁棒。因为 socket 即使在相应服务是暂时不可用(如crash)时也可用,所以客户进程不会丢失任何的请求(request入buffer,待重启服务后处理)

并行化Bus服务

Linux上现代的daemon都通过DBus而非socket来交互,现在的问题是,对于这些服务,能否施加与启动传统的、基于socket的服务逻辑相同的并行化?答案是可以,DBus已经提供了所有必要的hook:使用DBus将会在第一次访问时加载服务,并且给予最小的、每请求一个的、消费者与生产者同时启动的同步机制。例如Avahi与CUPS(CUPS需要Avahi进行 mDNS/DNS-SD上打印机扫描)同时启动,仅仅是简单的同时启动二者,若CUPS比Avahi启动快,则DBus将把请求缓存入队列,直到 Avahi服务进行了处理。

所以,总结如下:基于Socket和基于DBus的服务可一次并行启动所有进程,无需任何额外的同步。基于激活的策略还能令我们进行延迟加载服务。如果服务很少被用到,我们可以在第一次被访问时启动,而不是在启动过程中启动。

并行化文件系统任务

对于当前发行版的启动序列图可以看出,文件系统任务所发生的同步点大于 daemon 启动时的同步点:mount fsck等。现在,启动时很多时间都花费在空闲等待所有fstab 中列举的文件系统被加载、 fsck的过程中,仅在完全完成后启动进程才会继续。如何改进?答案是autofs系统。就如同connect() 调用表示一个服务对另一个服务感兴趣,open() 调用(或相似的调用)表示服务对特定的文件或文件系统有需求。所以,我们应该仅令那些访问暂时还不可用(暂未完成 mount、fsck)文件系统的服务阻塞,这样就改进了并行性。首先加载autofs,然后继续正常的mount过程,当被访问的文件系统未准备好,内核将会缓存请求调用,访问进程将被阻塞,一个未成功的访问仅可能阻塞一个进程。当真正的文件系统加载完成后,启动进程如同正常般完成,没有任何缺失的文件,如此我们能够在所有文件系统都准备好之前就加载服务。

假如有人提出将autofs内置于 init 是不妥当的我并不感觉奇怪,也许这会导致更多 crash。然而经过实验,我可以说这并不正确。使用autofs意味着无需马上提供后台 的真实文件系统,这只会导致访问被延迟。如果进程尝试访问autofs但真实的文件系统很长时间都没能加载,进程将被一个sleep中断上被挂起,意味着你可以安全的cancel 它。如果最后这个文件系统都没能加载,那么令 autofs 返回一个error Code(例如 ENOENT)。所以我认为内置 autofs 到init中是正确的。实验代码显示这一想法在实践中工作的很好。

 

关于systemd的争议:

作为 systemd 的拥护者,我前半部分尽量客观的陈述:
systemd 本来是一个先进的init程序,除了管理 daemon 之外,还实现了 socket-activation 来支持按需加载服务。
就架构上来说完胜现有的任何系统上的任何服务管理体系(我可以很负责很客观的说),但是反对的意见主要是:

  1. 不遵循 UNIX 原则。
  2. systemd 在设计之初就不考虑 Linux 以外的平台,不遵循 POSIX 标准,而且很多功能根本就是 Linux 特有的,无法移植到 Linux 之外的平台,这尤其让 BSD 爱好者们很受伤,在 Debian 7 以前,一直维护着Linux和FreeBSD两个内核,只不过后者没什么人用,Debian 8 为了支持systemd 不得不放弃支持 Debian kFreeBSD。
  3. 接管了太多设施,如 syslog 被 systemd-journal 取代,crond 也被 systemd 的 timer 单元取代,udev 也准备集成到 systemd 中来,未来甚至还可能取代 /etc/fstab。尽管这些新的服务大部分都是独立于主进程的,但是还是有整个系统被红帽控制住的感觉(systemd的作者Lennart Poettering 就职于红帽,systemd 也主要是红帽的 Fedora 首先在推,OpenSUSE 后面跟随)。这在开源社区看来是件政治不正确的事情。
  4. 有人怀疑 systemd 的可靠程度。然后就是很多管理员以前积攒的脚本全报废了(这也是管理员反对的主因吧)。

================================
后面我要说下自己的意见:

  1. 原则如果阻碍了进步,那还算个屁,不客气地说,UNIX 原则已经过时了。
  2. 移植性问题:我除了 Mac 外不用任何 BSD 系统,当然 Mac 上一般只做开发不做运维(但就算如此,Mac 上还是有 launchd,systemd 借[chao]鉴[xi]的就是 launchd)。
  3. 对于systemd接管其他设施,一般认为这样也有利于 Linux 系统标准化,在 systemd 之前,init 程序的实现就有 SysV Init,Ubuntu 的 upstart,Gentoo 的 OpenRC 等等,syslog 的实现由 syslog-ng,rsyslogd,简直就是一团乱麻,开发和部署的系统不一样的时候简直神烦(当然这种烦恼仅限于我这样主要做开发,边学边运维的)。关于udev什么的我不是很了解,但是我对 systemd 设计哲学本身就比较认可,相信这么做也是事出有因。另外有些功能在 systemd 之前根本就无法实现,比如
    1. logrotate 从来就不能保证归档日志的时候不丢失刚刚写入的 Log,systemd-journal 接管了 syslog 和 logrotate 之后日志被结构化的存储之后才解决这个问题。当然这是小问题。
    2. 从前的 init 程序根本就不管 daemon 能否正常的退出。有的时候 daemon 被挂了,但是daemon 开的子进程却没有正确退出,还占着关键资源,导致服务根本不能重启,除非重启操作系统。systemd 是能追踪全局进程树,能精确杀死一个进程下所有子进程,具备这样的能力才能称作 daemon manager。
  4. 对 systemd 的怀疑,我觉得那是很多人没用过 systemd,事实上 systemd 在设计上要完备得多(虽然其他 init 服务有各种各样些缺陷,但不是大家痛点),这种设计上就进行了充分的考量的系统,稳定下来后(比如进入 RHEL 7)必然更加可靠。

opensuse13.2 休眠问题

opensuse13.2 引入了systemd,dracut,新的内核,新的驱动。休眠有问题似乎是意料之中的事情:

刚装完的时候似乎pm-hibernate根本不能用,自动返回Xwindow,只有点击kde菜单里的休眠才ok,后来packagekit自动升级了某些rpm(估计是就是那几个新东西),会在resume的时候停在 [OK] systemd:reached target remote file system的地方。然后我开了systemd的log: systemd.log_level=debug systemd.log_target=console console=ttyS0,115200n8 输出到串口观察如下:

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.16.7-7-desktop (geeko@buildhost) (gcc version 4.8.3 20140627 [gcc-4_8-branch revision 212064] (SUSE Linux) ) #1 SMP PREEMPT Wed Dec 17 18:00:44 UTC 2014 (762f27a)
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.16.7-7-desktop root=UUID=e64b51c6-abbb-4895-adab-13fab8d0799b resume=/dev/disk/by-uuid/5a72c369-9ede-4517-b9c7-d5f32bc625f0 systemd.log_level=debug systemd.log_target=console console=ttyS0,115200n8
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x0000000000096fff] usable
[    0.000000] BIOS-e820: [mem 0x0000000000097000-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e4000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000bff8ffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000bff90000-0x00000000bff9dfff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000bff9e000-0x00000000bffdffff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000bffe0000-0x00000000bfffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ffb00000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000017fffffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 2.4 present.
[    0.000000] AGP: No AGP bridge found
[    0.000000] e820: last_pfn = 0x180000 max_arch_pfn = 0x400000000
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] mtrr: your BIOS has configured an incorrect mask, fixing it.
[    0.000000] mtrr: your BIOS has configured an incorrect mask, fixing it.
[    0.000000] mtrr: your BIOS has configured an incorrect mask, fixing it.
[    0.000000] e820: last_pfn = 0xbff90 max_arch_pfn = 0x400000000
[    0.000000] found SMP MP-table at [mem 0x000ff780-0x000ff78f] mapped at [ffff8800000ff780]
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
[    0.000000] init_memory_mapping: [mem 0x17fe00000-0x17fffffff]
[    0.000000] init_memory_mapping: [mem 0x17c000000-0x17fdfffff]
[    0.000000] init_memory_mapping: [mem 0x100000000-0x17bffffff]
[    0.000000] init_memory_mapping: [mem 0x00100000-0xbff8ffff]
[    0.000000] RAMDISK: [mem 0x36a6e000-0x3752efff]
[    0.000000] ACPI: Early table checksum verification disabled
[    0.000000] ACPI: RSDP 0x00000000000FAE70 000024 (v02 ACPIAM)
[    0.000000] ACPI: XSDT 0x00000000BFF90100 00004C (v01 MSTEST OEMXSDT  09000830 MSFT 00000097)
[    0.000000] ACPI: FACP 0x00000000BFF90290 0000F4 (v03 MSTEST OEMFACP  09000830 MSFT 00000097)
[    0.000000] ACPI: DSDT 0x00000000BFF905C0 00918E (v01 A0483  A0483035 00000035 INTL 20060113)
[    0.000000] ACPI: FACS 0x00000000BFF9E000 000040
[    0.000000] ACPI: APIC 0x00000000BFF90390 00006C (v01 MSTEST OEMAPIC  09000830 MSFT 00000097)
[    0.000000] ACPI: MCFG 0x00000000BFF90400 00003C (v01 MSTEST OEMMCFG  09000830 MSFT 00000097)
[    0.000000] ACPI: OEMB 0x00000000BFF9E040 00007B (v01 MSTEST AMI_OEM  09000830 MSFT 00000097)
[    0.000000] ACPI: HPET 0x00000000BFF99750 000038 (v01 MSTEST OEMHPET  09000830 MSFT 00000097)
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at [mem 0x0000000000000000-0x000000017fffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x17fffffff]
[    0.000000]   NODE_DATA [mem 0x17ffe9000-0x17fffcfff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x00001000-0x00ffffff]
[    0.000000]   DMA32    [mem 0x01000000-0xffffffff]
[    0.000000]   Normal   [mem 0x100000000-0x17fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00001000-0x00096fff]
[    0.000000]   node   0: [mem 0x00100000-0xbff8ffff]
[    0.000000]   node   0: [mem 0x100000000-0x17fffffff]
[    0.000000] ACPI: PM-Timer IO Port: 0x808
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x02] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x04] lapic_id[0x03] enabled)
[    0.000000] ACPI: IOAPIC (id[0x04] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 4, version 32, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a202 base: 0xfed00000
[    0.000000] smpboot: Allowing 4 CPUs, 0 hotplug CPUs
[    0.000000] PM: Registered nosave memory: [mem 0x00097000-0x0009ffff]
[    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000e3fff]
[    0.000000] PM: Registered nosave memory: [mem 0x000e4000-0x000fffff]
[    0.000000] PM: Registered nosave memory: [mem 0xbff90000-0xbff9dfff]
[    0.000000] PM: Registered nosave memory: [mem 0xbff9e000-0xbffdffff]
[    0.000000] PM: Registered nosave memory: [mem 0xbffe0000-0xbfffffff]
[    0.000000] PM: Registered nosave memory: [mem 0xc0000000-0xfedfffff]
[    0.000000] PM: Registered nosave memory: [mem 0xfee00000-0xfee00fff]
[    0.000000] PM: Registered nosave memory: [mem 0xfee01000-0xffafffff]
[    0.000000] PM: Registered nosave memory: [mem 0xffb00000-0xffffffff]
[    0.000000] e820: [mem 0xc0000000-0xfedfffff] available for PCI devices
[    0.000000] Booting paravirtualized kernel on bare hardware
[    0.000000] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:4 nr_node_ids:1
[    0.000000] PERCPU: Embedded 27 pages/cpu @ffff88017fc00000 s79104 r8192 d23296 u524288
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 1292562
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.16.7-7-desktop root=UUID=e64b51c6-abbb-4895-adab-13fab8d0799b resume=/dev/disk/by-uuid/5a72c369-9ede-4517-b9c7-d5f32bc625f0 systemd.log_level=debug systemd.log_target=console console=ttyS0,115200n8
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] AGP: Checking aperture...
[    0.000000] AGP: No AGP bridge found
[    0.000000] Memory: 5073908K/5242008K available (6302K kernel code, 1009K rwdata, 4708K rodata, 1560K init, 1532K bss, 168100K reserved)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU dyntick-idle grace-period acceleration is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=4.
[    0.000000]  Offload RCU callbacks from all CPUs
[    0.000000]  Offload RCU callbacks from CPUs: 0-3.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS:33024 nr_irqs:712 16
[    0.000000] Console: colour dummy device 80x25
[    0.000000] console [ttyS0] enabled
[    0.000000] allocated 20971520 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] tsc: Fast TSC calibration using PIT
[    0.000000] tsc: Detected 2666.579 MHz processor
[    0.002011] Calibrating delay loop (skipped), value calculated using timer frequency.. 5333.15 BogoMIPS (lpj=2666579)
[    0.004002] pid_max: default: 32768 minimum: 301
[    0.005013] ACPI: Core revision 20140424
[    0.014917] ACPI: All ACPI Tables successfully acquired
[    0.018069] Security Framework initialized
[    0.019014] AppArmor: AppArmor initialized
[    0.021527] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
[    0.025632] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.029331] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.030014] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.032429] Initializing cgroup subsys memory
[    0.033028] Initializing cgroup subsys devices
[    0.034008] Initializing cgroup subsys freezer
[    0.035004] Initializing cgroup subsys net_cls
[    0.036007] Initializing cgroup subsys blkio
[    0.037006] Initializing cgroup subsys perf_event
[    0.038003] Initializing cgroup subsys net_prio
[    0.039009] Initializing cgroup subsys hugetlb
[    0.040024] CPU: Physical Processor ID: 0
[    0.041002] CPU: Processor Core ID: 0
[    0.042002] mce: CPU supports 6 MCE banks
[    0.043007] CPU0: Thermal monitoring enabled (TM2)
[    0.044008] Last level iTLB entries: 4KB 128, 2MB 4, 4MB 4
[    0.044008] Last level dTLB entries: 4KB 256, 2MB 0, 4MB 32, 1GB 0
[    0.044008] tlb_flushall_shift: -1
[    0.045079] Freeing SMP alternatives memory: 24K (ffffffff82084000 - ffffffff8208a000)
[    0.047659] ftrace: allocating 24400 entries in 96 pages
[    0.054403] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.065721] smpboot: CPU0: Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz (fam: 06, model: 17, stepping: 06)
[    0.070000] Performance Events: PEBS fmt0+, 4-deep LBR, Core2 events, Intel PMU driver.
[    0.074002] ... version:                2
[    0.075000] ... bit width:              40
[    0.076000] ... generic registers:      2
[    0.077001] ... value mask:             000000ffffffffff
[    0.078000] ... max period:             000000007fffffff
[    0.079000] ... fixed-purpose events:   3
[    0.080000] ... event mask:             0000000700000003
[    0.092137] x86: Booting SMP configuration:
[    0.093002] .... node  #0, CPUs:      #1
[    0.107101] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
[    0.110135]  #2 #3
[    0.137012] x86: Booted up 1 node, 4 CPUs
[    0.138002] smpboot: Total of 4 processors activated (21332.63 BogoMIPS)
[    0.141072] devtmpfs: initialized
[    0.146026] PM: Registering ACPI NVS region [mem 0xbff9e000-0xbffdffff] (270336 bytes)
[    0.149042] pinctrl core: initialized pinctrl subsystem
[    0.150034] RTC time: 11:56:15, date: 01/10/15
[    0.151083] NET: Registered protocol family 16
[    0.152141] cpuidle: using governor ladder
[    0.153003] cpuidle: using governor menu
[    0.154051] ACPI: bus type PCI registered
[    0.155001] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    0.157011] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
[    0.158002] PCI: not using MMCONFIG
[    0.159001] PCI: Using configuration type 1 for base access
[    0.164079] ACPI: Added _OSI(Module Device)
[    0.165001] ACPI: Added _OSI(Processor Device)
[    0.166001] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.167001] ACPI: Added _OSI(Processor Aggregator Device)
[    0.170735] ACPI: Executed 1 blocks of module-level executable AML code
[    0.178378] ACPI: Dynamic OEM Table Load:
[    0.180193] ACPI: SSDT 0xFFFF88017810F600 000184 (v01 AMI    CPU1PM   00000001 INTL 20060113)
[    0.183520] ACPI: Dynamic OEM Table Load:
[    0.185191] ACPI: SSDT 0xFFFF88017810F400 00013A (v01 AMI    CPU2PM   00000001 INTL 20060113)
[    0.187698] ACPI: Dynamic OEM Table Load:
[    0.189193] ACPI: SSDT 0xFFFF88017810F200 00013A (v01 AMI    CPU3PM   00000001 INTL 20060113)
[    0.191698] ACPI: Dynamic OEM Table Load:
[    0.193196] ACPI: SSDT 0xFFFF88017810F000 00013A (v01 AMI    CPU4PM   00000001 INTL 20060113)
[    0.196385] ACPI: Interpreter enabled
[    0.197009] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20140424/hwxface-580)
[    0.200002] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S3_] (20140424/hwxface-580)
[    0.203008] ACPI: (supports S0 S1 S4 S5)
[    0.204001] ACPI: Using IOAPIC for interrupt routing
[    0.205026] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
[    0.207351] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in ACPI motherboard resources
[    0.208338] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.216525] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.217006] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[    0.218005] acpi PNP0A08:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
[    0.219338] PCI host bridge to bus 0000:00
[    0.220003] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.221001] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7]
[    0.222001] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff]
[    0.223001] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff]
[    0.224001] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000dffff]
[    0.225001] pci_bus 0000:00: root bus resource [mem 0xc0000000-0xffffffff]
[    0.226182] pci 0000:00:01.0: System wakeup disabled by ACPI
[    0.227168] pci 0000:00:1a.0: System wakeup disabled by ACPI
[    0.229143] pci 0000:00:1a.1: System wakeup disabled by ACPI
[    0.230182] pci 0000:00:1a.7: System wakeup disabled by ACPI
[    0.231322] pci 0000:00:1c.0: System wakeup disabled by ACPI
[    0.232166] pci 0000:00:1c.2: System wakeup disabled by ACPI
[    0.233153] pci 0000:00:1c.3: System wakeup disabled by ACPI
[    0.234153] pci 0000:00:1c.4: System wakeup disabled by ACPI
[    0.235154] pci 0000:00:1c.5: System wakeup disabled by ACPI
[    0.236150] pci 0000:00:1d.0: System wakeup disabled by ACPI
[    0.237159] pci 0000:00:1d.1: System wakeup disabled by ACPI
[    0.238151] pci 0000:00:1d.2: System wakeup disabled by ACPI
[    0.239181] pci 0000:00:1d.7: System wakeup disabled by ACPI
[    0.240123] pci 0000:00:1e.0: System wakeup disabled by ACPI
[    0.241114] pci 0000:00:1f.0: can't claim BAR 13 [io  0x0800-0x087f]: address conflict with ACPI CPU throttle [io  0x0810-0x0815]
[    0.242004] pci 0000:00:1f.0: quirk: [io  0x0480-0x04bf] claimed by ICH6 GPIO
[    0.243003] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 1 PIO at 0294 (mask 0003)
[    0.245039] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.248017] pci 0000:00:1c.0: PCI bridge to [bus 06]
[    0.252018] pci 0000:00:1c.2: PCI bridge to [bus 05]
[    0.253058] pci 0000:00:1c.3: PCI bridge to [bus 04]
[    0.254493] pci 0000:03:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[    0.255009] pci 0000:00:1c.4: PCI bridge to [bus 03]
[    0.259015] pci 0000:00:1c.5: PCI bridge to [bus 02]
[    0.261349] pci 0000:00:1e.0: PCI bridge to [bus 07] (subtractive decode)
[    0.262786] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15)
[    0.266074] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15)
[    0.270365] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 6 7 10 11 12 14 15)
[    0.273645] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 10 11 12 14 *15)
[    0.277073] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.
[    0.282264] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 10 11 12 *14 15)
[    0.286040] ACPI: PCI Interrupt Link [LNKG] (IRQs *3 4 5 6 7 10 11 12 14 15)
[    0.290262] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 *7 10 11 12 14 15)
[    0.294630] ACPI: Enabled 2 GPEs in block 00 to 1F
[    0.295056] vgaarb: setting as boot device: PCI:0000:01:00.0
[    0.296000] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
[    0.296003] vgaarb: loaded
[    0.297001] vgaarb: bridge control possible 0000:01:00.0
[    0.298124] SCSI subsystem initialized
[    0.299042] ACPI: bus type USB registered
[    0.300023] usbcore: registered new interface driver usbfs
[    0.301011] usbcore: registered new interface driver hub
[    0.302027] usbcore: registered new device driver usb
[    0.303045] PCI: Using ACPI for IRQ routing
[    0.309418] NetLabel: Initializing
[    0.310001] NetLabel:  domain hash size = 128
[    0.311000] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.312015] NetLabel:  unlabeled traffic allowed by default
[    0.313027] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[    0.314003] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[    0.316469] hpet0: 3 comparators, 64-bit 14.318180 MHz counter
[    0.319038] Switched to clocksource hpet
[    0.330227] AppArmor: AppArmor Filesystem Enabled
[    0.334965] pnp: PnP ACPI init
[    0.338043] ACPI: bus type PNP registered
[    0.342145] system 00:00: [mem 0xfed14000-0xfed19fff] has been reserved
[    0.349417] system 00:03: [io  0x0290-0x0297] has been reserved
[    0.355544] system 00:04: [io  0x04d0-0x04d1] has been reserved
[    0.361460] system 00:04: [io  0x0800-0x087f] could not be reserved
[    0.367724] system 00:04: [io  0x0480-0x04bf] has been reserved
[    0.373642] system 00:04: [mem 0xffafe000-0xffb0cbff] could not be reserved
[    0.381087] system 00:04: [mem 0xffb00000-0xffbfffff] has been reserved
[    0.387705] system 00:04: [mem 0xfed1c000-0xfed1ffff] has been reserved
[    0.394313] system 00:04: [mem 0xfed20000-0xfed8ffff] has been reserved
[    0.400925] system 00:04: [mem 0xfff00000-0xfffffffe] has been reserved
[    0.407538] system 00:04: [mem 0xfebfe000-0xfebfec00] has been reserved
[    0.414298] system 00:05: [mem 0xfec00000-0xfec00fff] could not be reserved
[    0.421260] system 00:05: [mem 0xfee00000-0xfee00fff] has been reserved
[    0.428051] system 00:07: [mem 0xe0000000-0xefffffff] has been reserved
[    0.434915] system 00:08: [mem 0x00000000-0x0009ffff] could not be reserved
[    0.441867] system 00:08: [mem 0x000c0000-0x000cffff] could not be reserved
[    0.448827] system 00:08: [mem 0x000e0000-0x000fffff] could not be reserved
[    0.455786] system 00:08: [mem 0x00100000-0xbfffffff] could not be reserved
[    0.462911] pnp: PnP ACPI: found 9 devices
[    0.467008] ACPI: bus type PNP unregistered
[    0.478147] pci 0000:00:1f.0: BAR 13: [io  0x0800-0x087f] has bogus alignment
[    0.485302] pci 0000:00:1c.0: BAR 15: assigned [mem 0xc0000000-0xc01fffff 64bit pref]
[    0.493123] pci 0000:00:1c.2: BAR 15: assigned [mem 0xc0200000-0xc03fffff 64bit pref]
[    0.500949] pci 0000:00:1c.3: BAR 14: assigned [mem 0xc0400000-0xc07fffff]
[    0.507822] pci 0000:00:1c.4: BAR 15: assigned [mem 0xc0800000-0xc09fffff 64bit pref]
[    0.515649] pci 0000:00:1c.5: BAR 15: assigned [mem 0xc0a00000-0xc0bfffff 64bit pref]
[    0.523472] pci 0000:00:1c.0: BAR 13: assigned [io  0x1000-0x1fff]
[    0.529652] pci 0000:00:1c.2: BAR 13: assigned [io  0x2000-0x2fff]
[    0.535831] pci 0000:00:1c.3: BAR 13: assigned [io  0x3000-0x3fff]
[    0.542010] pci 0000:00:1f.3: BAR 0: assigned [mem 0xc0c00000-0xc0c000ff]
[    0.548800] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.553763] pci 0000:00:01.0:   bridge window [io  0xb000-0xbfff]
[    0.559855] pci 0000:00:01.0:   bridge window [mem 0xfb900000-0xfb9fffff]
[    0.566640] pci 0000:00:01.0:   bridge window [mem 0xd0000000-0xdfffffff 64bit pref]
[    0.574381] pci 0000:00:1c.0: PCI bridge to [bus 06]
[    0.579347] pci 0000:00:1c.0:   bridge window [io  0x1000-0x1fff]
[    0.585440] pci 0000:00:1c.0:   bridge window [mem 0xfbd00000-0xfbefffff]
[    0.592226] pci 0000:00:1c.0:   bridge window [mem 0xc0000000-0xc01fffff 64bit pref]
[    0.599966] pci 0000:00:1c.2: PCI bridge to [bus 05]
[    0.604931] pci 0000:00:1c.2:   bridge window [io  0x2000-0x2fff]
[    0.611024] pci 0000:00:1c.2:   bridge window [mem 0xfbc00000-0xfbcfffff]
[    0.617810] pci 0000:00:1c.2:   bridge window [mem 0xc0200000-0xc03fffff 64bit pref]
[    0.625551] pci 0000:00:1c.3: PCI bridge to [bus 04]
[    0.630515] pci 0000:00:1c.3:   bridge window [io  0x3000-0x3fff]
[    0.637084] pci 0000:00:1c.3:   bridge window [mem 0xc0400000-0xc07fffff]
[    0.643871] pci 0000:00:1c.3:   bridge window [mem 0xfaf00000-0xfaffffff 64bit pref]
[    0.651612] pci 0000:00:1c.4: PCI bridge to [bus 03]
[    0.656576] pci 0000:00:1c.4:   bridge window [io  0xd000-0xdfff]
[    0.662670] pci 0000:00:1c.4:   bridge window [mem 0xfbb00000-0xfbbfffff]
[    0.669455] pci 0000:00:1c.4:   bridge window [mem 0xc0800000-0xc09fffff 64bit pref]
[    0.677196] pci 0000:00:1c.5: PCI bridge to [bus 02]
[    0.682159] pci 0000:00:1c.5:   bridge window [io  0xc000-0xcfff]
[    0.688254] pci 0000:00:1c.5:   bridge window [mem 0xfba00000-0xfbafffff]
[    0.695039] pci 0000:00:1c.5:   bridge window [mem 0xc0a00000-0xc0bfffff 64bit pref]
[    0.702779] pci 0000:00:1e.0: PCI bridge to [bus 07]
[    0.707744] pci 0000:00:1e.0:   bridge window [io  0xe000-0xefff]
[    0.713837] pci 0000:00:1e.0:   bridge window [mem 0xfbf00000-0xfbffffff]
[    0.720777] NET: Registered protocol family 2
[    0.725446] TCP established hash table entries: 65536 (order: 7, 524288 bytes)
[    0.732834] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[    0.739756] TCP: Hash tables configured (established 65536 bind 65536)
[    0.746293] TCP: reno registered
[    0.749535] UDP hash table entries: 4096 (order: 5, 131072 bytes)
[    0.755665] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes)
[    0.762297] NET: Registered protocol family 1
[    1.867013] pci 0000:00:1a.7: EHCI: BIOS handoff failed (BIOS bug?) 01010001
[    1.874804] Unpacking initramfs...
[    3.052455] Freeing initrd memory: 11012K (ffff880036a6e000 - ffff88003752f000)
[    3.059779] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    3.066214] software IO TLB [mem 0xbbf90000-0xbff90000] (64MB) mapped at [ffff8800bbf90000-ffff8800bff8ffff]
[    3.076354] microcode: CPU0 sig=0x10676, pf=0x40, revision=0x0
[    3.082199] microcode: CPU1 sig=0x10676, pf=0x40, revision=0x0
[    3.088031] microcode: CPU2 sig=0x10676, pf=0x40, revision=0x0
[    3.093865] microcode: CPU3 sig=0x10676, pf=0x40, revision=0x0
[    3.099772] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[    3.108579] Scanning for low memory corruption every 60 seconds
[    3.114841] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    3.121057] Initialise system trusted keyring
[    3.125453] audit: initializing netlink subsys (disabled)
[    3.130871] audit: type=2000 audit(1420890976.129:1): initialized
[    3.137280] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    3.143673] zbud: loaded
[    3.146488] VFS: Disk quotas dquot_6.5.2
[    3.150441] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    3.157163] msgmni has been set to 9931
[    3.161053] Key type big_key registered
[    3.165313] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    3.172780] io scheduler noop registered
[    3.176705] io scheduler deadline registered
[    3.181032] io scheduler cfq registered (default)
[    3.186031] pcieport 0000:00:1c.0: enabling device (0106 -> 0107)
[    3.192250] pcieport 0000:00:1c.2: enabling device (0106 -> 0107)
[    3.198470] pcieport 0000:00:1c.3: enabling device (0106 -> 0107)
[    3.204965] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    3.210555] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[    3.217212] vesafb: mode is 1400x1050x32, linelength=5632, pages=0
[    3.223390] vesafb: scrolling: redraw
[    3.227057] vesafb: Truecolor: size=0:8:8:8, shift=0:16:8:0
[    3.232649] vesafb: framebuffer at 0xd0000000, mapped to 0xffffc90010e80000, using 5824k, total 5824k
[    3.286473] Console: switching to colour frame buffer device 175x65
[    3.337019] fb0: VESA VGA frame buffer device
[    3.341445] GHES: HEST is not enabled!
[    3.345235] Serial: 8250/16550 driver, 32 ports, IRQ sharing disabled
[    3.372142] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    3.381177] Non-volatile memory driver v1.3
[    3.385365] Linux agpgart interface v0.103
[    3.389757] ahci 0000:00:1f.2: controller can't do SNTF, turning off CAP_SNTF
[    3.396950] ahci 0000:00:1f.2: SSS flag set, parallel bus scan disabled
[    3.403588] ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 6 ports 3 Gbps 0x3f impl RAID mode
[    3.411763] ahci 0000:00:1f.2: flags: 64bit ncq stag pm led clo pio slum part ccc ems sxs
[    3.430735] scsi0 : ahci
[    3.433464] scsi1 : ahci
[    3.436162] scsi2 : ahci
[    3.438850] scsi3 : ahci
[    3.441544] scsi4 : ahci

[    3.444232] scsi5 : ahci
[    3.446817] ata1: SATA max UDMA/133 abar m2048@0xfb8ff000 port 0xfb8ff100 irq 46
[    3.454210] ata2: SATA max UDMA/133 abar m2048@0xfb8ff000 port 0xfb8ff180 irq 46
[    3.461602] ata3: SATA max UDMA/133 abar m2048@0xfb8ff000 port 0xfb8ff200 irq 46
[    3.468987] ata4: SATA max UDMA/133 abar m2048@0xfb8ff000 port 0xfb8ff280 irq 46
[    3.476379] ata5: SATA max UDMA/133 abar m2048@0xfb8ff000 port 0xfb8ff300 irq 46
[    3.483771] ata6: SATA max UDMA/133 abar m2048@0xfb8ff000 port 0xfb8ff380 irq 46
[    3.502038] ahci 0000:03:00.0: AHCI 0001.0000 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
[    3.510121] ahci 0000:03:00.0: flags: 64bit ncq pm led clo pmp pio slum part
[    3.517647] scsi6 : ahci
[    3.520339] scsi7 : ahci
[    3.522929] ata7: SATA max UDMA/133 abar m8192@0xfbbfe000 port 0xfbbfe100 irq 16
[    3.530322] ata8: SATA max UDMA/133 abar m8192@0xfbbfe000 port 0xfbbfe180 irq 16
[    3.537739] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.544270] ehci-pci: EHCI PCI platform driver
[    3.548802] ehci-pci 0000:00:1a.7: EHCI Host Controller
[    3.554030] ehci-pci 0000:00:1a.7: new USB bus registered, assigned bus number 1
[    3.561428] ehci-pci 0000:00:1a.7: debug port 1
[    3.569888] ehci-pci 0000:00:1a.7: irq 18, io mem 0xfb8ffc00
[    3.581015] ehci-pci 0000:00:1a.7: USB 2.0 started, EHCI 1.00
[    3.586817] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.593597] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.600814] usb usb1: Product: EHCI Host Controller
[    3.605685] usb usb1: Manufacturer: Linux 3.16.7-7-desktop ehci_hcd
[    3.611943] usb usb1: SerialNumber: 0000:00:1a.7
[    3.616687] hub 1-0:1.0: USB hub found
[    3.620448] hub 1-0:1.0: 4 ports detected
[    3.624673] ehci-pci 0000:00:1d.7: EHCI Host Controller
[    3.629897] ehci-pci 0000:00:1d.7: new USB bus registered, assigned bus number 2
[    3.637293] ehci-pci 0000:00:1d.7: debug port 1
[    3.645727] ehci-pci 0000:00:1d.7: irq 23, io mem 0xfb8ff800
[    3.657015] ehci-pci 0000:00:1d.7: USB 2.0 started, EHCI 1.00
[    3.662806] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    3.669586] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.676805] usb usb2: Product: EHCI Host Controller
[    3.681684] usb usb2: Manufacturer: Linux 3.16.7-7-desktop ehci_hcd
[    3.687950] usb usb2: SerialNumber: 0000:00:1d.7
[    3.692677] hub 2-0:1.0: USB hub found
[    3.696435] hub 2-0:1.0: 6 ports detected
[    3.700611] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.706806] uhci_hcd: USB Universal Host Controller Interface driver
[    3.713246] uhci_hcd 0000:00:1a.0: UHCI Host Controller
[    3.718469] uhci_hcd 0000:00:1a.0: new USB bus registered, assigned bus number 3
[    3.725864] uhci_hcd 0000:00:1a.0: detected 2 ports
[    3.730752] uhci_hcd 0000:00:1a.0: irq 16, io base 0x0000a880
[    3.736533] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
[    3.743315] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.750532] usb usb3: Product: UHCI Host Controller
[    3.755411] usb usb3: Manufacturer: Linux 3.16.7-7-desktop uhci_hcd
[    3.761678] usb usb3: SerialNumber: 0000:00:1a.0
[    3.766403] hub 3-0:1.0: USB hub found
[    3.770165] hub 3-0:1.0: 2 ports detected
[    3.774338] uhci_hcd 0000:00:1a.1: UHCI Host Controller
[    3.779564] uhci_hcd 0000:00:1a.1: new USB bus registered, assigned bus number 4
[    3.786963] uhci_hcd 0000:00:1a.1: detected 2 ports
[    3.791860] uhci_hcd 0000:00:1a.1: irq 17, io base 0x0000ac00
[    3.796032] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    3.803812] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
[    3.805688] ata1.00: ATA-8: WDC WD5003ABYX-01WERA0, 01.01S01, max UDMA/133
[    3.805689] ata1.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[    3.806601] ata1.00: configured for UDMA/133
[    3.806739] scsi 0:0:0:0: Direct-Access     ATA      WDC WD5003ABYX-0 1S01 PQ: 0 ANSI: 5
[    3.806978] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
[    3.807081] sd 0:0:0:0: [sda] Write Protect is off
[    3.807114] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.810367]  sda: unknown partition table
[    3.810588] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.866743] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.873968] usb usb4: Product: UHCI Host Controller
[    3.878869] usb usb4: Manufacturer: Linux 3.16.7-7-desktop uhci_hcd
[    3.885135] usb usb4: SerialNumber: 0000:00:1a.1
[    3.889897] hub 4-0:1.0: USB hub found
[    3.893653] hub 4-0:1.0: 2 ports detected
[    3.897871] uhci_hcd 0000:00:1d.0: UHCI Host Controller
[    3.903099] uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 5
[    3.910490] uhci_hcd 0000:00:1d.0: detected 2 ports
[    3.915380] uhci_hcd 0000:00:1d.0: irq 23, io base 0x0000a400
[    3.921169] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
[    3.927956] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.935176] usb usb5: Product: UHCI Host Controller
[    3.940054] usb usb5: Manufacturer: Linux 3.16.7-7-desktop uhci_hcd
[    3.946320] usb usb5: SerialNumber: 0000:00:1d.0
[    3.951058] hub 5-0:1.0: USB hub found
[    3.954814] hub 5-0:1.0: 2 ports detected
[    3.958987] uhci_hcd 0000:00:1d.1: UHCI Host Controller
[    3.964213] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 6
[    3.968036] usb 1-1: new high-speed USB device number 2 using ehci-pci
[    3.978137] uhci_hcd 0000:00:1d.1: detected 2 ports
[    3.983052] uhci_hcd 0000:00:1d.1: irq 19, io base 0x0000a480
[    3.988839] usb usb6: New USB device found, idVendor=1d6b, idProduct=0001
[    3.995631] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.000043] ata7: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    4.009031] usb usb6: Product: UHCI Host Controller
[    4.013921] usb usb6: Manufacturer: Linux 3.16.7-7-desktop uhci_hcd
[    4.020201] usb usb6: SerialNumber: 0000:00:1d.1
[    4.020207] ata7.00: ATA-8: PLEXTOR PX-128M5Pro, 1.07, max UDMA/133
[    4.020208] ata7.00: 250069680 sectors, multi 1: LBA48 NCQ (depth 31/32), AA
[    4.038234] hub 6-0:1.0: USB hub found
[    4.038389] ata7.00: configured for UDMA/133
[    4.046258] hub 6-0:1.0: 2 ports detected
[    4.050433] uhci_hcd 0000:00:1d.2: UHCI Host Controller
[    4.055666] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 7
[    4.063056] uhci_hcd 0000:00:1d.2: detected 2 ports
[    4.067947] uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000a800
[    4.073727] usb usb7: New USB device found, idVendor=1d6b, idProduct=0001
[    4.079023] tsc: Refined TSC clocksource calibration: 2666.665 MHz
[    4.086680] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.093899] usb usb7: Product: UHCI Host Controller
[    4.098779] usb usb7: Manufacturer: Linux 3.16.7-7-desktop uhci_hcd
[    4.099041] ata8: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    4.102626] ata8.00: ATA-7: Maxtor 6L160P0, BAH41G10, max UDMA/133
[    4.102627] ata8.00: 320173056 sectors, multi 0: LBA48
[    4.102629] ata8.00: applying bridge limits
[    4.105585] usb 1-1: New USB device found, idVendor=05ac, idProduct=1006
[    4.105586] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.105587] usb 1-1: Product: Keyboard Hub
[    4.105588] usb 1-1: Manufacturer: Apple, Inc.
[    4.105589] usb 1-1: SerialNumber: 000000000000
[    4.105734] hub 1-1:1.0: USB hub found
[    4.105833] hub 1-1:1.0: 3 ports detected
[    4.107696] ata8.00: configured for UDMA/100
[    4.114028] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    4.119365] ata2.00: ATA-8: WDC WD5003ABYX-01WERA0, 01.01S01, max UDMA/133
[    4.119366] ata2.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[    4.120076] ata2.00: configured for UDMA/133
[    4.120130] scsi 1:0:0:0: Direct-Access     ATA      WDC WD5003ABYX-0 1S01 PQ: 0 ANSI: 5
[    4.120286] sd 1:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB)
[    4.120329] sd 1:0:0:0: [sdb] Write Protect is off
[    4.120348] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    4.128656]  sdb: sdb1 sdb2 sdb3 sdb4
[    4.128934] sd 1:0:0:0: [sdb] Attached SCSI disk
[    4.227658] usb usb7: SerialNumber: 0000:00:1d.2
[    4.232382] hub 7-0:1.0: USB hub found
[    4.236142] hub 7-0:1.0: 2 ports detected
[    4.240295] i8042: PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
[    4.247082] i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
[    4.254021] usb 1-3: new high-speed USB device number 3 using ehci-pci
[    4.264352] serio: i8042 KBD port at 0x60,0x64 irq 1
[    4.269434] mousedev: PS/2 mouse device common for all mice
[    4.275151] rtc_cmos 00:01: RTC can wake from S4
[    4.279904] rtc_cmos 00:01: rtc core: registered rtc_cmos as rtc0
[    4.286027] rtc_cmos 00:01: alarms up to one month, y3k, 114 bytes nvram, hpet irqs
[    4.293706] ledtrig-cpu: registered to indicate activity on CPUs
[    4.299741] hidraw: raw HID events driver (C) Jiri Kosina
[    4.305267] usbcore: registered new interface driver usbhid
[    4.310851] usbhid: USB HID core driver
[    4.314751] TCP: cubic registered
[    4.318179] NET: Registered protocol family 10
[    4.322677] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[    4.331865] Loading compiled-in X.509 certificates
[    4.336672] registered taskstats version 1
[    4.340829] AppArmor: AppArmor sha1 policy hashing enabled
[    4.346729]   Magic number: 15:774:933
[    4.350608] rtc_cmos 00:01: setting system clock to 2015-01-10 11:56:19 UTC (1420890979)
[    4.377459] usb 1-3: New USB device found, idVendor=0bda, idProduct=8187
[    4.384156] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.391288] usb 1-3: Product: RTL8187_Wireless
[    4.395735] usb 1-3: Manufacturer: Manufacturer_Realtek_RTL8187_
[    4.401740] usb 1-3: SerialNumber: 0015AF048F06
[    4.432019] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    4.442168] ata3.00: ATAPI: HL-DT-ST BD-RE  GGW-H20L, YL07, max UDMA/133
[    4.453451] ata3.00: configured for UDMA/133
[    4.566914] scsi 2:0:0:0: CD-ROM            HL-DT-ST BD-RE  GGW-H20L  YL07 PQ: 0 ANSI: 5
[    4.732088] usb 1-1.2: new low-speed USB device number 4 using ehci-pci
[    4.830207] usb 1-1.2: New USB device found, idVendor=05ac, idProduct=0220
[    4.837084] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.844389] usb 1-1.2: Product: Apple Keyboard
[    4.848837] usb 1-1.2: Manufacturer: Apple, Inc
[    4.857261] input: Apple, Inc Apple Keyboard as /devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1.2/1-1.2:1.0/0003:05AC:0220.0001/input/input1
[    4.869767] apple 0003:05AC:0220.0001: input,hidraw0: USB HID v1.11 Keyboard [Apple, Inc Apple Keyboard] on usb-0000:00:1a.7-1.2/input0
[    4.884762] input: Apple, Inc Apple Keyboard as /devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1.2/1-1.2:1.1/0003:05AC:0220.0002/input/input2
[    4.891032] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    4.903371] ata4.00: ATAPI: ATAPI   iHAS524   B, AL2A, max UDMA/100
[    4.903442] apple 0003:05AC:0220.0002: input,hidraw1: USB HID v1.11 Device [Apple, Inc Apple Keyboard] on usb-0000:00:1a.7-1.2/input1
[    4.924519] ata4.00: configured for UDMA/100
[    4.931916] scsi 3:0:0:0: CD-ROM            ATAPI    iHAS524   B      AL2A PQ: 0 ANSI: 5
[    4.979092] usb 1-1.3: new low-speed USB device number 5 using ehci-pci
[    5.076707] usb 1-1.3: New USB device found, idVendor=05ac, idProduct=0304
[    5.083587] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    5.083588] Switched to clocksource tsc
[    5.094724] usb 1-1.3: Product: Apple Optical USB Mouse
[    5.099953] usb 1-1.3: Manufacturer: Mitsumi Electric
[    5.107564] input: Mitsumi Electric Apple Optical USB Mouse as /devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1.3/1-1.3:1.0/0003:05AC:0304.0003/input/input3
[    5.121369] apple 0003:05AC:0304.0003: input,hidraw2: USB HID v1.10 Mouse [Mitsumi Electric Apple Optical USB Mouse] on usb-0000:00:1a.7-1.3/input0
[    5.257013] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    5.264725] ata5.00: ATA-8: TOSHIBA DT01ACA300, MX6OABB0, max UDMA/133
[    5.271246] ata5.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[    5.280016] ata5.00: configured for UDMA/133
[    5.284367] scsi 4:0:0:0: Direct-Access     ATA      TOSHIBA DT01ACA3 ABB0 PQ: 0 ANSI: 5
[    5.292586] sd 4:0:0:0: [sdc] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
[    5.300330] sd 4:0:0:0: [sdc] 4096-byte physical blocks
[    5.305592] sd 4:0:0:0: [sdc] Write Protect is off
[    5.310400] sd 4:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    5.340020] usb 7-2: new full-speed USB device number 2 using uhci_hcd
[    5.363923]  sdc: sdc1
[    5.366450] sd 4:0:0:0: [sdc] Attached SCSI disk
[    5.509718] usb 7-2: New USB device found, idVendor=0a5c, idProduct=4500
[    5.516421] usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    5.523552] usb 7-2: Product: BCM2046B1
[    5.527387] usb 7-2: Manufacturer: Broadcom
[    5.533756] hub 7-2:1.0: USB hub found
[    5.538718] hub 7-2:1.0: 3 ports detected
[    5.597014] ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    5.604183] ata6.00: ATA-8: Hitachi HDS721010CLA332, JP4OA3MA, max UDMA/133
[    5.611144] ata6.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[    5.619373] ata6.00: configured for UDMA/133
[    5.623710] scsi 5:0:0:0: Direct-Access     ATA      Hitachi HDS72101 A3MA PQ: 0 ANSI: 5
[    5.631944] sd 5:0:0:0: [sdd] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[    5.632020] scsi 6:0:0:0: Direct-Access     ATA      PLEXTOR PX-128M5 1.07 PQ: 0 ANSI: 5
[    5.632157] sd 6:0:0:0: [sde] 250069680 512-byte logical blocks: (128 GB/119 GiB)
[    5.632201] sd 6:0:0:0: [sde] Write Protect is off
[    5.632218] sd 6:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    5.632225] scsi 7:0:0:0: Direct-Access     ATA      Maxtor 6L160P0   1G10 PQ: 0 ANSI: 5
[    5.632437] sd 7:0:0:0: [sdf] 320173056 512-byte logical blocks: (163 GB/152 GiB)
[    5.632481] sd 7:0:0:0: [sdf] Write Protect is off
[    5.632498] sd 7:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    5.698377] sd 5:0:0:0: [sdd] Write Protect is off
[    5.703208] sd 5:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    5.712265]  sde: sde1 sde2 sde3 sde4 < sde5 sde6 >
[    5.717535] sd 6:0:0:0: [sde] Attached SCSI disk
[    5.726354]  sdd: sdd1
[    5.728880] sd 5:0:0:0: [sdd] Attached SCSI disk
[    5.829945]  sdf: sdf1 sdf2 < sdf5 sdf6 sdf7 sdf8 sdf9 sdf10 sdf11 sdf12 sdf13 > sdf3
[    5.838323] sd 7:0:0:0: [sdf] Attached SCSI disk
[    5.844341] Freeing unused kernel memory: 1560K (ffffffff81efe000 - ffffffff82084000)
[    5.852165] Write protecting the kernel read-only data: 14336k
[    5.862262] Freeing unused kernel memory: 1880K (ffff88000162a000 - ffff880001800000)
[    5.873142] Freeing unused kernel memory: 1436K (ffff880001c99000 - ffff880001e00000)
[    5.882727] usb 7-2.1: new full-speed USB device number 3 using uhci_hcd
[    5.882877] random: systemd urandom read with 103 bits of entropy available
Mounting cgroup to /sys/fs/cgroup/cpuset of type cgroup with options cpuset.
Mounting cgroup to /sys/fs/cgroup/cpu,cpuacct of type cgroup with options cpu,cpuacct.
Mounting cgroup to /sys/fs/cgroup/memory of type cgroup with options memory.
Mounting cgroup to /sys/fs/cgroup/devices of type cgroup with options devices.
Mounting cgroup to /sys/fs/cgroup/freezer of type cgroup with options freezer.
Mounting cgroup to /sys/fs/cgroup/net_cls,net_prio of type cgroup with options net_cls,net_prio.
Mounting cgroup to /sys/fs/cgroup/blkio of type cgroup with options blkio.
Mounting cgroup to /sys/fs/cgroup/perf_event of type cgroup with options perf_event.
Mounting cgroup to /sys/fs/cgroup/hugetlb of type cgroup with options hugetlb.
systemd 210 running in system mode. (+PAM -LIBWRAP +AUDIT +SELINUX -IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ +SECCOMP +APPARMOR)
Detected architecture 'x86-64'.
Running in initial RAM disk.

Welcome to openSUSE 13.2 (Harlequin) (x86_64) dracut-037-17.9.1 (Initramfs)!

Set hostname to .
Using cgroup controller name=systemd. File system hierarchy is at /sys/fs/cgroup/systemd.
Installed release agent.
Set up TFD_TIMER_CANCEL_ON_SET timerfd.
Spawned /usr/lib/systemd/system-generators/systemd-fstab-generator as 10[    6.007722] usb 7-2.1: New USB device found, idVendor=0a5c, idProduct=4502
1
Spawned /usr/[    6.015952] usb 7-2.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
lib/systemd/system-generators/dracut-rootfs-generator as 102
Spawned /usr/lib/s[    6.031118] input: HID 0a5c:4502 as /devices/pci0000:00/0000:00:1d.2/usb7/7-2/7-2.1/7-2.1:1.0/0003:0A5C:4502.0004/input/input4
ystemd/system-ge[    6.043020] hid-generic 0003:0A5C:4502.0004: input,hidraw3: USB HID v1.11 Keyboard [HID 0a5c:4502] on usb-0000:00:1d.2-2.1/input0
nerators/systemd-gpt-auto-generator as 103
/usr/lib/systemd/system-generators/systemd-fstab-generator exited successfully.
/usr/lib/systemd/system-generators/dracut-rootfs-generator exited successfully.
/usr/lib/systemd/system-generators/systemd-gpt-auto-generator exited successfully.
Looking for unit files in (higher priority first):
        /etc/systemd/system
        /run/systemd/system
        /run/systemd/generator
        /usr/local/lib/systemd/system
        /usr/lib/systemd/system
        /lib/systemd/system
Looking for SysV init scripts in:
        /etc/init.d
Looking for SysV rcN.d links in:
        /etc/rc.d
Failed to load configuration for syslog.service: No such file or directory
Failed to load configuration for systemd-readahead-replay.service: No such file or directory
Failed to load configuration[    6.122718] usb 7-2.2: new full-speed USB device number 4 using uhci_hcd
 for systemd-readahead-collect.service: No such file or directory
Failed to load configuration for getty.target: No such file or directory
Using notification socket @/org/freedesktop/systemd1/notify
Successfully created private D-Bus server.
-.mount changed dead -> mounted
Activating default unit: default.target
Failed to load configuration for systemd-fsck-root.service: No such file or directory
Trying to enqueue job initrd.target/start/isolate
Installed new job initrd.target/start as 1
Installed new job basic.target/start as 2
Installed new job sysinit.target/start as 3
Installed new job local-fs.target/start as 4
Installed new job swap.target/start as 6
Installed new job systemd-ask-password-console.path/start as 7
Installed new job systemd-tmpfiles-setup-dev.service/start as 8
Installed new job system.slice/start as 9
Installed new job -.slice/start as 10
Installed new job systemd-sysctl.service/start as 11
Installed new job systemd-udev-trigger.service/start as 12
Installed new job systemd-udevd.service/start as 13
Installed new job systemd-udevd-control.socket/start as 14
Installed new job systemd-udevd-kernel.socket/start as 15
Installed new job kmod-static-nodes.service/start as 16
Installed new job plymouth-start[    6.239718] usb 7-2.2: New USB device found, idVendor=0a5c, idProduct=4503
.service/start a[    6.247047] usb 7-2.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
s 17
Installed new job systemd-ask-password-plymouth.path/start as 18
Installed new job system[    6.263295] input: HID 0a5c:4503 as /devices/pci0000:00/0000:00:1d.2/usb7/7-2/7-2.2/7-2.2:1.0/0003:0A5C:4503.0005/input/input5
d-vconsole-setup[    6.275550] hid-generic 0003:0A5C:4503.0005: input,hidraw4: USB HID v1.11 Mouse [HID 0a5c:4503] on usb-0000:00:1d.2-2.2/input0
.service/start as 19
Installed new job systemd-journald.service/start as 20
Installed new job systemd-journald.socket/start as 21
Installed new job systemd-modules-load.service/start as 22
Installed new job sockets.target/start as 25
Installed new job timers.target/start as 26
Installed new job paths.target/start as 27
Installed new job slices.target/start as 28
Installed new job initrd-root-fs.target/start as 29
Installed new job sysroot.mount/start as 30
Installed new job dev-disk-by\x2duuid-e64b51c6\x2dabbb\x2d4895\x2dadab\x2d13fab8d0799b.device/start as 31
Installed new job systemd-fsck@dev-disk-by\x2duuid-e64b51c6\x2dabbb\x2d4895\x2dadab\x2d13fab8d0799b.service/start as 32
Installed new job system-systemd\x2dfsck.slice/start as 33
Installed new job initrd-[    6.354716] usb 7-2.3: new full-speed USB device number 5 using uhci_hcd
fs.target/start as 35
Installed new job initrd-parse-etc.servic[    6.366968] sd 0:0:0:0: Attached scsi generic sg0 type 0
e/start as 36
I[    6.374158] sd 1:0:0:0: Attached scsi generic sg1 type 0
nstalled new job[    6.380421] scsi 2:0:0:0: Attached scsi generic sg2 type 5
 dracut-mount.se[    6.387283] scsi 3:0:0:0: Attached scsi generic sg3 type 5
rvice/start as 3[    6.394147] sd 4:0:0:0: Attached scsi generic sg4 type 0
7
Installed new[    6.400844] sd 5:0:0:0: Attached scsi generic sg5 type 0
 job dracut-pre-[    6.407538] sd 6:0:0:0: Attached scsi generic sg6 type 0
trigger.service/[    6.414244] sd 7:0:0:0: Attached scsi generic sg7 type 0
start as 38
Installed new job dracut-pre-udev.service/start as 39
Installed new job dracut-cmdline.service/start as 40
Installed new job dracut-pre-mount.service/start as 41
Installed new job dracut-initqueue.service/start as 42
Installed new job remote-fs-pre.target/start as 43
Installed new job dracut-pre-pivot.service/start as 44
Installed new job remote-fs.target/start as 45
Enqueued job initrd.target/start as 1
Loaded units and determined initial transaction in 453.797ms.
Received SIGCHLD from PID 101 (n/a).
         Expecting device dev-disk-by\x2duuid-e64b51c6\x2dabb...0799b.device...
timers.target changed dead -> active
Job timers.target/start finished, result=done
[  OK  ] Reached target Timers.
-.slice changed dead -> active
Job -.slice/start finished, re[    6.489720] usb 7-2.3: New USB device found, idVendor=0461, idProduct=4d6a
sult=done
[    6.497141] usb 7-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
m  OK  ] Cre[    6.505832] usb 7-2.3: Product: BCM92046DG-CL1ROM
[    6.511895] usb 7-2.3: Manufacturer: Broadcom Corp
ated slice -.sli[    6.516706] usb 7-2.3: SerialNumber: 001A7D1161CF
ce.
ConditionPathIsReadWrite=/sys succeeded for systemd-udevd-control.socket.
systemd-udevd-control.socket changed dead -> listening
Job systemd-udevd-control.socket/start finished, result=done
[  OK  ] Listening on udev Control Socket.
ConditionPathIsReadWrite=/sys succeeded for systemd-udevd-kernel.socket.
systemd-udevd-kernel.socket changed dead -> listening
Job systemd-udevd-kernel.socket/start finished, result=done
[  OK  ] Listening on udev Kernel Socket.
systemd-journald.socket changed dead -> listening
Job systemd-journald.socket/start finished, result=done
[  OK  ] Listening on Journal Socket.
sockets.target changed dead -> active
Job sockets.target/start finished, result=done
[  OK  ] Reached target Sockets.
system.slice changed dead -> active
Job system.slice/start finished, result=done
[  OK  ] Created slice System Slice.
ConditionKernelCommandLine=|noresume failed for dracut-cmdline.service.
ConditionKernelCommandLine=|resume succeeded for dracut-cmdline.service.
ConditionKernelCommandLine=|rd.break=cmdline failed for dracut-cmdline.service.
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline succeeded for dracut-cmdline.service.
ConditionPathExistsGlob=|/etc/cmdline.d/*.conf succeeded for dracut-cmdline.service.
ConditionPathExists=/etc/initrd-release succeeded for dracut-cmdline.service.
         Starting dracut cmdline hook...
About to execute: /bin/dracut-cmdline
Forked /bin/dracut-cmdline as 140
dracut-cmdline.service changed dead -> start
system-systemd\x2dfsck.slice changed dead -> active
Job system-systemd\x2dfsck.slice/start finished, result=done
[  OK  ] Created slice system-systemd\x2dfsck.slice.
ConditionPathExists=/lib/modules/3.16.7-7-desktop/modules.devname succeeded for kmod-static-nodes.service.
ConditionCapability=CAP_MKNOD succeeded for kmod-static-nodes.service.
         Starting Create list of required static device nodes...rrent kernel...
About to execute: /usr/bin/kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
Forked /usr/bin/kmod as 141
kmod-static-nodes.service changed dead -> start
ConditionKernelCommandLine=|rd.modules-load failed for systemd-modules-load.service.
ConditionKernelCommandLine=|modules-load failed for systemd-modules-load.service.
ConditionDirectoryNotEmpty=|/run/modules-load.d failed for systemd-modules-load.service.
ConditionDirectoryNotEmpty=|/etc/modules-load.d failed for systemd-modules-load.service.
ConditionDirectoryNotEmpty=|/usr/local/lib/modules-load.d failed for systemd-modules-load.service.
ConditionDirectoryNotEmpty=|/usr/lib/modules-load.d succeeded for systemd-modules-load.service.
ConditionDirectoryNotEmpty=|/lib/modules-load.d failed for systemd-modules-load.service.
ConditionCapability=CAP_SYS_MODULE succeeded for systemd-modules-load.service.
         Starting Load Kernel Modules...
About to execute: /usr/lib/systemd/systemd-modules-load
Forked /usr/lib/systemd/systemd-modules-load as 142
systemd-modules-load.service changed dead -> start
         Starting Journal Service...
About to execute: /usr/lib/systemd/systemd-journald
Forked /usr/lib/systemd/systemd-journald as 197
systemd-journald.service changed dead -> running
Job systemd-journald.service/start finished, result=done
[  OK  ] Started Journal Service.
systemd-journald.socket changed listening -> running
slices.target changed dead -> active
Job slices.target/start finished, result=done
[  OK  ] Reached target Slices.
ConditionPathExists=/dev/tty0 succeeded for systemd-vconsole-setup.service.
         Starting Setup Virtual Console...
About to execute: /usr/lib/systemd/systemd-vconsole-setup
Forked /usr/lib/systemd/systemd-vconsole-setup as 199
systemd-vconsole-setup.service changed dead -> start
swap.target changed dead -> active
Job swap.target/start finished, result=done
[  OK  ] Reached target Swap.
local-fs.target changed dead -> active
Job local-fs.target/start finished, result=done
[  OK  ] Reached target Local File Systems.
Received SIGCHLD from PID 141 (kmod).
Child 140 (dracut-cmdline) died (code=exited, status=0/SUCCESS)
Child 140 belongs to dracut-cmdline.service
dracut-cmdline.service: main process exited, code=exited, status=0/SUCCESS
dracut-cmdline.service changed start -> exited
Job dracut-cmdline.service/start finished, result=done
[  OK  ] Started dracut cmdline hook.
dracut-cmdline.service: cgroup is empty
Child 141 (kmod) died (code=exited, status=0/SUCCESS)
Child 141 belongs to kmod-static-nodes.service
kmod-static-nodes.service: main process exited, code=exited, status=0/SUCCESS
kmod-static-nodes.service changed start -> exited
Job kmod-static-nodes.service/start finished, result=done
[  OK  ] Started Create list of required static device nodes ...current kernel.
kmod-static-nodes.service: cgroup is empty
Child 142 (systemd-modules) died (code=exited, status=0/SUCCESS)
Child 142 belongs to systemd-modules-load.service
systemd-modules-load.service: main process exited, code=exited, status=0/SUCCESS
systemd-modules-load.service changed start -> exited
Job systemd-modules-load.service/start finished, result=done
[  OK  ] Started Load Kernel Modules.
systemd-modules-load.service: cgroup is empty
Got notification message for unit systemd-journald.service
systemd-journald.service: Got notification message from PID 197 (WATCHDOG=1...)
systemd-journald.service: got WATCHDOG=1
Got notification message for unit systemd-journald.service
systemd-journald.service: Got notification message from PID 197 (WATCHDOG=1...)
systemd-journald.service: got WATCHDOG=1
Accepted new private connection.
Incoming traffic on systemd-udevd-kernel.socket
systemd-udevd-kernel.socket changed listening -> running
Accepted new private connection.
Accepted new private connection.
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie=0 error=n/a
Got disconnect on private connection.
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie=0 error=n/a
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie=0 error=n/a
Got disconnect on private connection.
Got disconnect on private connection.
ConditionPathExistsGlob=|/boot/sysctl.conf-3.16.7-7-desktop failed for systemd-sysctl.service.
ConditionDirectoryNotEmpty=|/run/sysctl.d failed for systemd-sysctl.service.
ConditionDirectoryNotEmpty=|/etc/sysctl.d succeeded for systemd-sysctl.service.
ConditionDirectoryNotEmpty=|/usr/local/lib/sysctl.d failed for systemd-sysctl.service.
ConditionDirectoryNotEmpty=|/usr/lib/sysctl.d succeeded for systemd-sysctl.service.
ConditionDirectoryNotEmpty=|/lib/sysctl.d failed for systemd-sysctl.service.
ConditionPathIsReadWrite=/proc/sys/ succeeded for systemd-sysctl.service.
         Starting Apply Kernel Variables...
About to execute: /usr/lib/systemd/systemd-sysctl
Forked /usr/lib/systemd/systemd-sysctl as 204
systemd-sysctl.service changed dead -> start
ConditionCapability=CAP_MKNOD succeeded for systemd-tmpfiles-setup-dev.service.
         Starting Create static device nodes in /dev...
About to execute: /usr/bin/systemd-tmpfiles --prefix=/dev --create
Forked /usr/bin/systemd-tmpfiles as 205
systemd-tmpfiles-setup-dev.service changed dead -> start
ConditionKernelCommandLine=|rd.driver.post failed for dracut-pre-udev.service.
ConditionKernelCommandLine=|rd.driver.pre failed for dracut-pre-udev.service.
ConditionKernelCommandLine=|rd.driver.blacklist failed for dracut-pre-udev.service.
ConditionKernelCommandLine=|rd.break=pre-udev failed for dracut-pre-udev.service.
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-udev failed for dracut-pre-udev.service.
ConditionPathExists=/etc/initrd-release succeeded for dracut-pre-udev.service.
Starting of dracut-pre-udev.service requested but condition failed. Ignoring.
Job dracut-pre-udev.service/start finished, result=done
Got notification message for unit systemd-journald.service
systemd-journald.service: Got notification message from PID 197 (READY=1...)
systemd-journald.service: got STATUS=Processing requests...
Got notification message for unit systemd-journald.service
systemd-journald.service: Got notification message from PID 197 (READY=1...)
systemd-journald.service: got STATUS=Processing requests...
Received SIGCHLD from PID 199 (systemd-vconsol).
Child 199 (systemd-vconsol) died (code=exited, status=0/SUCCESS)
Child 199 belongs to systemd-vconsole-setup.service
systemd-vconsole-setup.service: main process exited, code=exited, status=0/SUCCESS
systemd-vconsole-setup.service changed start -> exited
Job systemd-vconsole-setup.service/start finished, result=done
[  OK  ] Started Setup Virtual Console.
systemd-vconsole-setup.service: cgroup is empty
Child 204 (systemd-sysctl) died (code=exited, status=0/SUCCESS)
Child 204 belongs to systemd-sysctl.service
systemd-sysctl.service: main process exited, code=exited, status=0/SUCCESS
systemd-sysctl.service changed start -> exited
Job systemd-sysctl.service/start finished, result=done
[  OK  ] Started Apply Kernel Variables.
systemd-sysctl.service: cgroup is empty
Received SIGCHLD from PID 204 (n/a).
Accepted new private connection.
Received SIGCHLD from PID 205 (systemd-tmpfile).
Child 205 (systemd-tmpfile) died (code=exited, status=0/SUCCESS)
Child 205 belongs to systemd-tmpfiles-setup-dev.service
systemd-tmpfiles-setup-dev.service: main process exited, code=exited, status=0/SUCCESS
systemd-tmpfiles-setup-dev.service changed start -> exited
Job systemd-tmpfiles-setup-dev.service/start finished, result=done
[  OK  ] Started Create static device nodes in /dev.
systemd-tmpfiles-setup-dev.service: cgroup is empty
ConditionPathIsReadWrite=/sys succeeded for systemd-udevd.service.
         Starting udev Kernel Device Manager...
About to execute: /usr/lib/systemd/systemd-udevd
Forked /usr/lib/systemd/systemd-udevd as 207
systemd-udevd.service changed dead -> start
Accepted new private connection.
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie=0 error=n/a
systemd-vconsole-setup.service: cgroup is empty
Got disconnect on private connection.
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie=0 error=n/a
systemd-tmpfiles-setup-dev.service: cgroup is empty
Got notification message for unit systemd-udevd.service
systemd-udevd.servic[    7.477714] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input6
e: Got notificat[    7.486580] ACPI: Power Button [PWRB]
ion message from[    7.491675] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input7
[    7.491734] AMD IOMMUv2 driver by Joerg Roedel <joerg.roedel@amd.com>
[    7.491735] AMD IOMMUv2 functionality not available on this system
 PID 207 (READY=[    7.513145] ACPI: Power Button [PWRF]
[    7.513921] random: nonblocking pool is initialized
1...)
systemd-udevd.service: got READY=1
systemd-udevd.service changed start -> running
Job systemd-udevd.service/start finis[    7.533027] scsi8 : pata_jmicron
hed, result=done
[  OK      7.539610] fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.
0m] Started udev[    7.550949] Disabling lock debugging due to kernel taint
 Kernel Device M[    7.556964] scsi9 : pata_jmicron
anager.
systemd[    7.561462] ata9: PATA max UDMA/100 cmd 0xdc00 ctl 0xd880 bmdma 0xd400 irq 17
-udevd-control.s[    7.569890] ata10: PATA max UDMA/100 cmd 0xd800 ctl 0xd480 bmdma 0xd408 irq 17
ocket changed listening -> runni[    7.580070] firewire_ohci 0000:07:03.0: added OHCI v1.10 device as card 0, 4 IR + 8 IT contexts, quirks 0x2
ng
Got notification message for unit systemd-udevd.service
systemd-udevd.service: Got notification message from PID 207 (READY=1...)
Got disconnect on private connection.
ConditionKernelCommandLine=|rd.break=pre-trigger [    7.610036] [fglrx] Maximum main memory to use for locked dma buffers: 4790 MBytes.
failed for dracu[    7.618661] [fglrx]   vendor: 1002 device: 6779 revision: 0 count: 1
t-pre-trigger.se[    7.626940] [fglrx] ioport: bar 4, base 0xb000, size: 0x100
rvice.
Conditio[    7.633984] [fglrx] Kernel PAT support is enabled
nDirectoryNotEmp[    7.639960] [fglrx] module loaded - fglrx 14.50.2 [Nov 20 2014] with 1 minors
ty=|/lib/dracut/hooks/pre-trigger succeeded for [    7.652437] sr0: scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray
dracut-pre-trigg[    7.660408] cdrom: Uniform CD-ROM driver Revision: 3.20
er.service.
ConditionPathExists=/etc/initrd-release succeeded for dracut-pre-trigger.service.
         Starting dracut pre-trigger hook...
About to execute: /bin/dracut-pre-trigger
Forked /bin/dracut-pre-[    7.684773] sr1: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
trigger as 215
dracut-pre-trigger.service changed dead -> start
Received SIGCHLD from PID 215 (dracut-pre-trig).
Child 215 (dracut-pre-trig) died (code=exited, status=0/SUCCESS)
Child 215 belongs to dracut-pre-trigger.service
dracut-pre-trigger.service: main process exited, code=exited, status=0/SUCCESS
dracut-pre-trigger.service changed start -> exited
Job dracut-pre-trigger.service/start finished, result=done
[  OK  ] Started dracut pre-trigger hook.
dracut-pre-trigger.service: cgroup is empty
ConditionPathIsReadWrite=/sys succeeded for systemd-udev-trigger.service.
         Starting udev Coldplug all Devices...
About to execute: /usr/bin/udevadm trigger --type=subsystems --action=add
Forked /usr/bin/udevadm as 220
systemd-udev-trigger.service changed dead -> start
Accepted new private connection.
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie=0 error=n/a
dracut-pre-trigger.service: cgroup is empty
Got disconnect on private connection.
Received SIGCHLD from PID 220 (udevadm).
Child 220 (udevadm) died (code=exited, status=0/SUCCESS)
Child 220 belongs to systemd-udev-trigger.service
systemd-udev-trigger.service: main process exited, code=exited, status=0/SUCCESS
systemd-udev-trigger.service running next main command for state start
About to execute: /usr/bin/udevadm trigger --type=devices --action=add
Forked /usr/bin/udevadm as 222
Accepted new private connection.
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie=0 error=n/a
Got disconnect on private connection.
Received SIGCHLD from PID 222 (udevadm).
Child 222 (udevadm) died (code=exited, status=0/SUCCESS)
Child 222 belongs to systemd-udev-trigger.service
systemd-udev-trigger.service: main process exited, code=exited, status=0/SUCCESS
systemd-udev-trigger.service changed start -> exited
Job systemd-udev-trigger.service/start finished, result=done
[  OK  ] Started udev Coldplug all Devices.
systemd-udev-trigger.service: cgroup is empty
Accepted new private connection.
ConditionKernelCommandLine=|rd.break=initqueue failed for dracut-initqueue.service.
ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/timeout/*.sh succeeded for dracut-initqueue.service.
ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/online/*.sh failed for dracut-initqueue.service.
ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/finished/*.sh succeeded for dracut-initqueue.service.
ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/settled/*.sh succeeded for dracut-initqueue.service.
ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/*.sh failed for dracut-initqueue.service.
ConditionPathExists=|/lib/dracut/need-initqueue failed for dracut-initqueue.service.
ConditionPathExists=/etc/initrd-release succeeded for dracut-initqueue.service.
         Starting dracut initqueue hook...
About to execute: /bin/dracut-initqueue
Forked /bin/dracut-initqueue as 245
dracut-initqueue.service changed dead -> start
ConditionKernelCommandLine=!plymouth.enable=0 succeeded for plymouth-start.service.
         Starting Show Plymouth Boot Screen...
About to execute: /usr/sbin/plymouthd --mode=boot --pid-file=/run/plymouth/pid --attach-to-session
Forked /usr/sbin/plymouthd as 308
plymouth-start.service changed dead -> start
sysinit.target changed dead -> active
Job sysinit.target/start finished, result=done
[  OK  ] Reached target System Initialization.
dev-ttyS1.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS1.device changed dead -> plugged
dev-ttyS10.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS10.device changed dead -> plugged
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie=0 error=n/a
systemd-udev-trigger.service: cgroup is empty
dev-ttyS13.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS13.device changed dead -> plugged
dev-ttyS11.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS11.device changed dead -> plugged
Got disconnect on private connection.
dev-ttyS12.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS12.device changed dead -> plugged
dev-ttyS16.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS16.device changed dead -> plugged
dev-ttyS15.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS15.device c[    8.092105] firewire_core 0000:07:03.0: created device fw0: GUID 0011d80000cccca6, S400
hanged dead -> plugged
dev-ttyS17.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS17.device changed dead -> plugged
Received SIGCHLD from PID 308 (plymouthd).
Child 308 (plymouthd) died (code=exited, status=0/SUCCESS)
Child 308 belongs to plymouth-start.service
plymouth-start.service: control process exited, code=exited status=0
plymouth-start.service got final SIGCHLD for state start
Main PID guessed: 309
About to execute: /usr/bin/plymouth show-splash
Forked /usr/bin/plymouth as 310
plymouth-start.service changed start -> start-post
dev-ttyS19.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS19.device changed dead -> plugged
dev-ttyS14.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS14.device changed dead -> plugged
dev-ttyS2.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS2.device changed dead -> plugged
dev-ttyS21.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS21.device changed dead -> plugged
dev-ttyS20.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS20.device changed dead -> plugged
dev-ttyS18.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS18.device changed dead -> plugged
dev-ttyS24.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS24.device changed dead -> plugged
dev-ttyS22.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS22.device changed dead -> plugged
dev-ttyS26.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS26.device changed dead -> plugged
dev-ttyS28.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS28.device changed dead -> plugged
dev-ttyS29.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS29.device changed dead -> plugged
dev-ttyS3.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS3.device changed dead -> plugged
dev-ttyS30.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS30.device changed dead -> plugged
dev-ttyS31.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS31.device changed dead -> plugged
dev-ttyS25.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS25.device changed dead -> plugged
dev-ttyS23.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS23.device changed dead -> plugged
dev-ttyS5.device changed dead -> plugged
sys-devices-platform-serial8250-tty-ttyS5.device changed dead -> plugged
ddev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d1.0\x2dpart6.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_PLEXTOR_PX\x2d128MP02311121877\x2dpart6.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_PLEXTOR_PX\x2d128M5_P02311121877\x2dpart6.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_PLEXTOR_PX\x2d128M5P02311121877\x2dpart6.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_PLEXTOR_PX\x2d128M5Pro_P02311121877\x2dpart6.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_PLEXTOR_PX\x2d128M5_P02311121877\x2dpart6.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dPLEXTOR_PX\x2d128M5Pro_P02311121877\x2dpart6.device changed dead -> plugged
dev-sde6.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata7-host6-target6:0:0-6:0:0:0-block-sde-sde6.device changed dead -> plugged
dev-disk-by\x2duuid-04b0b552\x2d386a\x2d4507\x2da2a4\x2dc3563a30877d.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d1.0\x2dpart2.device changed dead -> plugged
dev-disk-by\x2dlabel-SUSE132\x2dBOOT.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_PLEXTOR_PX\x2d128MP02311121877\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_PLEXTOR_PX\x2d128M5_P02311121877\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_PLEXTOR_PX\x2d128M5P02311121877\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_PLEXTOR_PX\x2d128M5Pro_P02311121877\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_PLEXTOR_PX\x2d128M5_P02311121877\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dPLEXTOR_PX\x2d128M5Pro_P02311121877\x2dpart2.device changed dead -> plugged
dev-sde2.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata7-host6-target6:0:0-6:0:0:0-block-sde-sde2.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:00:1f.2\x2data\x2d5.0.device changed dead -> plugged
dev-disk-by\x2did-wwn\x2d0x5000039ff4c26bbf.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_TOSHIBA_DT01ACA_Z2R5A2XAS.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_TOSHIBA_DT01ACA3_Z2R5A2XAS.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d35000039ff4c26bbf.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_TOSHIBA_DT01ACA300_Z2R5A2XAS.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_TOSHIBA_DT01ACA3_Z2R5A2XAS.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dTOSHIBA_DT01ACA300_Z2R5A2XAS.device changed dead -> plugged
dev-sdc.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1f.2-ata5-host4-target4:0:0-4:0:0:0-block-sdc.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:00:1f.2\x2data\x2d1.0.device changed dead -> plugged
dev-disk-by\x2did-wwn\x2d0x50014ee002a62433.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_WDC_WD5003ABYX\x2d_WD\x2dWMAYP0692681.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_WDC_WD5003ABYX\x2d0_WD\x2dWMAYP0692681.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d350014ee002a62433.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_WDC_WD5003ABYX\x2d01WERA0_WD\x2dWMAYP0692681.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_WDC_WD5003ABYX\x2d0_WD\x2dWMAYP0692681.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dWDC_WD5003ABYX\x2d01WERA0_WD\x2dWMAYP0692681.device changed dead -> plugged
dev-sda.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1f.2-ata1-host0-target0:0:0-0:0:0:0-block-sda.device changed dead -> plugged
dev-resume.device changed dead -> plugged
dev-disk-by\x2duuid-5a72c369\x2d9ede\x2d4517\x2db9c7\x2dd5f32bc625f0.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d1.0\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_PLEXTOR_PX\x2d128MP02311121877\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_PLEXTOR_PX\x2d128M5_P02311121877\x2d[   10.038674] PM: Starting manual resume from disk
part1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_PLEXTOR_PX\x2d128M5P02311121877\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_PLEXTOR_PX\x2d128M5Pro_P02311121877\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_PLEXTOR_PX\x2d128M5_P02311121877\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dPLEXTOR_PX\x2d128M5Pro_P02311121877\x2dpart1.device changed dead -> plugged
dev-sde1.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata7-host6-target6:0:0-6:0:0:0-block-sde-sde1.device changed dead -> plugged
dev-disk-by\x2duuid-0077bd42\x2d2115\x2d456f\x2db95e\x2d80b58bf82365.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:00:1f.2\x2data\x2d5.0\x2dpart1.device changed dead -> plugged
dev-disk-by\x2dpartuuid-811ac0e2\x2dff2a\x2d44c5\x2daef5\x2d44db21cbe3dc.device changed dead -> plugged
dev-disk-by\x2dpartlabel-STO\x2d2.device changed dead -> plugged
dev-disk-by\x2dlabel-STO\x2d2.device changed dead -> plugged
dev-disk-by\x2did-wwn\x2d0x5000039ff4c26bbf\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_TOSHIBA_DT01ACA_Z2R5A2XAS\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_TOSHIBA_DT01ACA3_Z2R5A2XAS\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d35000039ff4c26bbf\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_TOSHIBA_DT01ACA300_Z2R5A2XAS\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_TOSHIBA_DT01ACA3_Z2R5A2XAS\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dTOSHIBA_DT01ACA300_Z2R5A2XAS\x2dpart1.device changed dead -> plugged
dev-sdc1.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1f.2-ata5-host4-target4:0:0-4:0:0:0-block-sdc-sdc1.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:00:1f.2\x2data\x2d6.0.device changed dead -> plugged
dev-disk-by\x2did-wwn\x2d0x5000cca375ce75df.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Hitachi_HDS7210_JP6940HZ10U49F.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Hitachi_HDS72101_JP6940HZ10U49F.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d35000cca375ce75df.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Hitachi_HDS721010CLA332_JP6940HZ10U49F.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Hitachi_HDS72101_JP6940HZ10U49F.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dHitachi_HDS721010CLA332_JP6940HZ10U49F.device changed dead -> plugged
dev-sdd.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1f.2-ata6-host5-target5:0:0-5:0:0:0-block-sdd.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:00:1f.2\x2data\x2d2.0\x2dpart3.device changed dead -> plugged
dev-disk-by\x2did-wwn\x2d0x50014ee2b040a469\x2dpart3.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_WDC_WD5003ABYX\x2d_WD\x2dWMAYP0770284\x2dpart3.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_WDC_WD5003ABYX\x2d0_WD\x2dWMAYP0770284\x2dpart3.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d350014ee2b040a469\x2dpart3.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_WDC_WD5003ABYX\x2d01WERA0_WD\x2dWMAYP0770284\x2dpart3.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_WDC_WD5003ABYX\x2d0_WD\x2dWMAYP0770284\x2dpart3.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dWDC_WD5003ABYX\x2d01WERA0_WD\x2dWMAYP0770284\x2dpart3.device changed dead -> plugged
dev-sdb3.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1f.2-ata2-host1-target1:0:0-1:0:0:0-block-sdb-sdb3.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G.device changed dead -> plugged
dev-sdf.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:00:1f.2\x2data\x2d2.0\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-wwn\x2d0x50014ee2b040a469\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_WDC_WD5003ABYX\x2d_WD\x2dWMAYP0770284\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_WDC_WD5003ABYX\x2d0_WD\x2dWMAYP0770284\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d350014ee2b040a469\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_WDC_WD5003ABYX\x2d01WERA0_WD\x2dWMAYP0770284\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_WDC_WD5003ABYX\x2d0_WD\x2dWMAYP0770284\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dWDC_WD5003ABYX\x2d01WERA0_WD\x2dWMAYP0770284\x2dpart1.device changed dead -> plugged
dev-sdb1.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1f.2-ata2-host1-target1:0:0-1:0:0:0-block-sdb-sdb1.device changed dead -> plugged
dev-disk-by\x2duuid-02B023DFB023D845.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:00:1f.2\x2data\x2d6.0\x2dpart1.device changed dead -> plugged
dev-disk-by\x2dlabel-STO\x2d1.device changed dead -> plugged
dev-disk-by\x2did-wwn\x2d0x5000cca375ce75df\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Hitachi_HDS7210_JP6940HZ10U49F\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Hitachi_HDS72101_JP6940HZ10U49F\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d35000cca375ce75df\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Hitachi_HDS721010CLA332_JP6940HZ10U49F\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Hitachi_HDS72101_JP6940HZ10U49F\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dHitachi_HDS721010CLA332_JP6940HZ10U49F\x2dpart1.device changed dead -> plugged
dev-sdd1.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1f.2-ata6-host5-target5:0:0-5:0:0:0-block-sdd-sdd1.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:00:1f.2\x2data\x2d2.0\x2dpart4.device changed dead -> plugged
dev-disk-by\x2did-wwn\x2d0x50014ee2b040a469\x2dpart4.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_WDC_WD5003ABYX\x2d_WD\x2dWMAYP0770284\x2dpart4.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_WDC_WD5003ABYX\x2d0_WD\x2dWMAYP0770284\x2dpart4.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d350014ee2b040a469\x2dpart4.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_WDC_WD5003ABYX\x2d01WERA0_WD\x2dWMAYP0770284\x2dpart4.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_WDC_WD5003ABYX\x2d0_WD\x2dWMAYP0770284\x2dpart4.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dWDC_WD5003ABYX\x2d01WERA0_WD\x2dWMAYP0770284\x2dpart4.device changed dead -> plugged
dev-sdb4.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1f.2-ata2-host1-target1:0:0-1:0:0:0-block-sdb-sdb4.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:00:1f.2\x2data\x2d2.0\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-wwn\x2d0x50014ee2b040a469\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_WDC_WD5003ABYX\x2d_WD\x2dWMAYP0770284\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_WDC_WD5003ABYX\x2d0_WD\x2dWMAYP0770284\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d350014ee2b040a469\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_WDC_WD5003ABYX\x2d01WERA0_WD\x2dWMAYP0770284\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_WDC_WD5003ABYX\x2d0_WD\x2dWMAYP0770284\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dWDC_WD5003ABYX\x2d01WERA0_WD\x2dWMAYP0770284\x2dpart2.device changed dead -> plugged
dev-sdb2.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1f.2-ata2-host1-target1:0:0-1:0:0:0-block-sdb-sdb2.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:00:1f.2\x2data\x2d4.0.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dATAPI_iHAS524_B_3524336_328212500539.device changed dead -> plugged
dev-sr1.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1f.2-ata4-host3-target3:0:0-3:0:0:0-block-sr1.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G\x2dpart2.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G\x2dpart2.device changed dead -> plugged
dev-sdf2.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf-sdf2.device changed dead -> plugged
dev-disk-by\x2duuid-50a20abb\x2da771\x2d46d4\x2d99c3\x2dcb24448afb7d.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0\x2dpart6.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G\x2dpart6.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G\x2dpart6.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G\x2dpart6.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G\x2dpart6.device changed dead -> plugged
dev-sdf6.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf-sdf6.device changed dead -> plugged
dev-disk-by\x2duuid-4F4F392B60C66216.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0\x2dpart9.device changed dead -> plugged
dev-disk-by\x2dlabel-0\x2d1\x2d4\x2dGAME.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G\x2dpart9.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G\x2dpart9.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G\x2dpart9.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G\x2dpart9.device changed dead -> plugged
dev-sdf9.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf-sdf9.device changed dead -> plugged
dev-disk-by\x2duuid-D6EC2364EC233E5D.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0\x2dpart1.device changed dead -> plugged
dev-disk-by\x2dlabel-0\x2d0\x2d0\x2dWINBOOT.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G\x2dpart1.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G\x2dpart1.device changed dead -> plugged
dev-sdf1.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf-sdf1.device changed dead -> plugged
dev-disk-by\x2duuid-40c929d9\x2d6fc6\x2d4c63\x2d83d8\x2da6de6475a681.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0\x2dpart7.device changed dead -> plugged
dev-disk-by\x2dlabel-0\x2d1\x2d2\x2doldroot.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G\x2dpart7.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G\x2dpart7.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G\x2dpart7.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G\x2dpart7.device changed dead -> plugged
dev-sdf7.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf-sdf7.device changed dead -> plugged
dev-disk-by\x2duuid-DC44F06344F041B6.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0\x2dpart10.device changed dead -> plugged
dev-disk-by\x2dlabel-0\x2d1\x2d5\x2dTOOLS.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G\x2dpart10.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G\x2dpart10.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G\x2dpart10.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G\x2dpart10.device changed dead -> plugged
dev-sdf10.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf-sdf10.device changed dead -> plugged
dev-disk-by\x2duuid-AE7E52F08941EE2A.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0\x2dpart11.device changed dead -> plugged
dev-disk-by\x2dlabel-0\x2d1\x2d6\x2dGALLERY.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G\x2dpart11.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G\x2dpart11.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G\x2dpart11.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G\x2dpart11.device changed dead -> plugged
dev-sdf11.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf-sdf11.device changed dead -> plugged
dev-disk-by\x2duuid-10CE034CCE032994.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0\x2dpart3.device changed dead -> plugged
dev-disk-by\x2dlabel-0\x2d2\x2d0\x2dFILES.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G\x2dpart3.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G\x2dpart3.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G\x2dpart3.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G\x2dpart3.device changed dead -> plugged
dev-sdf3.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf-sdf3.device changed dead -> plugged
dev-disk-by\x2duuid-E2B81089B8105DFB.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0\x2dpart5.device changed dead -> plugged
dev-disk-by\x2dlabel-0\x2d1\x2d0\x2dWINROOT.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G\x2dpart5.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G\x2dpart5.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G\x2dpart5.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G\x2dpart5.device changed dead -> plugged
dev-sdf5.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf-sdf5.device changed dead -> plugged
dev-disk-by\x2duuid-82306FF6306FF019.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0\x2dpart12.device changed dead -> plugged
dev-disk-by\x2dlabel-0\x2d1\x2d7\x2dTEMP.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G\x2dpart12.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G\x2dpart12.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G\x2dpart12.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G\x2dpart12.device changed dead -> plugged
dev-sdf12.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf-sdf12.device changed dead -> plugged
dev-disk-by\x2duuid-006a88c0\x2ddbd8\x2d42c1\x2dbb07\x2d3414a004a373.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0\x2dpart8.device changed dead -> plugged
dev-disk-by\x2dlabel-0\x2d1\x2d3\x2doldsys.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G\x2dpart8.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G\x2dpart8.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G\x2dpart8.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G\x2dpart8.device changed dead -> plugged
dev-sdf8.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf-sdf8.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:00:1f.2\x2data\x2d3.0.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dHL\x2dDT\x2dST_BD\x2dRE_GGW\x2dH20L_K1A87P05927.device changed dead -> plugged
dev-sr0.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1f.2-ata3-host2-target2:0:0-2:0:0:0-block-sr0.device changed dead -> plugged
Received SIGRTMIN+20 from PID 309 (plymouthd).
Enabling showing of status.
Received SIGCHLD from PID 310 (plymouth).
Child 310 (plymouth) died (code=exited, status=0/SUCCESS)
Child 310 belongs to plymouth-start.service
plymouth-start.service: control process exited, code=exited status=0
plymouth-start.service got final SIGCHLD for state start-post
plymouth-start.service changed start-post -> running
Job plymouth-start.service/start finished, result=done
[  OK  ] Started Show Plymouth Boot Screen.
ConditionPathExists=!/run/plymouth/pid failed for systemd-ask-password-console.path.
Starting of systemd-ask-password-console.path requested but condition failed. Ignoring.
Job systemd-ask-password-console.path/start finished, result=done
paths.target changed dead -> active
Job paths.target/start finished, result=done
[  OK  ] Reached target Paths.
ConditionPathExists=/run/plymouth/pid succeeded for systemd-ask-password-plymouth.path.
ConditionKernelCommandLine=!plymouth.enable=0 succeeded for systemd-ask-password-plymouth.path.
systemd-ask-password-plymouth.path changed dead -> waiting
Job systemd-ask-password-plymouth.path/start finished, result=done
basic.target changed dead -> active
Job basic.target/start finished, result=done
[  OK  ] Reached target Basic System.
Accepted new private connection.
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie=0 error=n/a
Got disconnect on private connection.
dev-disk-by\x2duuid-5A5ABDAE5ABD8773.device changed dead -> plugged
dev-disk-by\x2dpath-pci\x2d0000:03:00.0\x2data\x2d2.0\x2dpart13.device changed dead -> plugged
dev-disk-by\x2dlabel-0\x2d1\x2d8\x2dTEMP\x2d2.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2dSATA_Maxtor_6L160P0_L409MK9G\x2dpart13.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d1ATA_Maxtor_6L160P0_L409MK9G\x2dpart13.device changed dead -> plugged
dev-disk-by\x2did-scsi\x2d0ATA_Maxtor_6L160P0_L409MK9G\x2dpart13.device changed dead -> plugged
dev-disk-by\x2did-ata\x2dMaxtor_6L160P0_L409MK9G\x2dpart13.device changed dead -> plugged
dev-sdf13.device changed dead -> plugged
sys-devices-pci0000:00-0000:00:1c.4-0000:03:00.0-ata8-host7-target7:0:0-7:0:0:0-block-sdf-sdf13.device changed dead -> plugged
Received SIGCHLD from PID 245 (dracut-initqueu).
Child 245 (dracut-initqueu) died (code=exited, status=0/SUCCESS)
Child 245 belongs to dracut-initqueue.service
dracut-initqueue.service: main process exited, code=exited, status=0/SUCCESS
dracut-initqueue.service changed start -> exited
Job dracut-initqueue.service/start finished, result=done
[  OK  ] Started dracut initqueue hook.
dracut-initqueue.service: cgroup is empty
Accepted new private connection.
ConditionKernelCommandLine=|rd.break=pre-mount failed for dracut-pre-mount.service.
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount succeeded for dracut-pre-mount.service.
ConditionPathExists=/etc/initrd-release succeeded for dracut-pre-mount.service.
         Starting dracut pre-mount hook...
About to execute: /bin/dracut-pre-mount
Forked /bin/dracut-pre-mount as 334
dracut-pre-mount.service changed dead -> start
remote-fs-pre.target changed dead -> active
Job remote-fs-pre.target/start finished, result=done
[  OK  ] Reached target Remote File Systems (Pre).
remote-fs.target changed dead -> active
Job remote-fs.target/start finished, result=done
[  OK  ] Reached target Remote File Systems.
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie=0 error=n/a
dracut-initqueue.service: cgroup is empty
Got disconnect on private connection.
Got notification message for unit systemd-journald.service
systemd-journald.service: Got notification message from PID 197 (WATCHDOG=1...)
systemd-journald.service: got WATCHDOG=1
Got notification message for unit systemd-journald.service

因为systemd实在不熟悉,不想折腾,干脆用内核的接口直接试试:
echo platform > /sys/power/disk
echo disk > /sys/power/stats
看起来正常。说明内核是正常的,问题应该出在systemd,dracut+initramfs里面。

后来发现有人找到了根源:https://forums.opensuse.org/showthread.php/503950-13-2-Won-t-resume-from-Hibernate-aka-Sleep-to-disk

问题出在pm-utils这套工具。如果这套工具存在则休眠时systemd会调用它。否则systemd会使用自己的systemctl hibernate休眠。但pm-utils存在bug,所以卸载它就ok了。本来systemd是不需要pm-utils的,但因为后者维护的时间长,有一些hook, systemd没有,所以后来systemd提交了个补丁,又继续使用它了。

除了pm-utils,也可以把suspend组建卸载了,有了systemd同样也不需要它了。做完这些工作之后执行一下mkinitrd,重新封装一个新的initrd,因为其中原来是有pm-utils的脚本。

opensuse 13.2的fakeraid问题

目前在用的raid实现方案大致可分为三种:

    • 硬件raid(hardware raid),通过购买昂贵的raid卡实现,成本比较高。
    • 软件raid(software raid),通过操作系统内软件创建阵列,无硬件要求,raid处理开销完全由CPU负责。
    • 主板raid(fake raid),通过主板内建raid控制器创建阵列,由操作系统驱动识别并进行实际的读写操作。

所以software raid和fake raid都没有硬件offload的功能。但后者获得了一些硬件大厂的支持,比如intel。 如果只有单个linux系统,使用software raid一般比fake raid更健壮,但是,在多启动环境中(例如windows与linux双系统),为了使各个系统都能正确操作相同的raid分区,就必须使用fake raid了。

linux下最重要的raid管理程序为dmraid与mdadm。 本人印象中,前者用于识别rake raid,后者用于管理software raid,但最近更新系统时突然发现,openSUSE及rhel等发行版都改用mdadm替代dmraid来处理rake raid。但我发现mdadm识别一个container下面的第二个member时有问题,具体就是可以创建出一个md设备,但该设备无法访问,更无法分区和挂载,而dmraid没有问题。于是只有禁用mdadm ,然后手动执行dmraid -ay 。
禁用mdadm的方法是 echo ‘DEVICE /dev/null’ > /dev/mdadm.conf,然后执行systemctl start dmraid-activation.service。

 

dmraid从linux kernel version 2.6.18起引入,由Red Hat维护,主要目的为管理fake raid,通过libdevmapper与device-mapper kernel runtime实现。

mdadm从linux kernel version 2.6.27起引入,由SUSE维护,主要目的为管理software raid,通过md (Multiple Devices) device driver实现。

1
2
3
4
$ /sbin/dmraid --version
dmraid version:         1.0.0.rc16-3 (2010.01.12)
dmraid library version: 1.0.0.rc16-3 (2010.01.12)
device-mapper version:  unknown
1
2
$ /sbin/mdadm --version
mdadm - v3.2.5 - 18th May 2012

由以上对比可以看出,dmraid自2010年初就没有更新过了,mdadm则一直更新频繁。 特别是,mdadm 3.0版本加入对external metadata的支持;mdadm 3.2.1版本的release说明中有如下内容:

Secondly, the support for Intel Matrix Storage Manager (IMSM) arrays has been substantially enhanced. Spare migration is now possible as is level migration and OLCE (OnLine Capacity Expansion). This support is not quite complete yet and requires MDADM_EXPERIMENTAL=1 in the environment to ensure people only use it with care. In particular if you start a reshape in Linux and then shutdown and boot into Window, the Windows driver may not correctly restart the reshape. And vice-versa.

自此,mdadm正式踏入管理fake raid的舞台。

 

功能比较

下图为Intel文档中对dmraid与mdadm的简单比较,以供参考:

comparison_of_dm_and_md

另外已知的区别有:

  • mdadm可以使用其他电脑的磁盘进行恢复。
  • dmraid有时无法正确识别大硬盘(3TB imsm raid1被识别为746GB)。

mysql性能优化-慢查询分析、优化索引和配置

目录

一、优化概述

二、查询与索引优化分析

1性能瓶颈定位

Show命令

慢查询日志

explain分析查询

profiling分析查询

2索引及查询优化

三、配置优化

1)      max_connections

2)      back_log

3)      interactive_timeout

4)      key_buffer_size

5)      query_cache_size

6)      record_buffer_size

7)      read_rnd_buffer_size

8)      sort_buffer_size

9)      join_buffer_size

10)    table_cache

11)    max_heap_table_size

12)    tmp_table_size

13)    thread_cache_size

14)    thread_concurrency

15)    wait_timeout

一、 优化概述

 msql-1

MySQL数据库是常见的两个瓶颈是CPU和I/O的瓶颈,CPU在饱和的时候一般发生在数据装入内存或从磁盘上读取数据时候。磁盘I/O瓶颈发生在装入数据远大于内存容量的时候,如果应用分布在网络上,那么查询量相当大的时候那么平瓶颈就会出现在网络上,我们可以用mpstat, iostat, sar和vmstat来查看系统的性能状态。

除了服务器硬件的性能瓶颈,对于MySQL系统本身,我们可以使用工具来优化数据库的性能,通常有三种:使用索引,使用EXPLAIN分析查询以及调整MySQL的内部配置。

二、查询与索引优化分析

在优化MySQL时,通常需要对数据库进行分析,常见的分析手段有慢查询日志,EXPLAIN 分析查询,profiling分析以及show命令查询系统状态及系统变量,通过定位分析性能的瓶颈,才能更好的优化数据库系统的性能。

1 性能瓶颈定位

Show命令

我们可以通过show命令查看MySQL状态及变量,找到系统的瓶颈:

Mysql> show status ——显示状态信息(扩展show status like ‘XXX’)

Mysql> show variables ——显示系统变量(扩展show variables like ‘XXX’)

Mysql> show innodb status ——显示InnoDB存储引擎的状态

Mysql> show processlist ——查看当前SQL执行,包括执行状态、是否锁表等

Shell> mysqladmin variables -u username -p password——显示系统变量

Shell> mysqladmin extended-status -u username -p password——显示状态信息

查看状态变量及帮助:

Shell> mysqld –verbose –help [|more #逐行显示]

比较全的Show命令的使用可参考: http://blog.phpbean.com/a.cn/18/

慢查询日志

慢查询日志开启:

在配置文件my.cnf或my.ini中在[mysqld]一行下面加入两个配置参数

log-slow-queries=/data/mysqldata/slow-query.log

long_query_time=2

注:log-slow-queries参数为慢查询日志存放的位置,一般这个目录要有mysql的运行帐号的可写权限,一般都将这个目录设置为mysql的数据存放目录;

long_query_time=2中的2表示查询超过两秒才记录;

在my.cnf或者my.ini中添加log-queries-not-using-indexes参数,表示记录下没有使用索引的查询。

log-slow-queries=/data/mysqldata/slow-query.log

long_query_time=10

log-queries-not-using-indexes

慢查询日志开启方法二:

我们可以通过命令行设置变量来即时启动慢日志查询。由下图可知慢日志没有打开,slow_launch_time=# 表示如果建立线程花费了比这个值更长的时间,slow_launch_threads 计数器将增加

mysql-2

设置慢日志开启

mysql-3

MySQL后可以查询long_query_time 的值 。

mysql-4

为了方便测试,可以将修改慢查询时间为5秒。

mysql-5

慢查询分析mysqldumpslow

我们可以通过打开log文件查看得知哪些SQL执行效率低下

[root@localhost mysql]# more slow-query.log

# Time: 081026 19:46:34

# User@Host: root[root] @ localhost []

# Query_time: 11 Lock_time: 0 Rows_sent: 1 Rows_examined: 6552961

select count(*) from t_user;

从日志中,可以发现查询时间超过5 秒的SQL,而小于5秒的没有出现在此日志中。

如果慢查询日志中记录内容很多,可以使用mysqldumpslow工具(MySQL客户端安装自带)来对慢查询日志进行分类汇总。mysqldumpslow对日志文件进行了分类汇总,显示汇总后摘要结果。

进入log的存放目录,运行

[root@mysql_data]#mysqldumpslow  slow-query.log

Reading mysql slow query log from slow-query.log

Count: 2 Time=11.00s (22s) Lock=0.00s (0s) Rows=1.0 (2), root[root]@mysql

select count(N) from t_user;

mysqldumpslow命令

/path/mysqldumpslow -s c -t 10 /database/mysql/slow-query.log

这会输出记录次数最多的10条SQL语句,其中:

-s, 是表示按照何种方式排序,c、t、l、r分别是按照记录次数、时间、查询时间、返回的记录数来排序,ac、at、al、ar,表示相应的倒叙;

-t, 是top n的意思,即为返回前面多少条的数据;

-g, 后边可以写一个正则匹配模式,大小写不敏感的;

例如:

/path/mysqldumpslow -s r -t 10 /database/mysql/slow-log

得到返回记录集最多的10个查询。

/path/mysqldumpslow -s t -t 10 -g “left join” /database/mysql/slow-log

得到按照时间排序的前10条里面含有左连接的查询语句。

使用mysqldumpslow命令可以非常明确的得到各种我们需要的查询语句,对MySQL查询语句的监控、分析、优化是MySQL优化非常重要的一步。开启慢查询日志后,由于日志记录操作,在一定程度上会占用CPU资源影响mysql的性能,但是可以阶段性开启来定位性能瓶颈。

explain分析查询

使用 EXPLAIN 关键字可以模拟优化器执行SQL查询语句,从而知道MySQL是如何处理你的SQL语句的。这可以帮你分析你的查询语句或是表结构的性能瓶颈。通过explain命令可以得到:

– 表的读取顺序

– 数据读取操作的操作类型

– 哪些索引可以使用

– 哪些索引被实际使用

– 表之间的引用

– 每张表有多少行被优化器查询

mysql-6

EXPLAIN字段:

ØTable:显示这一行的数据是关于哪张表的

Øpossible_keys:显示可能应用在这张表中的索引。如果为空,没有可能的索引。可以为相关的域从WHERE语句中选择一个合适的语句

Økey:实际使用的索引。如果为NULL,则没有使用索引。MYSQL很少会选择优化不足的索引,此时可以在SELECT语句中使用USE INDEX(index)来强制使用一个索引或者用IGNORE INDEX(index)来强制忽略索引

Økey_len:使用的索引的长度。在不损失精确性的情况下,长度越短越好

Øref:显示索引的哪一列被使用了,如果可能的话,是一个常数

Ørows:MySQL认为必须检索的用来返回请求数据的行数

Øtype:这是最重要的字段之一,显示查询使用了何种类型。从最好到最差的连接类型为system、const、eq_reg、ref、range、index和ALL

nsystem、const:可以将查询的变量转为常量.  如id=1; id为 主键或唯一键.

neq_ref:访问索引,返回某单一行的数据.(通常在联接时出现,查询使用的索引为主键或惟一键)

nref:访问索引,返回某个值的数据.(可以返回多行) 通常使用=时发生

nrange:这个连接类型使用索引返回一个范围中的行,比如使用>或<查找东西,并且该字段上建有索引时发生的情况(注:不一定好于index)

nindex:以索引的顺序进行全表扫描,优点是不用排序,缺点是还要全表扫描

nALL:全表扫描,应该尽量避免

ØExtra:关于MYSQL如何解析查询的额外信息,主要有以下几种

nusing index:只用到索引,可以避免访问表.

nusing where:使用到where来过虑数据. 不是所有的where clause都要显示using where. 如以=方式访问索引.

nusing tmporary:用到临时表

nusing filesort:用到额外的排序. (当使用order by v1,而没用到索引时,就会使用额外的排序)

nrange checked for eache record(index map:N):没有好的索引.

mysql-7

profiling分析查询

通过慢日志查询可以知道哪些SQL语句执行效率低下,通过explain我们可以得知SQL语句的具体执行情况,索引使用等,还可以结合show命令查看执行状态。

如果觉得explain的信息不够详细,可以同通过profiling命令得到更准确的SQL执行消耗系统资源的信息。

profiling默认是关闭的。可以通过以下语句查看

mysql-8

打开功能: mysql>set profiling=1; 执行需要测试的sql 语句:

mysql-9

mysql> show profiles\G; 可以得到被执行的SQL语句的时间和ID

mysql>show profile for query 1; 得到对应SQL语句执行的详细信息

Show Profile命令格式:

SHOW PROFILE [type [, type] … ]

[FOR QUERY n]

[LIMIT row_count [OFFSET offset]]

type:

ALL

| BLOCK IO

| CONTEXT SWITCHES

| CPU

| IPC

| MEMORY

| PAGE FAULTS

| SOURCE

| SWAPS

 

以上的16rows是针对非常简单的select语句的资源信息,对于较复杂的SQL语句,会有更多的行和字段,比如converting HEAP to MyISAM 、Copying to tmp table等等,由于以上的SQL语句不存在复杂的表操作,所以未显示这些字段。通过profiling资源耗费信息,我们可以采取针对性的优化措施。

 

测试完毕以后 ,关闭参数:mysql> set profiling=0

2     索引及查询优化

 

索引的类型

Ø 普通索引:这是最基本的索引类型,没唯一性之类的限制。

Ø 唯一性索引:和普通索引基本相同,但所有的索引列值保持唯一性。

Ø 主键:主键是一种唯一索引,但必须指定为”PRIMARY KEY”。

Ø 全文索引:MYSQL从3.23.23开始支持全文索引和全文检索。在MYSQL中,全文索引的索引类型为FULLTEXT。全文索引可以在VARCHAR或者TEXT类型的列上创建。

大多数MySQL索引(PRIMARY KEY、UNIQUE、INDEX和FULLTEXT)使用B树中存储。空间列类型的索引使用R-树,MEMORY表支持hash索引。

单列索引和多列索引(复合索引)

索引可以是单列索引,也可以是多列索引。对相关的列使用索引是提高SELECT操作性能的最佳途径之一。

多列索引:

MySQL可以为多个列创建索引。一个索引可以包括15个列。对于某些列类型,可以索引列的左前缀,列的顺序非常重要。

多列索引可以视为包含通过连接索引列的值而创建的值的排序的数组。一般来说,即使是限制最严格的单列索引,它的限制能力也远远低于多列索引。

最左前缀

多列索引有一个特点,即最左前缀(Leftmost Prefixing)。假如有一个多列索引为key(firstname lastname age),当搜索条件是以下各种列的组合和顺序时,MySQL将使用该多列索引:

firstname,lastname,age

firstname,lastname

firstname

也就是说,相当于还建立了key(firstname lastname)和key(firstname)。

索引主要用于下面的操作:

Ø 快速找出匹配一个WHERE子句的行。

Ø 删除行。当执行联接时,从其它表检索行。

Ø 对具体有索引的列key_col找出MAX()或MIN()值。由预处理器进行优化,检查是否对索引中在key_col之前发生所有关键字元素使用了WHERE key_part_# = constant。在这种情况下,MySQL为每个MIN()或MAX()表达式执行一次关键字查找,并用常数替换它。如果所有表达式替换为常量,查询立即返回。例如:

SELECT MIN(key2), MAX (key2)  FROM tb WHERE key1=10;

Ø 如果对一个可用关键字的最左面的前缀进行了排序或分组(例如,ORDER BY key_part_1,key_part_2),排序或分组一个表。如果所有关键字元素后面有DESC,关键字以倒序被读取。

Ø 在一些情况中,可以对一个查询进行优化以便不用查询数据行即可以检索值。如果查询只使用来自某个表的数字型并且构成某些关键字的最左面前缀的列,为了更快,可以从索引树检索出值。

SELECT key_part3 FROM tb WHERE key_part1=1

有时MySQL不使用索引,即使有可用的索引。一种情形是当优化器估计到使用索引将需要MySQL访问表中的大部分行时。(在这种情况下,表扫描可能会更快些)。然而,如果此类查询使用LIMIT只搜索部分行,MySQL则使用索引,因为它可以更快地找到几行并在结果中返回。例如:

mysql-10

合理的建立索引的建议:

(1)  越小的数据类型通常更好:越小的数据类型通常在磁盘、内存和CPU缓存中都需要更少的空间,处理起来更快。

(2)  简单的数据类型更好:整型数据比起字符,处理开销更小,因为字符串的比较更复杂。在MySQL中,应该用内置的日期和时间数据类型,而不是用字符串来存储时间;以及用整型数据类型存储IP地址。

(3)  尽量避免NULL:应该指定列为NOT NULL,除非你想存储NULL。在MySQL中,含有空值的列很难进行查询优化,因为它们使得索引、索引的统计信息以及比较运算更加复杂。你应该用0、一个特殊的值或者一个空串代替空值

 

这部分是关于索引和写SQL语句时应当注意的一些琐碎建议和注意点。

1. 当结果集只有一行数据时使用LIMIT 1

2. 避免SELECT *,始终指定你需要的列

从表中读取越多的数据,查询会变得更慢。他增加了磁盘需要操作的时间,还是在数据库服务器与WEB服务器是独立分开的情况下。你将会经历非常漫长的网络延迟,仅仅是因为数据不必要的在服务器之间传输。

3. 使用连接(JOIN)来代替子查询(Sub-Queries)

连接(JOIN).. 之所以更有效率一些,是因为MySQL不需要在内存中创建临时表来完成这个逻辑上的需要两个步骤的查询工作。

4. 使用ENUMCHAR 而不是VARCHAR,使用合理的字段属性长度

5. 尽可能的使用NOT NULL

6. 固定长度的表会更快

7. 拆分大的DELETE INSERT 语句

8. 查询的列越小越快

 

Where条件

在查询中,WHERE条件也是一个比较重要的因素,尽量少并且是合理的where条件是很重要的,尽量在多个条件的时候,把会提取尽量少数据量的条件放在前面,减少后一个where条件的查询时间。

有些where条件会导致索引无效:

Ø where子句的查询条件里有!=,MySQL将无法使用索引。

Ø where子句使用了Mysql函数的时候,索引将无效,比如:select * from tb where left(name, 4) = ‘xxx’

Ø 使用LIKE进行搜索匹配的时候,这样索引是有效的:select * from tbl1 where name like ‘xxx%’,而like ‘%xxx%’ 时索引无效

三、    配置优化

安装MySQL后,配置文件my.cnf在 /MySQL安装目录/share/mysql目录中,该目录中还包含多个配置文件可供参考,有my-large.cnf ,my-huge.cnf,  my-medium.cnf,my-small.cnf,分别对应大中小型数据库应用的配置。win环境下即存在于MySQL安装目录中的.ini文件。

 

下面列出了对性能优化影响较大的主要变量,主要分为连接请求的变量和缓冲区变量。

1.   连接请求的变量:

1)     max_connections

MySQL的最大连接数,增加该值增加mysqld 要求的文件描述符的数量。如果服务器的并发连接请求量比较大,建议调高此值,以增加并行连接数量,当然这建立在机器能支撑的情况下,因为如果连接数越多,介于MySQL会为每个连接提供连接缓冲区,就会开销越多的内存,所以要适当调整该值,不能盲目提高设值。

数值过小会经常出现ERROR 1040: Too many connections错误,可以过’conn%’通配符查看当前状态的连接数量,以定夺该值的大小。

show variables like ‘max_connections’ 最大连接数

show  status like ‘max_used_connections’响应的连接数

如下:

mysql> show variables like ‘max_connections‘;

+———————–+——-+

| Variable_name | Value |

+———————–+——-+

| max_connections | 256  |

+———————–+——-+

mysql> show status like ‘max%connections‘;

+———————–+——-+

| Variable_name       | Value |

+—————————-+——-+

| max_used_connections | 256|

+—————————-+——-+

max_used_connections / max_connections * 100% (理想值≈ 85%)

如果max_used_connections跟max_connections相同 那么就是max_connections设置过低或者超过服务器负载上限了,低于10%则设置过大。

2)     back_log

MySQL能暂存的连接数量。当主要MySQL线程在一个很短时间内得到非常多的连接请求,这就起作用。如果MySQL的连接数据达到max_connections时,新来的请求将会被存在堆栈中,以等待某一连接释放资源,该堆栈的数量即back_log,如果等待连接的数量超过back_log,将不被授予连接资源。

back_log值指出在MySQL暂时停止回答新请求之前的短时间内有多少个请求可以被存在堆栈中。只有如果期望在一个短时间内有很多连接,你需要增加它,换句话说,这值对到来的TCP/IP连接的侦听队列的大小。

当观察你主机进程列表(mysql> show full processlist),发现大量264084 | unauthenticated user | xxx.xxx.xxx.xxx | NULL | Connect | NULL | login | NULL 的待连接进程时,就要加大back_log 的值了。

默认数值是50,可调优为128,对于Linux系统设置范围为小于512的整数。

3)     interactive_timeout

一个交互连接在被服务器在关闭前等待行动的秒数。一个交互的客户被定义为对mysql_real_connect()使用CLIENT_INTERACTIVE 选项的客户。

默认数值是28800,可调优为7200。

2.   缓冲区变量

全局缓冲:

4)     key_buffer_size

key_buffer_size指定索引缓冲区的大小,它决定索引处理的速度,尤其是索引读的速度。通过检查状态值Key_read_requests和Key_reads,可以知道key_buffer_size设置是否合理。比例key_reads / key_read_requests应该尽可能的低,至少是1:100,1:1000更好(上述状态值可以使用SHOW STATUS LIKE ‘key_read%’获得)。

key_buffer_size只对MyISAM表起作用。即使你不使用MyISAM表,但是内部的临时磁盘表是MyISAM表,也要使用该值。可以使用检查状态值created_tmp_disk_tables得知详情。

举例如下:

mysql> show variables like ‘key_buffer_size‘;

+——————-+————+

| Variable_name | Value      |

+———————+————+

| key_buffer_size | 536870912 |

+———— ———-+————+

key_buffer_size为512MB,我们再看一下key_buffer_size的使用情况:

mysql> show global status like ‘key_read%‘;

+————————+————-+

| Variable_name   | Value    |

+————————+————-+

| Key_read_requests| 27813678764 |

| Key_reads   |  6798830      |

+————————+————-+

一共有27813678764个索引读取请求,有6798830个请求在内存中没有找到直接从硬盘读取索引,计算索引未命中缓存的概率:

key_cache_miss_rate =Key_reads / Key_read_requests * 100%,设置在1/1000左右较好

默认配置数值是8388600(8M),主机有4GB内存,可以调优值为268435456(256MB)。

5)     query_cache_size

使用查询缓冲,MySQL将查询结果存放在缓冲区中,今后对于同样的SELECT语句(区分大小写),将直接从缓冲区中读取结果。

通过检查状态值Qcache_*,可以知道query_cache_size设置是否合理(上述状态值可以使用SHOW STATUS LIKE ‘Qcache%’获得)。如果Qcache_lowmem_prunes的值非常大,则表明经常出现缓冲不够的情况,如果Qcache_hits的值也非常大,则表明查询缓冲使用非常频繁,此时需要增加缓冲大小;如果Qcache_hits的值不大,则表明你的查询重复率很低,这种情况下使用查询缓冲反而会影响效率,那么可以考虑不用查询缓冲。此外,在SELECT语句中加入SQL_NO_CACHE可以明确表示不使用查询缓冲。

 

与查询缓冲有关的参数还有query_cache_type、query_cache_limit、query_cache_min_res_unit。

 

query_cache_type指定是否使用查询缓冲,可以设置为0、1、2,该变量是SESSION级的变量。

query_cache_limit指定单个查询能够使用的缓冲区大小,缺省为1M。

query_cache_min_res_unit是在4.1版本以后引入的,它指定分配缓冲区空间的最小单位,缺省为4K。检查状态值Qcache_free_blocks,如果该值非常大,则表明缓冲区中碎片很多,这就表明查询结果都比较小,此时需要减小query_cache_min_res_unit。

举例如下:

mysql> show global status like ‘qcache%‘;

+——————————-+—————–+

| Variable_name                  | Value        |

+——————————-+—————–+

| Qcache_free_blocks        | 22756       |

| Qcache_free_memory     | 76764704    |

| Qcache_hits           | 213028692 |

| Qcache_inserts         | 208894227   |

| Qcache_lowmem_prunes   | 4010916      |

| Qcache_not_cached | 13385031    |

| Qcache_queries_in_cache | 43560 |

| Qcache_total_blocks          | 111212      |

+——————————-+—————–+

mysql> show variables like ‘query_cache%‘;

+————————————–+————–+

| Variable_name            | Value      |

+————————————–+———–+

| query_cache_limit         | 2097152     |

| query_cache_min_res_unit      | 4096    |

| query_cache_size         | 203423744 |

| query_cache_type        | ON           |

| query_cache_wlock_invalidate | OFF   |

+————————————–+—————+

查询缓存碎片率= Qcache_free_blocks / Qcache_total_blocks * 100%

如果查询缓存碎片率超过20%,可以用FLUSH QUERY CACHE整理缓存碎片,或者试试减小query_cache_min_res_unit,如果你的查询都是小数据量的话。

查询缓存利用率= (query_cache_size – Qcache_free_memory) / query_cache_size * 100%

查询缓存利用率在25%以下的话说明query_cache_size设置的过大,可适当减小;查询缓存利用率在80%以上而且Qcache_lowmem_prunes > 50的话说明query_cache_size可能有点小,要不就是碎片太多。

查询缓存命中率= (Qcache_hits – Qcache_inserts) / Qcache_hits * 100%

示例服务器查询缓存碎片率=20.46%,查询缓存利用率=62.26%,查询缓存命中率=1.94%,命中率很差,可能写操作比较频繁吧,而且可能有些碎片。

每个连接的缓冲

6)    record_buffer_size

每个进行一个顺序扫描的线程为其扫描的每张表分配这个大小的一个缓冲区。如果你做很多顺序扫描,你可能想要增加该值。

默认数值是131072(128K),可改为16773120 (16M)

7)     read_rnd_buffer_size

随机读缓冲区大小。当按任意顺序读取行时(例如,按照排序顺序),将分配一个随机读缓存区。进行排序查询时,MySQL会首先扫描一遍该缓冲,以避免磁盘搜索,提高查询速度,如果需要排序大量数据,可适当调高该值。但MySQL会为每个客户连接发放该缓冲空间,所以应尽量适当设置该值,以避免内存开销过大。

一般可设置为16M

8)     sort_buffer_size

每个需要进行排序的线程分配该大小的一个缓冲区。增加这值加速ORDER BY或GROUP BY操作。

默认数值是2097144(2M),可改为16777208 (16M)。

9)     join_buffer_size

联合查询操作所能使用的缓冲区大小

record_buffer_size,read_rnd_buffer_size,sort_buffer_size,join_buffer_size为每个线程独占,也就是说,如果有100个线程连接,则占用为16M*100

10)  table_cache

表高速缓存的大小。每当MySQL访问一个表时,如果在表缓冲区中还有空间,该表就被打开并放入其中,这样可以更快地访问表内容。通过检查峰值时间的状态值Open_tablesOpened_tables,可以决定是否需要增加table_cache的值。如果你发现open_tables等于table_cache,并且opened_tables在不断增长,那么你就需要增加table_cache的值了(上述状态值可以使用SHOW STATUS LIKE ‘Open%tables’获得)。注意,不能盲目地把table_cache设置成很大的值。如果设置得太高,可能会造成文件描述符不足,从而造成性能不稳定或者连接失败。

1G内存机器,推荐值是128-256。内存在4GB左右的服务器该参数可设置为256M或384M。

11)  max_heap_table_size

用户可以创建的内存表(memory table)的大小。这个值用来计算内存表的最大行数值。这个变量支持动态改变,即set @max_heap_table_size=#

这个变量和tmp_table_size一起限制了内部内存表的大小。如果某个内部heap(堆积)表大小超过tmp_table_size,MySQL可以根据需要自动将内存中的heap表改为基于硬盘的MyISAM表。

12)  tmp_table_size

通过设置tmp_table_size选项来增加一张临时表的大小,例如做高级GROUP BY操作生成的临时表。如果调高该值,MySQL同时将增加heap表的大小,可达到提高联接查询速度的效果,建议尽量优化查询,要确保查询过程中生成的临时表在内存中,避免临时表过大导致生成基于硬盘的MyISAM表

mysql> show global status like ‘created_tmp%‘;

+——————————–+———+

| Variable_name             | Value |

+———————————-+———+

| Created_tmp_disk_tables | 21197  |

| Created_tmp_files   | 58  |

| Created_tmp_tables  | 1771587 |

+——————————–+———–+

每次创建临时表,Created_tmp_tables增加,如果临时表大小超过tmp_table_size,则是在磁盘上创建临时表,Created_tmp_disk_tables也增加,Created_tmp_files表示MySQL服务创建的临时文件文件数,比较理想的配置是:

Created_tmp_disk_tables / Created_tmp_tables * 100% <= 25%比如上面的服务器Created_tmp_disk_tables / Created_tmp_tables * 100% =1.20%,应该相当好了

默认为16M,可调到64-256最佳,线程独占,太大可能内存不够I/O堵塞

13)  thread_cache_size

可以复用的保存在中的线程的数量。如果有,新的线程从缓存中取得,当断开连接的时候如果有空间,客户的线置在缓存中。如果有很多新的线程,为了提高性能可以这个变量值。

通过比较 Connections和Threads_created状态的变量,可以看到这个变量的作用。

默认值为110,可调优为80。

14)  thread_concurrency

推荐设置为服务器 CPU核数的2倍,例如双核的CPU, 那么thread_concurrency的应该为4;2个双核的cpu, thread_concurrency的值应为8。默认为8

15)  wait_timeout

指定一个请求的最大连接时间,对于4GB左右内存的服务器可以设置为5-10。

 

3.    配置InnoDB的几个变量

innodb_buffer_pool_size

对于InnoDB表来说,innodb_buffer_pool_size的作用就相当于key_buffer_size对于MyISAM表的作用一样。InnoDB使用该参数指定大小的内存来缓冲数据和索引。对于单独的MySQL数据库服务器,最大可以把该值设置成物理内存的80%。

根据MySQL手册,对于2G内存的机器,推荐值是1G(50%)。

 

innodb_flush_log_at_trx_commit

主要控制了innodb将log buffer中的数据写入日志文件并flush磁盘的时间点,取值分别为0、1、2三个。0,表示当事务提交时,不做日志写入操作,而是每秒钟将log buffer中的数据写入日志文件并flush磁盘一次;1,则在每秒钟或是每次事物的提交都会引起日志文件写入、flush磁盘的操作,确保了事务的ACID;设置为2,每次事务提交引起写入日志文件的动作,但每秒钟完成一次flush磁盘操作。

实际测试发现,该值对插入数据的速度影响非常大,设置为2时插入10000条记录只需要2秒,设置为0时只需要1秒,而设置为1时则需要229秒。因此,MySQL手册也建议尽量将插入操作合并成一个事务,这样可以大幅提高速度。

根据MySQL手册,在允许丢失最近部分事务的危险的前提下,可以把该值设为0或2。

 

innodb_log_buffer_size

log缓存大小,一般为1-8M,默认为1M,对于较大的事务,可以增大缓存大小。

可设置为4M或8M。

 

innodb_additional_mem_pool_size

该参数指定InnoDB用来存储数据字典和其他内部数据结构的内存池大小。缺省值是1M。通常不用太大,只要够用就行,应该与表结构的复杂度有关系。如果不够用,MySQL会在错误日志中写入一条警告信息。

根据MySQL手册,对于2G内存的机器,推荐值是20M,可适当增加。

 

innodb_thread_concurrency=8

推荐设置为 2*(NumCPUs+NumDisks),默认一般为8

[转载]Versioning Symbols for Shared Libraries (glibc)

转载自:www.trevorpounds.com/blog/?p=33
Sometime back I got a request for running a piece of Java software on an older development system (2.4 kernel/2.2 glibc). The software makes use of a nifty little native compiled JVM launcher, Java Service Wrapper, which provides several features related to JVM configuration and life-cycle process management. Unfortunately, this software has a requirement on >= glibc 2.3 which isn’t supported by that system. Initially this did not surprise me, considering how old it was, but it did spark my curiosity as to how the dynamic loader enforces prerequisite versions on symbols even if an older version exists. Clearly shared library compatibility doesn’t end at versioning of the soname.

To get a basic idea of what shared libraries and symbols were listed in the wrapper binary I ran the following command:

objdump -x wrapper-linux-x86-32

Which gives quite a bit of useful info about the executable:

...
Dynamic Section:
NEEDED               libm.so.6
NEEDED               libpthread.so.0
NEEDED               libc.so.6
...
Version References:
required from libpthread.so.0:
0x0d696912 0x00 05 GLIBC_2.2
0x0d696911 0x00 04 GLIBC_2.1
0x0d696910 0x00 03 GLIBC_2.0
required from libc.so.6:
0x0d696913 0x00 08 GLIBC_2.3
0x0d696911 0x00 07 GLIBC_2.1
0x0d696912 0x00 06 GLIBC_2.2
0x0d696910 0x00 02 GLIBC_2.0
...
SYMBOL TABLE:
...
00000000    F *UND*  00000167      strchr@@GLIBC_2.0
00000000    F *UND*  00000078      nanosleep@@GLIBC_2.0
...
00000000    F *UND*  00000496      realpath@@GLIBC_2.3
...

In the output above I’ve omitted the uninteresting parts and left the important tidbits for the purposes of this article. (1) We can see that this binary requires the shared libraries: libm.so.6, libpthread.so.0, libc.so.6, (2) it has various glibc version references: 2.0, 2.1, 2.2, 2.3, and (3) has some interesting symbols appended with a unique version suffix.

So what? Well, after grepping through the large output from objdump I found that the only requirement on glibc 2.3 was the realpath function. Hmm…that’s interesting, if it wasn’t for this one function the executable would be binary compatible with the glibc installed on this old 2.4 linux distribution. Also, after browsing through the git tree I found that realpath has been available since at least glibc 2.1 (i.e.stdlib/canonicalize.c@202). So why is the dynamic linker requiring a newer version of glibc even though the function has been around for so long? The answer has to do with the versioned symbol scheme introduced in glibc 2.1 (http://people.redhat.com/drepper/symbol-versioning) which is an “extension” of Sun’s own symbol versioning scheme (http://docs.sun.com/app/docs/doc/817-1984/appendixb-45356?a=view).

As I mentioned above realpath has been around since glibc 2.1, yet this executable requires 2.3. The mechanism behind this is that the linker can be used to create global versioned symbol aliases to local symbols generated at compiled time. The internal linker interface provides two mechanisms for defining the aliases and requires the source to be inlined with a simple assembly pseduo-op .symver.

.symver actual, alias@version

.symver actual, alias@@version

The single @ op can be used to define any number of versioned symbols with the same base name. The double @@ can only be defined once for a given symbol since it denotes the default version to use. The linker also requires the use of a map file for defining if a symbol is global or local. A global symbol can be exported, while a local symbol is kept private. Each entry within the map file should correspond to a given version within the source file’s .symver definition.

VER_1.0 {
   global: alias
   local: *
};

To illustrate the full mechanics of the versioned symbol linking mechanism I’ve provided a better example. Say for example we release a library version 1.0 with a function foo. We could version it by adding the simple assembly to the function definition in the source foo.c:

__asm__(".symver foo, foo@@FOO_1.0");
int foo() {
   return 0;
}

Then we would need to create a map file (foo.map):

FOO_1.0 {
   foo;
};

After which we would compile our simple shared library.

gcc -shared -fPIC -Wl,--version-script foo.map foo.c -o libfoo.so.1

At this point we could distribute the library with the foo.h and let others compile against it to their hearts content. But what happens when we want to release another version of the library with potential behavioral changes that may affect the use of fooin other programs? We could introduce a new foo with with the updated behavior and still keep the old fucntion around for legacy programs. This can be done by renaming the original definition of foo to foo_1_0 and adding a new definition of foo called foo_1_1, like so:

/* old foo */
__asm__(".symver foo_1_0, foo@FOO_1.0");
int foo_1_0() {
   return 0;
}
 
/* new foo */
__asm__(".symver foo_1_1, foo@@FOO_1.1");
int foo_1_1() {
   return -1;
}

Then we update our existing map file (foo.map) to the following:

FOO_1.0 {
   foo;
};
FOO_1.1 {
   foo;
} FOO_1.0;

After which we would compile our simple shared library again and redistribute to our customers noting the change in behavior. Programs compiled against the old version and new version can now operate concurrently utilizing the updated library.

[转载]Linking to Older Versioned Symbols (glibc)

转载自http://www.trevorpounds.com/blog/?p=103

In my last post I gave a brief overview of the mechanism used internally by glibc for versioning symbols within shared libraries. As an addendum to my previous article I would like to discuss a simple way to force linking against older glibc symbols. Why would you do this you may ask? Well, suppose you have several GNU/Linux systems with varying glibc installs across them but you want to deliver a binary that would be compatible across them. One option is to statically link your binary, my vote :) , the other is to link to an older symbol within the shared library. I would like to mention that using an older symbol has the obvious drawback, possible advantage, of using something that was deprecated for a reason in the past (i.e. broken, behavior changes, performed poorly, new arch support, etc.). The reason I say it is possibly advantageous to link against an older symbol may be because it is known to behave in a desired way, broken or not! I present the following merely for education purposes, so use with care.

To force linking against a particular symbol you need to use the same .symver pseudo-op that is used for defining versioned symbols in the first place. In the following example I make use of glibc’s realpath, but want to make sure it is linked against an older 2.2.5 version.

#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
 
__asm__(".symver realpath,realpath@GLIBC_2.2.5");
int main()
{
   char* unresolved = "/lib64";
   char  resolved[PATH_MAX+1];
 
   if(!realpath(unresolved, resolved))
      { return 1; }
 
   printf("%s\n", resolved);
 
   return 0;
}

If you were to use objdump on the resulting binary you would see that it is indeed using realpath@GLIBC_2.2.5! Also note that other symbols have been resolved to their defaults so you need to make sure you add a .symver pseudo-op for each symbol you want to force to an older version.

0000000000000000      F *UND*  0000000000000000         realpath@GLIBC_2.2.5
...
0000000000000000      F *UND*  0000000000000000         __stack_chk_fail@@GLIBC_2.4

The .symver pseudo-op can be used this way to force any symbol to be linked against an older one so long as it is valid. To ease linking against older glibc versions I’ve provided a simple header which can be used to force linking against the minimum glibc version for a give x86 architecture. The minimum versions I am using were taken fromshlib-versions file of the glibc git tree.

#ifndef __GLIBC_COMPAT_SYMBOL_H__
#define __GLIBC_COMPAT_SYMBOL_H__ 1
 
/**
 * add other architecures below
 */
#ifdef __amd64__
   #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
#else
   #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.0");
#endif /*__amd64__*/
 
#endif /*__GLIBC_COMPAT_SYMBOL_H__*/

To use the glibc compatible header with the realpath example above, we merely use the GLIBC_COMPAT_SYMBOL macro with the appropriate symbol:

GLIBC_COMPAT_SYMBOL(realpath)

 

获得当前glibc版本的几种方法

1. rpm -qi glibc| grep ‘Version’

2. 执行/lib64/libc.so.6

3. 执行ldd –version

4.#include <gnu/libc-version.h>

printf(“GNU libc version: %s\n”, gnu_get_libc_version());