Linux prints out the corresponding memory and sum (shell) for the selected application

while[1 ] Do Clear PSAux |grepXmirror |grep-VgrepMem=0 forDatainch`PSAux |grepxxxx |grep-Vgrep|awk '{print $4}'` DoMem=`Echo$mem + $data |BC ' Done Echo`Date+%f" "%h:%m:%S 'Echomem:{$mem} #if[$mem-GT2 ] if(Echo${MEM}2|awk '! ($1>

Spark-shell Boot Error

18/06/24 16:41:40 ERROR Spark. Sparkcontext:error initializing Sparkcontext.Java.net.BindException:Cannot assign requested Address:service ' Sparkdriver ' failed after + retries (starting from 0)! Consider explicitly setting the appropriate port for

Linux Learning-----Shell Basics

Shell Basics1. What is a shellShell is a program developed by C language he is a bridge for users to use Linuxis both a command languageAn application This application provides an interface through which users access the operating system kernel's

Linux Common shell types

Different shells have different functions, the shell also decided that the default shell in Linux is/bin/bash, the popular shell has ash, bash, Ksh, CSH, zsh, and so on, different shells have their own characteristics and use.BashThe Shell,bash

Shell quotes those things

#通配符 {} * []?1.1 The difference between quotation marks and unquoted 1:[[email protected] ~]# touch a B[email protected] ~]# LLTotal 0-rw-r--r--. 1 root root 0 June 16:25 a-rw-r--r--. 1 root root 0 June 16:25 b[[email protected] ~]# touch "a

Linux kernel optimization related shell script

#修改 some of the default configurations in the/etc/sysctl.conf fileif [grep -v "^\s*#" /etc/sysctl.conf|grep -c "net.ipv4.ip_forward\s\+=\+0"];thenCat >>/etc/sysctl.conf Net.ipv4.ip_forward = 0Net.ipv4.tcp_max_tw_buckets = 5000Fs.file-max =

Self-study Linux Shell5.1-shell parent-child relationship

Click Back to learn the path of the Linux command line and shell script5.1-shell Parent-child relationship1 common types of shells Bash is the Linux standard default Shell, which is an abbreviation for the Bunrneagain shell, with a total of

Lab Four: Shell Programming (2)

1. basic usage of shell variables and usage of common symbolsThis section requires writing out the shell commands that implement the requirements, showing(1) Change the main prompt to the user's home directory name(2) Assign the string DOS file c:>\

[Shell]find command

Find./-mtime 18-exec ls-l {} \;Special places in this example are {} and \; And the-exec keyword, the meaning of these things: {} stands for "content found by find" and, as shown, the result of find is placed in the {} position; -exec

Tomcat multi-instance one-click Deployment Shell Script

#!bin/bash#tomcat deployment script, upload apache-tomcat-8.5.30.tar.gz, jdk-8u172-linux-x64.tar.gz to the server's/tmp/directory in advance. Install Jdktar  -zxf /tmp/jdk-8u172-linux-x64.tar.gz -c /usr/local/ln -s /usr/local/jdk1.8.0_

Shell Script Learning (i)

Shell Script Learning (i)A) Introduction to code-style shell scripts    1. Download Xshell 5      Build a folder Mkdri Home/data;1) Look at a 1.sh built in data    See if the build was successful.2) and edit echo Hello Word, and save the launch      

Basic monitoring menu written in shell

#!/bin/bashWhile:Doecho "1. View CPU View Memory View Disk View IP Exit Read-p "Please select menu:" ItemIf [${item}-eq 1]; Thenecho "CPU operating frequency is as follows:"Cat/proc/cpuinfo | grep MHRead-p "Enter carriage

The find command in the shell

Basic composition:find pathname-option [-print-exec-ok ...]Classify the attributes of the memory parameters ~Pathname: Specifies the query root path of the find command, such as '/', './'.You can also specify the search path in the-path

Shell Programming (Functions)

declaring functionsDemofun () { echo" This is my first shell function! " }Function name () {... function body}In the shell, arguments can be passed to a function when it is called. Inside the function body, the value of the parameter is obtained

Shell Programming (III)

Create a script admin.shPerform the following functions:-H | --HELP: Providing Help information--add users: Completing user additions-del User | --delete: Complete User deletion-V: Turn on debug mode, display informationYou can use all of the above

Read of the shell command

read:Brief introduction:The read command reads the value of a variable from the keyboard and is typically used in a shell script to interact with the user. The command can read the values of multiple variables at once, and the variables and input

Five, Shell operations

Integer numeric Operations use the expr command: You can only do integer operations and return the calculation results by default Format:Expr integer 1 operator integer 2 ...Integer values can be supplied with variables, giving the result of the

"Shell combat" executes commands on multiple servers in bulk

Function Description: Execute commands on multiple servers in bulk1 #!/bin/bash2 3 # ==========================================4 #function: Execute commands on multiple servers in bulk5 #method:./batch_cmd_manager.sh 6 #return: List of results

Shell script for regular cleanup of log files by "Shell combat"

Function Description: Cleans the Messages history log file (Messages-date) under the/var/log/path, but does not clean the messages file itselfDependency requirements: The BC module is installed on the server1 #clean_logs.sh2 #!/bin/bash3 4 # ========

Shell Script Programming arrays

Array:Variables: Storing the memory space of a single elementArray: A contiguous memory space that stores multiple elements, equivalent to a collection of multiple variablesArray name and IndexIndex: Numbering starting from 0, which is a numeric

Total Pages: 541 1 .... 343 344 345 346 347 .... 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.