Monitoring server activity

It may be helpful, especially for new users, to monitor server activity. Using commands appropriate for your platform, you can direct Sybase IQ to capture server activity in a log file.

Server startup messages

When you start an IQ server, a series of messages appears in the server log window. The exact set of messages you see depends on your platform and licensed options. The following is an example of what you see on AIX:

Starting server myserver_iqdemo on myserver at port 2638 (05/22 16:18:58)
Run Directory       : /myserver/users/sybase/iq152/IQ-15_2/demo
Server Executable   : /myserver/users/sybase/iq152/IQ-15_2/bin64/iqsrv15
Server Output Log   : /myserver/users/sybase/iq152/IQ
15_2/logfiles/myserver_iqdemo.0001.srvlog
Server Version      : 15.2.0.5027/GA
Open Client Version : 15.0/P-EBF16070 ESD #15
User Parameters     : '@iqdemo.cfg' 'iqdemo.db'
Default Parameters  : -ti 4400 -gn 25 

I. 05/22 16:19:05.      Sybase IQ
I. 05/22 16:19:05.       Version 15.2
I. 05/22 16:19:05.        (64bit mode)
I. 05/22 16:19:05. Copyright 1992-2010 by Sybase, Inc. All rights reserved
I. 05/22 16:19:05. 
I. 05/22 16:19:05. 4 physical processor(s) detected.
I. 05/22 16:19:05. Maximum number of physical processors the 
server will use: 4
I. 05/22 16:19:05. Running AIX 5 3 on PPC
I. 05/22 16:19:05. Server built for PPC processor architecture
I. 05/22 16:19:05. 49152K of memory used for caching
I. 05/22 16:19:05. Minimum cache size: 49152K, maximum cache size: 262144K
I. 05/22 16:19:05. Using a maximum page size of 4096 bytes
I. 05/22 16:19:05. Starting database "iqdemo"
(/myserver/users/sybase/iq151/IQ-15_2/demo/iqdemo.db) 
at Fri May 22 2009 16:19
=============================================================
IQ server starting with:
	10 connections         (       -gm )
	18 cmd resources       ( -iqgovern )
	267 threads             (     -iqmt )
	512 Kb thread stack size   (   -iqtss  )
	136704 Kb thread memory size ( -iqmt * -iqtss )
	4 IQ number of cpus  ( -iqnumbercpus )
	0 MB maximum size of IQMSG file ( -iqmsgsz )
	0 copies of IQMSG file archives ( -iqmsgnum )=============================================================
I. 05/22 16:19:07. Transaction log: iqdemo.log
I. 05/22 16:19:08. Starting checkpoint of "iqdemo" (iqdemo.db) at Fri May 22 2009 16:19
I. 05/22 16:19:08. Finished checkpoint of "iqdemo" (iqdemo.db) at Fri May
22 2009 16:19
=============================================================
IQ server starting with:
	10 connections         (       -gm )
	18 cmd resources       ( -iqgovern )
	267 threads             (     -iqmt )
	512 Kb thread stack size   (   -iqtss  )
	136704 Kb thread memory size ( -iqmt * -iqtss )
	4 IQ number of cpus  ( -iqnumbercpus )
	0 MB maximum size of IQMSG file ( -iqmsgsz )
0 copies of IQMSG file archives ( -iqmsgnum )
=============================================================
I. 05/22 16:19:07. Transaction log: iqdemo.log
I. 05/22 16:19:08. Starting checkpoint of "iqdemo" (iqdemo.db) 				
at Fri May 22 2009 16:19
I. 05/22 16:19:08. Finished checkpoint of "iqdemo" (iqdemo.db) 
at Fri May 22 2009 16:19I. 05/22 16:19:10. 
Database "iqdemo" (iqdemo.db) started at Fri May 22 2009 16:19
I. 05/22 16:19:10. IQ Server myserver_iqdemo.
I. 05/22 16:19:10. Database server started at Fri May 22 2009 16:19
I. 05/22 16:19:10. Trying to start SharedMemory link ...
I. 05/22 16:19:10.     SharedMemory link started successfully
I. 05/22 16:19:10. Trying to start TCPIP link ...
I. 05/22 16:19:15.     TCPIP link started successfully
I. 05/22 16:19:15. Now accepting requests
New process id is 397436
Server started successfully

start_iq log file

When you start a server with the start_iq utility, server activity is logged in an ASCII text file placed in the directory defined by $IQLOGDIR15.This file contains the standard output from the server and the server status.

The log file name has this format:

your_server_name.nnnn.srvlog

Each time you start the server, the number is incremented. For example, your directory may look like this:

demo.0001.srvlog   demo.0002.srvlog
testdemo.0001.srvlog

For information about your most recent session, choose the log with the largest number for the desired server. Issue a tail –f command to view the log contents. For example:

% tail -f demo.0002.srvlog

If you don’t define $IQLOGDIR15 directory, then on UNIX, the log is written to $IQDIR15/logfiles/ directory, and on Windows to the$IQLOGDIR15 directory defined by the Sybase IQ installation.

When you run start_iq, specify the -z option to enhance the log file with additional information about connections. This will help new users or those troubleshooting connection problems.

On UNIX systems, there are two ways to check if a particular server is running:

On Windows systems, look in the system tray for one or more Sybase IQ icons. Place the cursor over each icon and read the server name.

Naming the server log file

Use the -o parameter on the start_iq startup command to name the server log file, rather than using the default name of server.nnnn.srvlog. For example, to save output to a file named results in the directory where the server was started, start the server as follows:

start_iq -n imyserver -o results

You can also specify the full path to the log file using this option.

UNIX log files

On UNIX platforms, an additional log file captures operating system output, including stdout and stderr output.

The file name has this format:

your_server_name.####.stderr

For unexpected exceptions, Sybase IQ writes a stack trace file. On UNIX systems, the name of the file that contains stack trace information has this format:

stktrc-YYYYMMDD-HHNNSS_#.iq