Log File Description/var/log/message system startup information and error log, which is one of the most commonly used logs in red Hat Linux/var/log/secure Security-related log information/var/log/maillog Message-related log information/var/log/cron
1./bin CatalogueThe bin is an abbreviation for binary (binary). This directory inherits the structure of the UNIX system and stores the binary executable commands most often used by the user. such as CP, LS, cat, and so on.2./Boot DirectoryHere are
Find the specified string in the file and highlight it:Find. | xargs grep--color=auto "Hello"DOS Search:Netstat-ano|findstr "8001"To see if the port number is turned on:Netstat-pant | Fgrep 9009Sends a term signal to the parent process, trying to
Linux common view Hardware Device information command
System
# uname-a # View kernel/Os/cpu information # head-n 1/etc/issue # view OS version # cat/proc/cpuinfo # View CPU Information # hostname # View computer name # LSPCI-TV # list
See some system commands on the Internet, put a note# uname-a # View kernel/Os/cpu info # head-n 1/etc/issue # view OS version # Cat/proc/cpuinfo # View CPU Info # hostname # View Meter Computer name # LSPCI-TV
A few months ago began to use the VPS, the monthly limit of 300GB traffic, traffic convenience basic enough, but sometimes due to some malicious access, resulting in CPU, memory and other resource consumption, resulting in a VPS blog site response
Everything in Linux is a file, in the root directory of Linux/unix, there is a/proc directory, this/proc is a kernel and kernel module used to send information to the process (processes) mechanism (so called "/proc"), This pseudo file system allows
A Linux daemonLinux servers start with a number of system services that provide local and network users with a system-functional interface for Linux that is directly targeted to applications and users. The programs that provide these services are
These days have been research operations monitoring things, once saw a script is good, now can not find the address of the only use Python instead of shellThe principle is to monitor/proc/under the various files,/proc/as the name implies that it is
This section describes several shell scripts that can be used to extract I/O information from the disk, system load load information, and so on
1, extract the system load information
Copy Code code as follows:
#!/bin/sh
host=$ (hostname)
Multiple files under the/proc file system provide system information that is not specific to a particular process, but can be used throughout the system-wide context. The files that you can use vary depending on your system configuration. Command
System
# uname-a # View kernel/operating system/CPU information# head-n 1/etc/issue # View operating system version# cat/proc/cpuinfo # View CPU Information# hostname # View computer name# LSPCI-TV # list all PCI devices# LSUSB-TV # list all USB
Demo Effect:
1, the first level menu
2, Level two menu
3. Perform operation
Script reference:
Copy Code code as follows:
#!/bin/bash
#author Lic (Oldboy Linux student)
#date 1304
disk_no= "/DEV/SDA1"
Nginx_dir= "/usr/local/
system log files ( can be viewed by cat or Tail command )
/var/log/message information and error logs after system startup is one of the most common logs in red Hat Linux
/var/log/secure Security-related log information
/var/log/maillog
How to view system startup time and run time under Linux
1. View/proc/uptime file Computing system startup time:
Cat/proc/uptime
Output: 5113396.94 575949.85
The first number is the system has been running for 5,113,396,.94 seconds, using the
I. Preface we all know that the tasks under Windows for each run are managed and viewed through Task Manager. So under Linux. Frequently used system performance analysis commands: Top [Displays information about processes currently being executed by
The Proc file system is a real-time, resident memory file system that tracks how the process works on your machine and the state of your system. The/proc file system is a resident virtual memory and maintains the dynamic data of the operating system.
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.