<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SAS Logs Purge Job/Script in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/433278#M12124</link>
    <description>&lt;P&gt;My environment: Suse Linux Backend, Windows user tools (EG)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question:&amp;nbsp; I want to set up a nightly script on our Linux server to do maintenance.&amp;nbsp; I'm going to include running the cleanwork utility to get rid of rogue saswork sessions, along with some general housekeeping.&amp;nbsp; I have a list of all the common logging directories, and I'm going through each one to inventory the files that are there, in addition to deciding on a reasonable rule for each directory (ie: delete all old log files over 60 days, etc).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can tell what I'm looking at with the SAS Server Logs (object spawner, etc) and I feel comfortable making that decision. There are some logs that I am not familiar with and I don't want to "rip the rug" out from under the process, so to speak, if that log is in some way needed.&amp;nbsp; I am mostly wondering about any logging related to Environment Manager, Perf and Audit Logs.&amp;nbsp; Are there any logs that I absolutely shouldn't touch and let them continue to accumulate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are a few specific examples that I'm wondering about:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Lev1/ObjectSpawner/AuditLogs&lt;/LI&gt;&lt;LI&gt;Lev1/WorkspaceServer/PerfLogs&lt;/LI&gt;&lt;LI&gt;/Lev1/Web/SASEnvironmentManager/emi-framework/Logs/ acm*, getMetricData*, masterAPMETL*,&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;/Lev1/Web/SASEnvironmentManager/emi-framework/Archive/logs_processed_date.zip&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Lev1/Web/SASEnvironmentManager/emi-client/Logs logDiscovery*, logCollect*,&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;/Lev1/Web/SASEnvironmentManager/agent-5.8.0-EE/log/agentstats agentstats*.csv.gz&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I could keep going with this, but I think you get the picture.&amp;nbsp; I'm only worried about the locations where there isn't a built-in log cleanup and I'm not sure if it's safe to delete some things.&amp;nbsp; Generally I wouldn't even think to delete anything that obviously didn't have a recurring log with several months of existing old files.&amp;nbsp; I'm not talking about anything current - just old stuff that could free up space.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are a newer SAS site and I have not used these boards as much as I should, so I hope this is the appropriate place to post this and I hope I am not duplicating an already asked question.&amp;nbsp; I've done several searches and found a few articles, but nothing that answers my specific question.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2018 21:16:53 GMT</pubDate>
    <dc:creator>webbm</dc:creator>
    <dc:date>2018-02-01T21:16:53Z</dc:date>
    <item>
      <title>SAS Logs Purge Job/Script</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/433278#M12124</link>
      <description>&lt;P&gt;My environment: Suse Linux Backend, Windows user tools (EG)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question:&amp;nbsp; I want to set up a nightly script on our Linux server to do maintenance.&amp;nbsp; I'm going to include running the cleanwork utility to get rid of rogue saswork sessions, along with some general housekeeping.&amp;nbsp; I have a list of all the common logging directories, and I'm going through each one to inventory the files that are there, in addition to deciding on a reasonable rule for each directory (ie: delete all old log files over 60 days, etc).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can tell what I'm looking at with the SAS Server Logs (object spawner, etc) and I feel comfortable making that decision. There are some logs that I am not familiar with and I don't want to "rip the rug" out from under the process, so to speak, if that log is in some way needed.&amp;nbsp; I am mostly wondering about any logging related to Environment Manager, Perf and Audit Logs.&amp;nbsp; Are there any logs that I absolutely shouldn't touch and let them continue to accumulate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are a few specific examples that I'm wondering about:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Lev1/ObjectSpawner/AuditLogs&lt;/LI&gt;&lt;LI&gt;Lev1/WorkspaceServer/PerfLogs&lt;/LI&gt;&lt;LI&gt;/Lev1/Web/SASEnvironmentManager/emi-framework/Logs/ acm*, getMetricData*, masterAPMETL*,&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;/Lev1/Web/SASEnvironmentManager/emi-framework/Archive/logs_processed_date.zip&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Lev1/Web/SASEnvironmentManager/emi-client/Logs logDiscovery*, logCollect*,&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;/Lev1/Web/SASEnvironmentManager/agent-5.8.0-EE/log/agentstats agentstats*.csv.gz&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I could keep going with this, but I think you get the picture.&amp;nbsp; I'm only worried about the locations where there isn't a built-in log cleanup and I'm not sure if it's safe to delete some things.&amp;nbsp; Generally I wouldn't even think to delete anything that obviously didn't have a recurring log with several months of existing old files.&amp;nbsp; I'm not talking about anything current - just old stuff that could free up space.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are a newer SAS site and I have not used these boards as much as I should, so I hope this is the appropriate place to post this and I hope I am not duplicating an already asked question.&amp;nbsp; I've done several searches and found a few articles, but nothing that answers my specific question.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 21:16:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/433278#M12124</guid>
      <dc:creator>webbm</dc:creator>
      <dc:date>2018-02-01T21:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Logs Purge Job/Script</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/433321#M12125</link>
      <description>&lt;P&gt;At a former site, we would run a scheduled monthly O/S script which would check a list of log folder locations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For each log folder:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Compress all log files older than 24 hours into a "monthly-named" zip file.&lt;/LI&gt;
