Monday 13 January 2014

Manual Data aggragation command in SHR

In any of the case if you need to do data aggreation in a manual mode in SHR there are 2 options . Please find the options below.

I have tested and confirmed the second option. First option didnt work for me intially becuase i forgot to mention the switch execute=true.

I followed the second option and suceeded. Later i have got an update from support on my errors.

This is tested in SHR 9.30
Option 1

As per HP support the aggregation process is to run the following command.
aggregate config=%PMDB_HOME%/scripts/SR_SM_NODE_RES_SH_SM_NODE_RES_Hourly_Resource_Details.xml processall=true execute=true
In the above example i am aggrageting SM content pack and metrics like CPU,MEM,Buffer,Network etc.. Similarly there are many xml files under
%PMDB_HOME%/scripts/
file start with SR_ means this is initial data collection
File start with SH is hourly
file start with SD is horuly.
Now if you try to read this file name you can see that we are taking values from SR_SM_NODE_RES and aggrgeting and updating values in SH_SM_NODE_RES which is the hourly table.
So person who is doing the aggregation should do understand th xml files first and plan the aggreation well
Once Content pack idenfiteid needs agregation . need to indetnify the corresponding SR_ to SH and SH_ to SD xml files.
then first need to run the SR_ to SH_ and next SH_ to SD .
Make sure to follow the highrarchy

Option 2

on the similar scenario you can the below step to do the aggregation.
User need to login the PG Admin and go to SQL window
now we need to identify the data from aggregate_control table . for doing this person who is doing should be familar with Content pack and it tables
in the below scenario my primary interest is to aggrgate the system availability so do run the below sql

select * from aggregate_control where source_table like 'SH_SM_NODE_AVAIL'
this command will provide me the output


once i get the max_ta_period we need to know from when we need to aggrgate the data.
This can be done by a query in sybase. select min(ta_period),max(ta_period) from SR_SM_NODE_AVAIL
now we no the from when data is available in SR table
based on that we need to update the aggregate_control tables max_ta_period  filed to a prevous date. In this case min(ta_period) from SR_SM_Node_Avail will be that value.

now
update aggregate_control set max_ta_period ='2013-11-01 00:00:00.000' where source_table like 'SR_SM_NODE_AVAIL'
commit
run the above command in PG admin SQl Prompt.
check the value is reflected by
select * from aggregate_control where source_table like 'SH_SM_NODE_AVAIL'
until the commit is done data will not get updated permanant.

after checking the value in PG admin
run the following command on command line

%PMDB_HOME%\bin\aggregate config=C:\HP-SHR\PMDB\scripts\SR_SM_NODE_AVAIL_SH_SM_NODE_AVAIL_HourlyNodeAvailability.xml processAll=true
and repeat the same procedure for SH_SM to SD_SM tables also

No comments:

Post a Comment