???Linux????(???)????????
?????GeaoZhang ???????[ 2017/5/31 11:33:25 ] ?????????????? Linux ????
?????塢???????????????
????1??pstree????????????????????????
shell> pstree
init???Щ?abrtd
????acpid
????atd
????auditd??????{auditd}
????automount??????4*[{automount}]
????certmonger
????console-kit-dae??????63*[{console-kit-da}]
????crond
????cupsd
????dbus-daemon
????hald???Щ?hald-runner???Щ?hald-addon-acpi
?? ?? ????hald-addon-inpu
?? ????{hald}
????irqbalance
????login??????bash
????mcelog
????5*[mingetty]
????mysqld_safe??????mysqld??????28*[{mysqld}]
????rpc.statd
????rpcbind
????rsyslogd??????3*[{rsyslogd}]
????2*[sendmail]
????sshd???Щ?sshd??????bash??????pstree
?? ????sshd??????bash??????mysql
????udevd??????2*[udevd]
????vsftpd
????xinetd
????zabbix_agentd??????5*[zabbix_agentd]
???????????????-p???г??????PID??
??????????{}????????????
????2??pgrep??????????????????????PID???
????[root@localhost ~]# pgrep init
????1
????[root@localhost ~]# pgrep -l init
????1 init
????[root@localhost ~]# pgrep -l -u root -t pts/2
????11567 bash
????-l???г??????????
????-u??????????????????????в???
????-t???????????????????в???
????……?????????????????????á?
??????????????????
????Linux??????????????????????????????????????????????
????1?????????priority?????????????仯
??????С??類cpu??У??????????????????С??
????2??niceness??????????е????????????????????????????
????1????nice?????μ?nice?????????????????μ?nice?????????
????nice -10 vi &????//????nice??10
????nice --10 vi &????//????nice??-10
????2????renice??????????nice??????????????
????renice 10 15132????//????nice??10
????renice -10 15132????//????nice??-10
????3????top????????????????
??????????r?????????pid?????????????
?????????????????
???????????????????????????г???
????????????????????β????“&”??????y????????????
????bg?????????????????????????????
????[root@localhost lianxi]# jobs????//???????????
????[1]+ Stopped vim num.txt
????[2]- Killed cp -i -r /mnt/* /tmp
????+ ???·??????????
????- ?????????·??????????
????[root@localhost lianxi]# fg????//???????????????
????fg??????????????????????У??????????????????????????????“+”????????
???????kill????
????kill?????????????OS??“??????”??????????????????????????????????????????ο???http://www.cnblogs.com/geaozhang/p/6874310.html
????shell> kill –l????#?г?linux?????????????
?????????
????kill –?????? PID
????????kill???????????????????ж???????????????????????ж?????????????????
????1??kill??killall??????
????kill ????д????ID??????д??????
????killall ????д????????????д????ID?????????????????????
????2??pkill????????“???????”???????????
????-u?????????????????????????????
????-t???????????????????????????
????shell> pkill mysqld????#??????mysqld???????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11