Desligamentos forçados

Para identificar se o desligamento do sistema foi feito de forma correta, é necessário olhar o log engine.log, que pode ser acessado através do link log no manage ou acessando a pasta logs na raiz do sistema.

Cada log possui um nome, e os logs de dias anteriores possuem o nome mais a data.

Exemplos:

  • engine.log : Log referente ao dia corrente.
  • engine.log.2015-09-18 : Log referente ao dia 18/09/2015.

O engine.log registra os dados da inicialização e finalização do sistema.

Existem duas palavras chave principais para identificação da inicialização e finalização do sistema, são elas, startup e shutdown respectivamente. A linha indicada no item 3 representa o encerramento completo.

  1. A linha de log abaixo indica que o sistema está sendo iniciado: 17/09 17:14:15 [INFO] ngin.core.kernel - iEngine.exe version 15.9.0.2 startup
  2. A linha de log abaixo indica que o desligamento do sistema foi iniciado: 17/09 17:13:14 [INFO] ngin.core.kernel - iEngine.exe version 15.9.0.2 shutdown.
  3. A conclusão do encerramento é indicada na linha abaixo: 17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Database closed successfully.

Durante a finalização do sistema são feitas operações para guardar os dados que estavam sendo manipulados pelo sistema, garantindo a integridade do cache após o desligamento. Esses processos são logados entre as linhas 2 e 3. Segue abaixo o exemplo completo.

17/09 17:13:14 [INFO] ngin.core.kernel - engine.exe version 15.9.0.2 shutdown.
17/09 17:13:14 [INFO] ngin.core.kernel - Stop done.
17/09 17:13:15 [INFO] ngin.core.keycache - Finishing KeyCache. Next available key is 412224269
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iLob" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "FATOR" closed 12161 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "REFERENCIA" closed 119 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "MPRESUMO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iHost" closed 76 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "ESTOQUEPAF" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "PONTO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "SIMULA" closed 78 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "DOCUMENTO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iLog" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iSchedulerTask" closed 3 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "ETAPA" closed 304 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "INVENTAR" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iLicenseUse" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "VINCULAMOVIMENTAC" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "tMovimentation" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "LISTAPROD" closed 47 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "VINCULA" closed 32827 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iService" closed 110 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "EXPLOSAO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "LAYOUT" closed 34 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "Master" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iVfs" closed 23494 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "TREINAMENTO" closed 3 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iVfsLob" closed 1237 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "SOLICITACAO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "Detalhe" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "MOVDEPOS" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "FILAS" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "zCommitDefaultPK" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "MOVIMENTACAO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "VALMOIND" closed 2811 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iDatabase" closed 6 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "HORARIOM" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iAuxiliaryTable" closed 596 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iResourcestring" closed 733 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "XCONTABIL" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iDatabaseSchema" closed 105 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "MOVIMENTOECF" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iPendingTaskManagement" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iGroupUser" closed 784 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "Auxiliar" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "AuxiliarB" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "EVENTO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "LISTAPRODITEM" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "RECURSO" closed 8279 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "PROJETO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "ZKLGTABELA" closed 4 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iDataRel" closed 273 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "ENTIDADE" closed 54347 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "MOVDISPO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "tProduct" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "FOLHA" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "CLASSE" closed 7845 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "INTEGRACAO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iAuthToken" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "PARCELA" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "ETAPAREC" closed 394 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "PESSOACONTRATO" closed 159 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "HORARIO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "CODIGO" closed 1616 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "EXPLOMAQ" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "CONTRATO" closed 21 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "PEDIDO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "XPACKINGLIST" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "zCommitOtherPK" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iLicense" closed 49 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "BALANCEAMENTO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "tDateTimeTest" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "TABELA" closed 67831 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iPendingTask" closed 347 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iSequence" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "XPLANOCON" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iPermission" closed 464236 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "CONTABIL" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "CEP" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "PLANOCON" closed 13229 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "TAREFA" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iHistDataRel" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iSecurityPolicy" closed 10 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "CARTAO" closed 147 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "REQUISIC" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "iSysEvent" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "PRODUCAO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "CAMPO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Table "TITULO" closed 0 records.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Closing database.
17/09 17:13:17 [INFO] ngin.dbcache.DESENVOLVE - Database closed successfully.
17/09 17:14:15 [INFO] ngin.core.kernel - iEngine.exe version 15.9.0.2 startup as PID 11492::66448 on Windows Server 2008 R2 SP1[NTFS] using command line 'C:\Unum\Unum\DESENVOLVE\iEngine.exe -s -svc Unum_DESENVOLVE_8001

Esses logs mostram a verificação que é feita, tabela por tabela, para finalizar os registros corretamente. Quando o sistema é desligado abruptamente, seja por reinício forçado ou uma queda de energia, esses processos não são executados, logo a integridade dos dados não pode ser garantida. Segue abaixo um exemplo de log onde o sistema não foi desligado corretamente.

