ディスクスペース使用量の計算について
Plesk ユーザが契約を作成すると、Plesk はこのエンティティのディスクスペース使用量の計算を開始します。消費されるディスクスペースは、以下のタイプに分類されます。
- (常に含まれる)ウェブサイト、FTP、ウェブユーザのコンテンツ(ログファイルと統計レポートを含む)
- データベース
- リモートデータベース
- メールボックス
- Java アプリケーション
- メーリングリスト
- 契約のバックアップファイル
- サーバレベルバックアップの一部である契約バックアップ
このセクションでは、Linux 版と Windows 版の Plesk でこうした各カテゴリのディスクスペース使用量がどのように計算されるかについて説明します。ディスクスペースの計算にオプションを適用するか、除外するには、[ツールと設定] > [サーバ設定]ページで設定できます。
ディスクスペース使用量の合計は、[ツールと設定] > [概要レポート]で確認できます。概要レポートには、すべての契約によるディスクスペース使用量の合計が表示されます。
契約ごとのディスクスペース使用量を参照するには、[契約]に移動し、契約名をクリックして、クラシックリストビューモードに切り替えます( アイコンをクリックし、[クラシックリスト]を選択します)。メインドメインと追加ドメインおよびサブドメインのディスクスペース使用量が [ディスク使用量] 列に表示されます。
サブドメインおよび追加ドメインのコンテンツが占有するディスクスペースが、メインドメインに対して計算されるディスクスペース使用量の値に加算されます。
サブドメインおよび追加ドメインに対して計算されるディスクスペース使用量は少ない場合が多く、ドメインの構成やログなどのシステムファイルのみが含まれています。
変数
このセクションでは、説明をわかりやすくするために、次の変数を使用します。
-
HTTPD_VHOSTS_D
is the absolute path to the directory with virtual hosts. -
CATALINA_HOME
is the absolute path to the Tomcat installation directory. -
PRODUCT_ROOT_D
is the absolute path to the Plesk installation directory. -
PLESK_MAILNAMES_D
is the absolute path to the directory with mailboxes. -
PGSQL_DATA_D
andMYSQL_VAR_D
are the absolute paths to the directories with MySQL and PostgreSQL databases correspondingly.
変数の値は OS に応じて異なります。Linux では /etc/psa/psa.conf
で値を参照できます。
ウェブサイト、コンテンツ、匿名 FTP コンテンツ、ウェブユーザのコンテンツ
このカテゴリのコンテンツは、ディスクスペース使用量の計算に常に含められます。
On Windows, the size of website content is the total size of the
%plesk_vhosts%\<domain_name>
directory excluding these
directories:
%plesk_vhosts%\<domain_name>\anon_ftp
%plesk_vhosts%\<domain_name>\<subdomain_name>\anon_ftp
%plesk_vhosts%\<domain_name>\<addon_domain_name>\anon_ftp
%plesk_vhosts%\<domain_name>\web_users
%plesk_vhosts%\<domain_name>\<subdomain_name>\web_users
%plesk_vhosts%\<domain_name>\<addon_domain_name>\web_users
Linux では、ウェブサイトコンテンツのサイズは以下のディレクトリの合計サイズとなります。
HTTPD_VHOSTS_D/<domain_name>/cgi-bin
HTTPD_VHOSTS_D/<domain_name>/error_docs
HTTPD_VHOSTS_D/<domain_name>/httpdocs
HTTPD_VHOSTS_D/<domain_name>/<subdomain_name>
HTTPD_VHOSTS_D/<domain_name>/<addon_domain_name>
HTTPD_VHOSTS_D/system/<domain_name>/pd
Windows では、匿名 FTP コンテンツのサイズは以下のディレクトリの合計サイズとなります。
%plesk_vhosts%\<domain_name>\anon_ftp
%plesk_vhosts%\<domain_name>\<subdomain_name>\anon_ftp
%plesk_vhosts%\<domain_name>\<addon_domain_name>\anon_ftp
Linux では、匿名 FTP コンテンツのサイズは以下のディレクトリの合計サイズとなります。
HTTPD_VHOSTS_D/<domain_name>/anon_ftp
Windows では、ウェブユーザのコンテンツのサイズは以下のディレクトリの合計サイズとなります。
%plesk_vhosts%\<domain_name>\web_users
%plesk_vhosts%\<domain_name>\<subdomain_name>\web_users
%plesk_vhosts%\<domain_name>\<addon_domain_name>\web_users
Linux では、ウェブユーザのコンテンツのサイズは以下のディレクトリの合計サイズとなります。
HTTPD_VHOSTS_D/<domain_name>/web_users
注釈: If the directories mentioned above contain hard links, Plesk includes the size of each link in calculation only once, disregarding the number of the link instances.
We will refer to the total of website, FTP, and web users' content as
WEB_CONTENT
in the formula for calculation the total disk space usage.
ログファイルおよび統計レポート
Windows では、統計レポートのサイズは以下のディレクトリの合計サイズとなります。
%plesk_vhosts%\<domain_name>\.plesk\statistics
%plesk_vhosts%\<domain_name>\<subdomain_name>\.plesk\statistics
%plesk_vhosts%\<domain_name>\<addon_domain_name>\.plesk\statistics
Windows では、ログのサイズは以下のディレクトリの合計サイズとなります。
%plesk_vhosts%\<subscription_name>\logs
Linux では、ログとレポートのサイズは以下のディレクトリの合計サイズとなります。
HTTPD_VHOSTS_D/system/<domain_name>/statistics
We will refer to the total logs and reports size as LOG_AND_STAT
in
the formula for calculation the total disk space usage.
データベース
データベースのサイズは、ウェブサイトごとに計算した後で、合計サイズに集計されます。
On Windows, the size of MySQL databases is the sum of data length and
index length in the following query: SHOW TABLE STATUS FROM <db_name>
.
To get the size of MS SQL databases, the system runs the query exec
sp_databases
for each database under a particular website. The results
are summed and multiplied by 1024.
On Linux, the size of PostgreSQL databases is the total size of
directories PGSQL_DATA_D/base/<db_oid>
. Here db_oid
stands for
OID of a database under a certain website.
On Linux, the size of MySQL databases is the size of the directory
MYSQL_VAR_D/<db_name>
. Here db_name
stands for a database name
under a certain website.
We will refer to the total databases size as DATABASES
in the formula
for calculation the total disk space usage.
リモートデータベース
リモートホストのデータベースをディスクスペース使用量の計算に含めることができます。Linux では、リモート MySQL データベースのみを含めることができます([リモート MySQL データベース]オプション)。Windows では、あらゆる種類のリモートデータベースを計算に含めることができます([リモートデータベース]オプション)。
メールボックス
ウェブサイトごとのメールボックスサイズは、各メールボックス用のディレクトリの合計サイズです。メールボックスへのパスは、メッセージ転送エージェント(MailEnable など)に応じて異なります。
- (Windows, MailEnable)
<mailbox_dir>\<domain_name>\MAILROOT\<mailbox_name>
. Themailbox_dir
is stored in the Windows registryHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mail Enable\Mail Enable\Connectors\SF
. - (Windows, SmarterMail)
<mailbox_dir>\Users\<mailbox_name>
. Themailbox_dir
is obtained by calling theGetDomainSettings
method of thesvcDomainAdmin
web service. - (Linux)
PLESK_MAILNAMES_D/<domain_name>
.
We will refer to the total mailboxes size as MAILBOXES
in the formula
for calculating the total disk space usage.
Java アプリケーション
On Windows, the total size of Java applications is the size of the
directory CATALINA_HOME\psa-wars\<domain_name>
. Here
CATALINA_HOME
is the value of the InstallPath
parameter in the
Windows registry, in HKLM\SOFTWARE\Apache Software Foundation\Tomcat\<Tomcat_version>
.
On Linux, the directory with Java content is
CATALINA_HOME/psa-wars/<domain_name>
.
We will refer to this total as JAVA_APPS
in the formula for
calculation the total disk space usage.
バックアップファイル
Linux では、バックアップのサイズは以下のユーティリティ呼び出しによって取得されます。
PRODUCT_ROOT_D/admin/bin/pmm-ras --get-domain-dumps-disc-usage --domain-guid <domain_guid> \
--session-path PRODUCT_ROOT_D /PMM/logs
If the administrator specifies to exclude website backups nested in
server-level backups from user quota, the utility is run with an extra
option, --skip-server-dumps
.
On Windows, the size of backups is cached and is the sum of numbers that
follow size_
in file names size_xxxxxx
. These size_
files are stored in
%plesk_dir%\Backup\<backups_dir>\<domain_name>\.discovered\*\
.
The backups_dir
is:
/domains
- バックアップが管理者に所有されている場合。
/resellers/<reseller_username>/domains
– if a website is
owned by a reseller.
/resellers/<reseller_username>/clients/<customer_username>/domains
– if a website is owned by a customer of some reseller.
/clients/<customer_username>/domains
– if a website is
owned by a customer directly under the administrator.
If the file
%plesk_dir%\Backup\dumps_dir\<domain_name>\.discovered\*\ownertype_server
exists then the size of website backups nested in server-level backups
is not added to the disk space usage.
We will refer to the backups size as BACKUPS
in the formula for
calculation the total disk space usage.
ディスクスペースの合計使用量を計算する
ディスクスペースの合計使用量の計算式は、次のようになります。
TOTAL = WEB_CONTENT
+ LOG_AND_STAT
(if the log files and statistic reports option is
selected in Tools & Settings > Server Settings)
+ DATABASES
(depends on the databases option on Linux and MySQL
databases and Microsoft SQL databases)
+ MAILBOXES
(if the mailboxes option is selected)
+ JAVA_APPS
(if the Java applications option is selected)
+ BACKUPS
(if the domain backup files option is selected; the
value depends on backup files created by the administrator)
Here placeholders (for example, WEB_CONTENT
) stand for the totals of
respective categories.