Shell script code that counts CPU memory usage _linux shell

Copy Code code as follows: #!/bin/sh Clear while ((1>0)) Todo net=$ (NETSTAT-ANP | grep 1000 | grep EST | wc-l) prc=$ (ps aux | grep thread1 | grep-v grep | grep-v Screen | awk ' {print ' CPU: "$"%, MEM: "$"%, RSS: "$6/1024" M, VSZ: "$5/102

Shell write alarm number control and recovery sample code _linux shell

I am also a novice, write a bit old-fashioned, right when practicing, for beginners friends reference it. Copy Code code as follows: #!/bin/bash If [$SUCC _ping-gt $ ((ping_count-1))];then If [F./alarm_file/alarm_$host];then

Find the shell script code for the specified suffix file in the specified directory _linux shell

Copy Code code as follows: #!bin/sh # Find the file for the specified suffix at the specified location, including subdirectories Usage # FINDF $ $ # The first parameter is a suffix # Find the file for the specified suffix and print it out

Shell script timed backup clears the code that runs the system log _linux shell

First, write backup and clear old log shell script: Copy Code code as follows: #!/bin/sh #backup Eoslog #author Rhao #date 2008-12-27 #定义环境变量Eos_home=/home/eosSas_home=/home/eos/sas # Test primary and secondary nodes.If

Shift is an ingenious solution to the problem of incoming parameter in shell programming _linux shell

I said, the shell is my conventional weapons, although not yet proficient, but I love the shell of the language, under Linux mixed, always write a script. Programmers have genes, there is a preference for programming languages, you let me write C

Linux Server Security Hardening shell script code _linux Shell

Copy Code code as follows: #!/bin/sh # Desc:setup Linux system security # AUTHOR:CORALZD # Powered by www.freebsdsystem.org # version 0.1.2 written by 2011.05.03 #account Setup Passwd-l XFS Passwd-l News Passwd-l NSCD Passwd-l Dbus

Automatic restart of service shell script code _linux Shell

Copy Code code as follows: #!/bin/bash if [!-f/tmp/down_count];then echo "0" > /tmp/down_count Fi Curl-i tomcat-host-o "/tmp/status" >/dev/null 2>1 Code= ' awk ' nr==1 {print $} '/tmp/status ' If ["$[code]"-ge];then

Introduction to the CP and MV Collocation in Linux {,} in the shell of the use of _linux shell

Often see commands like the following in blogs or forums the curly braces extend brace expansion {} Shell functions Cp/etc/httpd/httpd. {,. Bakup} Or is MV Resume{z,}.doc So what does it mean in the uinx/linux shell

6 ways to determine if a string is a number in the shell share the _linux shell

This article mainly introduces the "shell judge string is a number", mainly related to the shell to determine whether the string is a digital content, for the shell to determine whether the number of figures interested students can refer to. #!

The frustrating system () function in awk _linux the shell

Find a special embarrassing fact. I worked hard to Baidu data, want to use rewrite to achieve different domain name source station after the failure of automatic jump function, but the whole idea of missing a serious problem. In my mind, make a

CentOS to view the real-time traffic command for the NIC _linux shell

The real-time traffic of the NIC can be viewed through the Iptraf command, and the image is very intuitive. I'm going to look at the network traffic on the test server today. Copy Code code as follows: [Root@localhost ~]# iptraf-d eth0 -

Shell script realizes real-time detection file change _linux shell

svn

Using Python for Web development, it is now popular to use UWSGI to invoke Python programs, but using UWSGI for a period of time to find that there is a disadvantage is that every time you change the source code must restart Uwsgi to take effect,

Putty method to realize automatic landing of remote Linux host _linux Shell

Because the work needs, often from the Windows host to access the remote Ubuntu server, each input account and the old password, feel very troublesome, so the reference online tutorial simple set up can automatically login remote host, very

Shell script realizes whether the rsync data is transmitted over the _linux shell

Today there is a server A to transfer all the Web site program to another server B up, but away from work time is only 1 hours, in order to work on time, simply wrote a shell script to monitor whether there is transmission, I first in the server a

Shell script Implementation Status code analysis in Apache log _linux shell

First, the Apache log by day cutting Copy Code code as follows: Vi/etc/httpd/conf/httpd.conf ErrorLog "|rotatelogs/var/log/httpd/%y%m%derror_log 86400 480" Customlog "|rotatelogs/var/log/httpd/%y%m%daccess_log 86400" combined

Shell script implementation to prevent foreign IP access server _linux shell

Customer requirements, do not want to allow foreign IP to access the server, would have to let the computer room in the upper route to solve, but those people do not bird you!!! ~~~~In this case, you can only use iptables to solve the ~~~~~~~~~About

The quickest way to login to an SSH server _linux shell

I do not know if you have the same shoes have no management of hundreds of Linux operating system experience, although through SSH private key can be password-free landing, but every day input dozens of times the server IP address, I really like to

Understanding and learning of shell programming Basics Bash_linux Shell

1. Understanding Bash Through the shell will input the instructions and kernel communication, let kernel control hardware workView Shell:cat/etc/shellA preset shell type is recorded in the/etc/passwd after login and is related to the accountCommand

How to use the DD command in Linux system _linux shell

Function: Copies the specified input file to the specified output file, and can be converted to format during the copy process. You can use this command to realize the function of the diskcopy command under DOS. First use the DD command to write the

Shell script implementation Gets a snapshot of a Web page and generates thumbnails _linux shell

Getting a snapshot of a Web page and generating thumbnails can be done in two steps: 1, get a snapshot of the Web page 2. Generate thumbnail image Get a snapshot of a Web page Here we use PHANTOMJS to achieve. For detailed usage of PHANTOMJS,

Total Pages: 541 1 .... 251 252 253 254 255 .... 541 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.