11/09 11:41:06 [INFO] ngin.core.kernel - iEngine.exe version 15.9.0.1 startup as PID 26456::45316 on Windows Server 2008 R2 SP1[NTFS] using command line 'C:\Unum\Unum\DESENVOLVE\iEngine.exe -s -svc Unum_DESENVOLVE_8001 '
11/09 11:41:06 [INFO] ngin.sys - Registry(MemManage Info) selected value is 2, heuristic 4
11/09 11:41:06 [INFO] ngin.core.kernel - Computer name: FORMOSA(172.16.1.6). MacAddress: 001517A257E2
11/09 11:41:06 [INFO] ngin.core.kernel - Processor name: Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
11/09 11:41:06 [INFO] ngin.core.kernel - Physical memory is 32706MB; Virtual memory is 4095MB
11/09 11:41:06 [INFO] ngin.core.kernel - Free disk size is 43362MB
11/09 11:41:06 [INFO] ngin.core.kernel - IDO cache size is 255MB. SyncToDisk parameter is off. Memory Manager is FastMM4
11/09 11:41:06 [INFO] ngin.core.kernel - TimeZone Bias is -180
11/09 11:41:06 [INFO] ngin.core.kernel - IdbBackup required version is 12.6.0.1, current is 12.6.0.1
11/09 11:41:06 [INFO] ngin.net.listener - Successfully bound TCP/IP port 8901.
11/09 11:41:06 [INFO] ngin.net.listener - Successfully bound TCP/IP port 8001.
11/09 11:41:06 [INFO] ngin.net.listener - Successfully bound TCP/IP port 7999.
11/09 11:41:06 [INFO] ngin.dbms.desenvolve - DBConnectionPool configured with 10 max connections.
11/09 11:41:06 [INFO] ngin.dbcache.DESENVOLVE - Preparing DBCacheEngine to start
11/09 11:41:06 [INFO] ngin.dbcache.DESENVOLVE - Provider Storage Id is 91E00A66D28E4A53B07806B0F6566E8C
11/09 11:41:06 [INFO] ngin.dbcache.DESENVOLVE - Opening database.
11/09 11:41:06 [INFO] ngin.ido.db.DESENVOLVE - Original Ido library version is 100; Current version is 100
11/09 11:41:06 [INFO] ngin.ido.db.DESENVOLVE - DB Format version is 0
11/09 11:41:20 [INFO] ngin.dbcache.DESENVOLVE - Database opened.
11/09 11:41:20 [INFO] ngin.core.keycache - First available key from keycache: 0
11/09 11:41:20 [INFO] ngin.ido.db.DESENVOLVE_KEYCACHE - Original Ido library version is 100; Current version is 100
11/09 11:41:20 [INFO] ngin.ido.db.DESENVOLVE_KEYCACHE - DB Format version is 0
11/09 11:41:20 [INFO] ngin.ido.db.DESENVOLVE_REFERENCESGETTER - Original Ido library version is 100; Current version is 100
11/09 11:41:20 [INFO] ngin.ido.db.DESENVOLVE_REFERENCESGETTER - DB Format version is 0
11/09 11:41:20 [INFO] ngin.ido.db.DESENVOLVE_SCHEDULER - Original Ido library version is 100; Current version is 100
11/09 11:41:20 [INFO] ngin.ido.db.DESENVOLVE_SCHEDULER - DB Format version is 0
11/09 11:41:20 [INFO] ngin.core.ctx - Creating context for database DESENVOLVE on 127.0.0.1:8901
11/09 11:41:20 [INFO] ngin.core.ctx - Starting DBContextManager.
11/09 11:41:20 [INFO] ngin.dbcache.DESENVOLVE - Starting DBCacheEngine
11/09 11:41:20 [INFO] ngin.core.ctx - DBContextManager started.
11/09 11:41:53 [INFO] ngin.core.kernel - SocketListenerManager - stopping.
11/09 11:41:53 [INFO] ngin.core.kernel - Dispatcher - stopping.
11/09 11:41:55 [INFO] ngin.core.dispatcher - Waiting 0 HTTP handlers.
11/09 11:41:57 [INFO] ngin.core.dispatcher - Waiting 0 HTTP handlers.
11/09 11:41:57 [INFO] ngin.core.kernel - SessionManager - aborting all session
11/09 11:41:57 [INFO] ngin.core.kernel - DBContextManager - stopping.
11/09 11:41:57 [INFO] ngin.core.ctx - Stopping DBContextManager.
11/09 11:41:57 [INFO] ngin.dbcache.DESENVOLVE - Stopping DBCacheEngine
11/09 11:42:51 [INFO] ngin.core.kernel - engine.exe version 15.9.0.1 startup as PID 57648::26108 on Windows Server 2008 R2 SP1[NTFS] using command line 'C:\Unum\Unum\DESENVOLVE\iEngine.exe -s -svc Unum_DESENVOLVE_8001 '

Neste exemplo notamos a ausência das linhas de log 2, 3 e consequentemente das linhas que mostram a verificação das tabelas do sistema. A falta dessas linhas deixa claro que o sistema não foi desligado da forma correta, logo a verificação se torna bem simples.