You are not logged in or registered. Please login or register to use the full functionality of this Website SybaseTeam.Com...
Hello There, Guest! (LoginRegister) Remember Me? Current time: 10-30-2014, 12:51 PM
   Home  |  About Us  |  Sybase Training  |  Synergy  |  Consulting  |  Job Openings  |  Tech Videos  |  Rules and Disclaimer  |  Search
Post Reply 
Forum Tools
Pls help on this..!!
01-31-2012, 08:37 AM
Post: #1
Quote this message in a reply
Pls help on this..!!


Hi,

How we calculate the cpu percentage in Sun Solaris for ASE processes using the CPU number from sysprocesses table in Sybase?


Pls help on this.

Thanks,
Sybase123


Find all posts by this user
02-02-2012, 08:06 AM
Post: #2
Quote this message in a reply
RE: Pls help on this..!!


Hi ,

Can anyone update the status for the same?




Thanks,
Sybase123


Find all posts by this user
02-03-2012, 03:41 AM
Post: #3
Quote this message in a reply
RE: Pls help on this..!!


If you are looking for CPU usage percentage of Sybase at OS level then please use the following commands to get the CPU percentage.

prstat or top

Sybase process will be running as "dataserver" at OS level


Find all posts by this user
02-04-2012, 03:10 AM
Post: #4
Quote this message in a reply
RE: Pls help on this..!!


Hi padalav,

Pls note mentioned query not for on going process if it ongoing process we will take it the same from sar or prstat output at os level..

We observed one issue which was happened on last week. For that I was captured sysprocess details through Cronjob which are scheduled on my server. In this output I could found that one process was showing the cpu count is " 456 " and physica_IO is "213421", However here my query is how do I calculate the CPU utilization using the CPU count "456" at OS level for that process.

Note : We are not capturing any monitoring output's at OS level.


Thanks,
Sybase123.


Find all posts by this user
04-12-2012, 06:55 AM
Post: #5
Quote this message in a reply
RE: Pls help on this..!!


What you are seeking is not at all clear. Please use technical terms in your response.

There is no "CPU number" in the sysprocesses table. There is a Host System Process number. That is ONLY if the client app (that connects to ASE) happens to run on an Unix host. That is for identification, if you need to chase down the location and identity of the client app instance. Much like the IP Address in sysprocesses.

On the host that ASE runs on, you will see one process for each Sybase ASE engine. Not one process per client app instance. Those engine processes can be monitored at the Unix level (ps, prstat, iostat, vmstat), as well as monitoring the whole machine, all processes running on it. Now at that level, there are no client apps on that host (if there are, that would be a very stupid thing to do, since Sybase recommends that ASE is run on a dedicated host). So here, you can monitor ASE (eg. 4 engines, 4 processes), which is essential. And you can check that nothing untoward is running on the machine (all other processes). If you see the 4 ASE engines running at say 50%, they are consuming 50% of your host Solaris system.

But that is not monitoring the processes (client app connections) that are running inside ASE. Separate to the above, inside ASE, Sybase provides a catalogue, which contains runtime info required to monitor (a) itself and (b) the client app connections. Since ASE is a true server, the client app connections are processes within ASE. The tables you need to monitor those client app processes are:
• sysprocesses
• systransactions
• syslocks

You can get much detailed more information re the internal operation (monitoring) of ASE via sp_sysmon at zero overhead. If you are willing to accept 15% and more overhead, and various administration problems, you can alternately use MDA tables.

The information you see in sysprocesses (or sysmon or MDA) is internal to ASE. There is no "CPU count". There is a "cpu" column, it contains time ticks. Let's say there are 200 client app connections to ASE; there will be 200 processes, 200 rows in sysprocess (plus about 10 more for the internal processes such as checkpoint). For each row (client app connection) it shows the amount of time that process has consumed, relative to all other processes within ASE. There is no correlation between the CPU used on the host system (which is the 4 ASE engines) and the processes within ASE; that is because the process within ASE is not running on Solaris, it is running within ASE only; there is no "O/S level CPU usage" for client app connection to ASE (sysprocesses entry).

If you wish to obtain the percentage of CPU used by each client app connection, just write a simple query to convert sysprocesses.cpu (and physical_io, etc) into an Percentage across the whole table. Or query MDA tables. Whatever use come up with, that will be the Percentage within the percentage that ASE is consuming on the Host: if ASE process 99 is consuming 10% of ASE, and ASE (all 4 engines) is consuming 50% of Solaris, then ASE process 99 is consuming 5% of Solaris. But most people do not bother with this level of information, it is very inaccurate, and of course very transient (you are looking at a snapshot in time). Or, to get a meaningful picture, you must be capturing an awful lot of data, and very frequently, which is definitely not recommended.

We do bother about sysmon figures, which is for ASE as a whole. If the 4 engines are consuming 40% (total) within sysmon, and ASE 4 processes are consuming 50% of Solaris (as per vmstat) then they are actually consuming 20% of Solaris. That is much more accurate. We monitor and administer the server, not each client app connection.

If you wish, you can set up the ASE server so that engines are grouped; apps (client app connections) are grouped; and resources can be allocated such that they are dedicated or limited. ASE has a fairly full set of resource management features. But even then, you are manging at the resource level, niot the client app connection level. There is also a decent capability for resource accounting via logins. And a full-blown Auditing feature.

With a view to supplying your need, rather than answering the technical detail, how do I calculate the CPU utilization using the CPU count "456" at OS level for that process, it is probably better to ask, what exactly are you trying to do, what info do you seek for some client app process ? What is the problem you are trying to solve ?



Ashirvad to my Shishyas, Cheers to the others
Derek Asirvadem
Information Architect / Sr Sybase DBA
Website
Selection of Useful Documents for the Sybase DBA
Visit this user's website Find all posts by this user
Post Reply 


Options:
Forum Jump:


Contact Us | SybaseTeam | Disclaimer & Rules | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication