AutoSys Workload Automation

  • 1.  Agent Log Clean Ideas, Please!

    Posted Nov 01, 2013 10:53 AM

    I am trying to find a way to effeciently manage agent logs.

    In DE 11.3, I am currently creating 1 unix job for each agent and calling cli (see below). The issue is that I have to remember to add a new job to the app every time we install a new agent, or remove them when we decommission servers.

    <host> <port> <user> 0X8B429CFD777543F5FAB7B743C5E85 "purgeagentlogs agent('<AGENT>')"

    Has anyone found a good way to dynamically populate the agent names from the topology into just one job to run the purgeagentlogs? Has anyone found a better way to automate the management of your agent logs?



  • 2.  RE: Agent Log Clean Ideas, Please!

    Posted Nov 01, 2013 12:46 PM

    I think there is an option to instruct the agent to automatically rotate the log when it grow to certain size.  With that arrangement, there is always only the active log and the archived log.



  • 3.  RE: Agent Log Clean Ideas, Please!

    Community Manager
    Posted Nov 04, 2013 11:18 AM
    henry.cheung:

    I think there is an option to instruct the agent to automatically rotate the log when it grow to certain size.  With that arrangement, there is always only the active log and the archived log.


    April, have you had any luck with this?



  • 4.  RE: Agent Log Clean Ideas, Please!

    Posted Nov 07, 2013 02:31 PM

    Hello April, within the ESP Agents, there is a txt file called agentparm.txt. Inside this file you have to add (depending on your version) the following parms so the logs automatically get cleaned up or archieved.

    Below is the agentparm.txt file:

    #
    # Agent settings for nt-x86-32
    #
    # Log
    #
    # log.archive settings:
    # 0 - archive with time extension
    # 1 - append ".archive.log"
    # 2 - delete previous log
    # 3 - keep writing to the same log file
    log.level=1
    log.archive=1
    log.maxsize=1M

    #
    # Agent name

    For more information, look in the installation guide.

    HTH.

    Allen Thennes



  • 5.  Re: RE: Agent Log Clean Ideas, Please!

    Posted Jul 07, 2015 06:23 PM

    I'd like to use log.archive=0

    are there any log parameters similar to spool clean-up?

    runnerplugin.spool.expire=10D
    runnerplugin.spool.clean.enable=true
    runnerplugin.spool.sleep=1D
    


  • 6.  Re: Agent Log Clean Ideas, Please!

    Posted Jul 07, 2015 06:46 PM

    It looks like we can only control with the size of the log, not by days?

     

    log.maxsize=maximum_size[B|K|M|G]

    Specifies the maximum log size. When the log file exceeds the specified size, the agent

    archives it and starts a new log file. If the log.archive parameter is set to 3, the agent ignores

    this parameter. The agent does not create an archive file, but it does append all logs. You can

    specify the following optional modifiers:

    B

    Specifies the size in bytes.

    K

    Specifies the size in kilobytes.

    M

    Specifies the size in megabytes.

    G

    Specifies the size in gigabytes.

    Limits: Up to 2 GB

    Default: 1M

    Note: The default (no modifier) size is in bytes

     

    Thanks,

    Chandru



  • 7.  Re: Agent Log Clean Ideas, Please!

    Posted Jul 10, 2015 10:01 AM

    you can always run a delete files etc based off time in windows and in *nix.

    using find command then get list and delete or using perl.

    This is what i offer from time to time through stirling forum. i have a delete files perl process that is able to run on windows and *nix.

     

    I am sure many others have written or used similar.

     

    Good luck.



  • 8.  Re: Agent Log Clean Ideas, Please!

    Posted Jul 10, 2015 01:38 PM

    an agent should clean its own files the same same way as with spool files.

     

    having autosys jobs to clean agent files has two disadvantages: jobs need to be created for every new machine and job must have root as an owner (for most of us)



  • 9.  Re: Agent Log Clean Ideas, Please!

    Posted Jul 10, 2015 01:52 PM

    Agreed. It's just an alternative until they get it working..

    clean_files used to do that.. i think they need to make it do it again..

     

    Steve C.



  • 10.  Re: Agent Log Clean Ideas, Please!

    Posted Jul 10, 2015 02:22 PM

    +1 for clean_files