698
edits
Changes
Created page with "'''vzstats''' это инструмент для сбора статистики об использовании OpenVZ. Эта статья попробует объясни..."
{{DISPLAYTITLE:vzstats}}
'''vzstats''' это инструмент для сбора статистики об использовании OpenVZ. Эта статья попробует объяснить для чего он нужен в форме вопросов и ответов.
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 ==
=== What is the purpose of vzstats? ===
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? ===
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? ===
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.
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 ==
=== How the client works? ===
When vzstats is executed, it does the following:
# checks if UUID is obtained; asks the server for one if it's not;
# runs scripts from <code>/usr/libexec/vzstats</code> directory;
# collects their output into separate text files, one per script;
# creates a tarball with all these text files
# sends this tarball together with UUID to the stats server, stats.openvz.org
=== Where can I see client source code? ===
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? ===
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>
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? ===
For details, check the scripts in <code>/usr/libexec/vzstats</code> directory.
=== Download ===
For latest and previous versions of vzstats see [[Download/vzstats]].
=== Source code ===
https://src.openvz.org/projects/OVZL/repos/vzstats/browse
=== When it is run? ===
vzstats run in the following cases
* Upon installation, if OpenVZ is already installed on the system
<!-- NOT IMPLEMENTED YET * During system boot, if OpenVZ is started (from vz initscript) -->
* 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 (<code>/usr/sbin/vzstats</code> as root) if you like to update your stats on server.
=== How to opt-out ===
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 ==
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 ==
* http://stats.openvz.org
* [[Man/vzstats.8|vzstats(8)]]
[[Category: Sub-projects]]
'''vzstats''' это инструмент для сбора статистики об использовании OpenVZ. Эта статья попробует объяснить для чего он нужен в форме вопросов и ответов.
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 ==
=== What is the purpose of vzstats? ===
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? ===
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? ===
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.
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 ==
=== How the client works? ===
When vzstats is executed, it does the following:
# checks if UUID is obtained; asks the server for one if it's not;
# runs scripts from <code>/usr/libexec/vzstats</code> directory;
# collects their output into separate text files, one per script;
# creates a tarball with all these text files
# sends this tarball together with UUID to the stats server, stats.openvz.org
=== Where can I see client source code? ===
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? ===
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>
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? ===
For details, check the scripts in <code>/usr/libexec/vzstats</code> directory.
=== Download ===
For latest and previous versions of vzstats see [[Download/vzstats]].
=== Source code ===
https://src.openvz.org/projects/OVZL/repos/vzstats/browse
=== When it is run? ===
vzstats run in the following cases
* Upon installation, if OpenVZ is already installed on the system
<!-- NOT IMPLEMENTED YET * During system boot, if OpenVZ is started (from vz initscript) -->
* 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 (<code>/usr/sbin/vzstats</code> as root) if you like to update your stats on server.
=== How to opt-out ===
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 ==
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 ==
* http://stats.openvz.org
* [[Man/vzstats.8|vzstats(8)]]
[[Category: Sub-projects]]