Learn about Centmin Mod LEMP Stack today
Become a Member

Beta Branch add sar_call function to log system stats for centmin mod routines

Discussion in 'Centmin Mod Github Commits' started by eva2000, Apr 1, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    29,733
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:37 PM
    Nginx 1.13.x
    MariaDB 5.5
    add sar_call function to log system stats for centmin mod routines

    In 123.09beta01 and newer versions, add sar_call function to log to sar sysstat database the system statistics for common centmin mod routines. This allows the new sar logging on initial centmin mod install to be more useful https://community.centminmod.com/th...ts-collection-for-initial-install-runs.11022/ so you get an idea of what nginx, php and other source and yum/dnf routines system cpu, memory and disk usage stats

    Continue reading...

    123.09beta01 branch
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,733
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:37 PM
    Nginx 1.13.x
    MariaDB 5.5
    sar logged stats example from centmin.sh menu option 4 nginx upgrade to 1.11.12 run
    Code (Text):
    sar -q
    
    06:13:12 PM       LINUX RESTART
    
    06:15:01 PM   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15   blocked
    06:15:25 PM         2       166      3.87      1.97      0.79         0
    06:16:30 PM         2       167      5.95      2.89      1.18         0
    06:16:33 PM         2       165      5.55      2.86      1.18         0
    Average:            2       166      5.12      2.57      1.05         0

    Code (Text):
    sar -r
    
    06:13:12 PM       LINUX RESTART
    
    06:15:01 PM kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty
    06:15:25 PM    158296   1725432     91.60      1812   1071272   1208880     34.97    742612    568536     51096
    06:16:30 PM    209752   1673976     88.87      1000   1025724   1208880     34.97    753740    511572     55864
    06:16:33 PM    248200   1635528     86.82      1000   1031464   1082048     31.30    713584    513920     52540
    Average:       205416   1678312     89.10      1271   1042820   1166603     33.75    736645    531343     53167
    

    Code (Text):
    sar -u
    
    06:13:12 PM       LINUX RESTART
    
    06:15:01 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle
    06:15:25 PM     all     15.11      0.00      9.99      0.63      0.00     74.27
    06:16:30 PM     all     66.96      0.00     20.16      0.09      0.00     12.79
    06:16:33 PM     all      1.97      0.00      2.04      0.38      0.00     95.61
    06:20:01 PM     all      0.49      0.00      0.16      0.02      0.00     99.34
    06:25:01 PM     all      0.02      0.00      0.05      0.00      0.00     99.93
    06:30:01 PM     all      0.02      0.00      0.04      0.00      0.00     99.93
    06:35:01 PM     all      0.02      0.00      0.04      0.00      0.00     99.93
    Average:        all      3.86      0.00      1.30      0.02      0.00     94.82
    

    Code (Text):
    dynamic modules include file /usr/local/nginx/conf/dynamic-modules.conf
    -rw-r--r-- 1 root root 152 Mar 31 18:15 /usr/local/nginx/conf/dynamic-modules.conf
    
    load_module "modules/ngx_http_image_filter_module.so";
    load_module "modules/ngx_http_fancyindex_module.so";
    load_module "modules/ngx_stream_module.so";
    
    dynamic module directory at /usr/local/nginx/modules
    total 1.2M
    drwxr-xr-x.  2 root root 4.0K Mar 31 18:16 .
    drwxr-xr-x. 10 root root 4.0K Mar 31 09:03 ..
    -rwxr-xr-x   1 root root  55K Mar 31 18:16 ngx_http_fancyindex_module.so
    -rwxr-xr-x.  1 root root  55K Mar 31 08:48 ngx_http_fancyindex_module.so.old
    -rwxr-xr-x   1 root root  58K Mar 31 18:16 ngx_http_image_filter_module.so
    -rwxr-xr-x.  1 root root  58K Mar 31 08:48 ngx_http_image_filter_module.so.old
    -rwxr-xr-x   1 root root 470K Mar 31 18:16 ngx_stream_module.so
    -rwxr-xr-x.  1 root root 470K Mar 31 08:48 ngx_stream_module.so.old
    
    backup dynamic modules to /usr/local/nginx/modules.copy
    total 1.2M
    drwxr-xr-x   2 root root 4.0K Mar 31 18:16 .
    drwxr-xr-x. 11 root root 4.0K Mar 31 18:16 ..
    -rwxr-xr-x   1 root root  55K Mar 31 18:16 ngx_http_fancyindex_module.so
    -rwxr-xr-x.  1 root root  55K Mar 31 08:48 ngx_http_fancyindex_module.so.old
    -rwxr-xr-x   1 root root  58K Mar 31 18:16 ngx_http_image_filter_module.so
    -rwxr-xr-x.  1 root root  58K Mar 31 08:48 ngx_http_image_filter_module.so.old
    -rwxr-xr-x   1 root root 470K Mar 31 18:16 ngx_stream_module.so
    -rwxr-xr-x.  1 root root 470K Mar 31 08:48 ngx_stream_module.so.old
    log files saved at /root/centminlogs
    -rw-r--r--  1 root root   46 Mar 31 18:15 centminmod_libresslinstalltime_310317-181311.log
    -rw-r--r--  1 root root    0 Mar 31 18:15 patch_patchnginx_310317-181311.log
    -rw-r--r--  1 root root 1.8K Mar 31 18:15 nginx-configure-310317-181311.log
    -rw-r--r--  1 root root  31K Mar 31 18:16 nginx_autoconf.err.310317-181311.log
    -rw-r--r--  1 root root 677K Mar 31 18:16 centminmod_1.2.3-eva2000.09.004_310317-181311_nginx_upgrade.log
     
    Last edited: Apr 1, 2017
  3. eva2000

    eva2000 Administrator Staff Member

    29,733
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:37 PM
    Nginx 1.13.x
    MariaDB 5.5
    Another DNF_ENABLE='y' 123.09beta01 install run
    Code (Text):
    ---------------------------------------------------------------------------
    Total Curl Installer YUM or DNF Time: 98.7542 seconds
    Total YUM Time: 17.725709820 seconds
    Total YUM or DNF + Source Download Time: 47.3388
    Total Nginx First Time Install Time: 50.9339
    Total PHP First Time Install Time: 147.9512
    Download Zip From Github Time: 1.2850
    Total Time Other eg. source compiles: 251.3197
    Total Centmin Mod Install Time: 497.5437
    ---------------------------------------------------------------------------
    Total Install Time (curl yum + cm install + zip download): 597.5829 seconds
    ---------------------------------------------------------------------------
    

    with new sar_call function logged system stats

    Code (Text):
    cat /root/centminlogs/sar-q-installstats.log | sed -e "s|$(hostname)|hostname|"
    Linux 3.10.0-514.10.2.el7.x86_64 (hostname)     03/31/2017      _x86_64_        (8 CPU)
    
    10:05:43 PM       LINUX RESTART
    
    10:05:47 PM   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15   blocked
    10:05:51 PM         0       159      0.30      0.10      0.05         0
    10:06:47 PM         0       159      0.57      0.20      0.08         0
    10:06:51 PM         0       159      0.61      0.21      0.09         0
    10:07:17 PM         0       159      0.60      0.24      0.10         0
    10:07:22 PM         0       159      0.63      0.25      0.10         0
    10:07:26 PM         0       159      0.66      0.27      0.11         0
    10:07:40 PM         0       159      2.02      0.59      0.22         0
    10:08:01 PM         0       159      1.58      0.59      0.23         0
    10:08:03 PM         0       159      1.58      0.59      0.23         0
    10:08:11 PM         0       159      1.49      0.60      0.23         0
    Average:            0       159      1.00      0.36      0.14         0
    
    10:08:12 PM       LINUX RESTART
    
    10:08:21 PM   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15   blocked
    10:08:23 PM         0       165      1.26      0.58      0.23         0
    10:08:33 PM         0       167      1.14      0.58      0.23         0
    10:08:45 PM         0       165      0.97      0.57      0.23         0
    10:08:46 PM         0       165      0.97      0.57      0.23         0
    10:10:01 PM         1       169      2.81      1.05      0.42         0
    10:10:02 PM         0       166      2.81      1.05      0.42         0
    10:10:24 PM         0       166      4.58      1.55      0.59         0
    10:12:01 PM         0       170      1.53      1.34      0.61         0
    10:12:03 PM         0       170      1.53      1.34      0.61         0
    10:12:30 PM         0       170      1.19      1.27      0.61         0
    10:14:20 PM         0       169      6.38      3.61      1.56         0
    10:14:26 PM         0       169      5.95      3.56      1.56         0
    10:15:01 PM        15       205      3.49      3.22      1.51         0
    10:15:24 PM         0       189      2.56      3.02      1.49         0
    10:15:31 PM         0       185      2.25      2.94      1.48         0
    10:15:36 PM         1       191      2.23      2.92      1.48         0
    10:15:38 PM         0       186      2.23      2.92      1.48         0
    10:15:39 PM         0       186      2.23      2.92      1.48         0
    10:15:52 PM         0       185      1.88      2.81      1.47         0
    10:15:53 PM         0       185      1.88      2.81      1.47         0
    10:15:57 PM         0       185      1.73      2.77      1.46         0
    10:16:00 PM         0       185      1.59      2.72      1.45         0
    10:16:01 PM         0       185      1.59      2.72      1.45         0
    10:16:23 PM         0       218      1.29      2.58      1.43         0
    10:16:30 PM         0       218      1.17      2.51      1.42         0
    Average:            1       181      2.29      2.16      1.05         0


    Code (Text):
    cat /root/centminlogs/sar-r-installstats.log | sed -e "s|$(hostname)|hostname|"
    Linux 3.10.0-514.10.2.el7.x86_64 (hostname)     03/31/2017      _x86_64_        (8 CPU)
    
    10:05:43 PM       LINUX RESTART
    
    10:05:47 PM kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty
    10:05:51 PM  31947780    795084      2.43     24920    393988    324856      0.93    280988    211480     62492
    10:06:47 PM  31429072   1313792      4.01     53188    829532    325156      0.93    323216    634260    431392
    10:06:51 PM  31427972   1314892      4.02     53236    830452    325128      0.93    322072    635532    431700
    10:07:17 PM  31202424   1540440      4.70     73492   1003228    325160      0.93    378068    772628    265936
    10:07:22 PM  31202628   1540236      4.70     73696   1003024    325140      0.93    377920    772720    196124
    10:07:26 PM  31168760   1574104      4.81     73912   1035336    325156      0.93    404520    778824    183348
    10:07:40 PM  31135660   1607204      4.91     74036   1067580    325156      0.93    434400    781872     90200
    10:08:01 PM  31069760   1673104      5.11     74548   1126556    325156      0.93    461740    814664     55712
    10:08:03 PM  31057308   1685556      5.15     74656   1137724    325156      0.93    475900    811488     62948
    10:08:11 PM  30998108   1744756      5.33     75092   1193484    325156      0.93    506100    835668     81532
    Average:     31263947   1478917      4.52     65078    962090    325122      0.93    396492    704914    186138
    
    10:08:12 PM       LINUX RESTART
    
    10:08:21 PM kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty
    10:08:23 PM  30869744   1873120      5.72     75316   1305168    352152      1.01    629780    833608    158056
    10:08:33 PM  30858480   1884384      5.76     76088   1308488    361556      1.04    630528    837096    162188
    10:08:45 PM  30905480   1837384      5.61     76284   1257380    352296      1.01    560700    857036     64892
    10:08:46 PM  30901836   1841028      5.62     76292   1259180    352296      1.01    561968    856908     65968
    10:10:01 PM  30474344   2268520      6.93     87420   1614328    348476      1.00    769980   1017816     89312
    10:10:02 PM  30474704   2268160      6.93     87468   1613876    345980      0.99    770640   1017212     88920
    10:10:24 PM  30456244   2286620      6.98     87960   1627080    346008      0.99    767552   1033388     93836
    10:12:01 PM  27950348   4792516     14.64     94228   4046536    336088      0.96    899312   3325044     21508
    10:12:03 PM  27920484   4822380     14.73     94472   4075356    336092      0.96    899272   3354908     50840
    10:12:30 PM  27915564   4827300     14.74     94504   4077892    336092      0.96    910172   3347344     36032
    10:14:20 PM  27663320   5079544     15.51     95372   4311452    336092      0.96   1101780   3389668     82696
    10:14:26 PM  27577680   5165184     15.77     96168   4394968    336092      0.96   1111848   3463912    164208
    10:15:01 PM  27536920   5205944     15.90     96884   4392820   1197072      3.44   1163772   3446272     10224
    10:15:24 PM  27499868   5242996     16.01     97616   4441752   1244628      3.57   1185204   3452924     38216
    10:15:31 PM  27472632   5270232     16.10     98208   4444584   1253024      3.60   1209036   3452620     39432
    10:15:36 PM  27463176   5279688     16.12     98316   4444948   1280168      3.67   1216304   3452136     35592
    10:15:38 PM  27466444   5276420     16.11     98352   4445764   1262212      3.62   1212456   3451548     21352
    10:15:39 PM  27463692   5279172     16.12     98364   4447596   1262212      3.62   1215160   3450908     23388
    10:15:52 PM  27430376   5312488     16.22     99016   4475688   1253332      3.60   1232876   3461676     42096
    10:15:53 PM  27425564   5317300     16.24     99020   4480536   1253332      3.60   1237096   3461736     44724
    10:15:57 PM  27424536   5318328     16.24     99128   4481804   1254512      3.60   1240836   3460356     37992
    10:16:00 PM  27422984   5319880     16.25     99184   4481824   1254448      3.60   1241824   3459752     37932
    10:16:01 PM  27418020   5324844     16.26     99828   4484460   1254448      3.60   1245500   3459684     41164
    10:16:23 PM  26402228   6340636     19.36    109224   4502712  13014516     37.36   2253272   3451884     28256
    10:16:30 PM  31299968   1442896      4.41      2220     57848  13002524     37.32   1114452     34132         0
    Average:     28547785   4195079     12.81     89477   3378962   1757026      5.04   1055253   2593183     59153


    Code (Text):
    cat /root/centminlogs/sar-u-installstats.log | sed -e "s|$(hostname)|hostname|"
    Linux 3.10.0-514.10.2.el7.x86_64 (hostname)     03/31/2017      _x86_64_        (8 CPU)
    
    10:05:43 PM       LINUX RESTART
    
    10:05:47 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle
    10:05:51 PM     all     11.23      0.00      0.23      0.03      0.00     88.51
    10:06:47 PM     all      4.82      0.00      1.07      0.16      0.00     93.95
    10:06:51 PM     all     12.26      0.00      0.18      0.00      0.00     87.56
    10:07:17 PM     all      6.42      0.00      1.84      0.56      0.00     91.19
    10:07:22 PM     all     11.57      0.00      0.28      0.14      0.00     88.01
    10:07:26 PM     all      4.02      0.00      3.87      0.15      0.00     91.95
    10:07:40 PM     all     85.82      0.00      2.92      0.59      0.00     10.67
    10:08:01 PM     all      6.57      0.00      4.42      0.14      0.00     88.87
    10:08:03 PM     all     67.57      0.00      8.15      0.05      0.00     24.23
    10:08:11 PM     all      5.83      0.00      2.70      0.17      0.00     91.29
    Average:        all     15.01      0.00      2.08      0.26      0.00     82.65
    
    10:08:12 PM       LINUX RESTART
    
    10:08:21 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle
    10:08:23 PM     all     10.11      0.00      1.54      0.10      0.00     88.26
    10:08:33 PM     all      7.55      0.00      0.39      0.02      0.00     92.04
    10:08:45 PM     all      1.74      0.00      0.88      0.04      0.00     97.34
    10:08:46 PM     all     47.56      0.00      5.31      0.00      0.00     47.13
    10:10:01 PM     all     18.60      0.00      4.53      0.11      0.00     76.76
    10:10:02 PM     all      6.56      0.00      7.44      0.08      0.00     85.92
    10:10:24 PM     all     67.31      0.00     13.35      0.02      0.00     19.31
    10:12:01 PM     all      6.06      0.00      0.93      4.63      0.00     88.38
    10:12:03 PM     all      9.93      0.00      0.97      0.06      0.00     89.04
    10:12:30 PM     all      9.42      0.00      4.15      0.01      0.00     86.42
    10:14:20 PM     all     71.01      0.00      9.08      0.01      0.00     19.91
    10:14:26 PM     all      5.13      0.00      8.15      0.00      0.00     86.72
    10:15:01 PM     all      6.08      0.00      1.49      0.06      0.00     92.38
    10:15:24 PM     all     19.64      0.00      3.44      0.02      0.00     76.90
    10:15:31 PM     all      4.14      0.00      1.64      0.07      0.00     94.14
    10:15:36 PM     all      9.38      0.00      4.36      0.00      0.00     86.26
    10:15:38 PM     all      9.47      0.00      6.14      0.35      0.00     84.04
    10:15:39 PM     all     61.18      0.00      8.07      0.00      0.00     30.76
    10:15:52 PM     all      5.01      0.00      2.04      0.03      0.00     92.92
    10:15:53 PM     all     28.87      0.00      4.52      0.00      0.00     66.61
    10:15:57 PM     all      0.27      0.00      0.36      0.12      0.00     99.24
    10:16:00 PM     all      0.14      0.00      0.05      0.00      0.00     99.81
    10:16:01 PM     all      7.30      0.00      7.60      0.15      0.00     84.95
    10:16:23 PM     all     10.91      0.00      1.57      0.21      0.00     87.31
    10:16:30 PM     all      3.33      0.00      1.79      0.16      0.00     94.71
    Average:        all     26.52      0.00      4.49      0.96      0.00     68.02