FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


os:linux:check:scripts:check_reboot.sh.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
os:linux:check:scripts:check_reboot.sh.html [2017/11/25 23:29]
kurihara
os:linux:check:scripts:check_reboot.sh.html [2018/02/05 00:02] (current)
kurihara
Line 1: Line 1:
-[[os:info.html|]]+[[os:linux:ope:index.html]]
 ====== check_reboot.sh ====== ====== check_reboot.sh ======
 +
 +$FHHOME/target/scripts/check_reboot.sh
  
  
Line 6: Line 8:
 #!/bin/bash #!/bin/bash
 #============================================================================== #==============================================================================
-systeminfo.sh+check_reboot.sh
 # #
 # How to use # How to use
Line 17: Line 19:
 # Function # Function
 #============================================================================== #==============================================================================
 +process_check(){ 
 +   COUNT=`ps aux | grep $1 |grep -v grep |wc -l` 
 +   if [ "$COUNT" -ge 1 ] ; then 
 +      echo "$1 Process Found" 
 +   fi 
 +}
  
 #============================================================================== #==============================================================================
Line 30: Line 37:
  
  
 +## which ntpq > /dev/null 2>&1 && ntpq -p ####
 +`which ntpq > /dev/null 2>&1 && ntpq -p`
 +
 +## which chronyc > /dev/null 2>&1 && chronyc sources -v ####
 +`which chronyc > /dev/null 2>&1 && chronyc sources -v`
  
  
Line 49: Line 61:
  
 ## mount | egrep ^/dev #### ## mount | egrep ^/dev ####
-`mount | egrep ^/dev`+`mount | egrep "^/dev|nfs"`
  
  
Line 65: Line 77:
 # Process # Process
 #---------------------------------------------------------- #----------------------------------------------------------
 +# OS
 +`process_check snmp`
 +
 +# middleware
 +`process_check httpd`
 +`process_check nginx`
  
 @ @
Line 73: Line 91:
 \\ \\
 \\ \\
-[[os:info.html|]]+[[os:linux:ope:index.html]]
  
 \\ \\
 <WRAP box 90%> <WRAP box 90%>
 [[:index.html#OS Management|Top#OS Management]] [[:index.html#OS Management|Top#OS Management]]
-<catlist ..: -noAddPageButton -noHead -sortAscending>+<catlist ..:..: -noAddPageButton -noHead -sortAscending>
 </WRAP> </WRAP>
  


os/linux/check/scripts/check_reboot.sh.html.1511620190.txt.gz · Last modified: 2017/11/25 23:29 by kurihara