linux series of commonly used commands finishing operation and maintenance record

table of Contents

This blog records of work requiring operation and maintenance of linux command, when the university came into contact with linux, it will be some of the basic operations, but did not finish it, plus do the development, operation and maintenance do, some commands forgotten, so now organized into blog of course vi, file operation is not introduced, and slowly accumulated some other expansion command, blog from time to time update

@

1, free command

The free command can be displayed on the idle system and physical memory has been used, as well as exchange of the memory, while the display buffer and cache can be used by the kernel

语法:free [param]

param can be:

  • -b: Displays a Byte memory usage;
  • -k: in KB display memory usage;
  • -m: in MB display memory usage;
  • -o: not display buffer adjustment columns;
  • -s <interval seconds>: Memory usage is continuously observed;
  • -t: Display memory column sums;
  • -V: Display version information.

Here Insert Picture Description
Men: represents the physical memory statistics

  • total: represents the total number of physical (total = used + free) memory
  • used: indicates the number of buffers assigned to the system used (here includes cache and buffer cache)
  • free: represents the total physical memory unallocated
  • shared: shared memory representation
  • buffers: the number of buffers assigned by the system but not in use.
  • cached: the number of cache system allocated but not used.

- / + buffers / cache: represents the physical memory of the cache statistics

  • (-Buffers / cache) Number of Memory: (used to refer to a first portion of the Mem line - buffers - cached)
  • (+ Buffers / cache) Memory Number: (refer to the first portion of the Mem line free + buffers + cached)

(-Buffers / cache) represents the amount of memory actually used, (+ buffers / cache) represents a real number of unused memory

Swap: represents the usage of the swap partition on the hard disk

2, tail command

tail command can be used to view the contents of a file, the syntax is

tail [param] [filename]

Where param can be:

  • -f: read cycle
  • -q: does not display process information
  • -v: display detailed processing information
  • -C [number]: the number of bytes displayed
  • Tail n lines display file contents: -n [rows]
  • --pid = PID: in combination with the -f, expressed after the end of the process ID, PID dies
  • -q, --quiet, --silent: never output headers giving file names
  • -s, --sleep-interval = S: combined with -f, represents the sleep interval repeated every S seconds

3, top command

the top command to view the real-time dynamic operation of the system as a whole, is a combination of information from multiple utilities to monitor system performance and operational information

语法:top [param]

param is:

  • -b: batch mode;
  • -c: display the complete cure command;
  • -d: Screen refresh interval;
  • -I: Ignore failure process;
  • -s: privacy mode;
  • -S: accumulation mode;
  • -u [User Name]: Specifies the user name;
  • -p [process ID]: Specifies the process;
  • -n [times]: number of cycles displayed.

4, ulimit command

Syntax: ulimit [param]
param parameter can be:

  • -a display the current resource limit settings.
  • -c  Maximum value core file, in units of blocks.
  • -d <section data block size> maximum section area of ​​the program data in units of KB.
  • Maximum file can be established -f <file size> shell, in units of blocks.
  • -H resources to set hard limits, which is under the limit set by the administrator.
  • -m <memory size> Specifies the upper limit of the memory, in units of KB.
  • -n <number of files> Specifies the same time open up the number of files.
  • -p <buffer size> Specifies the size of the pipe's buffer, 512 units of bytes.
  • -s <stack size> specifies the upper limit of the stacked units of KB.
  • -S set elastic resource constraints.
  • -t  CPU time limit specified in seconds.
  • -u <program number> program number of the user can open up.
  • -v <virtual memory size> specifies the maximum virtual memory can be used, in KB

5, netstat command

Network interfaces and packet statistics for monitoring incoming and outgoing network netstat command-line tool

语法:netstat [param]

param parameter can be:

  • -h: View Help
  • -r: Displays the routing table
  • -i: View Network Interface

Appendix:
Linux command Daquan (manual)

Guess you like

Origin www.cnblogs.com/mzq123/p/11783695.html