Trc Files in SAP

3
Question How can I disable the generation of rfc *.trc trace files when the SAP system is unavailable or offline? Cause If SAP connection cannot be established, but connection information is saved, it will be stored on the DataStage server and that information will be used by both the IDOC and BW RFC servers to register on the gateway. If RFC trace is enabled, the RFC server begins generating rfc *.trc files on the error under the RFC server location. They are many files created every minute. A file per 10 seconds to be precise. This pollutes file systems and decrease performance. This has nothing to do with a DataStage job running, because both the IDoc and BW Managers are separate services outside the DataStage canvas. Answer RFC trace is enabled by setting the environment variable RFC_TRACE=1. To disable it, set RFC_TRACE=0 or delete the environment variable. If DataStage server is running on Windows , verify if RFC_TRACE is set at the system level. To disable change the value to RFC_TRACE=0 or delete the variable and then re-start the IDoc or BW Manager service. The System environment variable is found in My Computer > Properties > Advanced > Environment Variables. On UNIX the RFC trace for RFC servers are controlled via dsenv. That is a global control for all listener treads, thus for all SAP connections. The best way to disable RFC trace is to set RFC_TRACE=0 in dsenv file. This will stop rfc trace on all SAP connections, on- line and offline. dsenv is located in $DSHOME. To check if RFC_TRACE is set in the file: cat dsenv | grep RFC_TRACE Add or update the dsenv to show the following line: RFC_TRACE=0; export RFC_TRACE

description

.trc file in SAP

Transcript of Trc Files in SAP

Question

How can I disable the generation of rfc *.trc trace files when the SAP system is unavailable or offline?

Cause

If SAP connection cannot be established, but connection information is saved, it will be stored on the DataStage server and that information will be used by both the IDOC and BW RFC servers to register on the gateway.

If RFC trace is enabled, the RFC server begins generating rfc *.trc files on the error under the RFC server location. They are many files created every minute. A file per 10 seconds to be precise. This pollutes file systems and decrease performance.

This has nothing to do with a DataStage job running, because both the IDoc and BW Managers are separate services outside the DataStage canvas.

Answer

RFC trace is enabled by setting the environment variable RFC_TRACE=1. To disable it, set RFC_TRACE=0 or delete the environment variable.

If DataStage server is runningon Windows, verify if RFC_TRACE is set at the system level. To disable change the value to RFC_TRACE=0 or delete the variable and then re-start the IDoc or BW Manager service. The System environment variable is found in My Computer > Properties > Advanced > Environment Variables.

On UNIXthe RFC trace for RFC servers are controlled via dsenv. That is a global control for all listener treads, thus for all SAP connections. The best way to disable RFC trace is to set RFC_TRACE=0 in dsenv file. This will stop rfc trace on all SAP connections, on-line and offline.

dsenv is located in $DSHOME. To check if RFC_TRACE is set in the file:cat dsenv | grep RFC_TRACE

Add or update the dsenv to show the following line:RFC_TRACE=0; export RFC_TRACE

Then restart the IDoc- dsidoccd.rc or the BW service- dsrfcd.rc

This will stop generation of the rfc*.trc files under the SAP connection folders.

Important Note:There is a reported issue: RFC_TRACE=0 will not disable RFC trace with Idoc listener on Linux x86_84 for the RFC libs version 700.

Environment variable: RFC_TRACE=0 will turn off the trace files from being generated.

Environment variable: CPIC_TRACE=0 will turn off the CPIC trace.

You might also have to turn off Trace option on the RFC destination in SAP for this to work.

And, to redirect the files to a different location, you can use RFC_TRACE_DIR and CPIC_TRACE_DIR environment variables. Please note that, once you do this, the SAP adapter page may not be able to find the trace files for display.

RFC_TRACE env variable must be set to 1 to disable it set it to 0 or delete the variable

I can set it up

but can i go ahead and dlete the rfc####.trc files manually in /usr/sap/SID/DVEBMGS00/work directory

Sure they are simply traces, if you don't need them just remove them or you might maybe take a backup (just in case someone need those in the future even tho in most cases is unlikely) and delete them

now: you may have to delete all log/audit(not usable for application) files from above mount point.

heck the below locations

/usr/sap//DVEBMGS/j2ee/cluster/server0/ - for core dump files if any

/usr/sap//DVEBMGS/j2ee/cluster/server0/log - default and application log files.

Delete the old files. This will free up space.

Also you can add the space to filesystem /usr/sap/. Check with your OS administrator.

Also move your statistical data file from from/usr/sap/SID/dvebmgs00/data, this could free some space..

have you tried a du -sk * in the /usr/sap/SID to find the largest directories?

Perhaps it's one of the j2ee log-zip files...

Check the size of all W* files under work directory....and restart your SAP application....then execute below command to delete all old w* files

rm dev_w*.old

then you may find some free space, but for a short time(inbetween you may need to extend the size of this mount point)

First check, which sub directories are dending on filesystem /usr/sap/....

- As per earlier replies, you can reset work processes trace files via SM50 and delete *.old files in directory /usr/sap//DVEBMGS/work

- Delete core file from /usr/sap//DVEBMGS/work......

- work flow logs also can be deleted from directory /sapmnt//global directory which is shared mount of /usr/sap/

- Schedule a job deleted old jobs logs

regarding /oracle/.... schedule cleanup logs jobs from DB13 which will delete logs from below directories

saptrace

sapreorg

sapbackup

saparch