Difference between revisions of "Vzstats/en"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(Created page with "=== Исходный код ===")
 
(51 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:vzstats}}
 
{{DISPLAYTITLE:vzstats}}
  
'''vzstats''' это инструмент для сбора статистики об использовании OpenVZ. Эта статья попробует объяснить для чего он нужен в форме вопросов и ответов.
+
'''vzstats''' is a tool to gather OpenVZ usage statistics. This page tries to explain it, mostly in form of questions and answers.
  
vzstat состоит из клиента и сервера. Клиент(пакет vzstats) устанавливается на OpenVZ сервер(аппаратную ноду), так-что у него множество клиентов. И только один сервер, который размещен на stats.openvz.org.
+
vzstats consists of a client and a server. A client (vzstats package) is installed on an OpenVZ server (hardware node), so there are many clients. There is only one server, it is deployed at stats.openvz.org.
  
== Общее ==
+
== General ==
  
=== Какова задача vzstats? ===
+
=== What is the purpose of vzstats? ===
  
Мы, OpenVZ разработчики, любопытны. Мы хотим знать больше о наших пользователях. Мы хотим получать определенную статистику использования OpenVZ.
+
We, OpenVZ developers, are curious. We want to know more about our users. We want some stats.
  
Мы хотим знать сколько OpenVZ серверов существует в мире.
+
We would like to know how many OpenVZ servers are there in the wild. Since OpenVZ is free software available from many places, there is no easy way to find out.
Это не простая задача, так-как OpenVZ это открыте програмное обеспечение и оно может быть получено из множества мест.
 
  
Мы хотим знать какие OpenVZ ядра используют наши пользователи, какая среди них доля RHEL5 и RHEL6 ядер.
+
We want to know which OpenVZ kernels are our users run, say what is the proportion of RHEL5 to RHEL6 kernel user base.
  
Мы хотим видеть как много людей используют новые технологии, такие как  [[ploop]] и [[vswap]].
+
We would like to see how many people use new technologies such as [[ploop]] and [[vswap]].
  
И было бы хорошо знать под какое количество ядер CPU или количество контейнеров, или Гигабайт места на диске мы должны оптимизировать работу OpenVZ.
+
It would be good to know for how many CPU cores, or number of containers, or gigabytes of disk space, should we optimize.
  
И мы предоставляем эту информацию Вам, в итоге.
+
Finally, we share all that information back to you.
  
=== Для чего я должен учавствовать? ===
+
=== Why do I need to participate? ===
  
Может быть потому, что Вы хотите помочь OpenVZ. Потому, что делаться это хорошо. Или Вы просто хороший человек.
+
Maybe because you want to help OpenVZ out just a bit. Because sharing is good. Or perhaps you are just a good person.
  
=== Почему vzstats можно опционально выключить, а не опционально включить? ===
+
=== Why is it opt-out rather than opt-in? ===
  
К сожалению у нас нет хорошей возможности (как в установщике или каком-либо GUI) предложить Вам включить vzstats.
+
We just don't have a good place (such as installer or some GUI) to ask you for opt-in.
  
=== Как на счет безопасности моих личных данных? ===
+
=== What about my privacy? ===
  
Мы посторались сделать клиент очень простым, так что Вы сами можете посмотреть какую информацию и как он собирает.
+
We are trying to keep the client very simple, so you can see for yourself what information is gathered and how it is being sent.
  
Вся информация, которую отправляет клиент, является анонимной. Она не включет Ваши IP адреса, MAC адреса, имя хоста и т.п.
+
All submissions are anonymous and is not including your IPs, MAC addresses, host names etc.
  
Кроме собранной информации сервер знает только UUID клиента и его IP.
+
Except for the information gathered, server knows client's UUID and IP.
  
UUID случаен. Он используется только что бы отделять сообщения клиента от сообщений других клиентов.
+
UUID is random, it's only purpose to track each client as a separate distinct entity.
  
IP адрес клиента естественно известен серверу. Он сохраняется в логах httpd сервера, но не используется при построении статистики.
+
Client IP address is naturally known to the server. It is stored in httpd server logs but is not used for statistics.
  
== Клиент ==
+
== Client ==
  
=== Как работает клиент? ===
+
=== How the client works? ===
  
При запуске vzstats делает следующее:
+
When vzstats is executed, it does the following:
# проверяет выделен ли ему уже UUID; запрашивает выдачу одного у сервера, если не выделан;
+
# checks if UUID is obtained; asks the server for one if it's not;
# запускает скрипты из директории <code>/usr/libexec/vzstats</code>;
+
# runs scripts from <code>/usr/libexec/vzstats</code> directory;
# собирает их вывод в отдельные файлы, по одному файлу на скрипт;
+
# collects their output into separate text files, one per script;
# создает tar архив из всех этих файлов;
+
# creates a tarball with all these text files
# отправляет этот tar архив с UUID на сервер статистики - stats.openvz.org
+
# sends this tarball together with UUID to the stats server, stats.openvz.org
  
=== Где я могу увидеть исходный код клиента? ===
+
=== Where can I see client source code? ===
  
