Tarantella Development

# Tarantella Debug Tips

Document control: | TTAPT/01/DebugTips.html 1.3
Author: | steveme
Last modified: | 2003/03/20 10:57:37
Review team: |
Circulation list: | tta_test
Amendments: | See CVS log

## Contents

1. Jserver Log Filters
2. C++ Log Filters
3. Java Client Debug
4. 3rd Tier Debug
5. Server Debug
6. Monitor Tools

##

1. Jserver log filters

Second tier debug information of the server components is available through Jserver log filters, which are configured through the 'Array Properties' in the 'Array Manager' and follow this format:
`
component/subcomponent/detail:name%%PID%%.log`
Specifying `.jsl` instead of `.log` generates output for automated parsing and searching, which is required by the '`tarantella query`' command, but is not very human friendly.
The available detail levels are:
`
info
moreinfo
error
fatalerror`
Wildcards are supported, e.g. `*info`
The available components are:
`admin/auth
admin/gui
admin/jndi
admin/misc
admin/status
admin/webtopsession
audit/license
audit/session
common/config
metrics/glue
server/billing
server/common
server/config
server/deviceservice
server/diskds
server/glue
server/install
server/launch
server/loadbalancing
server/logging
server/login
server/mupp
server/netlet
server/printing
server/replication
server/securid
server/security
server/server
server/services
server/session
server/tfn
server/tier3loadbalancing
server/webtop
session/metrics
`
Again, wildcards are supported, e.g. `audit/*`
The log filters create large amounts of data - try to select a more specific filter if possible and remember to remove the log filters after use.

#### Examples

Login debugging:`
server/login/*info:login%%PID%%.log`
Server side print debugging:
`server/printing/*info:print%%PID%%.log`
To produce a JVM thread dump on JVM exit:
`*/*/*error:com.sco.tta.server.log.ThreadDumpSink`

## 2. C++ Log Filters

Second tier debug for the emulation components is configured through C++ log filters,which follow a similar format to Jserver log filters but can only be set using config edit commands.
The available detail levels are:
`
*
*info
*error
`
The available components are:
`proxy/circuit
proxy/server
proxy/mapping
pem/circuit
pem/message
pem/server
pem/pem
pem/session
pem/launch
pem/launchdetails
pem/protocol
execpe/internal
execpe/launch
execpe/launchdetails
execpe/process
execpe/script
execpe/launchhelper
execpe/authenticate
xpe/xpe
xpe/cdm
xpe/memory
xpe/cache
xpe/link
tpe/*`
to enable log filtering on a specific C++ component, start with the following config edit commands:
`--tarantella-config-xpeconfig-logfilter "xpe/*/*" "pem/*/*"
--tarantella-config-tpeconfig-logfilter "tpe/*/*" "pem/*/*"
--tarantella-config-execpeconfig-logfilter "execpe/*/*"
--tarantella-config-auxserver-logfilter "proxy/*/*" "pem/*/*"`
Changes to the PE log filters take effect when a new PE is started. Auxserver log filters require a server restart.
The log filters create large amounts of data - try to select a more specific filter if possible and remember to remove the log filters after use.

#### Examples

`Server side CDM debug:
--tarantella-config-xpeconfig-logfilter "xpe/cdm/*"`
`
`Full X app debugging (very verbose):`
--tarantella-config-xpeconfig-logfilter "xpe/*/*" "pem/*/*"`
`
`Launch debugging:`
--tarantella-config-execpeconfig-logfilter "execpe/*/*"`
To include expect script tracing uncomment '`startdebug`' in `unix.exp`

## 3. Java Client Debug

Additional Java Console debug can be enabled by editing the webtop HTML and adding in a debug parameter.

#### Print Applet

Edit 'print.html' for the webtop theme you are using, and add:
`<param name="DebugMask" value="255">`
to the list of applet parameters

#### CDM applet

Edit 'opt.html' for the webtop theme you are using, and add:
`<param name="DebugMask" value="255">`
to the list of applet parameters
Applet debugging will slow down the client - remember to remove the log parameters after use.

## 4. 3rd Tier Debug

#### CDM

Inside a windows session, run:
C:\Program Files\Tarantella\Enhancement Module\ttatdm.exe
and set the required level of detail from the 'debug' menu.

####
Load Balancing

The 3rd tier load balancing data can be viewed by using a web browser to view:
`http://<server>:3579?get&ttalbinfo`

## 5. Server Debug

#### Asad browser

Start tarantella with:`
./tarantella start --debug-httpd=2 (`0 = off, 1=running, login required, 2=running, login disabled)`
`Which allows you to browse various server properties by using a web browser to view:
`http://<server>:5427`
.
It can also be started and stopped on a running server with a config edit command:
`--tarantella-config-server-debug-httpd 0|1` (running without login not supported with this command)

#### Memory and thread monitor

Before starting tarantella set:
`TTA_USER_CMD="com.sco.cid.common.Run com.sco.cid.common.swing.MemoryMonitor --"`
Which displays a graph of memory and thread usage.

####
Verbose Mode

To see all Jserver activity in a terminal, start Tarantella with:
`./tarantella start --verbose`

####
Asad packet tracing

Start tarantella with:
`./tarantella start --pvc-gui`
Which starts an application to monitor Asad packets

## 6. Monitor tools

The `tools.test` CVS module (usually available on NFS export `korma:/tools.test`) contains a utility to log Tarantella array statistics over an extended period to evaluate server load and provide historical data when investigating problems.
The files are:
`/tools.test/utils/ttamonitor.sh
/tools.test/utils/summary.sh`

#### ttamonitor.sh

`Usage: ttamonitor.sh [-i | -r]
-i - Install script and cron entries
-r - Remove cron entries`
Running '`ttamonitor.sh -i`' causes the script to install itself into the Tarantella directory structure and create the necessary cron entries to log and archive data.
Once installed, the monitor script periodically logs server statistics useful in diagnosing faults and assessing server loading.
The logged data is stored in date stamped files in: `<ttadir>/var/monitor`
The following data is gathered every 20 minutes:
* server uptime
* total process count
* TCP bytes transmitted and received
* file descriptor usage (Linux only)
* disk space
* 'ps' output filtered for Tarantella processes
* Tarantella status by server for the primary
Additionally, 'vmstat' information is gathered at 1 minute intervals.
Every 24 hours the previous days logs are archived and compressed along with the licence usage history.

#### summary.sh

`Usage: summary.sh <monitor log archive>`
Running 'summary.sh <monitor log archive>' processes the logged data into CSV files suitable for graphing in a spreadsheet application.
The following data is generated:
* Webtop and emulator sessions per server for each node of the array
* TCP bytes transmitted and received
* jserver process size
* vmstat output
* print queue activity
The script also reports a summary of the data:
* maximum webtop and emulator sessions per server
* maximum jserver process size
* minimum free memory
* minimum CPU idle time
* total number of print jobs
* peak license usage
The CSV files are generated in the current directory when the script is started.

TTAPT/01/DebugTips.html 1.3 ends...