什么包包括 AB Ubuntu 中的 Apache 服务器基准测试工具

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/66606/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 16:43:40  来源:igfitidea点击:

What package includes AB the Apache Server Benchmarking Tool in Ubuntu

linuxapacheubuntu

提问by reconbot

I'm trying to find ab - Apache HTTP server benchmarking toolfor Ubuntu, I'm hoping there's a package I can install for it. I decided I need to do some simple load testing on my applications.

我正在尝试找到ab -Ubuntu 的Apache HTTP 服务器基准测试工具,我希望有一个可以安装的包。我决定需要对我的应用程序进行一些简单的负载测试。

回答by Brian Phillips

% sudo apt-get install apache2-utils

The command-not-found package in Ubuntu provides some slick functionality where if you type a command that can't be resolved to an executable (or bash function or whatever) it will query your apt sources and find a package that contains the binary you tried to execute. So, in this case, I typed abat the command prompt:

Ubuntu 中的 command-not-found 包提供了一些灵活的功能,如果您键入一个无法解析为可执行文件(或 bash 函数或其他)的命令,它将查询您的 apt 源并找到一个包含您的二进制文件的包试图执行。所以,在这种情况下,我ab在命令提示符下输入:


% ab
The program 'ab' is currently not installed.  You can install it by typing:
sudo apt-get install apache2-utils
bash: ab: command not found

回答by 0x89

Another way to search for missing files, e.g. if you use zsh, want to disable command-not-found (slows things down when you misstype commandnames), or are looking for a file that is not an executable:

搜索丢失文件的另一种方法,例如,如果您使用 zsh,想要禁用 command-not-found(当您输入命令名时会减慢速度),或者正在寻找不是可执行文件的文件:

$ sudo aptitude install apt-file
$ sudo apt-file update
$ apt-file search bin/ab