&lt;LI&gt;Once compress, remove those log files.&lt;/LI&gt;
&lt;LI&gt;Remove any compressed files older than 3 months.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So each folder would contain (for example):&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;todays_log_file(s).log&lt;/LI&gt;
&lt;LI&gt;201712.zip&lt;/LI&gt;
&lt;LI&gt;201711.zip&lt;/LI&gt;
&lt;LI&gt;201710.zip&lt;/LI&gt;
&lt;LI&gt;other (non log) files&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;That way, admins had access to up to 3 months of logs if required. If older logs were required (unlikely?), revert to the server's filesystem backup.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't have a copy of the script here at my new site (different role), but it shouldn't be hard to replicate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 23:35:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/433321#M12125</guid>
      <dc:creator>AndrewHowell</dc:creator>
      <dc:date>2018-02-01T23:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Logs Purge Job/Script</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/433359#M12127</link>
      <description>&lt;P&gt;That's something like what I'm going for. I don't need help with the script - just looking to figure out what's safe to delete more or less. I like the idea of archiving some, then deleting old archives - might be a better way to go than just deleting the files if I'm uncomfortable with deleting some things to start with.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 02:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/433359#M12127</guid>
      <dc:creator>webbm</dc:creator>
      <dc:date>2018-02-02T02:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Logs Purge Job/Script</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/433399#M12130</link>
      <description>&lt;P&gt;Unsure if there's a definitive list - it depends what you have &amp;amp; how often it's used. (May also depend on your logging options.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My general rule of thumb is to zip any existing log files and remove any more than 24 hours old.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 06:16:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/433399#M12130</guid>
      <dc:creator>AndrewHowell</dc:creator>
      <dc:date>2018-02-02T06:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Logs Purge Job/Script</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/433412#M12132</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/118979"&gt;@webbm&lt;/a&gt;, you're right. There are certain logs that are very easy to spot and maintain, and there other's where you have no clue, especially on the mid-tier side.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From personal experience, I found it's really a learning process that you have to go through. Will you get an inventory of ALL the logs on the system ? I don't believe so. But it's necessarily a problem....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some considerations:&lt;/P&gt;
&lt;P&gt;1.) Run some OS commands that will list files and directories that contain something like "*log*". Yes, it's a fuzzy match.&lt;/P&gt;
&lt;P&gt;2.) Then go through all logs and locations and make an inventory. As you go through them, you'll start seeing patterns emerge.&lt;/P&gt;
&lt;P&gt;3.) If you are not reasonably sure about something, then rather park it (for now). Some logs are overwritten and some are really so small, it doesn't even warrant housekeeping.&lt;/P&gt;
&lt;P&gt;4.) Over time, as you learn more about the system, you can refine your 'log housekeeping inventory'&lt;/P&gt;
&lt;P&gt;5.) Also consider that many components in SAS are actually third-party components e.g. gemfire, so you will have to cast you research wider that just the SAS software.&lt;/P&gt;
&lt;P&gt;6.) The above will probably carry you 95% of the way, personally I wouldn't worry too much about the other 5% unless it becomes a problem, or if you are looking for work at 2am&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 07:17:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/433412#M12132</guid>
      <dc:creator>nhvdwalt</dc:creator>
      <dc:date>2018-02-02T07:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Logs Purge Job/Script</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/434150#M12163</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/118979"&gt;@webbm&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see perfectly where are you coming from. And I fully subscribe to the great recomendations and experience provided by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13754"&gt;@AndrewHowell&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SAS auditing, as any other auditing in other systems, consumes space and needs to be archived and clean once they are not directly needed anymore.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I truly think that, first, it would be very useful for you to understand what happens on SAS backstage, before providing a complete answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Those components are part of the&amp;nbsp;&lt;STRONG&gt;SAS Environment Manager Service Architecture Framework&lt;/STRONG&gt; (&lt;A href="https://support.sas.com/rnd/emi/SASEnvMgr/EVSAF/index.html" target="_self"&gt;link&lt;/A&gt;), more specifically from the Environment Manager Agent, ACM and APM.&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Understanding SAS Environment Manager Service Management Architecture&lt;/STRONG&gt; (&lt;A href="http://support.sas.com/documentation/cdl/en/evug/67886/HTML/default/viewer.htm#p0md48tpfq4yy7n1xxqn0re5v30l.htm" target="_self"&gt;link&lt;/A&gt;)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Paper 064-2014&lt;/STRONG&gt;:&amp;nbsp;Log entries, Events, Performance Measures, and SLAs: Understanding and Managing your SAS® Deployment by Leveraging the SAS® Environment Manager Data Mart (&lt;A href="http://support.sas.com/resources/papers/proceedings14/SAS064-2014.pdf" target="_self"&gt;link&lt;/A&gt;)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The part you would need to know is that:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;SAS Environment Manager agent feeds the SAS Environment Manager server, and this web app will feed the WIP database and a SAS internal process will feed the SAS Environment Manager Datamart. &lt;U&gt;Once the data collected by the agents are stored in WIP&lt;/U&gt;, the logs are not needed. Perhaps you would need to keep them archived due to company policies. This would cover the last location from your list.&lt;/LI&gt;
