echo off
rem * starts eedlc and lan connectivity -- ee=/f 4 /c22 /o 3b; lan(llc2)=/f 4 /c33 /o 2                            *
rem * starts appc apis for -- CPIC=/f 3 /c 4 /o 4; RUI=/f 3 /c 5 /o 4; APPC=/f 3 /c 7 /o 4; SLI=/f 3 /c 11 /o 4    *
rem *                         IPS =/f 3 /c 1 /o 1 --binary internal SNA process *ips.trc file                      *
rem * cstrace and quick beginnings (CSQKB) Appendix D (quick14.htm) for more options for apply and start           *
rem * cstrace ? start  or  cstrace ? apply displays help information on a command line                             *
rem * /f specifies the function group ID; /c specifies the component ID; /o specifies the trace options            * 
rem * /f 1 for user services                                                                                       *
rem *      /c  1 for NODE Initialization /o 1 API,2 Procedure,10 Exhaustive                                        *
rem *      /c  2 for Configuration API   /o 1 API                                                                  *
rem *      /c  3 for Message Facility    /o 1 Procedure                                                            *
rem *      /c  4 for SNA Node Operations /o 1 Procedure                                                            *
rem *      /c  5 for Automatic Dial Utility /o 1 Procedure                                                         *
rem *      /c  6 for ASCII Configuration /o 1 Binary Conversion                                                    *
rem * /f 2 for 3270/5250/VT Emulator functions                                                                     *
rem *      /c 1 for Communication data                                                                             *     
rem *            /o        1 for TCP/IP                                                                            *
rem *            /o        2 for 3270 via NWSAA & CS/NT                                                            *
rem *            /o        4 for IBM Global Network                                                                *
rem *            /o        8 for Home3270                                                                          *
rem *            /o       10 for SNA DFT                                                                           *
rem *            /o       20 for Non-SNA DFT                                                                       *
rem *            /o       40 for Async Console                                                                     *
rem *            /o      400 for Twinax Console                                                                    *
rem *            /o       80 for VT over Async                                                                     *
rem *            /o   100000 for LUA (API client)                                                                  *
rem *            /o   200000 for APPC3270 (API client)                                                             *
rem *            /o   400000 for APPC5250 (API client)                                                             *
rem *            /o  1000000 for LUA (IBM SNA stack)                                                               *
rem *            /o  2000000 for APPC3270 (IBM SNA stack)                                                          *
rem *            /o  4000000 for APPC5250 (IBM SNA stack)                                                          *
rem *            /o  8000000 for LUA (MS SNA client)                                                               *
rem *            /o 10000000 for APPC3270 (MS SNA client)                                                          *
rem *            /o 20000000 for APPC5250 (MS SNA client)                                                          *
rem *            /o 40000000 for FMI (MS SNA client)                                                               *
rem *      /c 2 for API                                                                                            *
rem *            /o 100 for EHLLAPI                                                                                *                                                                             *     
rem *            /o 200 for DDE                                                                                    *
rem *      /c 3 for Event                                                                                          *
rem *            /o 10000 for Keystroke                                                                            *                                                                             *     
rem *            /o 20000 for OLE Transactions                                                                     *
rem *      /c 4 for Debug                                                                                          *
rem *            /o 80000000 for Debug                                                                             *                                                                             *     
rem *            /o 00800000 for Bidi                                                                              *
rem * /f 3 for APPC and APPN functions                                                                             *
rem *      /c 1 for NBASE  /o 1 for IPS Internal Process SNA                                                       *
rem *      /c 2 for NOF  API /o 1 verb only, 2 verb +128 max data, 4 full verb +data                               *
rem *      /c 3 for MS   API /o 1 verb only, 2 verb +128 max data, 4 full verb +data                               *
rem *      /c 4 for CPIC API /o 1 verb only, 2 verb +128 max data, 4 full verb +data                               *
rem *      /c 5 for RUI  API /o 1 verb only, 2 verb +128 max data, 4 full verb +data                               *
rem *      /c 6 for CSV  API /o 1 verb only, 2 verb +128 max data, 4 full verb +data                               *
rem *      /c 7 for APPC API /o 1 verb only, 2 verb +128 max data, 4 full verb +data                               *
rem *      /c 8 for CCE  API /o 1 verb only, 2 verb +128 max data, 4 full verb +data                               *
rem *      /c 11 for SLI API /o 1 verb only, 2 verb +128 max data, 4 full verb +data                               *
rem * /f 4 for connectivity functions                                                                              *
rem *      /c 49 for ANYNET              /o 40 for Internal, 80 Transport                                          *
rem *      /c 33 for LAN/LLC2            /o 1 I frame, 2 all frames, 4 truncate 128                                *
rem *      /c  9 for SDLC                /o 1 Entry,2 Control,8 exit,10 DLC,20 Data Out,40 Data In,80 Internal     *
rem *      /c 19 for LAPB                /o 1 Entry,2 Control,8 exit,10 DLC,20 Data Out,40 Data In,80 Internal     *
rem *      /c 20 for QLLC                /o 1 Entry,2 Control,8 exit,10 DLC,20 Data Out,40 Data In,80 Internal     *
rem *      /c 14 for TDLC                /o 1 Entry,2 Control,8 exit,10 DLC,20 Data Out,40 Data In,80 Internal     *
rem *      /c 22 for EEDLC               /o 1 Entry,2 Control,8 exit,10 Data Out,20 Data In,80 Internal            *
rem *      /c  1 for Signaling Protocol  /o 1 Entry,2 Control,8 exit,10 msg rcvd,20 msg Sent,40 Internal           *
rem *      /c  7 for ADAPTER             /o 1 Entry,2 Control,8 exit,10 lvl 1 least,20 lvl 2 average,40 lvl 3 more,80 lvl 4 most *
rem *      /c 16 for ComPort ADAPTER     /o 1 Entry,2 Control,8 exit,10 lvl 1 least,20 lvl 2 average,40 lvl 3 more,80 lvl 4 most *
rem *      /c 17 for MPA ADAPTER         /o 1 Entry,2 Control,8 exit,10 lvl 1 least,20 lvl 2 average,40 lvl 3 more,80 lvl 4 most *
rem *      /c 15 for Twinax ADAPTER      /o 1 Entry,2 Control,8 exit,10 lvl 1 least,20 lvl 2 average,40 lvl 3 more,80 lvl 4 most *
rem *      /c 18 for WAC ADAPTER         /o 1 Entry,2 Control,8 exit,10 lvl 1 least,20 lvl 2 average,40 lvl 3 more,80 lvl 4 most *
rem *      /c  2 for LEASED LINE         /o 1 Entry,2 Control,8 exit,10 msg rcvd,20 msg sent,40 internal           *
rem *      /c  3 for MAPPER              /o 1 Entry,2 Control,8 exit                                               *
rem *      /c  4 for BUFFER RELAY        /o 1 Entry,2 Control,8 exit,10 Internal 1,20 internal 2                   *
rem *      /c  5 for CONFIGURATION       /o 1 Entry,2 Control,8 exit,10 Instance Data                              *
rem *      /c  6 for CONNECTION MANAGER  /o 1 Entry,2 Control,8 exit,10 Primatives & msgs,20 Internal Msg          *
rem *      /c  8 for PDLC_DLC            /o 1 Entry,2 Control,8 exit,10 Internal 1,20 Internal 2,30 Internal 3,40 internal 4,80 Internal 8 *
rem *      /c 10 for Hayes AT Signalling /o 1 Entry,2 Control,8 exit,10 msg rcvd,20 msg Sent,40 Internal           *
rem *      /c 10 for V.25bis Signalling  /o 1 Entry,2 Control,8 exit,10 msg rcvd,20 msg Sent,40 Internal           *
rem *      /c 10 for X.25 Signalling     /o 1 Entry,2 Control,8 exit,10 msg rcvd,20 msg Sent,40 Internal,80 NPDU   *
rem * /f 7 for data transfer                                                                                       *
rem *      /c  4 for configuraion /o 1 Entry,2 Control,8 exit,10 data,80 return codes                              *

rem to auto start traces at boot cstrace auto /e 1   and turn off by cstrace auto /e 0                             *
rem cstrace start /r    starts traces and resets the trace buffers /t option sets the maximum size of trace buffers*
rem /b specifies the size of a block in the trace buffer and /s specifies the number of blocks in the trace buffer * 
rem The total trace size is the product of the block size and number of blocks -- 32 x 256 = 8192 Kbytes.          *
rem to increase the trace buffer size to 36864 Meg add /b 192 /s 192 to the start statement cstrace start          *
rem Max trace buffer = 192x256 = 49252 Kbytes /b 192 /s 256 ********************************************************
rem add /m msgid to stop trace when the specific message ID is issued to the message log                           * 
rem NOTE: command line trace with cstrace cannot be used with trace GUI ( trcgui ) active.                         *
echo on
cstrace start /r /b 32 /s 256
cstrace apply /f 4 /c 22 /o 10 20 1 8 2
CSTRACE apply /f 4 /c 33 /o 2
cstrace apply /f 3 /c 1 /o 1
cstrace apply /f 3 /c 4 /o 4
cstrace apply /f 3 /c 7 /o 4
cstrace apply /f 3 /c 5 /o 4
cstrace apply /f 3 /c 11 /o 4
