Tag:running state
-
How to monitor the running status of docker container shell script
scene The company’s project is deployed in docker. The container will stop occasionally for unknown reasons. You need to write a script to monitor the running status of the container. If the container stops, start the container again Shell script #!/bin/bash #Pass in container name containerName=$1 currTime=`date +”%Y-%m-%d %H:%M:%S”` #Check whether the process exists exist=`docker […]
-
Shell script implementation monitors the running state of the specified process
In the previous blog, the implementation method of automatic test program was written. Now developers need to know the running state of the tested process (here refers to the main process running on Linux) before abnormal exit, such as memory utilization, CPU utilization, etc. Shell script is used to realize the running state of the […]
-
Summary of methods to view hardware information and running state in Linux system
1. View the disk Copy code The code is as follows: df -h 2. View the memory size Copy code The code is as follows: freefree [-m|g] Display memory by MB, GB Copy code The code is as follows: vmstat 3, check CPU Copy code The code is as follows: cat /proc/cpuinfo Only look at […]