Search This Blog

2011-10-12

Genesys Log Analysis Tips #1: PowerShell

Product: Genesys CTI Suite
OS: Windows
Utility: PowerShell
Objective: Log analysis using filter

Uses following command to analyze all Genesys log and filter following
1. Log file contain name log in the extension
2. Search recursively
3. Filter by "DnStatus Logged out" to quickly tell the log file and line number
4. In additional of that, also display lines containing PlaceId
5. Spool the output to file logout1.txt, with max length 600 character. Default is 120

PS C:\> Get-ChildItem . -include *.log -rec | select-string "DnStatus                  Logged out", PlaceId | Out-File logout1.txt -width 600

Following syntax filter following
1. Line containing text "@ICCS, Status: logged out," where ICCS is T-Server switch name
2. Line also contains "Dn logged in"
3. Output to file logout1.txt, with max length 500

PS C:\> Get-ChildItem . -include "@ICCS, Status: logged out," | select-string "Dn logged in" | Out-File logout1.txt -width 500

Use following command to analyze Genesys GAD log to spool agent logout event with time, Genesys login, PBX login, Genesys place, and PBX extension. GAD log level must be verbose or higher

1. Log file extension is .log
2. Search sub-directory
3. Find "Status: logged out," and interprete comma as part of the search string
4. Further filter the output by "Dn was logged in" to eliminate duplicate lines
5. Spool to file logout3.txt with max length 600 character


PS C:\> Get-ChildItem . -include *.log -rec | select-string "Status: logged out\," | select-string "Dn was logged in" | out-file logout3.txt -width 600

To filter Genesys CPD dialler server's log and focus in specific dialing attempt

First, search the log for the phone number that it dial, and found it is using ThID 4412, and ReqID 397. Filter by using this unique identifier


PS C:\> [string[]](select-string -path .\CPD1.20111007_032122_001.log -pattern "ThID:  4412" | select-string "ReqID:        397" )  | %{$_.substring(95)}
03:40:44.5720 ThID:  4412 ReqID:        397: making a call to '036345376'
03:40:44.5720 ThID:  4412 ReqID:        397: license consumed, 891 in use
03:40:44.5720 ThID:  4412 ReqID:        397: enable Accurate PAMD with PVD
03:40:44.5720 ThID:  4412 ReqID:        397: reusing DM3 data channel: dtiB7T11
03:40:47.5720 ThID:  4412 ReqID:        397: getting DM3 voice channel handle for dtiB7T11
03:40:47.5720 ThID:  4412 ReqID:        397: DM3 voice channel handle for dtiB7T11 is dxxxB18C2
03:40:47.5720 ThID:  4412 ReqID:        397: primary server info: ("name"="ICCS_TSvr","host"="svr03.family.com.my","is-server"="1","client-type"="10","server-type"="1","port"="3060","protocol"="addp","addp-timeout"="30","addp-remote-timeout"="60","addp-trace"="both")
03:40:47.5720 ThID:  4412 ReqID:        397: queue is NULL
03:40:47.5720 ThID:  4412 ReqID:        397: Queue type unknown
03:40:47.6500 ThID:  4412 ReqID:        397: no recording channels available
03:40:47.6500 ThID:  4412 ReqID:        397: invoking gc_MakeCall: dtiB7T11
03:40:47.7900 ThID:  4412 ReqID:        397: event 0x827 received: Current CRN: 0, Event CRN: 101318758, cInfoDM3 CRN:101318758,Event chid:102, cInfoV chid:103 Channel: dtiB7T11, ChannelV: dxxxB18C2
03:40:47.7900 ThID:  4412 ReqID:        397: event 0x827, progress message received: dtiB7T11
03:40:47.7900 ThID:  4412 ReqID:        397: enable pre-connect SIT detection
03:40:47.7900 ThID:  4412 ReqID:        397: initiating pre-connect CPA: dxxxB18C2
03:40:52.3680 ThID:  4412 ReqID:        397: event 0x828 received: Current CRN: 101318758, Event CRN: 101318758, cInfoDM3 CRN: 101318758,Event chid:102, cInfoV chid:103 Channel: dtiB7T11, ChannelV: dxxxB18C2
03:40:52.3680 ThID:  4412 ReqID:        397: event 0x828, progress message received: dtiB7T11
03:40:52.7900 ThID:  4412 ReqID:        397: event 0x822 received: Current CRN: 101318758, Event CRN: 101318758, cInfoDM3 CRN: 101318758,Event chid:102, cInfoV chid:103 Channel: dtiB7T11, ChannelV: dxxxB18C2
03:40:52.7900 ThID:  4412 ReqID:        397: call state connected: dtiB7T11
03:40:52.7900 ThID:  4412 ReqID:        397: dx_stopch() successful: dxxxB18C2, state: 7
03:40:52.8220 ThID:  4412 ReqID:        397: event 0x85 received: Current CRN: 101318758, Event CRN: 0, cInfoDM3 CRN: 101318758,Event chid:103, cInfoV chid:103 Channel: dtiB7T11, ChannelV: dxxxB18C2
03:40:52.8220 ThID:  4412 ReqID:        397: Current CRN: 101318758, Event CRN: 0, cInfoDM3 CRN: 101318758, cInfoV CRN:0, Channel: dxxxB18C2
03:40:52.8220 ThID:  4412 ReqID:        397: CPA result: 12, pre-connect CPA: 1, post-connect CPA: 0, connected: 1
03:40:52.8220 ThID:  4412 ReqID:        397: pre-connect CPA is stopped: dxxxB18C2
03:40:52.8220 ThID:  4412 ReqID:        397: initiating post-connect CPA: dxxxB18C2
03:40:54.3530 ThID:  4412 ReqID:        397: event 0x85 received: Current CRN: 101318758, Event CRN: 0, cInfoDM3 CRN: 101318758,Event chid:103, cInfoV chid:103 Channel: dtiB7T11, ChannelV: dxxxB18C2
03:40:54.3530 ThID:  4412 ReqID:        397: Current CRN: 101318758, Event CRN: 0, cInfoDM3 CRN: 101318758, cInfoV CRN:0, Channel: dxxxB18C2
03:40:54.3530 ThID:  4412 ReqID:        397: CPA result: 10, pre-connect CPA: 0, post-connect CPA: 1, connected: 1
03:40:54.3530 ThID:  4412 ReqID:        397: call connected: dxxxB18C2
03:40:54.3530 ThID:  4412 ReqID:        397: positive voice detection: dxxxB18C2
03:40:54.3530 ThID:  4412 ReqID:        397: gc_MakeCall successful completion: dtiB7T11


No comments: