Skip to content

Commit e63a57a

Browse files
committed
tools: add gromox-mbsize
1 parent 285d0e3 commit e63a57a

File tree

5 files changed

+412
-1
lines changed

5 files changed

+412
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Makefile.in
4646
/gromox-mailq
4747
/gromox-mbck
4848
/gromox-mbop
49+
/gromox-mbsize
4950
/gromox-mkmidb
5051
/gromox-mkprivate
5152
/gromox-mkpublic

Makefile.am

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ svc_plugins = \
5454
libgxs_midb_agent.la \
5555
libgxs_timer_agent.la \
5656
libgxs_mysql_adaptor.la libgxs_ruleproc.la
57-
sbin_PROGRAMS = gromox-abktconv gromox-compress gromox-dbop gromox-dscli gromox-e2ghelper gromox-eml2mbox gromox-eml2mt gromox-exm2eml gromox-mailq gromox-mbck gromox-mbop gromox-mkmidb gromox-mkprivate gromox-mkpublic gromox-kdb2mt gromox-mt2exm
57+
sbin_PROGRAMS = gromox-abktconv gromox-compress gromox-dbop gromox-dscli gromox-e2ghelper gromox-eml2mbox gromox-eml2mt gromox-exm2eml gromox-mailq gromox-mbck gromox-mbop gromox-mbsize gromox-mkmidb gromox-mkprivate gromox-mkpublic gromox-kdb2mt gromox-mt2exm
5858
if HAVE_ESEDB
5959
sbin_PROGRAMS += gromox-edb2mt
6060
endif
@@ -218,6 +218,8 @@ gromox_mbck_SOURCES = tools/mbck.cpp
218218
gromox_mbck_LDADD = ${libHX_LIBS} ${fmt_LIBS} ${sqlite_LIBS} libgromox_common.la
219219
gromox_mbop_SOURCES = tools/genimport.cpp tools/genimport.hpp tools/mbop_main.cpp
220220
gromox_mbop_LDADD = ${libHX_LIBS} ${mysql_LIBS} libgromox_common.la libgromox_exrpc.la libgromox_mapi.la libgxs_mysql_adaptor.la
221+
gromox_mbsize_SOURCES = tools/mbsize.cpp
222+
gromox_mbsize_LDADD = ${sqlite_LIBS} libgromox_common.la
221223
gromox_mkmidb_SOURCES = tools/mkmidb.cpp tools/mkshared.cpp tools/mkshared.hpp
222224
gromox_mkmidb_LDADD = ${fmt_LIBS} ${libHX_LIBS} ${mysql_LIBS} ${libssl_LIBS} ${sqlite_LIBS} libgromox_common.la libgromox_dbop.la libgromox_mapi.la
223225
gromox_mkprivate_SOURCES = tools/mkprivate.cpp tools/mkshared.cpp tools/mkshared.hpp
@@ -315,6 +317,7 @@ dist_man_MANS = \
315317
doc/gromox-eml2mbox.8 doc/gromox-eml2mt.8 doc/gromox-exm2eml.8 \
316318
doc/gromox-exm2ical.8 doc/gromox-exm2mt.8 doc/gromox-exm2vcf.8 \
317319
doc/gromox-kdb2mt.8 doc/gromox-mailq.8 doc/gromox-mbop.8 \
320+
doc/gromox-mbsize.8 \
318321
doc/gromox-mkmidb.8 doc/gromox-mkprivate.8 doc/gromox-mkpublic.8 \
319322
doc/gromox-mt2exm.8 doc/gromox-selinux.5 \
320323
doc/gromox-snapshot.8 doc/http.8gx \

