This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

CatTools_Client Memory Issue

Okay I've been running into a serious problem when using CatTools. I've wrote a custom script to do IOS Upgrades and also another script to pull Cisco Device information and save it to a file so I can import it into the database. The scripts work great but one problem. The memory that the CatTools_Client.exe is using when running these scripts never goes down but keeps climbing. This looks like a memory leak to me because after it finishes the activity on a device it's never restore that memory back to the pool. For me to do my upgrades I have to run it on less than 400 devices, after it completes, kill the CatTools_Client.exe process and then I can perform another batch. I've watched the scripts that are already with Cattools and they don't experience this problem.

So my question is what is wrong with my scripts that isn't wrong with the default scripts that are included. I have included this line at the end of my scripts.     cl.DisconnectHost which is supposedly to disconnect the client but it doesn't sound or look like it's working correctly. If a developer sees this I would be more than happy to let them look at my script so they can see if there is a problem in it.

  • Hi Sartuch--

    What version of CatTools are you running? Did you upgrade to 3.5 recently?

    M

  • I'm running 3.5 and have been since it came out. Any script that I write will continue to increase the amount of memory being used but I can run the same amount of devices using an included script and the memory fluctuates like its supposed soI have no idea what is wrong with my scripts compared to an included script.

  • Hi Sartuche--

    I checked our defect tracking system and it looks like this is known issue but I'm marking this for the PM to comment on.

    M

  • Well my maintenance ran out the end of last month so I'll wait until a release comes out that fixes the issue and renew my contract then.

  • Hi Sartuche--

    I discussed this with the PM and here are some other tasts to try:

    1. Goto: OPTIONS > SETUP > MISC (Tab). 
    2. Review the Clear log window before starting each activity checkbox.
      If this is unchecked, CatTools will keep appending rows to the Info Log pane with every activity run. This will increase memory usage although not by much because the Info Log pane also gets truncated after a couple of thousand records.

    Also, you can try rebooting.

    HTH,

    M

  • I already had it set to Clear the Log pane with every action. I even set it to not to log to a file and it doesn't make a difference.

  • Hi Sartuche24,

    Can you attach your custom scripts and I'll see if I can spot anything obvious which may be causing the memory leak in the CatTools_Client.exe.

    Also, with regards to the memory leak; how serious is it?  Are we talking a a few bytes with each run or are we talking mega bytes?

    Regards,

    Steve 

  • Here is the script that is causing a problem, I only have one other script and it's based off of this so whatever is fixed in this one will correct my other script. If in fact it is a script problem. Also it is using Mega Bytes and has actually used over 1Gig of memory before but if I use the same amount of devices with an included script I don't have a problem with the memory.

     

    Device.Update.IOS.Router.FTP.zip

  • Sartuche24,

    I had a quick browse over your script and I noticed a few things.

    The main one is that you appear to have added a lot of functions coded into the Client Activity script file; which probably ought to go into the Device script file.  Normally the Client script files simply has instructions to call functions within the device scripts (for example 'Login'; 'SendPostLoginCommands';  'EnterEnableMode'; 'SendPostEnterEnableModeCommands'; 'SendSessionTerminationCommands', etc.  I can see you are already calling these functions from within your client script.

    However I also see functions such as 'ProcessShowVersion', 'RunCommandFile', 'VerifyFlash', etc. which are all still running commands on the device.  These really ought to be added to the device script file.

    You'd then normally access these from within the function call to the activity within the device script, e.g:

    sResults = Custom_Activity_Template(sAltCommand)

    Take a look at the template files in the \templates sub-folder of CatTools and you'll see what I mean.

     

    I also noticed you are handling a reload.  When a reload is issued on the device, the communication between CatTools can sometimes timeout.  If not careful (i.e. if the reload command is being issued within a loop of commands to send); it could result in a infinite loop.

    You'd need to put debug messages in your script to check for this.

    Steve

  • I'll modify my scripts and see what happens from there. I'll give the results after I complete some testing.