Q:

SQLAnywhere: Visualize in real time CPU and RAM consumption of sql connections

I want to keep track of which connection use most of resources.
Within Sybase Central (SQL Anywhere 9, 12), for each server and database, we have pane to check in real time All Connected Users and Connections.
How to check for each connect it's cpu and ram consumption (in real time)?

A:

You can get the approximate CPU consumption with one of the connection properties:

ApproximateCPUTime    
Returns an estimate of the amount of CPU time accumulated by a given
  connection, in seconds. The value returned may differ from the actual
  value by as much as 50%, although typical variations are in the 5-10%
  range. On multi-processor computers, each CPU (or hyperthread or core)
  accumulates time, so the sum of accumulated times for all connections
  may be greater than the elapsed time. This property is supported on
  Windows and Linux.

See http://dcx.sybase.com/index.html#1201/en/dbadmin/connection-properties.html for usage in v12.0.1. 
I'm not aware of any statistics on RAM consumption at connection level - I can see how it would be hard to get accurately as a lot of the resource might be shared with other connections.
Hope this helps.