Клиент написан на shell, так что просто проверьте скрипт /usr/sbin/vzstats.
+
Client is written in shell, so just check /usr/sbin/vzstats script.
  
Так же код клиента доступен в git репо - http://git.openvz.org/?p=vzstats;a=summary
+
There is a git repository for client code, see http://git.openvz.org/?p=vzstats;a=summary
  
=== Что такое UUID? ===
+
=== What is UUID? ===
  
Это просто уникальный случайный идентификатор в формате UUID v4 [http://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29]. Пример такого UUID: <code>285ad6e8-fe62-433c-be2a-643e1c54b315</code>
+
It's just a unique random ID, in UUID v4 format [http://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29]. This is an example of UUID: <code>285ad6e8-fe62-433c-be2a-643e1c54b315</code>
  
Когда <code>vzstats</code> запускается в первый раз он проверяет, что у него нет UUID. Запрашивает его у сервера и сохраняет полученный UUID локально.
+
When <code>vzstats</code> is executed for the first time, it checks that there is no UUID, asks the stats server for one and stores it locally.
  
=== Какая информация собирается? ===
+
=== What info is collected? ===
  
Для получения подробностей смотрите скрипты в <code>/usr/libexec/vzstats</code>.
+
For details, check the scripts in <code>/usr/libexec/vzstats</code> directory.
  
=== Скачать ===
+
=== Download ===
  
Последнюю и предыдущие версии vzstats вы можете найти на [[Download/vzstats]].
+
For latest and previous versions of vzstats see [[Download/vzstats]].
  
=== Исходный код ===
+
=== Source code ===
  
 
https://src.openvz.org/projects/OVZL/repos/vzstats/browse
 
https://src.openvz.org/projects/OVZL/repos/vzstats/browse

Latest revision as of 16:54, 4 January 2016


vzstats is a tool to gather OpenVZ usage statistics. This page tries to explain it, mostly in form of questions and answers.

vzstats consists of a client and a server. A client (vzstats package) is installed on an OpenVZ server (hardware node), so there are many clients. There is only one server, it is deployed at stats.openvz.org.

General[edit]

What is the purpose of vzstats?[edit]

We, OpenVZ developers, are curious. We want to know more about our users. We want some stats.

We would like to know how many OpenVZ servers are there in the wild. Since OpenVZ is free software available from many places, there is no easy way to find out.

We want to know which OpenVZ kernels are our users run, say what is the proportion of RHEL5 to RHEL6 kernel user base.

We would like to see how many people use new technologies such as ploop and vswap.

It would be good to know for how many CPU cores, or number of containers, or gigabytes of disk space, should we optimize.

Finally, we share all that information back to you.

Why do I need to participate?[edit]

Maybe because you want to help OpenVZ out just a bit. Because sharing is good. Or perhaps you are just a good person.

Why is it opt-out rather than opt-in?[edit]

We just don't have a good place (such as installer or some GUI) to ask you for opt-in.

What about my privacy?[edit]

We are trying to keep the client very simple, so you can see for yourself what information is gathered and how it is being sent.

All submissions are anonymous and is not including your IPs, MAC addresses, host names etc.

Except for the information gathered, server knows client's UUID and IP.

UUID is random, it's only purpose to track each client as a separate distinct entity.

Client IP address is naturally known to the server. It is stored in httpd server logs but is not used for statistics.

Client[edit]

How the client works?[edit]

When vzstats is executed, it does the following:

  1. checks if UUID is obtained; asks the server for one if it's not;
  2. runs scripts from /usr/libexec/vzstats directory;
  3. collects their output into separate text files, one per script;
  4. creates a tarball with all these text files
  5. sends this tarball together with UUID to the stats server, stats.openvz.org

Where can I see client source code?[edit]

Client is written in shell, so just check /usr/sbin/vzstats script.

There is a git repository for client code, see http://git.openvz.org/?p=vzstats;a=summary

What is UUID?[edit]

It's just a unique random ID, in UUID v4 format [1]. This is an example of UUID: 285ad6e8-fe62-433c-be2a-643e1c54b315

When vzstats is executed for the first time, it checks that there is no UUID, asks the stats server for one and stores it locally.

What info is collected?[edit]

For details, check the scripts in /usr/libexec/vzstats directory.

Download[edit]

For latest and previous versions of vzstats see Download/vzstats.

Source code[edit]

https://src.openvz.org/projects/OVZL/repos/vzstats/browse

When it is run?[edit]

vzstats run in the following cases

  • Upon installation, if OpenVZ is already installed on the system
  • When any of OpenVZ packages are updated (vzctl, vzquota, ploop, kernel)
  • Periodically, once a month, from cron, if crond is running.

You can also run it manually (/usr/sbin/vzstats as root) if you like to update your stats on server.

How to opt-out[edit]

You can completely disable vzstats client on a machine by executing the following command:

touch /etc/vz/vzstats-disable

If you want to re-enable vzstats, just do

rm -f /etc/vz/vzstats-disable

Server[edit]

Server consists of the following components:

  • database (MySQL)
  • trivial UUID generation script
  • submission receiver script, which just stores the received file
  • submission processing scripts, populating the database
  • web interface (http://stats.openvz.org/), showing statistics from the database

See also[edit]