Knowledgebase: Server Administration
Health Check
Posted by Mont Rothstein on 12 November 2015 04:34 PM

Introduction

The Health Check command line utility should be installed on the repository server (for performance reasons) and finds the database and repository using the same Foray.Adams.config.xml the same as other Adams applications.  

Run the application from a CMD or PowerShell prompt:

PS C:\Program Files (x86)\Foray\Health Check> .\HealthCheck.exe

To re-direct output to a file use standard file redirection.  Output will be sent to both the console and the file.

PS C:\Program Files (x86)\Foray\Health Check> .\HealthCheck.exe 2> C:\Temp\healthCheck.log

The "2" before the ">" is optional.  It maintains the color in the console.

HealthCheck.exe is linked to the versions of the Adams database and repository.  Health Check was first introduced in 4.7.6.  It can be run against any 4.7.0 install of Adams or later.  it will not work on any release with a database or repository version earlier than 4.7.0.

When to Run

Run this before any major operation or any time integrity is questioned.  

IMPORTANT If errors occur it is critical to resolve all of them and re-run until you get an All Clear.

  • Before an upgrade
  • Before a migration
  • If integrity is questioned
  • Any time you want, just because

Options

-fast, -f

Disables asset hash verification.

-SkipDatabase, -sdb

Check of the database against the repository (db -> repo) will not be performed.

-SkipRepository, -sr

Check of the repository against the database (repo -> db) will not be performed.

-verbose, -v

Enable verbose logging

Checks Performed

Database -> Repository

Folders

  • Every Folder in the database exists in the repository
  • .XML file exists and can be read
  • .AUDIT.XML file exists and can be read

Assets

  • Every Asset that has not be moved or archived exists in the repository
  • .XML file exists and can be read
  • .AUDIT.XML file exists and can be read
  • .HASH file exists
  • Hash file can be read.
  • Asset matches the Hash (has not been modified) for all assets that have not be moved or archived.
  • .THM (thumbnail) file exists
  • No duplicate asset numbers (i.e. same asset number assigned to more than one asset in a case)
  • All assets have an asset number > 0
  • If an asset references a directory asset, then the reference directory asset exists in the database
  • The asset JSON file for a directory asset is well-formed
  • If a directory asset's state is "acquiring", then not all assets for that directory are in the database
  • If a directory asset's state is "acquired", then all assets for that directory asset are in the database

Property Groups

  • .XML file exists and can be read
  • .AUDIT.XML file exists and can be read

Property Items

  • .XML file exists and can be read
  • .AUDIT.XML file exists and can be read

Requests

  • .XML file exists and can be read
  • .AUDIT.XML file exists and can be read

Repository -> Database

Folder Directories

  • Each directory has a .XML file the name of the directory ex: CTEST\CTEST.XML
  • .XML file can be read
  • .XML file contains a Folder Prefix
  • .XML file contains a Type
  • A database entry exists corresponding to the directory

Asset Set Directories

  • For sub-directories of a Folder directory starting with "Set" a database entry exists corresponding to the directory. NOTE: This is only reported if asset files are found for that Set.

Asset Original and Working Directories

  • Checks "OriginalAssets" sub-directory of Asset Set directory if it exists
  • Checks "WorkingAssets" sub-directory of Asset Set directory if if exists
  • For each sub-directory (original or working) finds asset XML files
  • A database entry exists corresponding to the asset file name

Property Group Directories

  • Finds sub-directories of a Folder directory not starting with "Set" and not named "Requests"
  • Each directory has a .XML file the name of the directory ex: PG-0001\PG-0001.XML
  • A database entry exists corresponding to the directory name/property group unique ID

Property Items Directory

  • Checks "Items" sub-directory of the Property Group directory if it exists
  • Finds Property Item XML files
  • A database entry exists corresponding to the file name/property item unique ID

Requests Directory

  • Checks the "Requests" sub-directory of the Folder directory if it exists
  • Finds Request XML files
  • A database entry exists corresponding to the file name/Request Number

 


Comments (0)