/var/opt/teradata file system becoming full by Teradata gateway log files

Problem:

Teradata gateway log files in /var/opt/teradata/tdtemp/gtw taking lot of space .

Cause:

Trace logging are enable in Gateway.

#tdatcmd

#gtwcontrol -d

gtwcontrol: gtwversion 15.10.00.01

gdo version: 6, created on Tue Feb 12 10:37:38 2019

systemname: TD-EXPRESS

number of host groups: 1, number of gateway vprocs 1

max logfile size: 5000000

event trace cnt: 500

gtwglobal logon name: DBC

Send DBS error to client: no

TDGSS Library Version..........: 15.10.0.6

hgid: 1

assign vprocid: 22528

assigntrace: yes

logons enabled: yes

session timeout in minutes: 20

connection timeout in seconds: 60

keepalive timeout in minutes: 10

max sessions per gateway: 600

iothread check frequency in minutes: 10

max io threads per type (msg/net): 50

initial io threads per type (msg/net): 25

allow gateway testing enabled: no

External Authentication: on

Append Domain Name: no

Reserved for Backdown: 0

Require Confidentiality: no

Send Connect Response with Integrity Only: no

Connection trace: yes

Local PE Preferred Percent: 0%

TCP Socket SND/RCV Buffer Size: default (65587)

vproc id: 22528 status: Online

event trace

Solution:

Disable the logging:

Disable the Assigntrace:

#gtwcontrol -A

gtwcontrol: gtwversion 15.10.00.01

gtwcontrol: gtw gdo successfully updated

*** YOU HAVE MODIFIED A DEBUGGING OPTION. IS THIS WHAT YOU INTENDED? ***

Disable Connection Trace:

#gtwcontrol -C

gtwcontrol: gtwversion 15.10.00.01

gtwcontrol: gtw gdo successfully updated

*** YOU HAVE MODIFIED A DEBUGGING OPTION. IS THIS WHAT YOU INTENDED? ***

Disable Event Trace:

#gtwcontrol -E

gtwcontrol: gtwversion 15.10.00.01

gtwcontrol: gtw gdo successfully updated

*** YOU HAVE MODIFIED A DEBUGGING OPTION. IS THIS WHAT YOU INTENDED? ***

Demonstration by an example How event trace are logging and by disable event trace it stop logging in Gateway logs

#gtwcontrol -d

gtwcontrol: gtwversion 15.10.00.01

gdo version: 6, created on Tue Feb 12 10:37:38 2019

systemname: TD-EXPRESS

number of host groups: 1, number of gateway vprocs 1

max logfile size: 5000000

event trace cnt: 500

gtwglobal logon name: DBC

Send DBS error to client: no

TDGSS Library Version..........: 15.10.0.6

hgid: 1

assign vprocid: 22528

assigntrace: yes

logons enabled: yes

session timeout in minutes: 20

connection timeout in seconds: 60

keepalive timeout in minutes: 10

max sessions per gateway: 600

iothread check frequency in minutes: 10

max io threads per type (msg/net): 50

initial io threads per type (msg/net): 25

allow gateway testing enabled: no

External Authentication: on

Append Domain Name: no

Reserved for Backdown: 0

Require Confidentiality: no

Send Connect Response with Integrity Only: no

Connection trace: yes

Local PE Preferred Percent: 0%

TCP Socket SND/RCV Buffer Size: default (65587)

vproc id: 22528 status: Online

event trace

#bteq

Teradata BTEQ 15.10.00.03 for LINUX. PID: 14025

Copyright 1984-2015, Teradata Corporation. ALL RIGHTS RESERVED.

Enter your logon or BTEQ command:

.logon test

.logon test

Password:

*** Logon successfully completed.

*** Teradata Database Release is 15.10.00.06

*** Teradata Database Version is 15.10.00.07

*** Transaction Semantics are BTET.

*** Session Character Set Name is 'ASCII'.