&lt;LI&gt;APM and ACM basically extend the logs from your SAS services, such as Metadata, Object Spawner, Workspace Srv, STP srv, etc. &lt;U&gt;A nightly job will run every night, collecting the data and filling in WIP and the SAS Environment DataMart. Again, once collected&lt;/U&gt;, you can handle them safely. This would cover your first locations on your list.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Knowing this, you can create and customise the retention period of your logs in your system. SAS already does this, partially, out-of-the-box for you:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;/Lev1/Web/SASEnvironmentManager/emi-framework/Archive/logs_processed_date.zip is an actual archived collection of logs.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;SAS will also have a retention period on your audited data. You will want to review and understand well this part, specially if you will clean the original locations of the logs:
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://support.sas.com/kb/58/599.html" target="_blank"&gt;http://support.sas.com/kb/58/599.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://blogs.sas.com/content/sgf/2016/01/26/going-visual-analytics-audit-data-archiving/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2016/01/26/going-visual-analytics-audit-data-archiving/&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Hope it helps.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Juan&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 13:07:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Logs-Purge-Job-Script/m-p/434150#M12163</guid>
      <dc:creator>JuanS_OCS</dc:creator>
      <dc:date>2018-02-05T13:07:57Z</dc:date>
    </item>
  </channel>
</rss>

