Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Dynamic SSH Trailer

Solved1.63K views28th September 2020driver driver development drivers serial SSH
1
Blake Smethers [SLC] [DevOps Advocate]980 31st August 2020 0 Comments

I am making a request to a device via SSH, and am having a few problems.

One – creating a dynamic trailer.

Previously, we were using the # symbol as the trailer, but found that this cut some responses in two because there was a # inside the response. To combat this, I’d like to improve the trailer. When we get a response, we get back the terminal line ([SystemName]#). For example, Router0232#. Is it possible to create a dynamic trailer to ensure that I capture all of the data? That way, I can use the entire string as my trailer.

I tried to use the times=”2″ to guide how many times the trailer will occur, but also had no success there.

Two – Issue with request speed.

The request I am making fails or returns an empty response after startup. The format for all requests is the following:

Init CLI 1
Init CLI 2
Data request (desired data)

The Init CLI requests set up the terminal so that no data is lost in the response. If I don’t add these two pairs to all of our requests, I receive extra/missing information in the response we care about. Still, on startup, I receive incorrect data in my response, as below:

As you can see, there seems to be some overlap as I’ve received the previous command in my last (terminal width 0) response. However, if I execute the request again (manually with a button, for example), I receive the correct response. The only way I could get the response to work on the first request was using a half second delay. See below:

However, there are some requests we need to make thousands of times and this can quickly escalate the polling time. I’m still checking to see if we can make bulk requests of data, but in the meantime I want to see if I can make the responses return correctly without adding too much delay. Is there some way to improve the communication to reduce this overlapping of response, or do I just need to slow the communication down?

Thanks in advance for any information.

Blake Smethers [SLC] [DevOps Advocate] Selected answer as best 28th September 2020

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
3
Laurens Moutton [SLC] [DevOps Enabler]8.81K Posted 1st September 2020 0 Comments

To answer to question one:

-Having a true dynamic trailer during run-time with classic responses does not exist (yet). There is however a corner case for a serial driver. This worked three years ago, it could be that it’s not working anymore or that it doesn’t work for SSH: define the length interprete type of the trailer parameter to either fixed or next param. In case of a fixed length execute the change length action, then execute a copy action with the new value. With the next param it’s not needed to have the change length action.
There are some remarks with this way of working: warnings will be added to the logging that there’s an attempt to change the length of a fixed parameter. Changing the trailer value is only possible BEFORE launching the first command. It’s not possible to say “use trailer A for first response, then use trailer B for the second response”, then the second (and next responses) will wait until timeout time. This means that you can’t start with ‘#’ at startup to determine the system name and modify the trailer afterwards. If a saved parameter is used as trailer with the system name from previous runs and the system name ever changes means that the communication will be in timeout forever due to a mismatch in the trailer. To be tested could be: use one trailer # parameter to determine the name at startup and use another trailer parameter that will be modified.

-Another possibility is to use a multi-threaded timer: from a QAction the format of the response can be determined, also the trailer. Downside here is that a multi-threaded timer goes of every x seconds and it’s more complex if different groups need to be executed at different poll speeds.

Blake Smethers [SLC] [DevOps Advocate] Selected answer as best 28th September 2020
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs