Dynamically view memory usage of a process
CopyCode The Code is as follows:
1. Top Command Top-D 1-p pid [, PID...] // set it to delay 1 s. The default value is delay 3 s.
To sort by memory usage, Shift + M (sort by memory usage)
Static view of
The awk function split (s, A, SEP) Splits a string s into an awk array a using the delimiter Sep.
Set Time = 12:34:56Set hR = 'echo $ time | awk '{split ($0, a, ":"); print a [1]} ''# = 12Set sec = 'echo $ time | awk' {split ($0, a, ":"); print a [
I believe many system administrators may have encountered this situation. They logged on to a server and used the free command to view the memory, but found that swap partitions were occupied. So what process occupies this part of the SWAp partition?
CopyCodeThe Code is as follows :#! /Bin/bash
Send_thread_num = 13Tmp_domainofile = "/tmp/$. FIFO" # ID of the current process running the script as the file nameMkfifo "$ tmp_domainofile" # create a random FIFO pipeline FileExec 6 <> "$
In view of the security of our VPs, it is recommended that you change the root password for a while to maintain the security of the VPs. It doesn't matter if the root password is not changed in the user background of the VPs management platform. We
Operating in Linux, \ r \ n is inevitable, especially in many places, such as the recent email sending, why \ r \ n, in the past, only the era of \ n seems to have passed, because I am a person who prefers to sum up and a person who prefers theory
Linux program segments have been used in various ways. Today, we should make a reasonable conclusion that the time is too short and the summary is relatively scattered.
Linux section:Text: The machine code of the compiled program.
. Rodata: read-
Xtrabackup has two main tools: xtrabackup and innobackupex.
(1) xtrabackup can only back up InnoDB and XtraDB data tables, but cannot back up MyISAM data tables.(2) innobackupex-1.5.1 encapsulates xtrabackup, which is a script encapsulation, so
In linux, modify the MAC address
# Ifdown eth0
# Ifconfig eth0 hw ether 12: 34: 56: 78: 90: 12
(The modified MAC address is different from the original address)
# Ifup eth0 (modified successfully)
Then, use # ifconfig to check whether the MAC
As we all know, SFTP accounts are based on SSH accounts, so the permissions to access the server by default are very large. Today's tutorial is to teach you how to set SFTP user permissions.
Prerequisites:Your openssh-server version requires at
In linux, how does one perform soft raid? I hope the following introduction will help and inspire my friends!
Add a 10 Gb hard disk to the Virtual Machine System as sdb, divide the hard disk into five logical disks: sdb {5, 6, 7, 8, 9}, and the
Returns the length of a string.
Copy codeThe Code is as follows:
% X = "abcd"
# Method 1
% Expr length $ x
4
# Method 2
% Echo $ {# x}
4
# Method 3
% Expr "$ x ":".*"
4
# Expr help
# STRING: REGEXP anchored pattern match of REGEXP in STRING
Search
If you want to use the easy_install tool, you may need to install setuptools first, but the cool way is to use the ez_setup.py script:
Copy codeThe Code is as follows: wget-q http://peak.telecommunity.com/dist/ez_setup.py
Python ez_setup.py
After
1. vim/var/named/chroot/var/named/hrsx.com. zoneAdd a row:
Copy codeThe Code is as follows: * in a 192.168.0.204
2. To the apache server, vim/usr/local/apache2/conf/extra/httpd-vhosts.conf
Copy codeThe Code is as follows:
SetEnv APPLICATION_
I have read that/proc/net/dev in linux records the packets and number of segments sent and received by each Nic. Therefore, I wrote an idea. Running effect:
Copy codeThe Code is as follows: [root @ 74-82-173-217 ~] #./Net. sh
Current Ip: inet addr:
Shows the test environment:
Server ip: 192.168.0.1
Test requirements: the linux dhcp server is required to assign an IP address to the linux client.
Server Software Package: dhcp-3.0.1-12_EL.I386 (which is acceptable for other versions, of course)
1. If squid is not installed in the system, enter the command in the following order to complete the installation.
# Wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE18.tar.gz // download the Squid Agent installation package
#
Most VPS abroad are Linux/Unix platforms, and there are also many advantages of the Linux/Unix platform. The key point is that it is still free of charge. (friends who have used VPS in the United States know that foreign IDCs are installed.WinDows
How to enable url rewriting in Linux:
1. Open httpd. conf in apache (usually in the/etc/httpd/conf directory)
2. Find # LoadModule rewrite_module modules/mod_rewrite.so and remove the previous #
3. Change AllowOverride None to AllowOverride All, and
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