Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use CMS' tool CLINT for real time stats 9

Status
Not open for further replies.

BHodgins

IS-IT--Management
Nov 1, 2001
222
US
After much trial and error, here's how I use clint (I expect to see a lot of stars next to my name for posting this!!!) :)

1. Telnet to your CMS Server (using cms login)
2. At $ prompt, type: cd /cms/toolsbin
3. Type: clint

You'll now see a menu loosely based on the CMS main menu. Now I'm going to show you how to run a real time report based showing logged in agents having skill #1.

4. At the > prompt, type: do menu 0 "rep:rea:spl:skill st"
5. Type: set field 10 "1"
6. Type: set field 20 "10"
7. Type: do "Run"
8. Type: do "Exit"

In step 4, "rep" stands for "reports", "rea" stands for Real-Time", "spl" stands for "Split", and so on. You may have to look at the normal menu to determine the letters to use. Note that you must use as many letters as necessary to be "unique" for that menu item.

In step 5, field 10 is the split number (in this example split "1").

In Step 6, field 20 is the refresh interval (in this example, 10 seconds).

Now, if you are scraping this report using screen capture or something similar, you can script steps 7 and 8 to run over and over. You don't need to retype all the commands in again, just the "Run" and "Exit" command as the previous settings are still active.

You must do the "Exit" command immediately after the "Run" command. If you don't the output (every 10 seconds, or whatever you've set the Refresh rate to) will continue to post to the output buffer, but not be visible on the screen. And then the next Run command will show multiple versions of the report (one for each refresh interval).

You can type &quot;?&quot; plus <Enter> to see the available clint commands. For example, after you type the &quot;do menu ...&quot; command, you can type &quot;list&quot; to see the fields (and the field numbers) for that report.

When done, type &quot;Logout&quot; to exit the clint program.

If you have the # prompt instead of the $ prompt, you need to use a login profile based on the cms account. I'm not a deep Unix user and can't help on this one.

Obviously this is only the start. There's a lot more you can do. For instance, run a custom terminal screen report (but not Report Designer) reports. Or you can show calls waiting for a split.

But I suspect Avaya strongly frowns upon people using this utility. So be careful!

Bill
 
After the do &quot;run&quot;, you can also type &quot;watch&quot; so you don't have to run/exit again and again, clint will just 'push' the data.
 
Once you make the connection in Telnet and have the data refreshing on its own, what screen capture software is out there. I'm using Crystal Reports 8 and ASP at this company?
 
gommbar -

the watch command is very cool - thanks for pointing this out to me

you probably want to put a number of seconds after the watch command for how long to watch

otherwise it'll be stuck in a continuous loop and you'll have to Ctrl-Z to get out and then kill the processes (not very clean)

thanks again
 
When you're done watching, you can hit Ctrl-C to return to the prompt (cancel the watch).

You're still in the report context, so you could hit "watch" again if you like.
 
Here's a basic, non-optimized, very ugly EXPECT script to use to gather the data into a MySQL table, along with a MySQL table definition to match. I'll leave it to you to have MySQL and Expect set up properly. Later I would do some post-processing to this, but not yet.

By default it will use the same report in the example above, but with Skill 50 and Refresh of 5 seconds.

Prerequisites:
1. Expect is working
2. MySQL is installed and working

MySQL chores:
1. Create a db called 'lucentcms' or replace that string in the scripts below.
2. Create a table called 'rtimport' using the script below.
3. Create a mysql user called 'rtimport' with most all rights to that table (lucentcms.rtimport). Grant access to the table using your favorite MySQL administration utility. Be sure to grant the global "FILE" permission to that user too...

CentreVu chores:
1. Create a user called rtpull
2. Grant rights to view the split/skill that you will use
3. Change the user's shell on the cms box to /cms/toolsbin/clint (don't ask me how).

Other chores:
1. Scan the files below for changes you'll need to make.
2. Save them off.

Once that's all set, run "expect script.exp" from the command line.

------ MYSQL SCRIPT -------------
create table `rtimport`
( Garbage1 char(2),
AgentName char(18),
LogId char(4),
Garbage2 char(1),
AuxReason char(11),
AuxState char(4),
AuxDirection char(4),
Skill char(6),
Garbage3 char(1),
SkillLevel char(2),
TimeString char(10),
Garbage4 char(1),
VDNString char(20))


---- script.exp ----
log_file
set timeout -1
spawn telnet centrevu.my.domain.name
match_max 100000
expect "ogin"
send -- "rtpull\r"
expect "assword"
send -- "password\r"
expect ">"
send -- "do menu 0 \"rep:rea:spl:skill st\"\r"
expect "{}"
send -- "set field 10 \"50\"\r"
expect ">"
send -- "set field 20 \"5\"\r"
expect ">"
while {1} {
log_file rtimport.txt
send -- "do \"run\"\r"
send -- "watch\r"
expect " Succe"
log_file
system mysqlimport -u rtimport -Lsfd -ppassword lucentcms --fields-term
inated-by='' --fields-enclosed-by='' --lines-terminated-by='\n' rtimport.txt
system rm -f rtimport.txt
}
send -- "logout\r"
expect ">"
expect eof
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top