*** Total elapsed time was 10 seconds.

CREATE MULTISET TABLE QTable ,QUEUE ,FALLBACK ,

NO BEFORE JOURNAL,

NO AFTER JOURNAL,

CHECKSUM = DEFAULT,

DEFAULT MERGEBLOCKRATIO

(

TS TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),

SAPCustomerID INTEGER NOT NULL DEFAULT 0 ,

SequenceId INTEGER NOT NULL DEFAULT 0 ,

ReceiptSequenceNr INTEGER NOT NULL DEFAULT 0 ,

ReferenceTS TIMESTAMP(6) NOT NULL)

PRIMARY INDEX ( SequenceId ,ReferenceTS );

*** Table has been created.

*** Total elapsed time was 1 second.

BTEQ -- Enter your SQL request or BTEQ command:

select and consume top 1 * from QTable;

select and consume top 1 * from QTable;

^CBREAK received. Input Command:

^C

*** BREAK event detected. Press <ENTER>.

*** Warning: Double BREAKs, attempting to abort transaction.

*** Asynchronous ABORT request sent on all active sessions.

*** Warning: Canceling the rest of the output.

BTEQ -- Enter your SQL request or BTEQ command:

The following information logged in Gateway Log file(Located in /var/opt/teradata/tdtemp/gtw/) as Event Trace is enable:

-- This is event log for the command "select and consume top 1 * from QTable;"

Thu Feb 21 05:52:30.45: gtwnetio.cpp @ 953 (83906208): CE_STARTMSG on ctxno 23 sess 1011 user TEST oldstate CS_CLIENTWAITNOTRAN newstate CS_CLIENTWAITNOTRAN at (TCP/IP) e6e6 127.0.0.1

Thu Feb 21 05:52:30.45: gtwaction.cpp @ 7176 (83906208): CE_STARTMSGOK on ctxno 23 sess 1011 user TEST oldstate CS_CLIENTWAITNOTRAN newstate CS_WAITSTARTRSP at (TCP/IP) e6e6 127.0.0.1

-- This is event log for aborting the query

Thu Feb 21 05:52:37.19: gtwnetio.cpp @ 979 (83900064): CE_ABORTMSG on ctxno 23 sess 1011 user TEST oldstate CS_WAITSTARTRSP newstate CS_WAITSTARTRSP at (TCP/IP) e6e6 127.0.0.1

Thu Feb 21 05:52:37.19: gtwaction.cpp @ 1193 (83900064): CE_ABORTMSGOK on ctxno 23 sess 1011 user TEST oldstate CS_WAITSTARTRSP newstate CS_WAITABORTRSP at (TCP/IP) e6e6 127.0.0.1

Thu Feb 21 05:52:37.19: gtwmsgio.cpp @ 818 (83893152): CE_DBSRSP on ctxno 23 sess 1011 user TEST oldstate CS_WAITABORTRSP newstate CS_WAITABORTRSP at (TCP/IP) e6e6 127.0.0.1

Thu Feb 21 05:52:37.19: gtwaction.cpp @ 7343 (83893152): CE_STARTMSGRSPNOTRAN on ctxno 23 sess 1011 user TEST oldstate CS_WAITABORTRSP newstate CS_STARTMSGRSPNOTRAN at (TCP/IP) e6e6 127.0.0.1

Thu Feb 21 05:52:37.19: gtwaction.cpp @ 8615 (83893152): CE_STARTMSGRSPNOTRAN on ctxno 23 sess 1011 user TEST oldstate CS_STARTMSGRSPNOTRAN newstate CS_CLIENTWAITNOTRAN at (TCP/IP) e6e6 127.0.0.1

Now if we disable the event trace then the event log will not be logged in Gateway log file and the size of the file will not grow.

Additional Note:

You can Enable the trace logging using the same command.

#gtwcontrol -A

#gtwcontrol -C

#gtwcontrol -E