1.2 Getting Your System Ready for Effective Problem Determination

1.2. Getting Your System(s) Ready for Effective Problem Determination

The Linux problem determination tools and facilities are free, which begs the question: Why not install them? Without these tools, a simple problem can turn into a long and painful ordeal that can affect a business and/or your personal time. Before reading through the rest of the book, take some time to make sure the following tools are installed on your system(s). These tools are just waiting to make your life easier and/or your business more productive:

Linux debug工具是免费的, 这就引出了一个问题: 为什么不安装它们呢?如果没有这些工具, 一个简单的问题就会变成一个长期而痛苦的考验, 会影响企业和/或你的个人时间。在阅读完本书的其余部分之前, 请花点时间确保系统上安装了以下工具。这些工具只是让您的生活更轻松和/或您的业务更有效率:

  • strace: The strace tool traces the system calls, special functions that interact with the operating system. You can use this for many types of problems, especially those that relate to the operating system.
  • strace 工具跟踪系统调用, 与操作系统交互的专用函数。您可以对许多类型的问题使用此方法, 特别是与操作系统相关的情况。
  • ltrace: The ltrace tool traces the functions that a process calls. This is similar to strace, but the called functions provide more detail.
  • ltrace: ltrace 工具跟踪进程调用的函数。这与 strace 类似, 但所调用的函数提供了更详细的信息。
  • lsof: The lsof tool lists all of the open files on the operating system (OS). When a file is open, the OS returns a numeric file descriptor to the process to use. This tool lists all of the open files on the OS with their respective process IDs and file descriptors.
  • lsof: lsof 工具列出了操作系统 (OS) 上所有打开的文件。当文件打开时, OS 将向要使用的进程返回一个数字文件描述符。此工具列出 OS 上所有打开的文件及其各自的进程 id 和文件描述符。
  • top: This tool lists the “top” processes that are running on the system. By default it sorts by the amount of current CPU being consumed by a process.
  • top: 此工具列出了系统上运行的 "top" 进程。默认情况下, 它按进程消耗的当前 CPU 量进行排序。
  • traceroute/tcptraceroute: These tools can be used to trace a network route (or at least one direction of it).
  • traceroute/tcptraceroute: 这些工具可用于跟踪网络路由 (或至少一个方向)。
  • ping: Ping simply checks whether a remote system can respond. Sometimes firewalls block the network packets ping uses, but it is still very useful.
  • ping: ping 只是检查远程系统是否可以响应。有时防火墙会阻止 ping 使用的网络包, 但它仍然非常有用。
  • hexdump or equivalent: This is simply a tool that can display the raw contents of a file.
  • hexdump 或其它类似的工具: 这只是一个可以显示文件的原始内容的工具。
  • tcpdump and/or ethereal: Used for network problems, these tools can display the packets of network traffic.
  • tcpdump 和/或ethereal: 用于调试网络问题, 这些工具可以显示网络流量的包
  • GDB: This is a powerful debugger that can be used to investigate some of the more difficult problems.
  • GDB: 这是一个强大的调试器, 可以用来调查一些更困难的问题。
  • readelf: This tool can read and display information about various sections of an Executable and Linking Format (ELF) file
  • readelf: 此工具可以读取和显示有关可执行文件和链接格式 (ELF) 的各个部分的信息。

These tools (and many more) are listed in Appendix A, “The Toolbox,” along with information on where to find these tools. The rest of this book assumes that your systems have these basic Linux problem determination tools installed. These tools and facilities are free, and they won’t do much good sitting quietly on an installation CD (or on the Internet somewhere). In fact, this book will self-destruct in five minutes if these tools are not installed.

这些工具 (以及更多) 列在附录 A "工具箱" 中, 以及有关在何处查找这些工具的信息。本书的其余部分假定您的系统安装了这些基本的 Linux debug工具。这些工具和应用是免费的, 他们在安装光盘 (或在互联网上某处)可以找到。事实上, 如果这些工具没有安装, 这本书所讲的内容将毫无用处。

Now of course, just because you have a tool in your toolbox, it doesn’t mean you know how to use it in a particular situation. Imagine a toolbox with lots of very high quality tools sitting on your desk. Suddenly your boss walks into your office and asks you to fix a car engine or TV. You know you have the tools. You might even know what the tools are used for (that is, a wrench is used for loosening and tightening bolts), but could you fix that car engine? A toolbox is not a substitute for a good understanding of how and when to use the tools. Understanding how and when to use these tools is the main focus of this book.

当然, 即使在工具箱中有工具, 这并不意味着您知道在特定的情况下如何使用它。想象一下, 一个有很多非常高品质的工具的工具箱在你的办公桌上。突然, 你的老板走进你的办公室, 要求你修理汽车发动机或电视。你知道你有工具。你甚至可能知道工具是用来做什么 (即, 扳手是用来松动和收紧螺栓), 但你能修好那辆汽车引擎吗?工具箱不是一个好理解如何和何时使用工具的替代品。了解如何以及何时使用这些工具是本书的主要重点。

Python网络爬虫与推荐算法新闻推荐平台:网络爬虫:通过Python实现新浪新闻的爬取,可爬取新闻页面上的标题、文本、图片、视频链接(保留排版) 推荐算法:权重衰减+标签推荐+区域推荐+热点推荐.zip项目工程资源经过严格测试可直接运行成功且功能正常的情况才上传,可轻松复刻,拿到资料包后可轻松复现出一样的项目,本人系统开发经验充足(全领域),有任何使用问题欢迎随时与我联系,我会及时为您解惑,提供帮助。 【资源内容】:包含完整源码+工程文件+说明(如有)等。答辩评审平均分达到96分,放心下载使用!可轻松复现,设计报告也可借鉴此项目,该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的。 【提供帮助】:有任何使用问题欢迎随时与我联系,我会及时解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 下载后请首先打开README文件(如有),项目工程可直接复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mounter625

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值