Linuxコマンド入門(システム監視およびプロセス管理X)
Getting Started With Linux Command System Monitoring
使える うなめ カーネルコマンド情報の表示
uname情報照会システム
-r query kernel information -a display all the information -m type of computer display -n host name appears on the web -s displays the operating system name -v Displays the operating system version : File path computer cpu information / proc / cpuinfo
ホスト名ホスト名
You can view the host name hostnamectl set-hostname youname can modify the hostname
プロセス管理
bg (背景)タスク一時停止変調背景
fg (Forceground)フォアグラウンドプログラムのバックグラウンドが実行されます
仕事 バックグラウンドタスクで実行中のディスプレイ
トップディスプレイリアルタイムプロセス
The system displays real-time process -p specified process -u Specifies the user -n to cycle times
ps現在のプロセスステータス
プロセスの現在のステータスを表示し、 殺します 命令はいつでも中断され、不要なプログラムを削除します
-a display all the programs execution of the current terminal -e show all programs -f display UID, PPID -H Displays the tree x display all programs, buying terminal distinguish
と共通
ps -aux ps -ef ping 192.1683.1.1 ps aux | grep ping
pstree表示プロセスツリー
In the manner of a tree diagram to show the relationship between the derivation process, display more intuitive -a Show full instructions for each program -h lists the tree view, specifically marked program being executed -p display program code -u displays the user
終了プロセスを強制終了します
kill -l to see the process number information -p pid process the specified program -u Specifies the user
キルラキル
-
SIGHUP 2)SIGINT 3)SIGQUIT 4)シール
-
SIGTRAP 6)SIGABRT 7)SIGBUS 8)SIGFPE
-
SIGKILL 10)SIGUSR1 11)SIGSEGV 12)SIGUSR2
-
SIGPIPE 14)SIGALRM 15)SIGTERM 16)SIGSTKFLT
-
SIGCHLD 18)SIGCONT 19)SIGSTOP 20)SIGTSTP
Do not put the whole process information Specific commonly used process signals also several A second terminal disconnected terminal (with ctrl + c) 3 Exit terminated (with ctrl + ) 15 19 9 18 continues to suspend the forced termination (with ctrl + z) # Usage First, find the process ps, then kill kill ps -ef | grep vim // feedback of results root 3403 2808 0 04:15 pts/0 00:00:00 vim www root 3419 2808 0 04:15 pts/0 00:00:00 grep --color=auto vim # Kill vim process kill -9 3403 [1] + has been killed vim www
pkill
プロセス名に従ってプロセスを強制終了するpkillコマンド。単一のプロセスを強制終了する場合は、実行中のプログラムを直接強制終了するのと同様に、すべてのアプリケーションメソッドをpkillして強制終了します。
Some programs you use Kill kill the main program But some incidental routine and not killed All results may cause the program not normally start again **** pkill [options] [parameters] -t specified process -g specified process group -n find the largest (end) process to send a signal -o find the smallest (start) sends a signal