OpenResty XRay 常見問題解答

🔗 What is OpenResty XRay?

OpenResty XRay is a dynamic-tracing product analyzing various cloud and server applications in real-time. It treats running processes and containers as read-only databases and extracts essential information to troubleshoot performance issues, exceptions, errors, and security vulnerabilities. Armed with knowledge bases, inference engines, and hundreds of advanced analyzers, OpenResty XRay can diagnose and narrow down the root causes of deep issues without changing or affecting the target applications.

🔗 Who should use OpenResty XRay?

DevOps can use OpenResty XRay to quickly discover any issues or pinpoint the root causes of the problems and then forward the automatic reports and findings to the developers.

The development team can also utilize OpenResty XRay to check any regressions in everyday development or before new releases of the software products.

🔗 How to set up OpenResty XRay for my applications?

You need to install and run the OpenResty XRay Agent program on the servers with your applications or containers. The Agent program is a standalone daemon process that inspects all your applications on the same server. It also serves as a client to the OpenResty XRay web console.

There are several ways to install the OpenResty XRay Agent:

  1. Install the RPM or Deb package repositories we provided for the corresponding Linux distro.
  2. Install a big .tar.gz bundle containing all our RPM or Deb packages for your Linux distro.
  3. Install our official Docker or Kubernetes (K8s) container images

One common mistake is to install the Agent inside your own containers. It will always fail because your containers almost always lack privileges or file system access for the Agent to inspect other processes and containers.

🔗 What operating systems do we support?

Our official Docker or K8s container images can run on any modern Linux distros with container support, as long as the Linux distros used inside those target application containers are supported.

We support most of the mainstream Linux distributions if you want to run OpenResty XRay's Agent service natively. Check the latest supported distro list for details.

If you have a new Linux distro to be supported natively, contact us at info@openresty.com!

In the future, we may support non-Linux operating systems like Android, macOS, *BSD, and Microsoft Windows.

🔗 Do you require very new Linux kernels?

No! We support old kernels like CentOS 7's 3.10 kernels. Older kernels like 2.6 in CentOS 6 are not supported, though.

🔗 What is the overhead of the Agent?

We try very hard to minimize the performance impact of our Agent program on your servers marked as "production." The Agent uses an event-triggered sampling approach so that it won't attempt to collect data all the time, just when there is a real need. When not sampling, all of your processes incur strictly 0 extra overhead. Thanks to the true noninvasive nature of dynamic tracing. And even when sampling, the overhead of most of our analyzers should be less than 5% for your applications. Even for those inherently more expensive tools, the system tries to automatically adapt the frequency and process scope of those analyzers to minimize the impact.

If you do not mark your servers as production in the web console, the system will assume they are development or testing boxes. Therefore, it will no longer be cautious about resource usage, and all the analyzers will run at full speed so that you can get results as soon as possible.

🔗 What data does the Agent collect?

The OpenResty XRay Agent program only collects essential data for profiling performance issues, troubleshooting stability and behavioral problems, and scanning security vulnerabilities. We never collect any potentially sensitive data from your business-level code. We also implement safeguards to avoid accidentally collecting sensitive data in the data source so that it won't go outside your applications' processes.

🔗 How do you handle the data collected by the Agent?

We protect our customer's data and privacy with great caution. It is our #1 priority. We always use encryption methods of industrial standards (like TLS) when transferring all the data to our web console. The storage and management of the data on our web console also conforming to all the SOC 2 guidelines. Only the most recent 2 weeks of raw data live in our web console (higher-level report data lives longer).. If some customers have even shorter data lifetime requirements, we can also accommodate that.

🔗 Do you sell or share my data?

No, never. We won't sell your data to any third parties. We may only share some audited and obfuscated data with some of our external contractors. And all our contractors must sign nondisclosure agreements (NDAs) with us.

🔗 Can I avoid uploading any data to your console?

Yes! We provide the on-premises version of OpenResty XRay for companies with stringent data handling policies. It is more expensive than the cloud version. For the on-prem version, the user deploys the web console in their own environments; thus, no data will ever be uploaded to OpenResty Inc's servers.

🔗 Do I need to restart my processes after installing the Agent?

No! One beauty of dynamic-tracing technology is that it is postmortem. You don't need to restart your applications or any of your existing processes for the newly installed OpenResty XRay Agent to analyze. We can do that because we don't need any new plugins, new startup options, or inject any code into your applications. It is spotless and noninvasive.

We understand that you may have some processes that entered some rare state and restarting them will make the problem disappear. This is why postmortem analysis and debugging are so critical.

🔗 How do I stop the Agent?

To stop the OpenResty XRay Agent service, just run the following shell command:

