Skip to main content
Skip table of contents

Analyze censhare commands

Locate relevant information about commands in the censhare Admin Client and the server log files to trace commands for errors.

Identify command to trace

In this example, we use the Create Text Preview (automatic) command.

  1. Log into the censhare Admin Client and go to Configuration | Modules | Previews.
  2. Double-click Create Text Preview (automatic) to open it.
  3. Under Description, you see that the actual command name is: preview_maker.aa-preview-text. The name Create Text Preview (automatic) is the localized display name of the command. The localized English title comes as a localization file. This is displayed in the General Setup section under Title by the variable ${reg-title-aa-preview-text}.


We have identified the command name as preview_maker.aa-preview-text.

Find the running command

  1. In the censhare Admin Client, go to the Status | Commands folder and double-click it.
  2. From the drop-down in the dialog, select Commands | contains and paste the command name or parts of it into the empty field.
  3. Now the actual running command is shown, identified by its name and an ID.

    Here, you can identify the first problems:

    • If the command is not listed, the command was canceled by accident and you have to restart it.
    • If a command has a large queue, this can indicate a performance problem or an incorrectly configured command. In that case, you can contact support for help.
  4. Double-click the command to see the command details. You can see the source code of the command and its current process ID. This ID changes when the command or the server is restarted.
  5. Copy the command ID to the clipboard.


