官网 http://www.theether.org/pssh/
文档 http://www.theether.org/pssh/docs/0.2.3/pssh-HOWTO.pdf
安装
1 | mkdir -p /data/software/ |
使用
1 | pssh -P -h hosts.txt -o foo hostname |
-P,-v可以把执行的结果直接打印到控制台。
官网 http://www.theether.org/pssh/
文档 http://www.theether.org/pssh/docs/0.2.3/pssh-HOWTO.pdf
1 | mkdir -p /data/software/ |
1 | pssh -P -h hosts.txt -o foo hostname |
-P,-v可以把执行的结果直接打印到控制台。
1.概念
物理CPU:实际Server中插槽上的CPU个数。
物理cpu数量:可以数不重复的 physical id 有几个。
If you want only the remote URL, or referential integrity has been broken:
git config –get remote.origin.url
If you require full output or referential integrity is intact:
git remote show origin
When using git clone (from GitHub, or any source repository for that matter) the default name for the source of the clone is “origin”. Using git remote show will display the information about this remote name. The first few lines should show:1
2
3
4
5
6C:\Users\jaredpar\VsVim> git remote show origin
* remote origin
Fetch URL: git@github.com:jaredpar/VsVim.git
Push URL: git@github.com:jaredpar/VsVim.git
HEAD branch: master
Remote branches:
If you want to use the value in the script, you would use the first command listed in this answer.
From: http://nginx.org/en/docs/http/ngx_http_log_module.html
前两篇介绍Nginx的文章,全是选自Nginx官方文档,因为通俗易懂,比很多中文资料讲的都要透彻,并且很容易上手操作,所以就放了因为原文。读日志模块英文文档的时候,发现有些地方比较吃力,所以就得加入一些中文和图示了。
Introduction
Load balancing across multiple application instances is a commonly used technique for optimizing resource utilization, maximizing throughput, reducing latency, and ensuring fault-tolerant configurations.
It is possible to use nginx as a very efficient HTTP load balancer to distribute traffic to several application servers and to improve performance, scalability and reliability of web applications with nginx.
Load balancing methods
The following load balancing mechanisms (or methods) are supported in nginx:
round-robin — requests to the application servers are distributed in a round-robin fashion,
least-connected — next request is assigned to the server with the least number of active connections,
ip-hash — a hash-function is used to determine what server should be selected for the next request (based on the client’s IP address).
Default load balancing configuration
The simplest configuration for load balancing with nginx may look like the following:
1 | http { |
This guide gives a basic introduction to nginx and describes some simple tasks that can be done with it. It is supposed that nginx is already installed on the reader’s machine. If it is not, see the Installing nginx page. This guide describes how to start and stop nginx, and reload its configuration, explains the structure of the configuration file and describes how to set up nginx to serve out static content, how to configure nginx as a proxy server, and how to connect it with a FastCGI application.
nginx has one master process and several worker processes. The main purpose of the master process is to read and evaluate configuration, and maintain worker processes. Worker processes do actual processing of requests. nginx employs event-based model and OS-dependent mechanisms to efficiently distribute requests among worker processes. The number of worker processes is defined in the configuration file and may be fixed for a given configuration or automatically adjusted to the number of available CPU cores (see worker_processes).
The way nginx and its modules work is determined in the configuration file. By default, the configuration file is named nginx.conf and placed in the directory /usr/local/nginx/conf, /etc/nginx, or /usr/local/etc/nginx.
Starting, Stopping, and Reloading Configuration
To start nginx, run the executable file. Once nginx is started, it can be controlled by invoking the executable with the -s parameter. Use the following syntax:1
nginx -s signal
Where signal may be one of the following: