TICSMaintenance is the TICS maintenance application. It is used for a great variety of maintenance tasks such as new project creation, setting configuration properties, and, database maintenance.

TICSMaintenance runs for the project specified on the command line via the -project option, or for all projects specified in the PROJECTS.txt configuration file in case of -allprojects.


TICSMaintenance [option...] -project project|-allprojects

The following TICSMaintenance options are allowed.

execute the specified maintenance actions for all projects in the SERVER.txt/PROJECTS.txt
-archivefile archivefilename
the 'ARCHIVE'-file used for the archive extraction. (Only used in combination with -listarchiveresult)
-branchdir dir
specify the root directory of the source files for the branch
-branchname branch name
specify the name of the branch to set one of the following properties: -branchdir, -calculate, -rename or -visible
-calc metric
one or more (comma separated) metric type(s)
-calculate [0|1]
specify whether the branch should be analyzed
check the TICS configuration
shrink the database by removing unused meta data from the database (only available for Firebird databases)
create project specified with -project and/or create a branch if -branchname and -branchdir are given
-custom custom module name
executes custom module TICSCustomname.pm in the cfg directory
check project db consistency
-dirlisting inputfile
a file containing a list of directories which should be used to generate the archive expression. (Only used in combination with option -genarchiveexpression)
-err file
write error messages to the specified file
create finalization (viewer) tables for the project specified by -project
-from yyyy-mm-dd[ hh:mm:ss]
date/time in ISO format
generate a 'DIR'-expression for the 'ARCHIVE'-file based on a file containing the directories which TICS has to process. (Specified with -dirlisting)
generate the dbinfo for the project
generate and mail SQA reports for all branches of the project
generate the viewer cache for the project
show this help info
show configuration and project details
list project name and database version
list all directories that will be processed by TICS based on the 'DIR'-expression in the 'ARCHIVE'-file. (Optionally the 'ARCHIVE'-file can be specified with -archivefile)
list the last 20 runs for a branch of a project
-log int
show diagnostic messages upto the specified log level
-logdir dir
use the specified directory for server log files
run TICS with low priority
Merge redundant metric life cycles of failed runs
do not make a backup before maintaining the database (not recommended)
-nocalc metric
one or more (comma separated) metric type(s)
do not check the TICS configuration
do not overwrite the global log file (but append to it instead)
suppress TICS logo output
suppress all warnings
-project name
specify the name of the database to maintain
recalculate the language for all filenames in the database
delete a project or, if -branchname is specified, delete a branch from the database (use with care)
-removebaseline name
removes a baseline from the database
remove gaps from MetricLifeCycle table
remove overlaps from FileLifeCycle and MetricLifeCycle tables
remove a specific run from the database
remove entries from FileName that have no corresponding entry in FileLifeCycle
-rename new project name|branch name
rename a project or, if -branchname is specified, rename a branch to the given name
-renamebranchdirs [+-]subpath
rename branch directories in the database; remove(-) or add(+) the given subpath from/to each branch directory. E.g., -renamebranchdirs +/system/ appends /system/ to all branch directories
-renamefilenames frompath-topath
rename filenames that match the frompath pattern with the topath replacement value in the database. E.g., -renamefilenames "^A/B/C/-A/B/D/" renames all files under directory "A/B/C" to "A/B/D"
-saveqsmail dir
save a QServer status mail for the project in specified directory
send a QServer error mail for the project
send a QServer status mail for the project
-setbaseline name[,delta:(0|1)][,plotline:(0|1)]
set baseline name for a project. Defaults: delta:1,plotline:1
-setfilefilters [filter:value,]+
set (one or more) file filters
-setmetrics [metricname:value,]+
configure (one or more) metrics for a project
-setproppath [proppath=value;]+
set a property in the configuration; proppath is a '/' element separated root path in the configuration and value a valid value (empty to remove an existing property)
dump stack trace in case of errors
synchronize the file server configuration with the webserver
synchronize all active source files between the build server and the webserver
-timestamp yyyy-mm-dd hh:mm:ss
date/time in ISO format
-tmpdir dir
use the specified directory for intermediate files
-to yyyy-mm-dd[ hh:mm:ss]
date/time in ISO format
update SCM IDs in the database for all active files
update SCM IDs in the database for all cloned file instances (for buildability)
show version info and exit
-visible [0|1]
specify whether the branch should be visible in the viewer
show the tiobeweb URL from the configuration

Common Tasks

A number of common tasks is described below. For all tasks mentioned (except the -syncfgfiles example) the -project switch is required.

For most tasks it is possible to limit the action to a single, named branch (useful in case the project has multiple active branches). In the example of -setbaseline, the -branchname is mandatory since baselines are branch-specific.

Create a new project

TICSMaintenance -create -project ABC -branchname master -branchdir c:/archive/ABC/master

Enable metrics

TICSMaintenance -project ABC -setmetrics CODINGSTANDARD:1,COMPILERWARNING:1

Check a project configuration

TICSMaintenance -project ABC -checkconfig

Synchronize the file server configuration with the web server

TICSMaintenance -project ABC -synccfgfiles

Upload source files for annotated source

TICSMaintenance -project ABC -syncsrcfiles

Generate viewer caches

TICSMaintenance -project ABC -genviewercache -branchname master

Send SQA report

TICSMaintenance -project ABC -gensqareports

Send status mail

TICSMaintenance -project ABC -sendqsmail -branchname master

Set a baseline

TICSMaintenance -project ABC -setbaseline MYBASELINE,plotline:1,delta:1 -branchname master -timestamp "2016-06-23 09:09:36"

Disable calculation of a branch

Indicate that TICSQServer should not calculate the given branch. E.g., the branch has become inactive.

TICSMaintenance -project ABC -branchname master -calculate 0

Hide a branch in the viewer

Do not show the given branch in the TICS Dashboard and Explorer.

TICSMaintenance -project ABC -branchname master -visible 0

Remove a branch from the database

Remove all data related to the given branch from the quality database. All related measurements including the complete branch history will be lost! Use with care. Be sure to backup your database first.

TICSMaintenance -project ABC -branchname master -remove

Remove a project from the TICS configuration

Remove a project from the TICS configuration. This will remove the project from the TICS Dashboard/Explorer. TICSQServer will no longer calculate the project. The corresponding database is not removed! So no data is lost and the complete project history can be restored as long as a copy of the database is kept. This is relevant in case one wants to create a new project with the same name as a removed project (TICS will complain that the corresponding database cannot be created -- since it already exists).

TICSMaintenance -project ABC -remove

To remove the project database; go to the database server and remove the project's .fdb file.