FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


os:linux:set:performance:etc_cron.d_performance.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
os:linux:set:performance:etc_cron.d_performance.html [2018/01/15 01:04]
kurihara
os:linux:set:performance:etc_cron.d_performance.html [2018/02/04 23:24]
kurihara ↷ Page moved from os:set:performance:etc_cron.d_performance.html to os:linux:set:performance:etc_cron.d_performance.html
Line 20: Line 20:
 #daily output #daily output
 #------------------------------------------------------------------- #-------------------------------------------------------------------
-#0 * * * * root dstat -taf 5 720 >> ${LOGDIR}/dstat-taf.`date +\%Y\%m\%d` +Multi
-0 * * * * root sar -n DEV 5 720 >> ${LOGDIR}/sar-n-DEV.`date +\%Y\%m\%d`+
 0 * * * * root vmstat 5 720 | awk '{print strftime("\%y/\%m/\%d \%H:\%M:\%S"), $0} { system(":") }' >> ${LOGDIR}/vmstat.`date +\%Y\%m\%d` 0 * * * * root vmstat 5 720 | awk '{print strftime("\%y/\%m/\%d \%H:\%M:\%S"), $0} { system(":") }' >> ${LOGDIR}/vmstat.`date +\%Y\%m\%d`
 +#0 * * * * root dstat -taf 5 720 >> ${LOGDIR}/dstat-taf.`date +\%Y\%m\%d`
 +
 +# CPU Details
 0 * * * * root mpstat 5 720 >> ${DIR}/mpstat.`date +\%Y\%m\%d` 0 * * * * root mpstat 5 720 >> ${DIR}/mpstat.`date +\%Y\%m\%d`
 +
 +# Load Average Details
 +0 * * * * root sar -q 5 720 >> ${LOGDIR}/sar-q.`date +\%Y\%m\%d`
 +
 +# Memory
 +0 * * * * root sar -r 5 720 >> ${LOGDIR}/sar-r.`date +\%Y\%m\%d`
 +
 +# Disk Details
 0 * * * * root iostat -xtm 10 360 >> ${LOGDIR}/iostat.`date +\%Y\%m\%d` > /dev/null 2>&1 0 * * * * root iostat -xtm 10 360 >> ${LOGDIR}/iostat.`date +\%Y\%m\%d` > /dev/null 2>&1
  
-* * * * root /home/fasthandle/scripts/ps.sh /dev/null 2>&1 +# Network Details 
-* * * * * root /home/fasthandle/scripts/top.sh > /dev/null 2>&+* * * * root sar -n DEV 5 720 >> ${LOGDIR}/sar-n-DEV.`date +\%Y\%m\%d`
 * * * * * root /home/fasthandle/scripts/netstat-s.sh > /dev/null 2>&1 * * * * * root /home/fasthandle/scripts/netstat-s.sh > /dev/null 2>&1
 * * * * * root /home/fasthandle/scripts/netstat-i.sh > /dev/null 2>&1 * * * * * root /home/fasthandle/scripts/netstat-i.sh > /dev/null 2>&1
 +
 +# Process Details
 +* * * * * root /home/fasthandle/scripts/ps.sh > /dev/null 2>&1
 +* * * * * root /home/fasthandle/scripts/top.sh > /dev/null 2>&
 +
  
 #------------------------------------------------------------------- #-------------------------------------------------------------------
 # monthly output # monthly output
 #------------------------------------------------------------------- #-------------------------------------------------------------------
 +# Disk Details
 0  0,6,12,18 * * * root /home/fasthandle/scripts/df.sh > /dev/null 2>&1 0  0,6,12,18 * * * root /home/fasthandle/scripts/df.sh > /dev/null 2>&1
  
Line 52: Line 68:
 \\ \\
 ===== Multi ===== ===== Multi =====
 +==== vmstat ====
 +**memory, swap, io, system, cpu**
  
 +==Output Example==
 +<code>
 +~]# vmstat 1 3 | awk '{print strftime("%y/%m/%d %H:%M:%S"), $0} { system(":") }'
 +17/11/29 00:18:29 procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 +17/11/29 00:18:29  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 +17/11/29 00:18:29  1  0      0 270248   1492 251820    0    0    85    36   64  117  0  0 99  0  0
 +17/11/29 00:18:30  0  0      0 270092   1492 251852    0    0          149  265  0  0 100  0  0
 +17/11/29 00:18:31  1  0      0 270092   1492 251852    0    0        21  139  236  0  0 100  0  0
 +</code>
 +
 +\\
 ==== dstat -taf ==== ==== dstat -taf ====
 <code> <code>
Line 67: Line 96:
  
  
-\\ 
-==== vmstat ==== 
-**memory, swap, io, system, cpu** 
- 
-==Output Example== 
-<code> 
-~]# vmstat 1 3 | awk '{print strftime("%y/%m/%d %H:%M:%S"), $0} { system(":") }' 
-17/11/29 00:18:29 procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- 
-17/11/29 00:18:29  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st 
-17/11/29 00:18:29  1  0      0 270248   1492 251820    0    0    85    36   64  117  0  0 99  0  0 
-17/11/29 00:18:30  0  0      0 270092   1492 251852    0    0          149  265  0  0 100  0  0 
-17/11/29 00:18:31  1  0      0 270092   1492 251852    0    0        21  139  236  0  0 100  0  0 
-</code> 
  
  
Line 114: Line 130:
 </code> </code>
  
 +\\
 +\\
 +===== Load Average Details=====
 +==== sar -q ====
 +<code>
 +~]# sar -q 2 3
 +Linux 3.10.0-229.el7.x86_64 (centos7)   01/15/18        _x86_64_        (2 CPU)
 +
 +01:43:05      runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15   blocked
 +01:43:07            0       219      0.00      0.01      0.05         0
 +01:43:09            1       219      0.00      0.01      0.05         0
 +01:43:11            0       219      0.00      0.01      0.05         0
 +Average:            0       219      0.00      0.01      0.05         0
 +</code>
 +
 +\\
 +===== Memory Details =====
 +==== sar -r ====
 +<code>
 +~]# sar -r 2 3
 +Linux 3.10.0-229.el7.x86_64 (centos7)   01/15/18        _x86_64_        (2 CPU)
 +
 +01:43:26    kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty
 +01:43:28       249240    509760     67.16      1492    230356   1465816     91.69    247440    185552         0
 +01:43:30       249240    509760     67.16      1492    230356   1465816     91.69    247444    185552         0
 +01:43:32       249240    509760     67.16      1492    230360   1465816     91.69    247444    185556         0
 +Average:       249240    509760     67.16      1492    230357   1465816     91.69    247443    185553         0
 +</code>
  
 \\ \\
Line 211: Line 255:
  
 ==== netstat-i.sh ==== ==== netstat-i.sh ====
-netstat -i is check error packet.+netstat -i is check error packet with every interfaces.
  
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>


os/linux/set/performance/etc_cron.d_performance.html.txt · Last modified: 2018/02/04 23:24 by kurihara