{"id":297293,"date":"2020-01-17T21:00:16","date_gmt":"2020-01-17T21:00:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=297293"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=297293","title":{"rendered":"\u0412\u044b\u0431\u043e\u0440 \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u0431\u044d\u043a\u0430\u043f\u0430 \u043b\u043e\u0433\u043e\u0432"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/homecredit\/blog\/484414\/\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u044b\u0431\u0438\u0440\u0430\u043b \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0441\u0436\u0430\u0442\u0438\u044f \u043b\u043e\u0433\u043e\u0432 \u043d\u0430\u0448\u0435\u0439 \u0444\u0440\u043e\u043d\u0442-\u043e\u0444\u0438\u0441\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e, \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u0435\u0434\u0438\u043d\u043e\u0439 \u0444\u0440\u043e\u043d\u0442 \u043e\u0444\u0438\u0441\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0411\u0430\u043d\u043a\u0430. \u042f \u043e\u0442\u0432\u0435\u0447\u0430\u044e \u0437\u0430 \u0435\u0435 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0435, \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 DevOps.<br \/>  \u041d\u0430\u0448\u0430 \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u2014 \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0435\u0435 \u0431\u043e\u043b\u0435\u0435 5 000 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u2014 \u044d\u0442\u043e \u00ab\u043c\u043e\u043d\u043e\u043b\u0438\u0442\u00bb \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0441\u0432\u043e\u0438\u043c\u0438 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430\u043c\u0438 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430\u043c\u0438. \u041d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0434\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u043d\u043e\u0441\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b.<br \/>  \u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u043d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 130 \u0413\u0411 \u00ab\u0441\u044b\u0440\u044b\u0445\u00bb \u043b\u043e\u0433\u043e\u0432 \u0438, \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c ENG \u0441\u0442\u0435\u043a (Elasticsearch Nxlog Graylog), \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u043b\u043e\u0433\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, stack trace \u043e\u0448\u0438\u0431\u043e\u043a), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u0435\u0441\u0442\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e, \u0432\u0441\u0442\u0430\u0451\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0410 \u043a\u0430\u043a\u043e\u0439 \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0441 \u044d\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0435\u0439?\u00bb<br \/>  \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 PowerShell, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b \u0430\u043d\u0430\u043b\u0438\u0437 \u0437\u0430 \u043c\u0435\u043d\u044f.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440\u044b rar, 7z \u0438 zip \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0438, \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043d\u0430 \u0434\u0438\u0441\u043a\u0435.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">ArchSearch.ps1<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">#Requires -Version 4.0  # \u041e\u0447\u0438\u0449\u0430\u0435\u043c \u044d\u043a\u0440\u0430\u043d, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e Clear-Host  # \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0433\u0434\u0435 \u0431\u0430\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b Set-Location $PSScriptRoot  # \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 $Archive = &quot;Archive&quot; $ArchFileName = &quot;ArchFileName&quot; [array]$path = (Get-ChildItem '.\\logs').DirectoryName|Select-Object -Unique  # \u0414\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u0430\u043f\u043a\u0430-\u0430\u0440\u0445\u0438\u0432. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0435\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430. if ((Test-Path -Path &quot;.\\$Archive&quot;) -ne $true){     New-Item -Path .\\ -Name $Archive -ItemType Directory -Force } else {     # \u0415\u0441\u043b\u0438 \u043f\u0430\u043f\u043a\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 - \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435     Get-ChildItem .\\$Archive|Remove-Item -Recurse -Force }  # \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b [array]$table=@()  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044e Rar #rar  #  m&lt;0..5&gt;       Set compression level (0-store...3-default...5-maximal) 1..5|foreach{ $CompressionLevel = $(&quot;-m&quot; + $_) $mc = Measure-Command {cmd \/c .\\rar.exe a -ep1 -ed  $CompressionLevel -o+ -tsc .\\$Archive\\$($ArchFileName + $_) &quot;$path&quot;} [math]::Round(($mc.TotalMilliseconds), 0) $ArchFileNamePath = &quot;.\\$Archive\\$($ArchFileName + $_ + &quot;.rar&quot;)&quot; $table += &quot;&quot;|Select-Object -Property @{name=&quot;ArchFileName&quot;; expression={$ArchFileNamePath -split &quot;\\\\&quot;|Select-Object -Last 1}},` @{name=&quot;CompressionLevel&quot;; expression={$CompressionLevel}},@{name=&quot;Extension&quot;; expression={&quot;rar&quot;}},@{name=&quot;Size&quot;; expression={(Get-ChildItem $ArchFileNamePath).Length}},` @{name=&quot;Time&quot;; expression={[math]::Round(($mc.TotalMilliseconds), 0)}},` @{name=&quot;Size %&quot;; expression={0}},@{name=&quot;Time %&quot;; expression={0}},@{name=&quot;Result %&quot;; expression={0}} }  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044e 7z #7z # -mx[N] : set compression level: -mx1 (fastest) ... -mx9 (ultra) #cmd \/c &quot;$env:ProgramFiles\\7-Zip\\7z.exe&quot; a -mx=&quot;$MX&quot; -mmt=&quot;$MMT&quot; -t7z -ssw -spf $($ArchFileName + &quot;Fastest&quot;) &quot;$path&quot; 1..9|foreach{ $CompressionLevel = $(&quot;-mx=&quot; + $_) $mc = Measure-Command {cmd \/c &quot;$env:ProgramFiles\\7-Zip\\7z.exe&quot; a $CompressionLevel -t7z -ssw -spf .\\$Archive\\$($ArchFileName + $_) $path} #-mmt=&quot;$MMT&quot; [math]::Round(($mc.TotalMilliseconds), 0) $ArchFileNamePath = &quot;.\\$Archive\\$($ArchFileName + $_ + &quot;.7z&quot;)&quot; $table += &quot;&quot;|Select-Object -Property @{name=&quot;ArchFileName&quot;; expression={$ArchFileNamePath -split &quot;\\\\&quot;|Select-Object -Last 1}},` @{name=&quot;CompressionLevel&quot;; expression={$CompressionLevel}},@{name=&quot;Extension&quot;; expression={&quot;7z&quot;}},@{name=&quot;Size&quot;; expression={(Get-ChildItem $ArchFileNamePath).Length}},` @{name=&quot;Time&quot;; expression={[math]::Round(($mc.TotalMilliseconds), 0)}},` @{name=&quot;Size %&quot;; expression={0}},@{name=&quot;Time %&quot;; expression={0}},@{name=&quot;Result %&quot;; expression={0}} }  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044e zip (\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f PS &quot;Compress-Archive&quot;) #zip  1..2|foreach{      Switch ($_){          1{$CompressionLevel = &quot;Fastest&quot;}          2{$CompressionLevel = &quot;Optimal&quot;}      } $mc = Measure-Command {Compress-Archive -Path $path -DestinationPath .\\$Archive\\$($ArchFileName + $_) -CompressionLevel $CompressionLevel -Force} [math]::Round(($mc.TotalMilliseconds), 0) $ArchFileNamePath = &quot;.\\$Archive\\$($ArchFileName + $_ + &quot;.zip&quot;)&quot; $table += &quot;&quot;|Select-Object -Property @{name=&quot;ArchFileName&quot;; expression={$ArchFileNamePath -split &quot;\\\\&quot;|Select-Object -Last 1}},` @{name=&quot;CompressionLevel&quot;; expression={$CompressionLevel}},@{name=&quot;Extension&quot;; expression={&quot;zip&quot;}},@{name=&quot;Size&quot;; expression={(Get-ChildItem $ArchFileNamePath).Length}},` @{name=&quot;Time&quot;; expression={[math]::Round(($mc.TotalMilliseconds), 0)}},` @{name=&quot;Size %&quot;; expression={0}},@{name=&quot;Time %&quot;; expression={0}},@{name=&quot;Result %&quot;; expression={0}} }  # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u043e \u043f\u043e\u043b\u044e Size \u0438 \u0431\u0435\u0440\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 [0] - \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0441\u0436\u0430\u0442\u044b\u0439 \u0444\u0430\u0439\u043b $Size = ($table|Sort-Object -Property Size)[0].Size \/ 100 # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u043e \u043f\u043e\u043b\u044e Time \u0438 \u0431\u0435\u0440\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 [0] - \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0436\u0430\u0442\u044b\u0439 \u0444\u0430\u0439\u043b $Time = ($table|Sort-Object -Property Time)[0].Time \/ 100  # \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0438\u0442\u043e\u0433\u043e\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 $table|foreach { $_.time $_.&quot;Size %&quot; = [math]::Round(($_.Size \/ $Size), 0) $_.&quot;Time %&quot; = [math]::Round(($_.Time \/ $Time), 0)     if ($_.&quot;Size %&quot; -ge $_.&quot;Time %&quot;){         $_.&quot;Result %&quot; = $_.&quot;Size %&quot; - $_.&quot;Time %&quot;     } else {         $_.&quot;Result %&quot; = $_.&quot;Time %&quot; - $_.&quot;Size %&quot;     }  }  # \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043f\u043e &quot;Size %&quot; - \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0441\u0436\u0430\u0442\u044b\u0439 \u0444\u0430\u0439\u043b $table|Sort-Object -Property &quot;Size %&quot;,&quot;Result %&quot;|Select-Object -First 1|Format-Table -AutoSize # \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043f\u043e &quot;Result %&quot; - \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u043c \u043c\u0435\u0441\u0442\u043e\u043c \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 $table|Sort-Object -Property &quot;Result %&quot;,&quot;Size %&quot;,&quot;Time %&quot;|Select-Object -First 1|Format-Table -AutoSize  $table|Sort-Object -Property &quot;Size %&quot;,&quot;Result %&quot;|Select-Object -First 1|Format-Table -AutoSize $table|Sort-Object -Property &quot;Result %&quot;,&quot;Size %&quot;,&quot;Time %&quot;|Select-Object -First 1|Format-Table -AutoSize  # \u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u0434\u0435\u043b\u0430\u043d\u0430! \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0432\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438 \u043c\u0435\u0441\u0442\u043e Get-ChildItem .\\$Archive|Remove-Item -Force<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h1 id=\"podgotovitelnye-raboty\">\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b:<\/h1>\n<p>  <\/p>\n<pre><code class=\"php\"># \u0417\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f PowerShell \u043c\u0435\u043d\u044c\u0448\u0435 4.0 ($PSVersionTable): #Requires -Version 4.0  # \u041e\u0447\u0438\u0449\u0430\u0435\u043c \u044d\u043a\u0440\u0430\u043d, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e Clear-Host  # \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0433\u0434\u0435 \u0431\u0430\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u044c .\\) Set-Location $PSScriptRoot<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"php\"># \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 $Archive = &quot;Archive&quot; $ArchFileName = &quot;ArchFileName&quot; [array]$path = (Get-ChildItem '.\\logs').DirectoryName|Select-Object -Unique  # \u0414\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u0430\u043f\u043a\u0430-\u0430\u0440\u0445\u0438\u0432. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0435\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 if ((Test-Path -Path &quot;.\\$Archive&quot;) -ne $true){     New-Item -Path .\\ -Name $Archive -ItemType Directory -Force } else {     # \u0415\u0441\u043b\u0438 \u043f\u0430\u043f\u043a\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435     Get-ChildItem .\\$Archive|Remove-Item -Recurse -Force }  # \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b [array]$table=@()<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"razbiraem-podrobnee\">\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/h1>\n<p>  <\/p>\n<pre><code class=\"php\"># \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 1 \u0434\u043e 5 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0432 \u0446\u0438\u043a\u043b foreach 1..5|foreach{<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"php\"># \u041f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e $CompressionLevel \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442 1 \u0434\u043e 5($_), \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u0440\u043e\u0432\u043d\u044f \u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0438 $CompressionLevel = $(&quot;-m&quot; + $_)<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"php\"># \u041a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 Measure-Command \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0439 \u0432 {} $mc = Measure-Command {cmd \/c .\\rar.exe a -ep1 -ed  $CompressionLevel -o+ -tsc .\\$Archive\\$($ArchFileName + $_) &quot;$path&quot;}<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"php\"># \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d [math]::Round(($mc.TotalMilliseconds), 0) # \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432\u0438\u0434\u0430 $ArchFileName + $_ + &quot;.rar&quot;: Archive1.rar $ArchFileNamePath = &quot;.\\$Archive\\$($ArchFileName + $_ + &quot;.rar&quot;)&quot; # \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 $table \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e(+=) \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0434\u0430\u043d\u043d\u044b\u0435 $table += &quot;&quot;|Select-Object -Property @{name=&quot;ArchFileName&quot;; expression={$ArchFileNamePath -split &quot;\\\\&quot;|Select-Object -Last 1}},` @{name=&quot;CompressionLevel&quot;; expression={$CompressionLevel}},@{name=&quot;Extension&quot;; expression={&quot;rar&quot;}},@{name=&quot;Size&quot;; expression={(Get-ChildItem $ArchFileNamePath).Length}},` @{name=&quot;SizeAVD&quot;; expression={0}},@{name=&quot;Time&quot;; expression={[math]::Round(($mc.TotalMilliseconds), 0)}},` @{name=&quot;Size %&quot;; expression={0}},@{name=&quot;Time %&quot;; expression={0}},@{name=&quot;Result %&quot;; expression={0}} }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"php\"># \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u043e \u043f\u043e\u043b\u044e Size \u0438 \u0431\u0435\u0440\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 [0] - \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0441\u0436\u0430\u0442\u044b\u0439 \u0444\u0430\u0439\u043b $Size = ($table|Sort-Object -Property Size)[0].Size \/ 100 # \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u043e \u043f\u043e\u043b\u044e Time \u0438 \u0431\u0435\u0440\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 [0] - \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0436\u0430\u0442\u044b\u0439 \u0444\u0430\u0439\u043b $Time = ($table|Sort-Object -Property Time)[0].Time \/ 100  # \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0438\u0442\u043e\u0433\u043e\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 $table|foreach { $_.time $_.&quot;Size %&quot; = [math]::Round(($_.Size \/ $Size), 0) $_.&quot;Time %&quot; = [math]::Round(($_.Time \/ $Time), 0)     if ($_.&quot;Size %&quot; -ge $_.&quot;Time %&quot;){         $_.&quot;Result %&quot; = $_.&quot;Size %&quot; - $_.&quot;Time %&quot;     } else {         $_.&quot;Result %&quot; = $_.&quot;Time %&quot; - $_.&quot;Size %&quot;     }  }  # \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043f\u043e &quot;Size %&quot; - \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0441\u0436\u0430\u0442\u044b\u0439 \u0444\u0430\u0439\u043b $table|Sort-Object -Property &quot;Size %&quot;,&quot;Result %&quot;|Select-Object -First 1|Format-Table -AutoSize # \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043f\u043e &quot;Result %&quot; - \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u043c \u043c\u0435\u0441\u0442\u043e\u043c \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 $table|Sort-Object -Property &quot;Result %&quot;,&quot;Size %&quot;,&quot;Time %&quot;|Select-Object -First 1|Format-Table -AutoSize  # \u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u0434\u0435\u043b\u0430\u043d\u0430! \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0432\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438 \u043c\u0435\u0441\u0442\u043e. Get-ChildItem .\\$Archive|Remove-Item -Force<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"php\">$table|Sort-Object -Property &quot;Size %&quot;,&quot;Result %&quot;|Format-Table -AutoSize<\/code><\/pre>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>ArchFileName<\/th>\n<th>Compression Level<\/th>\n<th>Extension<\/th>\n<th>Size<\/th>\n<th>Time<\/th>\n<th>Size %<\/th>\n<th>Time %<\/th>\n<th>Result %<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>ArchFileName8.7z<\/td>\n<td>-mx=8<\/td>\n<td>7z<\/td>\n<td>26511520<\/td>\n<td>62404<\/td>\n<td>100<\/td>\n<td>1674<\/td>\n<td>1574<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName9.7z<\/td>\n<td>-mx=9<\/td>\n<td>7z<\/td>\n<td>26511520<\/td>\n<td>64614<\/td>\n<td>100<\/td>\n<td>1733<\/td>\n<td>1633<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName7.7z<\/td>\n<td>-mx=7<\/td>\n<td>7z<\/td>\n<td>28948176<\/td>\n<td>52832<\/td>\n<td>109<\/td>\n<td>1417<\/td>\n<td>1308<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName6.7z<\/td>\n<td>-mx=6<\/td>\n<td>7z<\/td>\n<td>30051742<\/td>\n<td>37339<\/td>\n<td>113<\/td>\n<td>1002<\/td>\n<td>889<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName5.7z<\/td>\n<td>-mx=5<\/td>\n<td>7z<\/td>\n<td>31239355<\/td>\n<td>35169<\/td>\n<td>118<\/td>\n<td>943<\/td>\n<td>825<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName4.rar<\/td>\n<td>-m4<\/td>\n<td>rar<\/td>\n<td>33514693<\/td>\n<td>11426<\/td>\n<td>126<\/td>\n<td>306<\/td>\n<td>180<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName5.rar<\/td>\n<td>-m5<\/td>\n<td>rar<\/td>\n<td>33465152<\/td>\n<td>12894<\/td>\n<td>126<\/td>\n<td>346<\/td>\n<td>220<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName3.rar<\/td>\n<td>-m3<\/td>\n<td>rar<\/td>\n<td>33698079<\/td>\n<td>9835<\/td>\n<td>127<\/td>\n<td>264<\/td>\n<td>137<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName2.rar<\/td>\n<td>-m2<\/td>\n<td>rar<\/td>\n<td>34399885<\/td>\n<td>8352<\/td>\n<td>130<\/td>\n<td>224<\/td>\n<td>94<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName4.7z<\/td>\n<td>-mx=4<\/td>\n<td>7z<\/td>\n<td>38926348<\/td>\n<td>6470<\/td>\n<td>147<\/td>\n<td>174<\/td>\n<td>27<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName3.7z<\/td>\n<td>-mx=3<\/td>\n<td>7z<\/td>\n<td>44545819<\/td>\n<td>5889<\/td>\n<td>168<\/td>\n<td>158<\/td>\n<td>10<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName2.7z<\/td>\n<td>-mx=2<\/td>\n<td>7z<\/td>\n<td>51690114<\/td>\n<td>4754<\/td>\n<td>195<\/td>\n<td>128<\/td>\n<td>67<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName1.rar<\/td>\n<td>-m1<\/td>\n<td>rar<\/td>\n<td>53605833<\/td>\n<td>4600<\/td>\n<td>202<\/td>\n<td>123<\/td>\n<td>79<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName1.7z<\/td>\n<td>-mx=1<\/td>\n<td>7z<\/td>\n<td>57472172<\/td>\n<td>3728<\/td>\n<td>217<\/td>\n<td>100<\/td>\n<td>117<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName2.zip<\/td>\n<td>Optimal<\/td>\n<td>zip<\/td>\n<td>65733242<\/td>\n<td>14025<\/td>\n<td>248<\/td>\n<td>376<\/td>\n<td>128<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName1.zip<\/td>\n<td>Fastest<\/td>\n<td>zip<\/td>\n<td>81556824<\/td>\n<td>9031<\/td>\n<td>308<\/td>\n<td>242<\/td>\n<td>66<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<pre><code class=\"php\">$table|Sort-Object -Property &quot;Result %&quot;,&quot;Size %&quot;,&quot;Time %&quot;|Format-Table -AutoSize<\/code><\/pre>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>ArchFileName<\/th>\n<th>Compression Level<\/th>\n<th>Extension<\/th>\n<th>Size<\/th>\n<th>Time<\/th>\n<th>Size %<\/th>\n<th>Time %<\/th>\n<th>Result %<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>ArchFileName3.7z<\/td>\n<td>-mx=3<\/td>\n<td>7z<\/td>\n<td>44545819<\/td>\n<td>5889<\/td>\n<td>168<\/td>\n<td>158<\/td>\n<td>10<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName4.7z<\/td>\n<td>-mx=4<\/td>\n<td>7z<\/td>\n<td>38926348<\/td>\n<td>6470<\/td>\n<td>147<\/td>\n<td>174<\/td>\n<td>27<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName1.zip<\/td>\n<td>Fastest<\/td>\n<td>zip<\/td>\n<td>81556824<\/td>\n<td>9031<\/td>\n<td>308<\/td>\n<td>242<\/td>\n<td>66<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName2.7z<\/td>\n<td>-mx=2<\/td>\n<td>7z<\/td>\n<td>51690114<\/td>\n<td>4754<\/td>\n<td>195<\/td>\n<td>128<\/td>\n<td>67<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName1.rar<\/td>\n<td>-m1<\/td>\n<td>rar<\/td>\n<td>53605833<\/td>\n<td>4600<\/td>\n<td>202<\/td>\n<td>123<\/td>\n<td>79<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName2.rar<\/td>\n<td>-m2<\/td>\n<td>rar<\/td>\n<td>34399885<\/td>\n<td>8352<\/td>\n<td>130<\/td>\n<td>224<\/td>\n<td>94<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName1.7z<\/td>\n<td>-mx=1<\/td>\n<td>7z<\/td>\n<td>57472172<\/td>\n<td>3728<\/td>\n<td>217<\/td>\n<td>100<\/td>\n<td>117<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName2.zip<\/td>\n<td>Optimal<\/td>\n<td>zip<\/td>\n<td>65733242<\/td>\n<td>14025<\/td>\n<td>248<\/td>\n<td>376<\/td>\n<td>128<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName3.rar<\/td>\n<td>-m3<\/td>\n<td>rar<\/td>\n<td>33698079<\/td>\n<td>9835<\/td>\n<td>127<\/td>\n<td>264<\/td>\n<td>137<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName4.rar<\/td>\n<td>-m4<\/td>\n<td>rar<\/td>\n<td>33514693<\/td>\n<td>11426<\/td>\n<td>126<\/td>\n<td>306<\/td>\n<td>180<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName5.rar<\/td>\n<td>-m5<\/td>\n<td>rar<\/td>\n<td>33465152<\/td>\n<td>12894<\/td>\n<td>126<\/td>\n<td>346<\/td>\n<td>220<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName5.7z<\/td>\n<td>-mx=5<\/td>\n<td>7z<\/td>\n<td>31239355<\/td>\n<td>35169<\/td>\n<td>118<\/td>\n<td>943<\/td>\n<td>825<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName6.7z<\/td>\n<td>-mx=6<\/td>\n<td>7z<\/td>\n<td>30051742<\/td>\n<td>37339<\/td>\n<td>113<\/td>\n<td>1002<\/td>\n<td>889<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName7.7z<\/td>\n<td>-mx=7<\/td>\n<td>7z<\/td>\n<td>28948176<\/td>\n<td>52832<\/td>\n<td>109<\/td>\n<td>1417<\/td>\n<td>1308<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName8.7z<\/td>\n<td>-mx=8<\/td>\n<td>7z<\/td>\n<td>26511520<\/td>\n<td>62404<\/td>\n<td>100<\/td>\n<td>1674<\/td>\n<td>1574<\/td>\n<\/tr>\n<tr>\n<td>ArchFileName9.7z<\/td>\n<td>-mx=9<\/td>\n<td>7z<\/td>\n<td>26511520<\/td>\n<td>64614<\/td>\n<td>100<\/td>\n<td>1733<\/td>\n<td>1633<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<pre><code class=\"php\"># \u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u0434\u0435\u043b\u0430\u043d\u0430! \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0432\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0438 \u043c\u0435\u0441\u0442\u043e. Get-ChildItem .\\$Archive|Remove-Item -Force<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0442\u043e\u0433:<br \/>  \u0421\u0430\u043c\u044b\u043c \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u043d\u044b\u043c \u043f\u043e \u043c\u0435\u0441\u0442\u0443 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f 7z \u0441\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0441\u0436\u0430\u0442\u0438\u044f -mx=8 \u0438 -mx=9<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cd\/mq\/f5\/cdmqf5xjxwupeq8m3y7erk75tfm.png\"><\/p>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u044b\u043c \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f 7z \u0441\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0441\u0436\u0430\u0442\u0438\u044f -mx=1<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8e\/_b\/jj\/8e_bjj2e0rkquzmbe9sm-dvmzdw.png\"><\/p>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u044b\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u043c\u043e\u043c\u0443 \u043c\u0435\u0441\u0442\u0443 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f 7z \u0441\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0441\u0436\u0430\u0442\u0438\u044f -mx=3<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mz\/fb\/ss\/mzfbssm17xhzc_ixnxeuqgdbg5w.png\"><\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c 7z \u0441\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0441\u0436\u0430\u0442\u0438\u044f -mx=8, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0430\u0440\u0445\u0438\u0432\u0430 \u043e\u043d \u0440\u0430\u0432\u0435\u043d -mx 9, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0443\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<p>  <\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440 \u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0436\u0430\u0442\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u044b, \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u043b\u043e\u0433\u0438!<\/p>\n<p>  <\/p>\n<h1 id=\"nam-nuzhno-reshit-sleduyuschie-zadachi\">\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/h1>\n<p>  <\/p>\n<ol>\n<li>\u0418\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b.<\/li>\n<li>\u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u0430\u043f\u043a\u0438 \u0441 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u043e\u0439 Logs.<\/li>\n<li>\u0423\u0434\u0430\u043b\u044f\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u044b \u0441\u0442\u0430\u0440\u0448\u0435 30 \u0434\u043d\u0435\u0439 (\u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u043b\u043e\u0441\u044c \u043c\u0435\u0441\u0442\u043e \u043d\u0430 \u0434\u0438\u0441\u043a\u0435).<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u044b \u043f\u043e \u0434\u043d\u044f\u043c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432.<\/li>\n<\/ol>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">ArchLogs.ps1<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">#Requires -Version 4.0  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0434\u0430\u0447\u0443 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u043b\u043e\u0433\u043e\u0432 #SCHTASKS \/Create \/SC DAILY \/ST 22:00 \/TN ArchLogs \/TR &quot;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe C:\\Scripts\\ArchLogs.ps1&quot; \/RU &quot;NT AUTHORITY\\NETWORKSERVICE&quot; \/F \/RL HIGHEST  # \u041e\u0447\u0438\u0449\u0430\u0435\u043c \u044d\u043a\u0440\u0430\u043d, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e Clear-Host  # \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0433\u0434\u0435 \u0431\u0430\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b Set-Location $PSScriptRoot  # \u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044f\u0434\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430.   # \u0423\u0441\u043b\u043e\u0432\u0438\u0435 1 Function Set-MMTCore {  $Core = (Get-WmiObject \u2013class Win32_processor|Measure-Object NumberOfLogicalProcessors -sum).Sum \/ 2 $CoreTMP = $Core \/ 4 IF ($Core -lt 4)     {     $Core = $Core -1     }     Else     {     $Core = $Core - $CoreTMP     } [math]::Round($Core) }  # \u0417\u0430\u0434\u0430\u0435\u043c \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0436\u0430\u0442\u0438\u044f $MX = 8 # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b $MMT = Set-MMTCore  # \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 $SearchFolder = &quot;C:\\inetpub&quot; # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 $SearchFolder $InetpubFolder = Get-ChildItem $SearchFolder # \u0418\u0449\u0435\u043c \u043f\u0430\u043f\u043a\u0438 \u0441 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u043e\u0439 Logs # \u0423\u0441\u043b\u043e\u0432\u0438\u0435 2 $LogsFolder = $InetpubFolder|foreach {Get-ChildItem $_.Fullname|Where-Object{$_.PSIsContainer -eq $true}|Where-Object{$_.name -eq &quot;logs&quot;}}  # \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 $Archive = &quot;Archive&quot; $ArchiveFile = &quot;ArchFiles.txt&quot;  # \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u043f\u0430\u043a\u0435 \u0438\u0437 $LogsFolder \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0432 $LogsFolderName \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c foreach($LogsFolderName in $LogsFolder.Fullname){ $LogsFolderName # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 $Archive, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u043d\u0435 \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0440\u0430\u043d\u0435\u0435 IF ((Test-Path -Path &quot;$LogsFolderName\\$Archive&quot;) -ne $true){New-Item -Path $LogsFolderName -Name $Archive -ItemType Directory -Force} # \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0441\u0442\u0430\u0440\u0448\u0435 30 \u0434\u043d\u0435\u0439 # \u0423\u0441\u043b\u043e\u0432\u0438\u0435 3 Get-ChildItem &quot;$LogsFolderName\\$Archive&quot;|Where-Object {$_.LastWriteTime -le (Get-Date).AddDays(-30)}| Remove-Item -Force # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f [Array]$ArchiveItems = Get-ChildItem -Path $LogsFolderName -Exclude $Archive     # \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u0435\u0441\u0442\u044c, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c. \u0412 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 - \u0432\u044b\u0445\u043e\u0434\u0438\u043c     IF ($ArchiveItems.Count -ne ^_^quot&#0;quot^_^){     # \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0444\u0430\u0439\u043b\u044b \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0435 \u043d\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f     $AllLogsFiles = Get-ChildItem $ArchiveItems -Recurse &lt;#-Filter *.log#&gt;|Where-Object {$_.LastWriteTime -lt (Get-Date).Date}     # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u0442\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432     # \u0423\u0441\u043b\u043e\u0432\u0438\u0435 4     $AllData = ($AllLogsFiles|Sort-Object -Property LastWriteTime).LastWriteTime.Date|Select-Object -Unique     $AllData         foreach ($Data in $AllData){             IF ($ArchiveItems.Count -ne ^_^quot&#0;quot^_^){             # \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0434\u0430\u0442\u0443             ($AllLogsFiles|Where-Object {$_.LastWriteTime -lt (Get-Date).Date}|Where-Object {$_.LastWriteTime -ge (Get-Date $Data) -and $_.LastWriteTime -lt (Get-Date $Data).AddDays(1)}).FullName|Out-File .\\$ArchiveFile -Force -Encoding default             Write-Host &quot;===&quot;             $Data             Write-Host &quot;===&quot;                 # \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0438\u0445                 IF ($(Get-Content .\\ArchFiles.txt -Encoding default) -ne $null){                 $ArchiveFileName =$(($LogsFolderName.Remove($LogsFolderName.LastIndexOf(&quot;\\&quot;))) -split &quot;\\\\&quot;|Select-Object -Last 1) + &quot;_&quot; + $(Get-Date $Data -Format dd-MM-yyyy)                 cmd \/c &quot;$env:ProgramFiles\\7-Zip\\7z.exe&quot; a -mx=&quot;$MX&quot; -mmt=&quot;$MMT&quot; -t7z -ssw -sdel &quot;$LogsFolderName\\$Archive\\$ArchiveFileName&quot; &quot;@$ArchiveFile&quot;                 # \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043f\u0438\u0441\u043e\u043a\u043c \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f                 IF(Test-Path &quot;.\\$ArchiveFile&quot;){Remove-Item &quot;.\\$ArchiveFile&quot; -Force}                 # \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u0430\u043f\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0430\u043f\u043a\u0438 Logs                 $LogsFolderName|foreach {Get-ChildItem $_|Where-Object {(Get-ChildItem -Path $_.FullName) -eq $null}|Remove-Item -Force}                 }             }         }     } }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0430(\u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445), \u0430 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043b\u0438\u0448\u044c \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Set-MMTCore, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u043b\u044f 7z, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">Function Set-MMTCore { # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0443\u043c\u043c\u0443 \u044f\u0434\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0438 \u0434\u0435\u043b\u0438\u043c \u043d\u0430 2 $Core = (Get-WmiObject \u2013class Win32_processor|Measure-Object NumberOfLogicalProcessors -sum).Sum \/ 2 # \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0435\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0435\u043b\u0438\u043c \u0435\u0449\u0435 \u043d\u0430 4 $CoreTMP = $Core \/ 4 IF ($Core -lt 4)     {     $Core = $Core -1     }     Else     {     $Core = $Core - $CoreTMP     } #\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043e \u0446\u0435\u043b\u043e\u0433\u043e [math]::Round($Core) }<\/code><\/pre>\n<p>  <\/p>\n<h6 id=\"bez-ispolzovaniya-funkcii-set-mmtcore\">\u0411\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Set-MMTCore<\/h6>\n<p>  <\/p>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e CPU \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 100%. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0430\u043b\u0435\u0440\u0442 \u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lx\/zs\/35\/lxzs35gatvlgkeq3nqg1lqlosum.png\"><\/p>\n<p>  <\/p>\n<h6 id=\"pri-ispolzovanii-funkcii-set-mmtcore\">\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Set-MMTCore<\/h6>\n<p>  <\/p>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e CPU \u0440\u0430\u0432\u0435\u043d 30-35%. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Set-MMTCore \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0431\u0435\u0437 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1i\/0e\/lu\/1i0elui1ntjzib8hlb6i1lgdbea.png\"><\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u043e\u0433 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<h6 id=\"papka-do-arhivacii\">\u041f\u0430\u043f\u043a\u0430 \u0434\u043e \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438:<\/h6>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jp\/4l\/zm\/jp4lzmtwot2wr8pry4xmxks7uxo.png\"><\/p>\n<p>  <\/p>\n<h6 id=\"papka-posle-arhivacii\">\u041f\u0430\u043f\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438:<\/h6>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5d\/ei\/ls\/5deils-brkw-qwkq6mdedtw2kxm.png\"><\/p>\n<p>  <\/p>\n<h6 id=\"fayly-sozdannye--v-processe-arhivacii\">\u0424\u0430\u0439\u043b\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438:<\/h6>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hi\/pv\/q-\/hipvq-nga8eyesk50mfzb4qs8cw.png\"><\/p>\n<p>  <\/p>\n<h6 id=\"fayly-v-arhive\">\u0424\u0430\u0439\u043b\u044b \u0432 \u0430\u0440\u0445\u0438\u0432\u0435:<\/h6>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/a4\/3_\/s9\/a43_s9t2hg2cfjl3ytu559jjxo8.png\"><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rl\/yf\/u2\/rlyfu2qtcs3jcq0rdu9__wuok6m.png\"><\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/homecredit\/blog\/484414\/\"> https:\/\/habr.com\/ru\/company\/homecredit\/blog\/484414\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/homecredit\/blog\/484414\/\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u044b\u0431\u0438\u0440\u0430\u043b \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0441\u0436\u0430\u0442\u0438\u044f \u043b\u043e\u0433\u043e\u0432 \u043d\u0430\u0448\u0435\u0439 \u0444\u0440\u043e\u043d\u0442-\u043e\u0444\u0438\u0441\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e, \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u0435\u0434\u0438\u043d\u043e\u0439 \u0444\u0440\u043e\u043d\u0442 \u043e\u0444\u0438\u0441\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0411\u0430\u043d\u043a\u0430. \u042f \u043e\u0442\u0432\u0435\u0447\u0430\u044e \u0437\u0430 \u0435\u0435 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0435, \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 DevOps.<br \/>  \u041d\u0430\u0448\u0430 \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u2014 \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0435\u0435 \u0431\u043e\u043b\u0435\u0435 5 000 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u2014 \u044d\u0442\u043e \u00ab\u043c\u043e\u043d\u043e\u043b\u0438\u0442\u00bb \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0441\u0432\u043e\u0438\u043c\u0438 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430\u043c\u0438 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430\u043c\u0438. \u041d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0434\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u043d\u043e\u0441\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b.<br \/>  \u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u043d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 130 \u0413\u0411 \u00ab\u0441\u044b\u0440\u044b\u0445\u00bb \u043b\u043e\u0433\u043e\u0432 \u0438, \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c ENG \u0441\u0442\u0435\u043a (Elasticsearch Nxlog Graylog), \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u043b\u043e\u0433\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, stack trace \u043e\u0448\u0438\u0431\u043e\u043a), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u0435\u0441\u0442\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e, \u0432\u0441\u0442\u0430\u0451\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0410 \u043a\u0430\u043a\u043e\u0439 \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0441 \u044d\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0435\u0439?\u00bb<br \/>  \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 PowerShell, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b \u0430\u043d\u0430\u043b\u0438\u0437 \u0437\u0430 \u043c\u0435\u043d\u044f.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-297293","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=297293"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297293\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}