Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-15-2015, 08:21 AM
ronanOrange ronanOrange is offline
Registered User
 
Join Date: Jul 2015
Posts: 4
Unhappy Script to alert about Packet Loss

Hello Friends,

About some time, here in my work, my team started to monitor a SIP Trunk looking for a new drop for we analise the problem. To be honest i cant explain very well, i'm a new comer here.

Anyway, i saw that the SecureCRT can receive a Script, and a thouth this could help us, but i don't have any experience in developing.

So, any of you have a script that can identify a sequence of packet loss, something like 8 packet straight and when this happens give to us a alarm?

This would realy help us here.

Thanks in advance.
Reply With Quote
  #2  
Old 07-15-2015, 03:22 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi ronanOrange,

Thanks for the post.

I am not sure if you could script something like this.

If you have some indicator in the SecureCRT terminal window that tells you that a packet is lost, then I would think you could script it.

When using SecureCRT, how do you manually determine if there is packet loss?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 07-16-2015, 06:14 AM
ronanOrange ronanOrange is offline
Registered User
 
Join Date: Jul 2015
Posts: 4
So, that's was just something that i've imagined that could be done, i'm not sure about it.

As i said, i'm not good in dev, but i saw that you can tell (by script) the secureCRT to do something when he finds some string. What i thought is when he finds a sequence of dots, like 8 or 9 packets loss in straight, he could make an action. Is that possible?


Thanks again
Reply With Quote
  #4  
Old 07-16-2015, 11:08 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi ronanOrange,

If the terminal window has output that indicates packet loss, then you could send your command, and wait for the output.

Please note that I have no knowledge of your process or environment, so I can't make any guesses as to what might be possible.

If you could post the output from the point that you issue a command to the point that you know there is packet loss, I may be able to provide further suggestions.

If you do post output, please ensure that there is no sensitive data in your post.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 07-16-2015, 12:18 PM
ronanOrange ronanOrange is offline
Registered User
 
Join Date: Jul 2015
Posts: 4
When i ping, i send a simple comand, like:<ping 10.255.60.4 repeat 100000>

In green is what is printed:

ROUTER#ping 10.255.60.4 repeat 100000
Type escape sequence to abort.
Sending 100000, 100-byte ICMP Echos to 10.255.60.4, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!(the ping is continuous)!!!!!!........!!!!!!(that sequence of dots are packet lost)

Each point is a packet loss, if we had anything to alert us it would be really useful

I'm sorry that i couldn't be more clear, and again, i'm realy gratefull for your help.

Last edited by ronanOrange; 07-16-2015 at 12:24 PM.
Reply With Quote
  #6  
Old 07-16-2015, 04:14 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi ronanOrange,

Thanks for the clarification. It seems like you could use the ReadString() method to capture each character that is sent to SecureCRT after issuing a command, and use that to build a string. You could then check the string to see if you find 8 continuous dots in the string. This may have a performance impact, but if you are just watching, I am not sure if that would matter.

For example:
Code:
strOutput = ""
crt.Screen.Synchronous = True
crt.Screen.Send "ping 10.255.60.4 repeat 100000" & vbcr
crt.Screen.WaitForString "timeout is 2 seconds:"
Do
    strOutput = strOutput & crt.Screen.ReadString
    If Instr(strOutput, "........") > 0 Then
        MsgBox "I found packet loss."
        Exit Do
    End If
Loop
Does this help you accomplish your goal?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #7  
Old 07-17-2015, 06:58 AM
ronanOrange ronanOrange is offline
Registered User
 
Join Date: Jul 2015
Posts: 4
Smile

That's exactly what i needed....

Man, i don't know how to thank you. You saved us from a lot of work.

Thanks you very much!!
Reply With Quote
  #8  
Old 07-17-2015, 08:15 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
You are welcome ronanOrange. I am glad I could help.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
Reply

Tags
packet loss , scrypt


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 12:07 AM.