SHELL scripts to achieve high availability of Nginx service processes

Write a SHELL script to implement high HA of the Nginx service process. The script content is as follows :#! /Bin/bashwhile: donginxpid = 'ps-Cnginx -- no-header | wc-l' if [$ nginxpid-eq0]; then/usr/local/nginx/sbin/nginxsleep5 Write SHELL scripts

Original by Bai Qiao: Visual C ++ is not the only C ++ compiler.

Original by Bai Qiao: Visual C ++ is not the only C ++ compiler-general Linux technology-Linux programming and kernel information. For details, see the following. C ++, as a high-level language, must compile the source program to convert it into a

Shell string Truncation

Shell string truncation rules: & #8226; $ {# parameter} Get the string length & #8226; $ {parameter % word} to the minimum extent, extract word from the back & #8226; $ {parameter % word} captures word & #8226; $ {parameter # word} at the backend to

Process control, function, and script debugging in Shell

Introduce Process Control in Shell, such as judgment statements... If statement: first, learn a few knowledge: [-f "somefile"]: Determine whether a file is [-x "/bin/ls"]: determine whether/bin/ls exists and has the executable permission [-n "$ var"]

Shell common techniques Pipe Combination

Run the Shell command in the pipeline to obtain the system running data: 1. output the five most memory-occupied commands in the current system: #1) run the ps command to list all processes running on the current host. #2) The fifth field is sorted (

Causes of DHCP service startup failure

The reason for DHCP Service Startup failure-Linux general technology-Linux technology and application information. For details, refer to the following section. Service dhcpd restart (that is,/etc/rc. d/init. d/dhcpd start) faild and faild is used to

ZendStudio7.0.0 officially released

ZendStudio7.0.0 was officially released-general Linux technology-Linux programming and kernel information. The following is a detailed description. An award-winning professional PHP integrated development environment with powerful professional

How to install Win8RTM for NONBOOT on a hard disk

How to install Win8RTM for NONBOOT on a hard disk-general Linux technology-Linux technology and application information. For details, refer to the following section. After downloading the Win8 RTM file, the leaked version of Win8 is NONBOOT, so the

Loop Control Structure of shell script Programming

Loop Control-for Loop syntax structure 1 forVariableinListdocommands & nb Loop Control-for Loop Syntax 1 For Variable in List Do Commands Done Syntax structure 2 For Variable in List; do Commands Done This List can be a List, variable, command, etc.

Shell implements a simple process monitoring script

#! /Bin/bashNAME = javaNOP =/bin/trueDATE = $ (/bin/date + "% Y-% m-% d % H: % M: % S ") ps-ef | awk-F "" '{print $8, $2}' | grep ^ java & gt;/dev/null2 & gt; & amp; 1 case "$? "In0) # Itisrunninginth #! /Bin/bash NAME = java NOP =/bin/trueDATE = $

Problem fixed by federa startup, urgent

Federa starts to fix the problem. Urgent: Linux general technology-Linux technology and application information. The following is a detailed description. I have installed fedora16 from the hard disk and deleted the 10 Gb partition used to install

Accurately clear the Squid cache using SHELL scripts

This script was modified on the cache cleanup script of Zhang banquet, mainly to add the if option, and select the address of the cached file based on the $1 parameter type (because $1 is not fixed, sometimes it is a specific jpg type, sometimes it

Shell automatically deletes the backup angle n days ago.

Linux schedules tasks and automatically deletes old files n days ago. linux is a system that can automatically generate files, such as logs, emails, and backups. Although hard disks are cheap now, we can have a lot of hard disk space to waste these

Shc can be used to encrypt shell scripts in binary format.

Shc can be used to perform binary encryption on shell scripts The following describes how to install and use: Install: Take shc-3.8.7.tgz as an example tar-vxfshc-3.8.7.tgzcdshc-3.8.7maketestmakestringsmakeexpirationmakeinstallmakeinstall-c-ss Shc

Common CentOSShell skills: findxargs

File SEARCH Command find: The following shows the main application example of the find command:/& gt; ls-l # list the test files contained in the current directory-rw-r --. 1rootroot48217Nov1200 File SEARCH Command find:The following is an example

Solve the Problem of garbled Chinese characters in the txt files saved in windows on ubuntu.

Solve the Problem of garbled Chinese characters in the txt files stored in windows in ubuntu-general Linux technology-Linux technology and application information. The following is a detailed description. The solution is as follows: 【 After ubuntu

Analyze apache Log Status Codes Using shell scripts

1. First, cut apache logs by day vi/etc/httpd/conf/httpd. confErrorLog & quot; | rotatelogs/var/log/httpd/% Y % m % derror_log864001_& quot; 1. First, cut apache logs by day Vi/etc/httpd/conf/httpd. confErrorLog "| rotatelogs/var/log/httpd/% Y % m %

Use mail monitoring ssh to log on to the User shell script

Wgethttp: // response #! /Bin/shuser = $ USERip =$ {SSH_CLIENT % Wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz Tar xvf sendEmail-v1.56.tar.gzMusic sendEmail-v1.56 sendEmail Vi/etc/ssh/sshrc#! /Bin/shUser = $ USERIp =

Yum source settings

Yum source settings-general Linux technology-Linux technology and application information. For more information, see. $ Yum update Plugin "product-id" can't be imported Plugin "subrole-manager" can't be imported Loaded plugins: refresh-packagekit

Shell size comparison

#! /Bin/basffe [$ 1-gt $2] thenecho & quot; $1 & gt; $2 & quot; elseecho & quot; $2 & gt; $1 & quot; fi # Number judgment commands #-gt is greater than meaning #-lt is less than #-eq is equal to #-ne is not equal to #-ge is greater than or equal to #

Total Pages: 2732 1 .... 2547 2548 2549 2550 2551 .... 2732 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.