Check Content ConsistencyPermanent link for this heading

The availability and consistency of files in CAS areas can be checked by using the checkcas utility on the file server. For every entry in the CAS area, the content address is read and validated. Information about the results is stored as a structured report in the root of the CAS area.

On the file server the checkcas utility can be executed as follows.

Example

[root@example 1.506]# checkcas -root MMCSVC1/
Fabasoft CheckCAS Version 21.9.0.9
Copyright (c) Fabasoft R&D GmbH, A-4020 Linz, 1988-2021.
CheckCAS:
Start at            : 2021-10-21T11:14:11
Directory           : MMCSVC1/
Report              : /var/opt/fabasoft/lib/mmc/1.506/MMCSVC1/logchecks/2021/10-21/check-2021-10-21T11-14-11.json
SKIP: directory /var/opt/fabasoft/lib/mmc/1.506/MMCSVC1/logscans
SKIP: directory /var/opt/fabasoft/lib/mmc/1.506/MMCSVC1/temp
SKIP: directory /var/opt/fabasoft/lib/mmc/1.506/MMCSVC1/logchecks
SKIP: directory /var/opt/fabasoft/lib/mmc/1.506/MMCSVC1/logs
FAIL: 79adac8c671790504a142ab2392cf927
[/var/opt/fabasoft/lib/mmc/1.506/MMCSVC1/31/f9/c5/31f9c5546c00cfd90b310f197bb53e53_5675.cas]
Summary:
Directory           : MMCSVC1/
Directories scanned : 59923
Directories ignored : 4
Files scanned       : 33471
Files ignored       : 0
Files hashed        : 33471
Files failed        : 1
Thread E/D          : 0/10
Start at            : 2021-10-21T11:14:11
Stop at             : 2021-10-21T11:14:14
Runtime             : 00:00:04 seconds.
Report written      : /var/opt/fabasoft/lib/mmc/1.506/MMCSVC1/logchecks/2021/10-21/check-2021-10-21T11-14-11.json, 451 bytes
Report updated      : /var/opt/fabasoft/lib/mmc/1.506/MMCSVC1/logchecks/latest.json
Check completed with errors, found 1 invalid files.

The latest log file is saved in the logchecks folder.

Example

/var/opt/fabasoft/lib/mmc/1.506/MMCSVC1/logchecks/latest.json

{
   "checkpath":"MMCSVC1/",

   "checkfile":"/var/opt/fabasoft/lib/mmc/1.1250/MMCSVC1/logchecks/2021/10-22/check-2021-10-22T06-37-58.json",

   "checkstartat":"2021-10-22T06:37:58",

   "checkendat":"2021-10-22T06:38:03",

   "success":false,

   "checkeddirectoriescnt":29129,

   "ignoreddirectoriescnt":3,

   "checkeddocumentscnt":15218,

   "faileddocumentscnt":1,

   "ignoreddocumentscnt":0,

   "faileddocumenthashes":[

      {

         "hash":"d555ddb08e463407614524896034bc1c_6d69",

         "detail":"Invalid hash."

      }

   ]

}

Failed files are listed in faileddocumenthashes whereby hash indicates the failed file name (without extension) and detail contains the corresponding information.

As administrator it is possible to generate a report based on this log file by executing the COOSYSTEM@1.1:CheckContentConsistency action.

Example

q="SELECT * FROM ContentObject WHERE true";
r=FSCCHECK@1.1001:GroupContentCheckLog.ObjectCreate();
r.objname = "CheckContentConsistency - Demo";
coort.GetCurrentDomain().CheckContentConsistency(q,r,true);
cootx.Commit();

The generated report object can be found and evaluated in Fabasoft Folio.