Every day -- linux uptime command -- Linux general technology-Linux technology and application information. The following is a detailed description. Appendix: linux-cainiao heaven: 60678254 coming soon
If you have any questions, contact qq: 407263252 or contact us in the group.
Use the uptime command to monitor the system status
A) # uptime
Pm up 27 min, 2 users, load average: 0.00, 0.00, 0.00
How long has it taken to start online CPU average load for several users (3 in total)
First: average load within 1 minute
Second: average load in 5 minutes
Third: average load within 15 minutes
When the system load is too large, multiple commands are blocked in memory and I/O systems.
In a large linux system, 2 and 3 indicate light loads, 5 and 6 indicate moderate loads, and 10 or more indicate overload.
Ps Process Management
B) # ps? Ef
UID PID PPID C STIME TTY TIME CMD
Root 1 0 0 :27? 00:00:01 init [3]
Root 2 1 0 :27? 00:00:00 [kflushd]
Root 3 1 0 :27? 00:00:00 [kupdate]
Root 4 1 0 :27? 00:00:00 [kpiod]
-E: displays the environment after the command is executed.
-F: complete display output
1) Process User ID (UID)
2) process ID (PID)
3) parent process ID (PPID)
4) CPU scheduling (C)
5) process start time (STIME)
6) total CPU usage TIME of processes (TIME)
7) command for starting the process (CMD)
C) The following methods are used to analyze system performance:
1) First, 2) Search for many similar tasks executed by the same user based on the user ID. 3) 4) these tasks may be caused by the startup of multiple processes in the background of a script program run by the user. 5.
6) Next, 7) Check the CPU usage TIME of each process in the TIME domain. 8) If a process occupies a large amount of cpu time, 9) it usually indicates that the process may be in an infinite loop, 10) or a write logic in the capital has an error.
11) after finding the deadlocked process IDs, 12) You can use the kill command to forcibly terminate the process.
Storage location of Linux kernel source files
D)/usr/src/linux-$ VERSION
1) VERSION: the VERSION is good.
E) the/usr/src directory may also contain different f) versions of Linux kernel, g) Different h) the source program of the kernel is placed in the subdirectory named I by version number. j) there is a directory/usr/src/linux, which is actually a link file linked to the latest kernel version.
K) we can obtain the latest Linux kernel source file through the web, l)
1) common file names 2): linux-w.version.tar.gz
M) Get the new kernel and unpackage it as root in the/usr/src directory.
Core configuration work
N) read the README file in the/usr/src/linux-$ VERSION directory first.
O) # make config: Call the configuration script. p) You can compile the kernel according to the system prompts. q) after the compilation is complete, the system automatically records the modified parameter values.
R) There are two other configuration parameters that can be configured in the same s) sample.
1) make menuconfig ------- run a configuration tool based on the dialog box. 2) allow you to select different values for each configuration parameter. 3.
4) make xconfig ------- run an X11-based application. 5) You can set the value of each configuration parameter (running on X server)
Compile new kernel
T) # make dep
1) Check the system to confirm that you already have 2) All necessary files
U) # make clean
1) Clear all targets generated during core compilation 2) files and other useless temporary files
V) # make zImage
1) start to compile the core, 2) and generate a file called zImage
W) The core file is stored in the./arch/i386/boot directory.
Load new core
X) cp./arch/i386/boot/zImage/boot/vmlinuz-$ VERSION
Y) cd/boot
Z) rm vmlinuz
Aa) ln? S vmlinuz-$ VERSION vmlinuz
Bb) lilo? V
Fdisk/dev/hda
Cc) a activates a new partition
Dd) n adds a new partition.
Ee) p print the current Partition Table
Ff) d. delete a partition.
Gg) t changes the partition type
Hh) l list all partition types
Ii) w disk to exit
Start core files
Jj vmlinuz-2.2.16-22
Kk) lilo. conf
Init process
Ll)/etc/inittab
1) 0: Shutdown
2) 1. Single User
3) 2: multiple users (not 4) support nfs)
5) 3: multiple users (full)
6) 4: meaningless
7) 5: Xwindow
8) 6: restart
Find the Startup Script
Mm)/etc/rc. d/init. d
Nn) starts a script file
1)/etc/rc. d/init. d/network start
2)/etc/rc. d/init. d/nfs start
Common Startup Problems
Oo) floppy boot
Pp) Use loadlin
1) # loadlin vmlinuz root =/dev/hda3
Qq) use the Upgrade Method to install non-rr) select any software package
Ss) the root password is missing.
1) bash # linux 1 (linux single)
Tt) controls external intrusion
1) BIOS Encryption
2) Ctrl + Alt + del (invalid)
Uu) boot Error
1) detect the file system (in single user mode)
1. fsck/dev/hda3
Vv)
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.