1、显示统计占用系统内存最多的进程,并排序
[root@bogon ~]
PID PPID CMD %MEM %CPU
3511 3316 /usr/bin/gnome-shell 16.3 0.2
3873 3316 /usr/bin/gnome-software --g 5.4 0.0
1572 1156 /usr/bin/X :0 -background n 4.5 0.0
4084 1 /usr/libexec/gnome-terminal 2.2 0.0
3800 3316 nautilus-desktop --force 1.6 0.0
1134 1 /usr/bin/python2 -Es /usr/s 1.1 0.0
3602 1 /usr/libexec/geoclue -t 5 1.0 0.0
3693 3316 /usr/libexec/gsd-power 1.0 0.0
3834 1 /usr/bin/vmtoolsd -n vmusr 1.0 0.0
[root@bogon ~]
3511 16.3 /usr/bin/gnome-shell
3873 5.4 --gapplication-service
1572 4.5 vt1
4084 2.2 /usr/libexec/gnome-terminal-server
3800 1.6 --force
1134 1.1 -P
741 1.0 --no-debug
4577 1.0 --no-daemon
3834 1.0 vmusr
3709 1.0 /usr/libexec/gsd-xsettings
2、编写脚本,使用for和while分别实现192.168.0.0/24网段内,地址是否能够ping通,若ping通则输出"success!",若ping不通则输出"fail!"
[root@bogon ~]
for ((i=1;