sudo systemctl stop orxray-agent

But this is temporary. If the system restarts or reboots, the Agent service will start again. To stop it permanently, you can also run the command after running the previous one:

sudo systemctl disable orxray-agent

For containerized Agent services, you can stop the Agent container instances with Docker or Kubernetes.

🔗 How do I restart the Agent?

To restart your Agent, just run the command

sudo systemctl restart orxray-agent

Wait a few minutes for the new instance of the Agent to take effect.

🔗 My Agent is not working; what should I do?

There are times when the Agent is not working correctly due to network or disk issues. In such cases, please check out the error log files in this directory:

/usr/local/orxray-agent/logs/

If you still need help with the errors in the error log files, feel free to contact us.

🔗 Can Agent analyze private software?

Yes, if you wrote the private software. For example, you should never analyze other vendors' proprietary software if you don't have their permission. But if you wrote the software or have access to the source code and permissions to compile it, then it is possible. And you can even use our Y language (ylang) to write advanced analyzers for your programs. Make sure you compile the private software with DWARF data (or "debug symbols"). For example, C/C++ programs should be compiled with the -g or -g3 option when gcc or g++ are used. Building with DWARF symbols incurs zero overhead to your programs' runtime performance, and most of the mainstream Linux distributions do this by default for their standard software packages.

DWARF data is not always required, however. Some elemental analyzers in OpenResty XRay do not need "debug symbols" to work. We used to help a customer to pinpoint a memory leak in a third-party proprietary library on the C/C++ function level. But make sure you conform to the licensing requirements of the third parties.

🔗 Does the Agent require installing C compiler toolchains?

Nope! Unlike those open-source dynamic tracing frameworks like SystemTap or eBPF/BCC, OpenResty XRay does not require installing any C or C++ compiler toolchains on the target machines. No gcc, no clang, nothing. Additionally, it does not require installing any Linux kernel header files.

🔗 Do I need to install the debug symbol packages on all my servers?

No. OpenResty XRay indexes all the debug symbols it sees in a remote database called package database. Whenever the Agent sees a binary executable file, it will automatically query the package database for its corresponding debug symbols.

We run crawlers that fetch the Internet for public software packages' debug symbols (or DWARF data) across the Internet all the time. And we also automatically index our users' own DWARF data and debug symbols. Each OpenResty XRay tenant has their own separate package database for privacy protection. If you compile the software yourself, then make sure you have an offline (or online) machine with all the software binaries and debug symbols installed and an OpenResty XRay Agent is running there (for a while at least). Once the DWARF data and binary programs are indexed in the user's package database, the user can get rid of the debug symbols on all her machines.

🔗 OpenResty XRay says my programs lack debug symbols; what should I do?

If the programs are compiled by yourself, try to find the debug symbol packages associated with your main packages (like *-debuginfo packages on an RPM-based distro and *-dbgsym.ddeb or *-dbgsym.deb files for a Deb-based distro). Install the debuginfo packages on one of your machines with an Agent installed and running, and wait for the Agent to index the debug symbols.

Suppose your programs were compiled without debug symbols in the first place, or you cannot find the corresponding debuginfo packages. In that case, you can try re-compiling your programs with debug symbols enabled (for C/C++ programs, pass the -g or -g3 option to the compiler command lines). Also, make sure your packaging scripts generate a debuginfo package (like *-debuginfo*.rpm or *-dbgsym.deb) instead of tossing the debug symbols away.

We understand finding debug symbols can be a hassle sometimes. We've been working on an AI system that can automatically rebuild DWARF data from existing DWARF data for similar but not identical binary programs. Once this is ready, OpenResty XRay will be able to thoroughly analyze a lot of open-source software binaries missing debug symbols.

It's worth mentioning that some elemental analyzers in OpenResty XRay do not require "debug symbols" to work. Indeed, we used to help a customer to pinpoint a memory leak in a third-party proprietary library on the C/C++ function level.

🔗 Can OpenResty XRay analyze applications not running on OpenResty?

Sure! OpenResty XRay is a general platform that can analyze any software. Okay, at least the software you control (like you have access to the DWARF debug symbols, source code, etc.).

However, OpenResty XRay currently analyzes OpenResty and Nginx tech stacks best. We have initial support for some versions of Python, Perl, PHP, and PostgreSQL. And we've been working on the Go and Java support as well. Tell us the open-source software you want OpenResty XRay to support soon!

🔗 Does OpenResty XRay need to change my applications in any way?