Trace the process in the server logs

  1. Log in to the server by the terminal as corpus.
  2. Go to the logs directory.
    The shortcut wl should bring you there.
  3. Grep for the process ID like this:

    CODE
    grep cs-srv41.20150302.153504.672 server-0.0.log

    The result will look like this:

    CODE
    2015.03.13-17:24:10.971 FINE : T022: CommandExecutor: cs-srv41.20150302.153504.672[system]: sync fork of event command preview_maker.aa-preview-text started 
    2015.03.13-17:24:11.386 FINE : T022: CommandExecutor: cs-srv41.20150302.153504.672[system]: sync fork of event command preview_maker.aa-preview-text finished with state 'completed all' 
    2015.03.13-17:24:11.387 INFO : T022: CommandExecutor: cs-srv41.20150302.153504.672[system]: preview_maker.aa-preview-text completed all in 417ms

    The command ran successfully. This is indicated by the "completed all" phrase.

  4. Copy the timestamp of the command, open the server log with the command and search for it to find out more information about the command. In this case, it executed several steps to create the text preview.

    CODE
    2015.03.13-17:24:10.971 FINE : T022: CommandExecutor: cs-srv41.20150302.153504.672[system]: sync fork of event command preview_maker.aa-preview-text started 
    2015.03.13-17:24:10.984 FINE : T049: AAPreviewText.setup: CommandExecutor: cs-srv41.20150313.172410.970[system]: taking: Bildunterschrift D[11203-v1-c0-tcn1-ccn1] 
    2015.03.13-17:24:10.984 INFO : T049: AAPreviewText.setup: CommandExecutor: cs-srv41.20150313.172410.970[system]: working on: Bildunterschrift D[11203-v1-c0-tcn1-ccn1] 
    2015.03.13-17:24:10.984 INFO : T049: AAPreviewText.setup: CommandExecutor: cs-srv41.20150313.172410.984[system]: preview_maker.aa-preview-text-engine execute 
    2015.03.13-17:24:11.062 INFO : T036: AAPreviewTextEngine.processPreview: LocalFileSystemImpl: atomically moved /opt/corpus/censhare-Server-v4.10.3-b1406/censhare-Server/work/assets-temp/170063.xhtml -> /opt/corpus/censhare-Server-v4.10.3-b1406 
    2015.03.13-17:24:11.062 INFO : T036: AAPreviewTextEngine.processPreview: FileFactoryService: cs-srv41.20150313.172410.984[system]: Non streaming based (e.g. local) move cs-srv41:assets-temp:work/assets-temp/,170063.xhtml -> cs-srv41:temp:work/ 
    2015.03.13-17:24:11.063 INFO : T036: AAPreviewTextEngine.processPreview: AssetManagementService: cs-srv41.20150313.172410.984[system]: Update of asset: Bildunterschrift D[11203-v1-c0-tcn1-ccn1] 2015.03.13-17:24:11.065 INFO : T036: AAPreviewTextEngine.processPreview: AssetManagementService: cs-srv41.20150313.172410.984[system]: computed hash code for file cs-srv41:temp:work/temp/,170064.xhtml in 1 ms: D29F8C8C790CD2A3B074DD1218E890975 
    2015.03.13-17:24:11.066 INFO : T036: AAPreviewTextEngine.processPreview: LocalFileSystemImpl: atomically moved /opt/corpus/censhare-Server-v4.10.3-b1406/censhare-Server/work/temp/170064.xhtml -> /opt/corpus/censhare-Server-v4.10.3-b1406/censha 
    2015.03.13-17:24:11.066 INFO : T036: AAPreviewTextEngine.processPreview: FileFactoryService: cs-srv41.20150313.172410.984[system]: Non streaming based (e.g. local) move cs-srv41:temp:work/temp/,170064.xhtml -> cs-srv41:assets:work/assets/,15/4 
    2015.03.13-17:24:11.362 INFO : AssetStoreUpdater: AssetStoreService: AssetStoreUpdater: Updater wrote 1 updates (1 high) in 3ms, 0 tasks in update queue, 0 tasks in buildQueue, 0 tasks in fulltextBuildQueue, 0 events in queue. 2015.03.13-17:24:11.367 INFO : T036: CommandExecutor: cs-srv41.20150313.172410.984[system]: preview_maker.aa-preview-text-engine completed all in 382ms 2015.03.13-17:24:11.368 FINE : T079: CommandExecutor: cs-srv41.20150302.153504.577[system]: sync fork of event command asset_export_import.aa-asset-export-20150129-1718-0 started 
    2015.03.13-17:24:11.371 FINE : T061: HistoryLogEventHandler.handleEvent: CommandExecutor: cs-srv41.20150302.153504.668[system]: 1 history log entries written into database [time 2ms] 
    2015.03.13-17:24:11.371 INFO : T006: CommandExecutor: cs-srv41.20150302.153504.810[system]: admin.cached_tables.resource-asset-updater completed all in 5ms 
    2015.03.13-17:24:11.372 INFO : RMI TCP Connection(15244)-192.168.211.135: CommandExecutor: cs-srv41.20150313.165910.735[dag]: client.common.refresh-events completed all in 7ms 2015.03.13-17:24:11.381 INFO : RMI TCP Connection(15270)-192.168.211.155: CommandExecutor: cs-srv41.20150313.172411.383[censhare]: asset.read-attributes-cached execute 
    2015.03.13-17:24:11.384 INFO : T031: CommandExecutor: cs-srv41.20150313.172411.383[censhare]: asset.read-attributes-cached completed all in 2ms 
    2015.03.13-17:24:11.385 INFO : AssetStoreUpdater: AssetStoreService: AssetStoreUpdater: Updater wrote 1 updates (0 high) in 2ms, 0 tasks in update queue, 0 tasks in buildQueue, 0 tasks in fulltextBuildQueue, 0 events in queue. 
    2015.03.13-17:24:11.386 INFO : T018: CommandExecutor: cs-srv41.20150313.172410.970[system]: preview_maker.aa-preview-text completed all in 415ms 
    2015.03.13-17:24:11.386 INFO : T061: CommandExecutor: cs-srv41.20150302.153504.668[system]: history_log.history-log-event-listener completed all in 20ms 
    2015.03.13-17:24:11.386 FINE : T022: CommandExecutor: cs-srv41.20150302.153504.672[system]: sync fork of event command preview_maker.aa-preview-text finished with state 'completed all' 
    2015.03.13-17:24:11.387 INFO : T022: CommandExecutor: cs-srv41.20150302.153504.672[system]: preview_maker.aa-preview-text completed all in 417ms
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.