{"id":252452,"date":"2015-03-04T23:46:02","date_gmt":"2015-03-04T19:46:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=252452"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=252452","title":{"rendered":"\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0434\u043b\u044f \u0431\u0435\u0434\u043d\u044b\u0445 \u0438\u043b\u0438 SAR + MySQL + Gnuplot"},"content":{"rendered":"<br \/>\n<h4>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e SAR?<\/h4>\n<p>  \u042f \u0443\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u0430\u0432\u043d\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e \u0440\u043e\u0434\u0443 \u0441\u0432\u043e\u0435\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0447\u0430\u0441\u0442\u0435\u043d\u044c\u043a\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0441\u044c \u0441 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u043c\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u00ab\u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u044b\u00bb, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0445\u043e\u0441\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 (\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0438\u043b\u0438 VDS), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0447\u0435\u043d\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445.<\/p>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Zabbix, Nagios, Cacti \u0438 \u0442.\u0434. \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432\u0441\u0435 \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442, \u0432 \u0441\u0438\u043b\u0443 \u044f\u0441\u043d\u044b\u0445 \u043f\u0440\u0438\u0447\u0438\u043d \u2014 \u043e\u043d\u0438 \u0441\u0430\u043c\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443 \u043d\u0430\u0441 \u0438\u0442\u0430\u043a \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e. \u0421\u0440\u0430\u0437\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u0430\u043a \u0431\u044b\u0442\u044c? \u0418 \u0442\u0443\u0442 \u043a \u043d\u0430\u043c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0441\u043f\u0435\u0448\u0438\u0442 SAR.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 SAR<\/h4>\n<p>  <b>SAR<\/b> (System Activity Report) \u2014 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u043e\u0449\u043d\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430, \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u0430\u043a\u0435\u0442 sysstat. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0435\u0449\u0435 \u043d\u0435\u0442 \u043f\u0430\u043a\u0435\u0442\u0430 sysstat, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f Debian:  <\/p>\n<pre><code class=\"bash\"># apt-get install sysstat <\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0430\u043c SAR. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c sysstat, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b:  <\/p>\n<pre><code class=\"bash\"># vim \/etc\/default\/sysstat <\/code><\/pre>\n<p>  \u0418 \u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 ENABLED=\u00abfalse\u00bb \u043d\u0430 ENABLED=\u00abtrue\u00bb. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0432 cron.  <\/p>\n<pre><code class=\"bash\"># vim \/etc\/cron.d\/sysstat <\/code><\/pre>\n<p>  \u042f \u0441\u043e\u0431\u0438\u0440\u0430\u044e \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043c\u043e\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a (\u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0430\u0447\u0435):  <\/p>\n<pre><code class=\"bash\"># Activity reports every 1 minutes everyday * * * * * root command -v debian-sa1 &gt; \/dev\/null && debian-sa1 1 1  # Additional run at 23:59 to rotate the statistics file 59 23 * * * root command -v debian-sa1 &gt; \/dev\/null && debian-sa1 60 2 <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441 sysstat:  <\/p>\n<pre><code class=\"bash\"># service sysstat restart <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u0430.<\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 SAR<\/h4>\n<p>  \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SAR. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u0434\u0430 \u0438 \u0441\u0430\u043c SAR \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e. \u0412\u0441\u0435 \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u044d\u0442\u043e man sar, \u0430 \u0442\u0430\u043c, \u0434\u0443\u043c\u0430\u044e, \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u0442\u0435\u0441\u044c.<\/p>\n<h4>\u0423\u0447\u0438\u043c SAR \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0440\u0442\u044b \u0432 MySQL<\/h4>\n<p>  \u0414\u0430-\u0434\u0430, \u0432\u044b \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SAR \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u043f\u0440\u044f\u043c\u043e\u043c\u0443 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e, \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0440\u0442\u044b \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435:  <\/p>\n<pre><code class=\"bash\">$ sar -s 07:00:00 -e 07:10:00 Linux 3.2.0-4-amd64 (mind-x)    02.03.2015      _x86_64_        (1 CPU)  07:00:01        CPU     %user     %nice   %system   %iowait    %steal     %idle 07:01:01        all      0,64      0,00      0,15      0,10      0,00     99,11 07:02:01        all      0,03      0,00      0,02      0,00      0,00     99,95 07:03:01        all      0,03      0,00      0,02      0,00      0,00     99,95 07:04:01        all      0,03      0,00      0,02      0,02      0,00     99,93 07:05:01        all      0,05      0,00      0,03      0,00      0,00     99,92 07:06:01        all      0,63      0,00      0,17      0,10      0,00     99,11 07:07:01        all      0,03      0,00      0,02      0,00      0,00     99,95 07:08:01        all      0,02      0,00      0,02      0,00      0,00     99,97 07:09:01        all      0,03      0,00      0,02      0,00      0,00     99,95 \u0421\u0440\u0435\u0434\u043d\u0435\u0435:     all      0,17      0,00      0,05      0,02      0,00     99,76 <\/code><\/pre>\n<p>  \u041d\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u044d\u0442\u0438 \u0446\u0438\u0444\u0440\u044b \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0434\u043d\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0433\u043b\u0430\u0437\u0430 \u0431\u043e\u043b\u044f\u0442 \u0438 \u0442.\u0434. \u0427\u0442\u043e \u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c? \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0441\u0442\u043e\u043b\u044c \u0432\u0430\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439?<\/p>\n<p>  \u041f\u0440\u0438\u0437\u043d\u0430\u044e\u0441\u044c, \u044f \u0446\u0435\u043b\u044b\u0439 \u0432\u0435\u0447\u0435\u0440 \u0434\u0443\u043c\u0430\u043b \u043d\u0430\u0434 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439. \u0412\u0441\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u043d\u0435 \u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b, \u0442\u043e\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u044f \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c SAR \u0441 MySQL? \u041f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0438\u0442\u0430\u043b\u0438 \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 SAR, \u0442\u043e \u0432\u044b, \u043d\u0430\u0432\u0435\u0440\u043d\u043e, \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e SAR \u0440\u043e\u0442\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u044b \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u043d\u043e\u0447\u0438. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b\u044b \u043f\u043e \u0434\u043d\u044f\u043c. \u041c\u043d\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e (\u0432\u0435\u0434\u044c \u0434\u0430\u043b\u0435\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u043e \u043d\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438), \u0447\u0442\u043e\u0431\u044b \u044f \u043c\u043e\u0433 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u043d\u0435 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0442.\u0434. \u0418 \u0442\u0443\u0442 \u044f \u0437\u0430\u0434\u0443\u043c\u0430\u043b\u0441\u044f, \u0430 \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0440\u0435\u043f\u043e\u0440\u0442\u044b \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445? \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0443\u0436\u0435 \u0431\u044b\u043b MySQL, \u0442\u043e \u0432\u044b\u0431\u043e\u0440 \u0441\u0442\u0430\u043b \u043e\u0447\u0435\u0432\u0438\u0434\u0435\u043d.<\/p>\n<h4>\u0418\u0442\u0430\u043a, \u0434\u0440\u0443\u0436\u0438\u043c SAR \u0438 MySQL<\/h4>\n<p>  \u042f \u043f\u0435\u0440\u0435\u0440\u044b\u043b \u0432\u0435\u0441\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443, \u043d\u043e \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0443 \u0441\u0442\u0430\u0442\u0435\u0439, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442. \u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u0435\u0433\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0431\u0430\u0437\u0443.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 sysstat:  <\/p>\n<pre><code class=\"sql\">CREATE DATABASE `sysstat`; <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f sysstat (\u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430\u0442\u044c \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0430\u0432\u0430).  <\/p>\n<pre><code class=\"sql\">CREATE USER 'sysstat'@'localhost' IDENTIFIED BY 'some_pass'; GRANT ALL PRIVILEGES ON sysstat.* TO 'sysstat'@'localhost'; <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"sql\">CREATE TABLE `host_health_cpu` (   `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',   `pct_user` decimal(10,2) DEFAULT NULL,   `pct_nice` decimal(10,2) DEFAULT NULL,   `pct_system` decimal(10,2) DEFAULT NULL,   `pct_iowait` decimal(10,2) DEFAULT NULL,   `pct_steal` decimal(10,2) DEFAULT NULL,   `pct_idle` decimal(10,2) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  CREATE TABLE `host_health_memory` (   `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',   `kbmemfree` int(11) DEFAULT NULL,   `kbmemused` int(11) DEFAULT NULL,   `per_memused` decimal(10,2) DEFAULT NULL,   `kbbuffers` int(11) DEFAULT NULL,   `kbcached` int(11) DEFAULT NULL,   `kbcommit` int(11) DEFAULT NULL,   `per_commit` decimal(10,2) DEFAULT NULL,   `kbactive` int(11) DEFAULT NULL,   `kbinact` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  CREATE TABLE `host_health_la` (   `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',   `runq_sz` int(11) DEFAULT NULL,   `plist_sz` int(11) DEFAULT NULL,   `ldavg_1` decimal(10,2) DEFAULT NULL,   `ldavg_5` decimal(10,2) DEFAULT NULL,   `ldavg_15` decimal(10,2) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  CREATE TABLE `host_health_net` (   `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',   `iface` varchar(7) DEFAULT NULL,   `rxpck_persec` decimal(10,2) DEFAULT NULL,   `txpck_persec` decimal(10,2) DEFAULT NULL,   `rxbyt_persec` decimal(10,2) DEFAULT NULL,   `txbyt_persec` decimal(10,2) DEFAULT NULL,   `rxcmp_persec` decimal(10,2) DEFAULT NULL,   `txcmp_persec` decimal(10,2) DEFAULT NULL,   `rxcst_persec` decimal(10,2) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; <\/code><\/pre>\n<p>  \u0412\u0441\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0440\u0442\u044b \u0432 MySQL.<\/p>\n<h4>\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442<\/h4>\n<p>  \u0412 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <b>sadf<\/b>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 SAR, \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 CSV, JSON, XML. \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f CSV. \u0421\u0430\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u0434\u043e\u043f\u043e\u043b\u043d\u044e \u043b\u0438\u0448\u044c \u0442\u043e, \u0447\u0442\u043e \u044f \u0443\u0434\u0430\u043b\u044f\u044e \u043f\u0435\u0440\u0432\u044b\u0435 2 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0438\u0437 \u0432\u044b\u0432\u043e\u0434\u0430 sadf, \u0432 \u043d\u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0445\u043e\u0441\u0442\u0435 \u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u043d\u044f\u0442\u0438\u044f\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0425\u043e\u0441\u0442 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0434\u0438\u043d, \u0430 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u044f \u0438 \u0442\u0430\u043a \u0437\u043d\u0430\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043c\u043d\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430.  <\/p>\n<pre><code class=\"bash\">#!\/bin\/bash #\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 WORKDIR=\/var\/cache\/sar FMATDIR=\/var\/cache\/sar_data SADF=`which sadf` HEAD=`which head` AWK=`which awk` #\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0436\u0443\u0440\u043d\u0430\u043b \u0432 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e cd ${WORKDIR} COPY=`which cp` SAR_LOG=\/var\/log\/sysstat cd ${SAR_LOG} LATEST_DATA=`ls -tlr ${SAR_LOG} | tail -1 | awk '{print $9}'` ${COPY} ${LATEST_DATA} ${WORKDIR}  for file in *; do #\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0440\u0442\u044b \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 6 \u043c\u0438\u043d\u0443\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e $TIME UNIXTIME=$((`date +%s`-300)) TIME=`date -d@${UNIXTIME} +%H:%M:%S` #\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e CPU ${SADF} -d ${file} -s ${TIME} -t | cut -d ';' -f3,5- &gt; &quot;${FMATDIR}&quot;\/&quot;${file}&quot;-host_health_cpu.csv #\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 ${SADF} -d ${file} -s ${TIME} -t -- -n DEV | cut -d ';' -f3- &gt; &quot;${FMATDIR}&quot;\/&quot;${file}&quot;-host_health_net.csv #\u0420\u0430\u0437\u043c\u0435\u0440\u044b \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439 \u0438 LA ${SADF} -d ${file} -s ${TIME} -t -- -q | cut -d ';' -f3- &gt; &quot;${FMATDIR}&quot;\/&quot;${file}&quot;-host_health_la.csv #\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u0430\u043c\u044f\u0442\u0438 ${SADF} -d ${file} -s ${TIME} -t -- -r | cut -d ';' -f3- &gt; &quot;${FMATDIR}&quot;\/&quot;${file}&quot;-host_health_memory.csv done #\u0417\u0430\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 MySQL cd ${FMATDIR} MYSQL=`which mysql` USER='user' PASS='some_pass' HOST='localhost' DB='sysstat' for file in *.csv; do ${MYSQL} -u${USER} -p${PASS} -h${HOST} -D${DB} -e &quot;LOAD DATA LOCAL INFILE '${FMATDIR}\/${file}' INTO TABLE `echo ${file} | sed 's\/.csv\/\/g' | awk -F'-' '{print $2}'` FIELDS TERMINATED BY ';' IGNORE 1 LINES;&quot; done #\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b rm -fr ${FMATDIR}\/*.csv rm -fr ${WORKDIR}\/sa* <\/code><\/pre>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043b\u0438\u0432\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 cron. \u0412\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0437 \u0432 5 \u043c\u0438\u043d\u0443\u0442.  <\/p>\n<pre><code class=\"bash\"> *\/5 * * * *     bash \/usr\/local\/sbin\/sar.sh <\/code><\/pre>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e SAR \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043a\u0430\u043a sar -s, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0442\u043e \u0441\u0430\u043c\u043e \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0440\u0435\u043f\u043e\u0440\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u044f \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 sar \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 6 \u043c\u0438\u043d\u0443\u0442, \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0440\u0442 \u0437\u0430 5 \u043c\u0438\u043d\u0443\u0442. \u042d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0434\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c. \u0418\u043d\u0430\u0447\u0435 \u0431\u0443\u0434\u0443\u0442 \u00ab\u0434\u044b\u0440\u043a\u0438\u00bb \u0438\u043b\u0438 \u0434\u0443\u0431\u043b\u0438 \u0432 MySQL.<\/p>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0443 \u0432\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<pre><code class=\"bash\">mysql&gt; SELECT * FROM host_health_memory WHERE datetime &gt; NOW() - INTERVAL 10 MINUTE; +---------------------+-----------+-----------+-------------+-----------+----------+----------+------------+----------+---------+ | datetime            | kbmemfree | kbmemused | per_memused | kbbuffers | kbcached | kbcommit | per_commit | kbactive | kbinact | +---------------------+-----------+-----------+-------------+-----------+----------+----------+------------+----------+---------+ | 2015-03-02 08:36:01 |   1381896 |    679396 |       32.00 |    104044 |   155520 |   803420 |      38.00 |   484244 |  142688 | | 2015-03-02 08:37:01 |   1377476 |    683816 |       33.00 |    104068 |   155668 |   810284 |      39.00 |   487632 |  142808 | | 2015-03-02 08:38:01 |   1377476 |    683816 |       33.00 |    104096 |   155672 |   810284 |      39.00 |   487668 |  142804 | | 2015-03-02 08:39:01 |   1377476 |    683816 |       33.00 |    104120 |   155680 |   810524 |      39.00 |   487832 |  142804 | | 2015-03-02 08:40:01 |   1372416 |    688876 |       33.00 |    104160 |   155684 |   819104 |      39.00 |   490708 |  142816 | | 2015-03-02 08:41:01 |   1377104 |    684188 |       33.00 |    104276 |   155700 |   810524 |      39.00 |   488008 |  142808 | | 2015-03-02 08:42:01 |   1379228 |    682064 |       33.00 |    104288 |   155708 |   816640 |      39.00 |   486392 |  142632 | | 2015-03-02 08:43:01 |   1378980 |    682312 |       33.00 |    104328 |   155708 |   816744 |      39.00 |   486680 |  142628 | | 2015-03-02 08:44:01 |   1378608 |    682684 |       33.00 |    104356 |   155716 |   816932 |      39.00 |   486936 |  142636 | | 2015-03-02 08:45:01 |   1371564 |    689728 |       33.00 |    104392 |   155720 |   827704 |      40.00 |   491912 |  142648 | +---------------------+-----------+-----------+-------------+-----------+----------+----------+------------+----------+---------+ <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438?<\/h4>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u042f \u0447\u0443\u0442\u044c \u0432\u044b\u0448\u0435 \u043f\u0438\u0441\u0430\u043b, \u0447\u0442\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u044e\u0431\u044b\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043b\u0438\u0448\u044c \u043e\u0442 \u0432\u0430\u0448\u0435\u0439 \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0438.<\/p>\n<h4>Gnuplot<\/h4>\n<p>  \u041c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u0432\u044b\u043f\u0430\u043b \u043d\u0430 <b>Gnuplot<\/b>. \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432, \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0438 \u0442.\u0434. \u041f\u043e Gnuplot \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0430 \u0435\u0433\u043e <a href=\"http:\/\/gnuplot.sourceforge.net\/\">\u0440\u043e\u0434\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435<\/a>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043c.<\/p>\n<p>  \u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:  <\/p>\n<pre><code class=\"bash\">#!\/bin\/bash sleep 10 # \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e width=&quot;640&quot; high=&quot;480&quot; outfile=&quot;graph.svg&quot; format=&quot;svg&quot;  NO_ARGS=0 E_OPTERROR=65  if [ $# -eq &quot;$NO_ARGS&quot; ]  # \u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0432\u044b\u0437\u0432\u0430\u043d \u0431\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432? then   echo &quot;\u0421\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432!      \u0414\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:     -o  \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \\&quot;graph.svg\\&quot;)     -f  \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442 \u0444\u0430\u0439\u043b\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \\&quot;svg\\&quot;)     -w  \u0428\u0438\u0440\u0438\u043d\u0430 \u0444\u0430\u0439\u043b\u0430 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \\&quot;640\\&quot;)     -h  \u0412\u044b\u0441\u043e\u0442\u0430 \u0444\u0430\u0439\u043b\u0430 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \\&quot;480\\&quot;)     -t  \u0422\u0438\u043f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u0432\u0430\u0448\u0443 \u043f\u043e\u043f\u044b\u0442\u043a\u0443.&quot;   exit $E_OPTERROR fi #\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b while getopts &quot;:h:w:t:f:o:&quot; Option do   case $Option in     h) high=&quot;$OPTARG&quot;;;     w) width=&quot;$OPTARG&quot;;;     f) format=&quot;$OPTARG&quot;;;     o) outfile=&quot;$OPTARG&quot;;;     t) type=&quot;$OPTARG&quot;;;   esac done shift $(($OPTIND - 1))  #\u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \/tmp\/datatmp if [ ${type} == 'cpu' ] then     #\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0433\u0440\u0430\u0444\u0438\u043a\u0430     title=&quot;\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 CPU, %&quot;     QUERY=&quot;select time(datetime), pct_idle as idle, pct_iowait as iowait, pct_system as system, pct_user as user from host_health_cpu where now() - interval 1 hour &lt; datetime;&quot;     format_y='set format y &quot;%.0f%%&quot;;' elif [ ${type} == 'mem' ] then     title=&quot;\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438, B&quot;     QUERY=&quot;select time(datetime),(kbmemfree * 1024) as Free,(kbmemused * 1024) as Used,(kbbuffers * 1024) as Buffers,(kbcached * 1024) as Cached from host_health_memory where now() - interval 1 hour &lt; datetime;&quot;         format_y=&quot;set format y '%.1s%cB'&quot; elif [ ${type} == &quot;net&quot; ] then     title=&quot;\u0412\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0438 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a, B\/s&quot;     QUERY='select time(datetime), (rxbyt_persec * 1024) as Rx, (txbyt_persec * 1024) as Tx from host_health_net where now() - interval 1 hour &lt; datetime and iface=&quot;eth0&quot;;'     format_y=&quot;set format y '%.1s%cB\/s'&quot; elif [ ${type} == &quot;la&quot; ] then     title=&quot;Load Average&quot;     QUERY=&quot;select time(datetime),ldavg_1 as LoadAvg1, ldavg_5 LoadAvg5,ldavg_15 as LoadAvg15 from host_health_la where now() - interval 1 hour &lt; datetime;&quot;     format_y=&quot;set format y '%.2f'&quot; fi  #\u0414\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0438\u0437 \u0431\u0430\u0437\u044b \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b MYSQL=`which mysql` USER=&quot;user&quot; PASS=&quot;some_pass&quot; DB=&quot;sysstat&quot; ${MYSQL} -u${USER} -p${PASS} -D${DB} -B -r -e &quot;${QUERY}&quot; &gt;&gt; \/tmp\/datatmp_${type}  #\u041f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0432 \u0444\u0430\u0439\u043b\u0435. cols=`awk '{print NF}' \/tmp\/datatmp_${type} | sort -nu | tail -n 1` #\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0438 hour_ago=`${MYSQL} -u${USER} -p${PASS} -D${DB} -N -e &quot;select time(datetime) from host_health_cpu where now() - interval 1 hour &lt; datetime limit 1;&quot;` now=`${MYSQL} -u${USER} -p${PASS} -D${DB} -N -e &quot;select time(datetime) from host_health_cpu where now() - interval 1 hour &lt; datetime order by datetime desc limit 1;&quot;`  #\u0420\u0438\u0441\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a gnuplot &lt;&lt; EOP #\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u043e\u0440\u043c\u0430\u0442 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440 set terminal ${format} size ${width},${high}  #\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0430\u0439\u043b set output ${outfile}  #\u0420\u0438\u0441\u0443\u0435\u043c \u043b\u0435\u0433\u0435\u043d\u0434\u044b set key autotitle columnhead set key outside center bottom set key horizontal #\u0420\u0438\u0441\u0443\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a set style fill transparent solid 0.5 noborder set title &quot;${title}&quot;  #\u0414\u0435\u043b\u0430\u0435\u043c \u043e\u0441\u044c \u0425 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u0430\u0442 set xdata time set timefmt &quot;%H:%M:%S&quot; set xrange [&quot;${hour_ago}&quot;:&quot;${now}&quot;] set xtics format &quot;%H:%M&quot;  #\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043c\u0435\u043d\u0430 \u043e\u0441\u0435\u0439 set xlabel &quot;\u0412\u0440\u0435\u043c\u044f&quot; set ylabel &quot;${title}&quot; set grid set yrange [0:*] ${format_y} #\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. plot for [i=2:${cols}] &quot;\/tmp\/datatmp_${type}&quot; using 1:i  smooth unique with filledcurve x1  EOP #\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b. rm \/tmp\/datatmp_${type} echo &quot;Image write to \\&quot;${outfile}\\&quot;&quot; exit 0; <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"bash\">$ sar-plot.sh -t mem -o \/path\/to\/memory.svg <\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u0437\u0430 1 \u0447\u0430\u0441. <br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/67c\/337\/2b7\/67c3372b71d2427ea220efc6746f5b98.png\"\/><br \/>  \u0415\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 cron \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0437 \u0432 5 \u043c\u0438\u043d\u0443\u0442, \u0442\u043e \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0441\u0432\u0435\u0436\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443 \u043c\u0435\u043d\u044f \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"bash\">*\/5 * * * *     bash \/usr\/local\/sbin\/sar-plot.sh -t cpu -o \/path\/to\/images\/cpu.svg *\/5 * * * *     bash \/usr\/local\/sbin\/sar-plot.sh -t mem -o \/path\/to\/images\/memory.svg *\/5 * * * *     bash \/usr\/local\/sbin\/sar-plot.sh -t net -o \/path\/to\/images\/network.svg *\/5 * * * *     bash \/usr\/local\/sbin\/sar-plot.sh -t la -o \/path\/to\/images\/la.svg <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u044d\u0442\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430 HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0430\u0441\u044c. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0445\u043e\u0441\u0442\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 5 \u043c\u0438\u043d\u0443\u0442). \u0427\u0435\u0433\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  <b>SAR<\/b> \u2014 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043d\u0435\u0437\u0430\u043c\u0435\u043d\u0438\u043c\u044b\u0439 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430. \u041e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043c\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445, \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Zabbix \u0438\u043b\u0438 \u043f\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c.<br \/>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u044c \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u0441\u0435\u0431\u044f:  <\/p>\n<ul>\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/li>\n<li>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043b\u044e\u0431\u044b\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Javascript-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/li>\n<li>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u0438\u0445-\u043d\u0438\u0431\u0443\u0434\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043d\u0430 \u0432\u0430\u0448\u0435\u0439 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0438\u0441\u044c \u0430\u043b\u0435\u0440\u0442\u044b, \u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441\u0435\u0431\u0435 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443.<\/li>\n<\/ul>\n<p>  \u0412\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044f. \u0423\u0434\u0430\u0447\u0438! \t\t\t<\/p>\n<div class=\"clear\"><\/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=\"http:\/\/habrahabr.ru\/post\/252201\/\"> http:\/\/habrahabr.ru\/post\/252201\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<h4>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e SAR?<\/h4>\n<p>  \u042f \u0443\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u0430\u0432\u043d\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e \u0440\u043e\u0434\u0443 \u0441\u0432\u043e\u0435\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0447\u0430\u0441\u0442\u0435\u043d\u044c\u043a\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0441\u044c \u0441 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u043c\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u00ab\u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u044b\u00bb, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0445\u043e\u0441\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 (\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0438\u043b\u0438 VDS), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0447\u0435\u043d\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445.<\/p>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Zabbix, Nagios, Cacti \u0438 \u0442.\u0434. \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432\u0441\u0435 \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442, \u0432 \u0441\u0438\u043b\u0443 \u044f\u0441\u043d\u044b\u0445 \u043f\u0440\u0438\u0447\u0438\u043d \u2014 \u043e\u043d\u0438 \u0441\u0430\u043c\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443 \u043d\u0430\u0441 \u0438\u0442\u0430\u043a \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e. \u0421\u0440\u0430\u0437\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u0430\u043a \u0431\u044b\u0442\u044c? \u0418 \u0442\u0443\u0442 \u043a \u043d\u0430\u043c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0441\u043f\u0435\u0448\u0438\u0442 SAR.  <\/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-252452","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/252452","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=252452"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/252452\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=252452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=252452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=252452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}