Select Menu

Ads

Random Posts

Powered By Blogger
Powered By Blogger

Blog Archive

Search This Blog

Thirupal Boreddy. Powered by Blogger.

My Blog List

Followers

Lorem 1

Technology

Circle Gallery

Shooting

Racing

News

Lorem 4

select  a.target_name as HOST,
to_char(a.rollup_timestamp,'dd-Mon-yy::hh24:mi') as "DAY-TIME",
sum(c.cpu_count) as "CPU COUNT" ,
round((sum(a.maximum*c.cpu_count)/ sum(c.cpu_count)),1) as "MAXIMUM CPU %",
round((sum(a.minimum*c.cpu_count)/ sum(c.cpu_count)),1) as "MINIMUM CPU %",
round((sum(a.average*c.cpu_count)/ sum(c.cpu_count)),1) as "AVERAGE CPU %"
from
mgmt$metric_hourly a ,
mgmt$target b ,
sysman.MGMT_ECM_HW c
where    a.metric_name = 'Load'
and      a.column_label = 'CPU Utilization (%)'
and      a.target_guid = b.target_guid
and      a. target_type = 'host'
and      c.hostname||'.'||c.domain = b.target_name
and rollup_timestamp > sysdate-31
and a.target_type='host'
and c.cpu_count !=0
--and round((sum(a.maximum*c.cpu_count)/ sum(c.cpu_count)),1) is not null
group by a.target_name, a.target_type,a.rollup_timestamp
order by 1;

QUERY FOR CPU USAGE

select  a.target_name as HOST, to_char(a.rollup_timestamp,' dd-Mon-yy::hh24:mi') as "DAY-TIME", sum(c.cpu_count) as ...