Week Seven - kernel customization, system customization, kickstart

1, citing common sense kernel parameters and parameters

kernel.hostname hostname 
net.ipv4.ip_forward route forwarding 
net.ipv4.icmp_echo_ignore_all ban all icmp_echo response packet 
vm.drop_caches clean up the memory buffer / cache


2, how / proc view the top of the display process status

cat / proc / 18106 / cmdline to see the process cmdline 18106 of 
cat / proc / * info view various cpuinfo, meminfo, etc. 
cat / proc / vmstat view system statistics 
cat / proc / partitions view the partition analysis


3, respectively while, for loop detection IP address subnet 10.0.0.1/24 survival

! # / bin / the bash 
CAT / dev / null> / tmp / RT 
for I in {1..254}; do 
        # ip every 0.2 second intervals ping3 times, one second end, the result is stored in / tmp / RT, 
        of ping -i0.2 -W1 10.0.0 -c3. $ i >> / tmp / rt & 
DONE 
echo the wait for A the while... 
# wait for two seconds and all processes end 
SLEEP 2 
# from the result set / tmp / rt sieve the active IP 
grep -OP '(<= from?) + (= :).?' / tmp / RT | the Sort -u 
echo DONE
! # / bin / the bash 
IP. 1 = 
echo the while the wait for A... 
the while [$ IP -le 254]; do 
# entire ping Analyzing and detecting a sub-shell back into parallel processing, $ ip beginning will be replaced do not worry son shell variable ip not obtain the value of 
        (the ping -W1 10.0.0 $ ip &> / dev / null;. [$ = 0?] && echo $ ip 10.0.0.) & 
        the let ip ++; 
DONE 
SLEEP 2 
echo done

4, the operation of the initrd

Kernel loads initrd (initramfs) into memory as a temporary root file system, load a variety of underlying hardware drive module, 
and then be able to identify and load the real root file system on the device, and they can start on the real root file system initialization process init program the


Guess you like

Origin blog.51cto.com/ckalago/2432082