Search This Blog

2011-10-31

Genesys Log Analysis Tips #2: PowerShell

Software Component: Genesys Outbound Contact Server

Following example demonstrate searching OCS log for list of campaign. This can easily be changed to display CPD port, agent, extension, calling list, etc.

This command search log gad_1_20111031_000000_001_1.log with following criteria:
1. Contain word "Name:GSW_CAMPAIGN_NAME" which basically capture all outbound campaign name
2. Select the output, and hide the line number. Select-String will always return file name, line number, and the search result, which is too long. In this example, I only searching 1 file, so file name is not important
3. Sort the output alphabetically
4. Display unique campaign name, so that duplicate campaign name won't be shown


Select-String -path gad_1_20111031_000000_001_1.log -pattern "Name:GSW_CAMPAIGN_NAME" | select-object Line | Sort-Object Line -Unique

This can provide a quick glance on what campaign is running, and interact by agents in GAD


Line
----
.Name:GSW_CAMPAIGN_NAME Value:Inbound
.Name:GSW_CAMPAIGN_NAME Value:Test_Campaign_1
.Name:GSW_CAMPAIGN_NAME Value:Test_Campaign_2
.Name:GSW_CAMPAIGN_NAME Value:Test_Campaign_3
.Name:GSW_CAMPAIGN_NAME Value:Test_Campaign_4
.Name:GSW_CAMPAIGN_NAME Value:Test_Campaign_5
.Name:GSW_CAMPAIGN_NAME Value:Test_Campaign_6
.Name:GSW_CAMPAIGN_NAME Value:Test_Campaign_7
.Name:GSW_CAMPAIGN_NAME Value:Test_Campaign_8
.Name:GSW_CAMPAIGN_NAME Value:Test_Campaign_9
.Name:GSW_CAMPAIGN_NAME Value:Test_Campaign_a
.Name:GSW_CAMPAIGN_NAME Value:Test_Campaign_b

No comments: