4 Replies Latest reply on Feb 23, 2017 8:21 AM by cachilli

    How can I enable logging on a device on demand without having to push an update from Avalanche?

    Matt Dermody SSMMVPGroup

      Can I trigger the enablement of device side TelnetCE logging on demand from the device without having to push a TelnetCE Update from the Avalanche server? I see there is a Logging_On scripting method that I could trigger through a keypress activated script but is this the same logging as the Network Traffic Log file configured in the Emulation Parameters or is it a different log? If different does it still contain some of the same info as the Network Traffic Log File? If not can I enable logging on demand using any other methods?

       

       

      Right now, these are the only two options that come to mind and I'm honestly not a fan of either of them:

       

      1. Make the change to the TelnetCE package to Enable Logging for the whole site. Manually update the one sample device so that it receives the update. All other devices won’t receive the same update unless they are rebooted or are manually updated while logging is temporarily enabled. After you’ve gathered the information that you’re looking for on the sample device you can then disable logging again at the Avalanche server level. Your sample device, and any devices that may have inadvertently received the command to enable logging will then receive the command to disable logging. This is by far the easiest approach but may have the unintended consequence of enabling logging on other devices.
      2. Clone the current Production Software Profile for that Site and create a new Test profile. Change the Selection Criteria for the new Profile to be inclusive of the device’s serial number (eg. SerialNumber = XYZ) and then also change the Selection Criteria of the current Prod profile to be exclusive of the same device (Eg. SerialNumber != XYZ) so that that the test device isn’t simultaneously eligible for two configurations. Then make the change to the cloned profile to enable TelnetCE Logging and deploy it to the test device. This process is significantly more complex but it will prevent other devices from inadvertently having logging turned on.
        • 1. Re: How can I enable logging on a device on demand without having to push an update from Avalanche?
          cachilli SupportEmployee

          The script logging only enables logging with in the script to debug the script itself..the only other option besides what you stated above would be to enable logging the traditional way, save off the bin files in the install dir to someplace on the device.. turn logging off on the profile.. when you need logging you could swap out the bin files for the saved off ones but even this is cumbersome to do

          • 2. Re: How can I enable logging on a device on demand without having to push an update from Avalanche?
            Matt Dermody SSMMVPGroup

            I had thought about that option, but that would be problematic if other Emulation Parameters were changed after the fact. Meaning if I created a custom TermCfg.bin file using this process with Logging Enabled and stored it on the device it wouldn't receive the same updates if the main Emulation Parameters were later changed in any way. I would either have to constantly maintain the logging version of the TermCfg.bin file or live with the fact that other Emulation Parameters might differ between the two versions of the file when I temporarily swapped them out.

             

            It's a shame there isn't a way to trigger it from a key press within the TelnetCE session. It'd also be pretty cool if you could Enable or Disable it through a custom Avalanche Property so that it could be a sortable value in the inventory.

             

            Are there any APIs that could be called from another application? Could I write a custom application that would open the TermCfg.Bin and set the logging to enabled on demand? I feel like not since the TermCfg.bin file seems kind of encrypted or obfuscated but I've done something similar before for dynamically setting Printer Values. It seems to be somewhat human readable...

             

            Disabled:

             

            Enabled:

            What happens if you specify a directory that doesn't exist on the device? I'm thinking I could specify an invalid directory in the Emulation Parameters for Network Traffic Log file so that there would be a placeholder in the TermCfg.Bin that I could then modify programmatically on demand. If specifying an invalid directory prevents logging from being actually enabled then that might just work perfectly.

            • 3. Re: How can I enable logging on a device on demand without having to push an update from Avalanche?
              cachilli SupportEmployee

              an incorrect directory would work however a message would pop up every time you started the profile that the path is invalid..

              • 4. Re: How can I enable logging on a device on demand without having to push an update from Avalanche?
                cachilli SupportEmployee

                As for editing the bin file and restarting the client.. I have actually never tried before.. I suppose it would work if we knew exactly what lines are being added to the bin..