master database only
sysprocesses contains information about Adaptive Server processes, but it is not a normal table. It is built dynamically when queried by a user. No updates to sysprocesses are allowed. Use the kill statement to kill a process.
The columns for sysprocesses are:
| Name | Datatype | Description | 
|---|---|---|
| spid | smallint | Process ID. | 
| int for the Cluster Edition | ||
| kpid | int | Kernel process ID. | 
| enginenum | int | Number of engine on which process is being executed. | 
| status | char(12) | Process ID status (see Table 1-21). | 
| suid | int | Server user ID of user who issued command. | 
| hostname | varchar(30) null | Name of host computer. | 
| program_name | varchar(30) null | Name of front-end module. | 
| hostprocess | varchar(30) null | Host process ID number.. | 
| cmd | varchar(30) null | Command or process currently being executed.
Evaluation of a conditional statement, such as an if or while loop,
returns  | 
| cpu | int | Cumulative CPU time for process in ticks | 
| physical_io | int | Number of disk reads and writes for current command. | 
| memusage | int | Amount of memory allocated to process. | 
| blocked | smallint | Process ID of blocking process, if any. | 
| int for the Cluster Edition | ||
| dbid | smallint | Database ID. | 
| uid | int | ID of user who executed command. | 
| gid | int | Group ID of user who executed command. | 
| tran_name | varchar(64) null | Name of the active transaction. | 
| time_blocked | int null | Time blocked in seconds. | 
| network_pktsz | int null | Current connection’s network packet size. | 
| fid | smallint | Process ID of the worker process’ parent. | 
| int for the Cluster Edition | ||
| execlass | varchar(30) null | Execution class that the process is bound to. | 
| priority | varchar(10) null | Base priority associated with the process. | 
| affinity | varchar(30) null | Name of the engine to which the process has affinity. | 
| id | int null | Object ID of the currently running procedure (or 0 if no procedure is running). | 
| stmtnum | int null | The current statement number within the running procedure (or the SQL batch statement number if no procedure is running). | 
| linenum | int null | The line number of the current statement within the running stored procedure (or the line number of the current SQL batch statement if no procedure is running). | 
| origsuid | int null | Original server user ID. If this value is not NULL, a user with an suid of origsuid executed set proxy or set session authorization to impersonate the user who executed the command. | 
| block_xloid | int null | Unique lock owner ID of a lock that is blocking a transaction. | 
| clientname | varchar(30) null | (Optional) Name by which the user is know for the current session. 
 | 
| clienthostname | varchar(30) null | Optional – name by which the host is known for the current session. | 
| clientapplname | varchar(30) null | Optional – name by which the application is known for the current session. | 
| sys_id | smallint null | Unique identity of companion node. | 
| ses_id | int null | Unique identity of each client session. | 
| loggedindatetime | datetime null | Shows the time and date when the client connected to Adaptive Server. See “Row-level access control“ in Chapter 11, “Managing User Permissions” of the Security Administration Guide for more information. | 
| ipaddr | varchar(64) null | IP address of the client where the login is made. See “Row-level access control“ in Chapter 11, “Managing User Permissions” of the Security Administration Guide for more information. | 
| nodeid | tinyint null | Reserved for future use (not available for cluster environments). | 
| instanceid | tinyint | ID of the instance (available only for cluster environments). | 
| pad | smallint | (Cluster Edition) Column added for alignment purposes. | 
| lcid | int | (Cluster Edition) ID of the cluster. | 
 Because of this change in the datatypes for the Cluster
Edition, Sybase strongly recommends that you archive and truncate
audit tables before you upgrade. This reduces the likelihood of
a failed upgrade because of insufficient space in the sybsecurity database.
Because of this change in the datatypes for the Cluster
Edition, Sybase strongly recommends that you archive and truncate
audit tables before you upgrade. This reduces the likelihood of
a failed upgrade because of insufficient space in the sybsecurity database.
Table 1-21 lists the values for the status column:
| Status | Meaning | 
|---|---|
| alarm sleep | Waiting for alarm to wake process up (user executed a waitfor delay command) | 
| background | A process, such as a threshold procedure, run by Adaptive Server rather than by a user process | 
| infected | Server has detected a serious error condition; extremely rare | 
| latch sleep | Waiting on a latch acquisition | 
| lock sleep | Waiting on a lock acquisition | 
| PLC sleep | Waiting to access a user log cache | 
| recv sleep | Waiting on a network read | 
| remote i/o | Performing I/O with a remote server | 
| runnable | In the queue of runnable processes | 
| running | Actively running on one of the server engines | 
| send sleep | Waiting on a network send | 
| sleeping | Waiting on a disk I/O, or some other resource (often indicates a process that is running, but doing extensive disk I/O) | 
| stopped | Stopped process | 
| sync sleep | Waiting on a synchronization message from another process in the family |