Editing Vzstats

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
{{DISPLAYTITLE:vzstats}}
 
{{DISPLAYTITLE:vzstats}}
<languages />
+
 
<translate>
 
<!--T:1-->
 
 
'''vzstats''' is a tool to gather OpenVZ usage statistics. This page tries to explain it, mostly in form of questions and answers.
 
'''vzstats''' is a tool to gather OpenVZ usage statistics. This page tries to explain it, mostly in form of questions and answers.
  
<!--T:2-->
 
 
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.
 
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 == <!--T:3-->
+
== General ==
  
=== What is the purpose of vzstats? === <!--T:4-->
+
=== What is the purpose of vzstats? ===
  
<!--T:5-->
 
 
We, OpenVZ developers, are curious. We want to know more about our users. We want some stats.
 
We, OpenVZ developers, are curious. We want to know more about our users. We want some stats.
  
<!--T:6-->
 
 
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 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.
  
<!--T:7-->
 
 
We want to know which OpenVZ kernels are our users run, say what is the proportion of RHEL5 to RHEL6 kernel user base.
 
We want to know which OpenVZ kernels are our users run, say what is the proportion of RHEL5 to RHEL6 kernel user base.
  
<!--T:8-->
 
 
We would like to see how many people use new technologies such as [[ploop]] and [[vswap]].
 
We would like to see how many people use new technologies such as [[ploop]] and [[vswap]].
  
<!--T:9-->
 
 
It would be good to know for how many CPU cores, or number of containers, or gigabytes of disk space, should we optimize.
 
It would be good to know for how many CPU cores, or number of containers, or gigabytes of disk space, should we optimize.
  
<!--T:10-->
 
 
Finally, we share all that information back to you.
 
Finally, we share all that information back to you.
  
=== Why do I need to participate? === <!--T:11-->
+
=== Why do I need to participate? ===
  
<!--T:12-->
 
 
Maybe because you want to help OpenVZ out just a bit. Because sharing is good. Or perhaps you are just a good person.
 
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? === <!--T:13-->
+
=== Why is it opt-out rather than opt-in? ===
  
<!--T:14-->
 
 
We just don't have a good place (such as installer or some GUI) to ask you for 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? === <!--T:15-->
+
=== What about my privacy? ===
  
<!--T:16-->
 
 
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.
 
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.
  
<!--T:17-->
 
 
All submissions are anonymous and is not including your IPs, MAC addresses, host names etc.
 
All submissions are anonymous and is not including your IPs, MAC addresses, host names etc.
  
<!--T:18-->
 
 
Except for the information gathered, server knows client's UUID and IP.
 
Except for the information gathered, server knows client's UUID and IP.
  
<!--T:19-->
 
 
UUID is random, it's only purpose to track each client as a separate distinct entity.
 
UUID is random, it's only purpose to track each client as a separate distinct entity.
  
<!--T:20-->
 
 
Client IP address is naturally known to the server. It is stored in httpd server logs but is not used for statistics.
 
Client IP address is naturally known to the server. It is stored in httpd server logs but is not used for statistics.
  
== Client == <!--T:21-->
+
== Client ==
  
=== How the client works? === <!--T:22-->
+
=== How the client works? ===
  
<!--T:23-->
 
 
When vzstats is executed, it does the following:
 
When vzstats is executed, it does the following:
 
# checks if UUID is obtained; asks the server for one if it's not;
 
# checks if UUID is obtained; asks the server for one if it's not;
Line 69: Line 52:
 
# sends this tarball together with UUID to the stats server, stats.openvz.org
 
# sends this tarball together with UUID to the stats server, stats.openvz.org
  
=== Where can I see client source code? === <!--T:24-->
+
=== Where can I see client source code? ===
  
<!--T:25-->
 
 
Client is written in shell, so just check /usr/sbin/vzstats script.
 
Client is written in shell, so just check /usr/sbin/vzstats script.
  
<!--T:26-->
 
 
There is a git repository for client code, see 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
  
=== What is UUID? === <!--T:27-->
+
=== What is UUID? ===
  
<!--T:28-->
 
 
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>
 
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>
  
<!--T:29-->
 
 
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.
 
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? === <!--T:30-->
+
=== What info is collected? ===
  
<!--T:31-->
 
 
For details, check the scripts in <code>/usr/libexec/vzstats</code> directory.
 
For details, check the scripts in <code>/usr/libexec/vzstats</code> directory.
  
=== Download === <!--T:32-->
+
=== Download ===
  
<!--T:33-->
 
 
For latest and previous versions of vzstats see [[Download/vzstats]].
 
For latest and previous versions of vzstats see [[Download/vzstats]].
  
=== Source code === <!--T:34-->
+
=== Source code ===
  
<!--T:35-->
 
 
https://src.openvz.org/projects/OVZL/repos/vzstats/browse
 
https://src.openvz.org/projects/OVZL/repos/vzstats/browse
  
=== When it is run? === <!--T:36-->
+
=== When it is run? ===
  
<!--T:37-->
 
 
vzstats run in the following cases
 
vzstats run in the following cases
 
* Upon installation, if OpenVZ is already installed on the system
 
* Upon installation, if OpenVZ is already installed on the system
Line 109: Line 84:
 
* Periodically, once a month, from cron, if crond is running.
 
* Periodically, once a month, from cron, if crond is running.
  
<!--T:38-->
 
 
You can also run it manually (<code>/usr/sbin/vzstats</code> as root) if you like to update your stats on server.
 
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 === <!--T:39-->
+
=== How to opt-out ===
  
<!--T:40-->
 
 
You can completely disable vzstats client on a machine by executing the following command:
 
You can completely disable vzstats client on a machine by executing the following command:
  
<!--T:41-->
+
touch /etc/vz/vzstats-disable
<pre><nowiki>mkdir -p /etc/vz
 
touch /etc/vz/vzstats-disable</nowiki></pre>
 
  
<!--T:42-->
 
 
If you want to re-enable vzstats, just do
 
If you want to re-enable vzstats, just do
  
  <!--T:43-->
+
  rm -f /etc/vz/vzstats-disable
rm -f /etc/vz/vzstats-disable
 
  
== Server == <!--T:44-->
+
== Server ==
  
<!--T:45-->
 
 
Server consists of the following components:
 
Server consists of the following components:
 
* database (MySQL)
 
* database (MySQL)
Line 137: Line 105:
 
* web interface (http://stats.openvz.org/), showing statistics from the database
 
* web interface (http://stats.openvz.org/), showing statistics from the database
  
== See also == <!--T:46-->
+
== See also ==
  
<!--T:47-->
 
 
* http://stats.openvz.org
 
* http://stats.openvz.org
 
* [[Man/vzstats.8|vzstats(8)]]
 
* [[Man/vzstats.8|vzstats(8)]]
</translate>
+
 
  
 
[[Category: Sub-projects]]
 
[[Category: Sub-projects]]

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)