Check the hard drive information first.
[Root@xenserver-ds-monitor01 ~]# Smartctl--ALL/DEV/SDASMARTCTL 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0+10] (local build)Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org= = = START
Think of/dev/null as a "black hole". It is very equivalent to a write-only file. All content written to it is lost forever. And trying to read content from it is nothing. However,/dev/null is very useful for both the command line and the script.
Linux Extract tar commandTar commandtar [-cxtzjvfppn] files and directories ....Parameters:-C: Create a compressed file parameter instruction (create meaning);-x: Unlock a parameter command for a compressed file!-T: View the files inside the Tarfile!
Web monitoring through the Zabbi can not only monitor the corresponding time to the site, but also according to the status code returned by the site, or the corresponding time to do the alarm
1, the need to monitor the host to add Web
When you perform the find./-mtime +30-type f-name *.php on the server today, the following error is reported:
Find:paths must precede expression
Usage:find [-h] [-l] [p] [path ...] [Expression]And then I looked it up on the Internet, the results
With an SSH key login, it turns out that you can't log in with the key, and I'm not allowed to enter the password. Distress.
Enter SSH connection code
Ssh-i private.key-v User@host.com-p22
There is nothing wrong with the information from the
Explain if you are configuring your network.
[Root@arch ~]# ls/sys/class/net/#查看有哪些可用网络eno16777736 Lo[Root@arch ~]# ip addr add 1.1.1.21/24 dev eno16777736 #给接口eno16777736配置ip为1.1.1.21 Subnet Mask bit 255.255.255.0[Root@arch ~]# IP link set eno16777
First, revise the Beijing time zone
Here old left to modify the time zone as the default, if there are other needs, you can modify the corresponding.
The code is as follows
Copy Code
VPS one hand, the first thing is to change the SSH port, using a not easy to disassemble the port number, to prevent being black.
Changing the port number is done by modifying the SSH configuration file, and after logging in SSH, enter:
1. Background information
In the case where the host host can surf the Internet, the operating system in the virtual machine is typically communicated with the host host by Nat mode.
Virtual machines cannot be on the Internet by default. But with
Linux scheduling Task Cron is a timed mode, for example, we can back up the system at least when the system is used, but it is impossible for an administrator to come to work in the middle of the night, so you can use the Linux program task Cron,
1 netstat-nlp to view the service that uses the port number2 process to find this port number3 Find the Process ID4 Kill it
How do I view the port number of a process?
NETSTAT-LNP | grep EXFTCP 0 0 0.0.0.0:9101 0.0.0.0:* LISTEN 5791/exfilter
Note:
Nagios using email to alert notifications is a common way.
1. Use SendEmail to send mail
SendEmail tools are very handy. See the specific content:
2. Create a contact
The code is as follows
Copy Code
#
If you do not remember after modifying the file under Linux, we need to find the files that have been changed in the specified time, and we can use Find command to look for them.
Find/opt-iname "*"-atime 1-type F
"Find the files that/opt visited
1, the outline of the planning task;
The task of planning is to perform the work that has been planned at the agreed time, which is the superficial meaning. In Linux, we often use the Crond server to do this work. A cron server can perform a
Background: Multiple items in the code of the log printing level unified replacement, if the file size, the number of many, to do it obviously powerless, through the script, this replacement sed the most suitable.Title:I:I want to put: Log_threshold
1. Allow to pass through a port at one end
Vi/etc/sysconfig/iptables
-A input-m state--state new-m tcp-p TCP--dport 80-j ACCEPT (allow 80 ports through the firewall)
/etc/init.d/iptables restart
#最后重启防火墙使配置生效
Allow only specific IP access to a
If it's a simple phone reboot we can do the following
----Linux Restart command----
1, shutdown2, Poweroff3. Init4, reboot5, halt
Here we will not introduce, because I mainly talk about automatic restart implementation method
using scripts to
Slurm is an Open-source distributed resource management software similar to Sun Grid Engine (SGE) for supercomputers and large compute node clusters, which can be highly scalable and fault-tolerant. After SUN was sold to Oracle, the handy SGE became
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