Database Commands¶
voss cleardown - the command re-initializes the VOSS-4-UC database. It is usually run on a fresh installation and care should be taken with its use, as it deletes all system data.
Note that this step may take some time. You can follow the process by running log follow upgrade_db.log or log follow voss-deviceapi/app.log.
voss db_collection_stats [collection]… - Display detailed statistics of all the VOSS-4-UC databases, or of only a list of collections.
Refer to the example snippets below.
$ voss db_collection_stats
+--------------------+-----+--------+---------+-------------+------+----------+
| Collection | Cnt | % Size | DB Size | AvgObj Size | Idx | Idx Size |
+--------------------+-----+--------+---------+-------------+------+----------+
| VOSS.DATA_ACCESS.. | 8 | 0.0% | 92.88K | 11.61K | 2 | 15.97K |
| VOSS.DATA_APIVER.. | 1 | 0.0% | 496.00b | 496.00b | 2 | 15.97K |
| VOSS.DATA_APPLIC.. | 1 | 0.0% | 1.98K | 1.98K | 2 | 15.97K |
+--------------------+-----+--------+---------+-------------+------+----------+
...
| VOSS.WORKER_QUEUE |9508 | 9.4% | 117.76M | 12.68K | 9 | 4.34M |
+--------------------+-----+--------+---------+-------------+------+----------+
Total Documents: 144624
Total Data Size: 1.22G
Total Index Size: 73.31M
voss db_index_stats - Display detailed statistics of the VOSS-4-UC database indices, including the five largest.
Refer to the example below.
$ voss db_index_stats
Index Overview
+-----------------------+-------------------------------+--------+------------+
| Collection | Index | % Size | Index Size |
+-----------------------+-------------------------------+--------+------------+
| VOSS.DATA_USER | _id_ | 0.1% | 44.00K |
| VOSS.DATA_USER | username_1___hierarchy_1 | 0.1% | 52.00K |
| VOSS.RESOURCE | _id_ | 0.6% | 460.00K |
| VOSS.RESOURCE | _search._i.v_1 | 10.8% | 7.83M |
| VOSS.RESOURCE | lock_1 | 0.3% | 196.00K |
...
| VOSS.WORKER_QUEUE | parent_transaction_id_1_.. | 0.0% | 12.00K |
+-----------------------+-------------------------------+--------+------------+
Top 5 Largest Indexes
+----------------------+--------------------------------+--------+------------+
| Collection | Index | % Size | Index Size |
+----------------------+--------------------------------+--------+------------+
| VOSS.RESOURCE | meta.model_type_1__search._i.. | 16.5% | 11.97M |
| VOSS.TRANSACTION_LOG | _id_ | 10.8% | 7.85M |
| VOSS.RESOURCE | _search._i.v_1 | 10.8% | 7.83M |
| VOSS.TRANSACTION_LOG | _id.t_id_1_time_1 | 8.6% | 6.26M |
| VOSS.TRANSACTION | submitted_time_-1_parent_1_a.. | 6.3% | 4.59M |
+----------------------+--------------------------------+--------+------------+
Total Documents: 743332
Total Data Size: 2.86G
Total Index Size: 72.56M