Editing Proc/user beancounters
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: | ||
{{UBC toc}} | {{UBC toc}} | ||
− | {{DISPLAYTITLE: | + | {{DISPLAYTITLE:proc/user_beancounters}} |
The proc filesystem entry showing resource control information is <code>/proc/user_beancounters</code> file. An example content of <code>/proc/user_beancounters</code> is shown below. | The proc filesystem entry showing resource control information is <code>/proc/user_beancounters</code> file. An example content of <code>/proc/user_beancounters</code> is shown below. | ||
Line 38: | Line 38: | ||
== Fields == | == Fields == | ||
− | The field '''<code>uid</code>''' is a numeric identifier of the | + | The field '''<code>uid</code>''' is a numeric identifier of the Virtual Environment<ref>The name “uid” is related to the fact that OpenVZ Resource Management can be used without virtualization and Virtual Environments.</ref>. |
− | For accountable parameters, the field '''<code>held</code>''' shows the current counter for the | + | For accountable parameters, the field '''<code>held</code>''' shows the current counter for the Virtual Environment (resource “usage”), and the field '''<code>maxheld</code>''' shows the counter's maximum for the last accounting period. The accounting period is usually the lifetime of the Virtual Environment<ref>The lifetime of a Virtual Environment is the period from the start of the VE till the time all processes in the VE exited and all resources used by these processes are freed. Usually, the lifetime is just the time between the start and the stop of the Virtual Environment.</ref>. |
The field '''<code>failcnt</code>''' shows the number of refused “resource allocations” for the whole lifetime of the process group. | The field '''<code>failcnt</code>''' shows the number of refused “resource allocations” for the whole lifetime of the process group. | ||
Line 51: | Line 51: | ||
the <code>limit</code> for the parameter. | the <code>limit</code> for the parameter. | ||
− | == Units == | + | == Units of measurement == |
− | + | As also discussed in [[UBC parameter units]], all values related to parameters with | |
+ | names starting with <code>num</code> are measured in pieces. Values related to parameters | ||
+ | with names ending with pages are measured in memory pages (memory page is 4 kilobytes on | ||
+ | x86 and x86_64 hardware, others may differ). Values related to other parameters are measured in bytes. | ||
== Settings == | == Settings == | ||
Line 58: | Line 61: | ||
General notes about parameters and their barrier and limit settings | General notes about parameters and their barrier and limit settings | ||
are provided in [[UBC parameters]]. Parameters not having limit setting have | are provided in [[UBC parameters]]. Parameters not having limit setting have | ||
− | [[ | + | [[MAX_ULONG]] in the corresponding field. |
== Reading == | == Reading == | ||
− | + | If you want to print UBC values for a specific VE, the following construct can be helpful | |
− | + | <nowiki>egrep -A23 '^[[:space:]]+${CTID}:' /proc/user_beancounters</nowiki> | |
− | + | Here <code>${CTID}</code> is the ID of the VE you are interested in. | |
− | + | In case you want to print UBC values for a few VEs at once, set CTID to something like <code>(101|102|103)</code>. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | In case you want to print UBC values for a few | ||
== Notes == | == Notes == | ||
<references/> | <references/> |