No! OpenResty XRay uses advanced dynamic-tracing technologies that do not require collaboration from the target applications. It is 100% noninvasive.

  1. We do not require adding a plugin or module to your applications.
  2. We do not require patching your applications' code.
  3. We do not need special compilation or startup options (Okay, you do need the -g option when compiling C/C++ programs to emit DWARF data, but that's very standard practice).
  4. We do not inject any code into your application processes.

Using OpenResty XRay analyzers won't crash or impair your applications' processes in any way since we add zero stuff to your processes. Zero.

🔗 Can I write my own analyzers?

Yes! You can use our Y language (or ylang) to write your own analyzers. Ylang is a large subset of the C programming language with our own extensions for dynamic tracing. We also provide the Ylua language, a subset of the Lua language with extensions, and YSQL, a SQL dialect.

🔗 Can I use my own Linux kernels?

Yes! But you need to contact our team so that we can index your kernels in the package database and test their compatibility with our product thoroughly. We do not support automatic indexing of custom or unknown kernels yet. We may consider adding this support in the future.

🔗 Can I use OpenResty XRay in a local VM atop VMWare/VirtualBox/KVM/etc.?

Yes! All such full-system virtualization technologies should work out of the box with OpenResty XRay. If not, please report to us.

Please note that installing our Agent inside your own Docker or K8s containers is not supported. But you can always use our official Docker and K8s container images for the Agent.

🔗 Can I run OpenResty XRay in a public cloud VM?

Yes! Like Microsoft Azure, Google Cloud (GCP), Amazon Cloud (AWS), or Digital Ocean. And virtualized Cloud servers are fine. It doesn't have to be bare metals.

🔗 Is there a personal version for individual use?

Yes! As long as the personal version is not used for any companies, governments, or other commercial purposes. We usually don't provide SLA for personal versions, though.

🔗 OpenResty XRay 是什么?

OpenResty XRay 是一个动态追踪产品,它可以实时分析各种云和服务器应用程序。它将运行中的进程和容器视为只读数据库,并提取必要的信息来解决性能问题、异常、错误和安全漏洞。OpenResty XRay 拥有知识库、推理引擎和数百个高级分析器,可以在不改变或影响目标应用程序的情况下诊断和缩小深层问题的根源。

🔗 谁应该使用 OpenResty XRay?

DevOps 可以利用 OpenResty XRay 快速发现任意问题或找出问题根源,然后将发现的问题和生成的自动报告转发给开发人员。

开发团队也可以利用 OpenResty XRay 来检查日常开发中或新的软件产品发布前的任何回归问题。

🔗 如何为我的应用程序部署安装 OpenResty XRay?

您需要在装有应用程序或容器的服务器上安装并运行 OpenResty XRay agent 程序。agent 程序是一个独立的守护进程,可以检查您在同一服务器上的所有应用程序。它也是作为 OpenResty XRay web 控制台的一个客户端。

有几种方法来安装 OpenResty XRay agent。

  1. 安装我们为相应的 Linux 发行版提供的 RPM 或 Deb 软件包库。
  2. 安装一个大的 .tar.gz 包,其中包含我们为您的 Linux 发行版提供的所有 RPM 或 Deb 包。
  3. 安装我们的官方 Docker 或 Kubernetes(K8s)容器镜像。

一个常见的错误是在您自己的容器中安装 agent。这总会失败的,因为您的容器基本总会缺乏权限或文件系统访问权,使 agent 无法检查其他进程和容器。

🔗 我们支持哪些操作系统?

我们的官方 Docker 或 K8s 容器镜像可以在任何支持容器的现代 Linux 发行版上运行,只要这些目标应用容器内使用的 Linux 发行版在 支持列表 内。

如果您想原生运行 OpenResty XRay 的 agent 服务,我们是支持大多数主流 Linux 发行版的。请查看最新的 发行版支持列表 了解详情。

如果您有新的 Linux 发行版需要原生支持,请联系我们:info@openresty.com!

以后我们可能也会支持非 Linux 操作系统,如 Android、macOS、*BSD 和 Microsoft Windows 等。

🔗 需要非常新的 Linux 内核吗?

不需要!我们支持旧的内核,如 CentOS 7 的 3.10 内核。但不支持像 CentOS 6 的 2.6 这样的旧内核。

🔗 agent 的开销多大?

我们尽量将 agent 程序对您标记为“生产”的服务器的性能影响降到最低。agent 使用事件触发的采样方法,因此它不会一直试图收集数据,只是在有真正需要的时候才收集。当不采样时,您的所有进程严格意义上产生的额外开销是 0。这是由于动态追踪的真正非侵入性。即使在采样时,我们大多数的分析器的开销也应该小于您的应用的5%。即使是那些原本开销比较昂贵的工具,系统也会尝试自动调整这些分析器的频率和进程范围,以尽量减少影响。

如果您不在 web 控制台中把您的服务器标记为“生产”,系统会认为它们是开发或测试环境。因此,它将不再对资源的使用持谨慎态度,所有的分析器将全速运行,以便您能尽快得到结果。

🔗 agent 会收集哪些数据?

OpenResty XRay agent 程序只收集用于分析性能问题、排除稳定性和行为上的问题以及扫描安全漏洞的基本数据。我们从不从您的业务级代码中收集任何潜在的敏感数据。我们还实施保护措施,以避免意外地收集数据源中的敏感数据,使其不会泄露到您的应用程序进程之外。

🔗 你们如何处理 agent 收集的数据?

我们非常谨慎地保护我们客户的数据和隐私。这是我们的第一要务。在传输所有数据到我们的 web 控制台时,我们总是使用工业标准的加密方法(如TLS)。我们 web 控制台的数据存储和管理也符合所有 SOC 2 准则。只有最近 2 周的原始数据存放在我们的 web 控制台中(更高级别的报告数据存放时间更长些)。如果有些客户有更短的数据生命周期要求,我们也可以满足。

🔗 你们会出售或分享我们的数据吗?

不,永远不会。我们不会把您的数据卖给任何第三方。我们只可能与我们的一些外部承包商分享一些经过审计和混淆的数据。而我们所有的承包商必须与我们签署保密协议(NDA)。

🔗 我可以避免上传任何数据到你们的控制台吗?

是的!我们为有严格的数据处理政策的公司提供 OpenResty XRay 的自主部署版本。它比云版本更贵。对于自主部署版本,用户在自己的环境中部署 web 控制台;因此,没有数据会被上传到 OpenResty Inc 的服务器上。

🔗 安装 agent 后,我需要重新启动我的进程吗?

不需要!动态追踪技术的一个优点是事后分析。您不需要重新启动您的应用程序或任何现有的进程,让新安装的 OpenResty XRay agent 进行分析。我们可以做到这一点,因为我们不需要任何新的插件、新的启动选项,也不需要向您的应用程序注入任何代码。它是无污染和非侵入的。

我们理解,您可能有一些进程进入了一些罕见的状态,重新启动它们会使问题消失。这就是为什么事后分析和调试是如此关键。

🔗 我怎样才能停止 agent ?

要停止 OpenResty XRay agent 服务,只需运行以下 shell 命令。

sudo systemctl stop orxray-agent

但这只是暂时的。如果系统重新启动或重启,agent 服务会再次启动。要永久停止它,您也可以在运行前一个命令后再运行这个命令。

sudo systemctl disable orxray-agent

对于容器化的 agent 服务,您可以用 Docker 或 Kubernetes 停止 agent 容器实例。

🔗 我如何重新启动 agent?

要重新启动您的 agent,只需运行命令

sudo systemctl restart orxray-agent

等待几分钟,新的 agent 实例就会生效。

🔗 我的 agent 不工作了,我应该怎么做?

有些时候,由于网络或硬盘问题,agent 不能正常工作。在这种情况下,请查看该目录下的错误日志文件。

/usr/local/orxray-agent/logs/

如果您对错误日志文件中的错误还需要帮助,请随时联系我们。

🔗 agent 可以分析私人软件吗?

是的,如果您编写了私有软件的话。例如,如果您没有得到其他供应商的许可,您就不应该分析他们的专有软件。但是,如果您编写了这个软件,或者有机会接触到源代码,并且有编译的权限,那就可以了。而且您甚至可以使用我们的 Y 语言(lang)来为您的程序编写高级分析器。请确保您用 DWARF 数据(或 "调试符号")来编译私有软件。例如,C/C++ 程序在使用 gccg++ 时,应使用 gg3 选项进行编译。使用 DWARF 符号编译对程序的运行性能没有任何影响,大多数主流的 Linux 发行版在其标准软件包中都默认这样做。

然而,DWARF 数据并不总是必需的。OpenResty XRay 中一些基本分析器不需要“调试符号”来工作。我们曾经帮助一个客户在 C/C++ 函数层面上准确定位了一个第三方专有库的内存泄漏。但要确保您符合第三方的许可要求。

🔗 agent 需要安装 C 编译器工具链吗?

不需要。与那些开源的动态追踪框架如 SystemTapeBPF/BCC 不同,OpenResty XRay 不要求在目标机器上安装任何 C 或 C++ 编译器工具链。没有 gcc,没有 clang,什么都没有。此外,它不需要安装任何 Linux 内核头文件。

🔗 我需要在我所有的服务器上安装调试符号包吗?

不需要。OpenResty XRay 在一个叫做 package database 的远程数据库中索引它发现的所有调试符号。每当 agent 发现一个二进制的可执行文件,它就会自动查询包数据库中相应的调试符号。

我们运行爬虫程序,在互联网上一直获取公共软件包的调试符号(或 DWARF 数据)。而且我们还自动索引用户自己的 DWARF 数据和调试符号。每个 OpenResty XRay 租户都有自己独立的软件包数据库以保护隐私。如果您自己编译软件,那么请确保您有一台离线(或在线)的机器,安装了所有的软件二进制文件和调试符号,并且让 OpenResty XRay agent 在那运行(至少有一段时间)。一旦 DWARF 数据和二进制程序被索引到用户的软件包数据库中,用户就可以在他所有的机器上摆脱调试符号了。

🔗 OpenResty XRay 说我的程序缺乏调试符号,我应该怎么做?

如果程序是自行编译的,试着找到与您的主软件包相关的调试符号包(比如基于 RPM 的发行版上的 *-debuginfo 包,基于 Deb 的发行版上的 *-dbgsym.ddeb*-dbgsym.deb文件)。将 debuginfo 包安装在一台安装并运行了 agent 的机器上,并等待 agent 对调试符号进行索引。

假设您的程序在编译时没有调试符号,或者您找不到相应的 debuginfo 包。在这种情况下,您可以尝试在启用调试符号的情况下重新编译您的程序(对于 C/C++ 程序,在编译器命令行中传递 -g-g3选项)。另外,确保您的打包脚本生成一个 debuginfo 包(如 *-debuginfo*.rpm*-dbgsym.deb),而不是把调试符号丢弃。

我们理解寻找调试符号有时是一件很麻烦的事。我们一直在开发一个人工智能系统,可以从现有的 DWARF 数据中自动重建相似但不完全相同的二进制程序的 DWARF 数据。一旦这个准备就绪,OpenResty XRay 将能够彻底分析大量缺少调试符号的开源软件二进制文件。

值得一提的是,OpenResty XRay 中的一些基本分析器并不要求“调试符号”来工作。事实上,我们曾经帮助一个客户在 C/C++ 函数层面上准确定位了一个第三方专有库的内存泄漏。

🔗 OpenResty XRay 可以分析不在 OpenResty 上运行的应用程序吗?

当然!OpenResty XRay 是一个通用平台,可以分析任何软件。好吧,至少是您控制的软件(比如您可以访问 DWARF 的调试符号,源代码等)。

不过,OpenResty XRay 目前分析 OpenResty 和 Nginx 技术栈的效果最好。我们已经初步支持了一些版本的 Python、Perl、PHP 和 PostgreSQL。而且我们也一直在研究对 Go 和 Java 的支持。告诉我们您希望 OpenResty XRay 尽快支持的开源软件!

🔗 OpenResty XRay 需要以任何方式改变我的应用程序吗?

不!OpenResty XRay 使用先进的动态追踪技术,不需要目标应用程序的协作。它是 100% 非侵入的。

  1. 我们不要求在您的应用程序中添加插件或模块。
  2. 我们不需要对您的应用程序的代码打上补丁。
  3. 我们不需要特殊的编译或启动选项(好吧,在编译 C/C++ 程序时,您确实需要 -g 选项来发送 DWARF 数据,但这是非常标准的做法)。
  4. 我们不向您的应用程序进程注入任何代码。

使用 OpenResty XRay 分析器不会以任何方式损害您的应用程序进程甚至使其崩溃,因为我们不会向您的进程添加任何东西。

🔗 我可以编写自己的分析器吗?

可以!您可以使用我们的 Y 语言(或 Ylang)来编写您自己的分析器。Ylang 是 C 编程语言的一个大的子集,有我们自己的动态追踪的扩展。我们还提供了 Ylua 语言,这是一个带有扩展的 Lua 语言的子集,以及 YSQL,一个 SQL 方言。

🔗 我可以使用我自己的 Linux 内核吗?

可以!但您需要联系我们的团队,以便我们能够在软件包数据库中索引您的内核,并彻底测试它们与我们产品的兼容性。我们还不支持对自定义或未知内核的自动索引。我们可能会考虑在未来增加这一支持。

🔗 我可以在 VMWare/VirtualBox/KVM/ 等本地虚拟机上使用 OpenResty XRay 吗?

可以!所有这样的全系统虚拟化技术都应该可以与 OpenResty XRay 一起开箱工作。如果不能,请向我们报告。

请注意,不支持在您自己的 Docker 或 K8s 容器内安装我们的 agent。但您可以随时使用我们的官方 Docker 和 K8s 容器镜像来安装 agent 。

🔗 我可以在公有云虚拟机中运行 OpenResty XRay 吗?

可以!比如微软 Azure、谷歌云(GCP)、亚马逊云(AWS)或 Digital Ocean。虚拟化的云服务器都可以。不是一定要物理机。

🔗 是否有提供个人使用的个人版?

是的有提供! 只要个人版不用于任何公司、政府或其他商业用途。不过,我们通常不为个人版提供 SLA。

🔗 OpenResty XRay 是甚麼?

OpenResty XRay 是一個動態追蹤產品,它可以實時分析各種雲和伺服器應用程式。它將執行中的程序和容器視為只讀資料庫,並提取必要的資訊來解決效能問題、異常、錯誤和安全漏洞。OpenResty XRay 擁有知識庫、推理引擎和數百個高階分析器,可以在不改變或影響目標應用程式的情況下診斷和縮小深層問題的根源。

🔗 誰應該使用 OpenResty XRay?

DevOps 可以利用 OpenResty XRay 快速發現任意問題或找出問題根源,然後將發現的問題和生成的自動報告轉發給開發人員。

開發團隊也可以利用 OpenResty XRay 來檢查日常開發中或新的軟體產品釋出前的任何回歸問題。

🔗 如何為我的應用程式部署安裝 OpenResty XRay?

您需要在裝有應用程式或容器的伺服器上安裝並執行 OpenResty XRay agent 程式。agent 程式是一個獨立的守護程序,可以檢查您在同一伺服器上的所有應用程式。它也是作為 OpenResty XRay web 控制檯的一個客戶端。

有幾種方法來安裝 OpenResty XRay agent。

  1. 安裝我們為相應的 Linux 發行版提供的 RPM 或 Deb 軟體包庫。
  2. 安裝一個大的 .tar.gz 包,其中包含我們為您的 Linux 發行版提供的所有 RPM 或 Deb 包。
  3. 安裝我們的官方 Docker 或 Kubernetes(K8s)容器映象。

一個常見的錯誤是在您自己的容器中安裝 agent。這總會失敗的,因為您的容器基本總會缺乏許可權或檔案系統訪問權,使 agent 無法檢查其他程序和容器。

🔗 我們支援哪些作業系統?

我們的官方 Docker 或 K8s 容器映象可以在任何支援容器的現代 Linux 發行版上執行,只要這些目標應用容器內使用的 Linux 發行版在 支援列表 內。

如果您想原生執行 OpenResty XRay 的 agent 服務,我們是支援大多數主流 Linux 發行版的。請檢視最新的 發行版支援列表 瞭解詳情。

如果您有新的 Linux 發行版需要原生支援,請聯絡我們:info@openresty.com!

以後我們可能也會支援非 Linux 作業系統,如 Android、macOS、*BSD 和 Microsoft Windows 等。

🔗 需要非常新的 Linux 核心嗎?

不需要!我們支援舊的核心,如 CentOS 7 的 3.10 核心。但不支援像 CentOS 6 的 2.6 這樣的舊核心。

🔗 agent 的開銷多大?

我們儘量將 agent 程式對您標記為“生產”的伺服器的效能影響降到最低。agent 使用事件觸發的取樣方法,因此它不會一直試圖收集資料,只是在有真正需要的時候才收集。當不取樣時,您的所有程序嚴格意義上產生的額外開銷是 0。這是由於動態追蹤的真正非侵入性。即使在取樣時,我們大多數的分析器的開銷也應該小於您的應用的5%。即使是那些原本開銷比較昂貴的工具,系統也會嘗試自動調整這些分析器的頻率和程序範圍,以儘量減少影響。

如果您不在 web 控制檯中把您的伺服器標記為“生產”,系統會認為它們是開發或測試環境。因此,它將不再對資源的使用持謹慎態度,所有的分析器將全速執行,以便您能儘快得到結果。

🔗 agent 會收集哪些資料?

OpenResty XRay agent 程式只收集用於分析效能問題、排除穩定性和行為上的問題以及掃描安全漏洞的基本資料。我們從不從您的業務級程式碼中收集任何潛在的敏感資料。我們還實施保護措施,以避免意外地收集資料來源中的敏感資料,使其不會洩露到您的應用程式程序之外。

🔗 你們如何處理 agent 收集的資料?

我們非常謹慎地保護我們客戶的資料和隱私。這是我們的第一要務。在傳輸所有資料到我們的 web 控制檯時,我們總是使用工業標準的加密方法(如TLS)。我們 web 控制檯的資料儲存和管理也符合所有 SOC 2 準則。只有最近 2 周的原始資料存放在我們的 web 控制檯中(更高階別的報告資料存放時間更長些)。如果有些客戶有更短的資料生命週期要求,我們也可以滿足。

🔗 你們會出售或分享我們的資料嗎?

不,永遠不會。我們不會把您的資料賣給任何第三方。我們只可能與我們的一些外部承包商分享一些經過審計和混淆的資料。而我們所有的承包商必須與我們簽署保密協議(NDA)。

🔗 我可以避免上傳任何資料到你們的控制檯嗎?

是的!我們為有嚴格的資料處理政策的公司提供 OpenResty XRay 的自主部署版本。它比雲版本更貴。對於自主部署版本,使用者在自己的環境中部署 web 控制檯;因此,沒有資料會被上傳到 OpenResty Inc 的伺服器上。

🔗 安裝 agent 後,我需要重新啟動我的程序嗎?

不需要!動態追蹤技術的一個優點是事後分析。您不需要重新啟動您的應用程式或任何現有的程序,讓新安裝的 OpenResty XRay agent 進行分析。我們可以做到這一點,因為我們不需要任何新的外掛、新的啟動選項,也不需要向您的應用程式注入任何程式碼。它是無汙染和非侵入的。

我們理解,您可能有一些程序進入了一些罕見的狀態,重新啟動它們會使問題消失。這就是為甚麼事後分析和除錯是如此關鍵。

🔗 我怎樣才能停止 agent ?

要停止 OpenResty XRay agent 服務,只需執行以下 shell 命令。

sudo systemctl stop orxray-agent

但這只是暫時的。如果系統重新啟動或重啟,agent 服務會再次啟動。要永久停止它,您也可以在執行前一個命令後再執行這個命令。

sudo systemctl disable orxray-agent

對於容器化的 agent 服務,您可以用 Docker 或 Kubernetes 停止 agent 容器例項。

🔗 我如何重新啟動 agent?

要重新啟動您的 agent,只需執行命令

sudo systemctl restart orxray-agent

等待幾分鐘,新的 agent 例項就會生效。

🔗 我的 agent 不工作了,我應該怎麼做?

有些時候,由於網路或硬碟問題,agent 不能正常工作。在這種情況下,請檢視該目錄下的錯誤日誌檔案。

/usr/local/orxray-agent/logs/

如果您對錯誤日誌檔案中的錯誤還需要幫助,請隨時聯絡我們。

🔗 agent 可以分析私人軟體嗎?

是的,如果您編寫了私有軟體的話。例如,如果您沒有得到其他供應商的許可,您就不應該分析他們的專有軟體。但是,如果您編寫了這個軟體,或者有機會接觸到原始碼,並且有編譯的許可權,那就可以了。而且您甚至可以使用我們的 Y 語言(lang)來為您的程式編寫高階分析器。請確保您用 DWARF 資料(或 "除錯符號")來編譯私有軟體。例如,C/C++ 程式在使用 gccg++ 時,應使用 gg3 選項進行編譯。使用 DWARF 符號編譯對程式的執行效能沒有任何影響,大多數主流的 Linux 發行版在其標準軟體包中都預設這樣做。

然而,DWARF 資料並不總是必需的。OpenResty XRay 中一些基本分析器不需要“除錯符號”來工作。我們曾經幫助一個客戶在 C/C++ 函式層面上準確定位了一個第三方專有庫的記憶體洩漏。但要確保您符合第三方的許可要求。

🔗 agent 需要安裝 C 編譯器工具鏈嗎?

不需要。與那些開源的動態追蹤框架如 SystemTapeBPF/BCC 不同,OpenResty XRay 不要求在目標機器上安裝任何 C 或 C++ 編譯器工具鏈。沒有 gcc,沒有 clang,甚麼都沒有。此外,它不需要安裝任何 Linux 核心標頭檔案。

🔗 我需要在我所有的伺服器上安裝除錯符號包嗎?

不需要。OpenResty XRay 在一個叫做 package database 的遠端資料庫中索引它發現的所有除錯符號。每當 agent 發現一個二進位制的可執行檔案,它就會自動查詢包資料庫中相應的除錯符號。

我們執行爬蟲程式,在網際網路上一直獲取公共軟體包的除錯符號(或 DWARF 資料)。而且我們還自動索引使用者自己的 DWARF 資料和除錯符號。每個 OpenResty XRay 租戶都有自己獨立的軟體包資料庫以保護隱私。如果您自己編譯軟體,那麼請確保您有一臺離線(或線上)的機器,安裝了所有的軟體二進位制檔案和除錯符號,並且讓 OpenResty XRay agent 在那執行(至少有一段時間)。一旦 DWARF 資料和二進位制程式被索引到使用者的軟體包資料庫中,使用者就可以在他所有的機器上擺脫除錯符號了。

🔗 OpenResty XRay 說我的程式缺乏除錯符號,我應該怎麼做?

如果程式是自行編譯的,試著找到與您的主軟體包相關的除錯符號包(比如基於 RPM 的發行版上的 *-debuginfo 包,基於 Deb 的發行版上的 *-dbgsym.ddeb*-dbgsym.deb檔案)。將 debuginfo 包安裝在一臺安裝並執行了 agent 的機器上,並等待 agent 對除錯符號進行索引。

假設您的程式在編譯時沒有除錯符號,或者您找不到相應的 debuginfo 包。在這種情況下,您可以嘗試在啟用除錯符號的情況下重新編譯您的程式(對於 C/C++ 程式,在編譯器命令列中傳遞 -g-g3選項)。另外,確保您的打包指令碼生成一個 debuginfo 包(如 *-debuginfo*.rpm*-dbgsym.deb),而不是把除錯符號丟棄。

我們理解尋找除錯符號有時是一件很麻煩的事。我們一直在開發一個人工智慧系統,可以從現有的 DWARF 資料中自動重建相似但不完全相同的二進位制程式的 DWARF 資料。一旦這個準備就緒,OpenResty XRay 將能夠徹底分析大量缺少除錯符號的開源軟體二進位制檔案。

值得一提的是,OpenResty XRay 中的一些基本分析器並不要求“除錯符號”來工作。事實上,我們曾經幫助一個客戶在 C/C++ 函式層面上準確定位了一個第三方專有庫的記憶體洩漏。

🔗 OpenResty XRay 可以分析不在 OpenResty 上執行的應用程式嗎?

當然!OpenResty XRay 是一個通用平臺,可以分析任何軟體。好吧,至少是您控制的軟體(比如您可以訪問 DWARF 的除錯符號,原始碼等)。

不過,OpenResty XRay 目前分析 OpenResty 和 Nginx 技術棧的效果最好。我們已經初步支援了一些版本的 Python、Perl、PHP 和 PostgreSQL。而且我們也一直在研究對 Go 和 Java 的支援。告訴我們您希望 OpenResty XRay 儘快支援的開源軟體!

🔗 OpenResty XRay 需要以任何方式改變我的應用程式嗎?

不!OpenResty XRay 使用先進的動態追蹤技術,不需要目標應用程式的協作。它是 100% 非侵入的。

  1. 我們不要求在您的應用程式中新增外掛或模組。
  2. 我們不需要對您的應用程式的程式碼打上補丁。
  3. 我們不需要特殊的編譯或啟動選項(好吧,在編譯 C/C++ 程式時,您確實需要 -g 選項來傳送 DWARF 資料,但這是非常標準的做法)。
  4. 我們不向您的應用程式程序注入任何程式碼。

使用 OpenResty XRay 分析器不會以任何方式損害您的應用程式程序甚至使其崩潰,因為我們不會向您的程序新增任何東西。

🔗 我可以編寫自己的分析器嗎?

可以!您可以使用我們的 Y 語言(或 Ylang)來編寫您自己的分析器。Ylang 是 C 程式語言的一個大的子集,有我們自己的動態追蹤的擴充套件。我們還提供了 Ylua 語言,這是一個帶有擴充套件的 Lua 語言的子集,以及 YSQL,一個 SQL 方言。

🔗 我可以使用我自己的 Linux 核心嗎?

可以!但您需要聯絡我們的團隊,以便我們能夠在軟體包資料庫中索引您的核心,並徹底測試它們與我們產品的相容性。我們還不支援對自定義或未知核心的自動索引。我們可能會考慮在未來增加這一支援。

🔗 我可以在 VMWare/VirtualBox/KVM/ 等本地虛擬機器上使用 OpenResty XRay 嗎?

可以!所有這樣的全系統虛擬化技術都應該可以與 OpenResty XRay 一起開箱工作。如果不能,請向我們報告。

請注意,不支援在您自己的 Docker 或 K8s 容器內安裝我們的 agent。但您可以隨時使用我們的官方 Docker 和 K8s 容器映象來安裝 agent 。

🔗 我可以在公有云虛擬機器中執行 OpenResty XRay 嗎?

可以!比如微軟 Azure、谷歌雲(GCP)、亞馬遜雲(AWS)或 Digital Ocean。虛擬化的雲伺服器都可以。不是一定要物理機。

🔗 是否有提供個人使用的個人版?

是的有提供! 只要個人版不用於任何公司、政府或其他商業用途。不過,我們通常不為個人版提供 SLA。