doc/gromox-mbsize.8

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
.\" SPDX-License-Identifier: CC-BY-SA-4.0 or-later
2+
.\" SPDX-FileCopyrightText: 2024 grommunio GmbH
3+
.TH gromox\-mbsize 8 "" "Gromox" "Gromox admin reference"
4+
.SH Name
5+
gromox\-mbsize \(em Mailbox size analysis
6+
.SH Synopsis
7+
\fBgromox\-mbsize\fP \fIdirectory\fP
8+
.SH Description
9+
Shows a detailed view of how a mailbox size translates to on-disk usage.
10+
Explanation of the columns/rows follows.
11+
.PP
12+
Apparent size: This is the exact size of the object, or simply the sum
13+
of sizes of objects.
14+
.PP
15+
On FS: This is the space that is used on the filesystem, and is subject
16+
to fs block sizes. Details about this behavior may be found on
17+
<https://en.wikipedia.org/wiki/Block_(data_storage)>. As a result,
18+
the on-disk size may be larger than the apparent size.
19+
.PP
20+
RFC5322/Mbox: For the sake of IMAP, RFC5322 copies of messages and some
21+
metadata is retained.
22+
.PP
23+
RFC5322 Received: Applies to messages received via delivery(8gx).
24+
.PP
25+
RFC5322 Sent: Applies to any other message.
26+
.PP
27+
Body analysis: A set of 4 MAPI properties that usually get stored as files on
28+
disk rather than inside the sqlite database: PR_BODY, PR_HTML,
29+
PR_RTF_COMPRESSED and PR_INTERNET_TRANSPORT_HEADERS. In gromox\-mbsize, these
30+
are considered "body".
31+
.PP
32+
Attachment analysis: What it says. Not all MIME parts are or stay an
33+
attachment; for example, calendar items/meeting requests are usually converted
34+
to MAPI objects.
35+
.PP
36+
Missing items/Apparent: The number of MAPI properties/attachments which have a
37+
dangling reference into the filesystem.
38+
.PP
39+
Missing items/FS: The on-disk number of files that seem to be absent. This
40+
number can be lower than Apparent due to internal data deduplication that is
41+
transparent to MAPI/exmdb clients.
42+
.PP
43+
Informational content: The logical amount of data that is represented by those
44+
four MAPI properties / by MAPI attachments.
45+
.PP
46+
After deduplication: The logical amount of unique bodies/attachments.
47+
.PP
48+
Dedup ratio/gains: For the "body" group, there are usually little gains to be
49+
observed in practice; bodies are just very unique. Messages like "test" are
50+
ironically the ones that benefit. Attachments dedup a little better, owing to
51+
many people sending/receiving redundant information, such as company logos.
52+
.PP
53+
After compression: Besides deduplication, Gromox can also compress before data
54+
goes to disk. This is also the final form and so there is an apparent and an
55+
on-disk value. The on-disk value may be higher due to aforementioned filesystem
56+
block sizing.
57+
.PP
58+
File compress ratio/gains: The earnings going from Dedup to Compressed.
59+
.PP
60+
IFC compress ratio/gains: The earnings going from Informational Content to
61+
Compressed.
62+
.PP
63+
MAPI reported sizes: The PR_MESSAGE_SIZE property of a store, folder, message,
64+
and the PR_ATTACH_SIZE property of an attachment, all give a close
65+
approximation to the amount of data needed to transfer the object(s) over a
66+
MAPI connection.
67+
.PP
68+
NTS deviation: how much the Network Transfer Size is off from the on-disk size.
69+
.PP
70+
Provisioning factor: The ratio between on-disk usage and the logical mailbox
71+
size reported inside MUAs.
72+
.SH See also
73+
\fBgromox\fP(7)

doc/gromox.7

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ gromox\-mbck(8) \(em Mailbox check and repair utility
107107
.IP \(bu 4
108108
gromox\-mbop(8) \(em Mailbox operations utility
109109
.IP \(bu 4
110+
gromox\-mbsize(8) \(em Mailbox size analysis
111+
.IP \(bu 4
110112
gromox\-mkmidb(8) \(em Tool for creating a blank message index database
111113
.IP \(bu 4
112114
gromox\-mkprivate(8) \(em Tool for creating a blank private store

0 commit comments

Comments
 (0)