Linux system status detection and process control

Source: Internet
Author: User
Linux system status detection and process control I. proc file system the commands we usually input: ifconfig, hostname, free (view memory usage), df (view hard disk usage ), where does the uname command obtain the information? The answer is proc! See...
Linux system status detection and process control I. proc file system the commands we usually input: ifconfig, hostname, free (view memory usage), df (view hard disk usage ), where does the uname command obtain the information? The answer is proc! Check out: jerry @ why :~ $ Cat/proc/versionLinux version 3.2.0-23-generic-pae (buildd @ palmer) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu4) # 36-Ubuntu SMP Tue Apr 10 22:19:09 UTC 2012jerry @ why: ~ $ Uname-aLinux why 3.2.0-23-generic-pae # 36-Ubuntu SMP Tue Apr 10 22:19:09 UTC 2012 i686 i686 i386 GNU/Linuxjerry @ why :~ $/Proc/is a small kernel window. Www.2cto.com 2. log system Location: jerry @ why :~ $ Ls/var/log/below I use regular expressions to find out. log File: jerry @ why:/var/log $ locate-r "^/var/log/[a-z] * \. log $ "/var/log/alternatives. log/var/log/apport. log/var/log/auth. log/var/log/boot. log/var/log/bootstrap. log/var/log/dpkg. log/var/log/fontconfig. log/var/log/jockey. log/var/log/kern. log/var/log/mail. log/var/log/ufw. logjerry @ why:/var/log $ -------------------------------------------------- process top to view the process information. by default, the process is sorted by cpu usage, and the memory can be set by M. Sort the occupied values. If you want to kill a process, send the 15th signal, that is, press k and press Enter. what if it cannot be kill? It can be forced to kill. at this time, it sends a signal on the 9th (which may generate zombie processes (uncontrolled sub-processes )). Look at each signal www.2cto.com jerry @ why:/var/log $ kill-l 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) quit) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR31) SIGSY S 34) SIGRTMIN 35) SIGRTMIN + 1 36) SIGRTMIN + 2 37) SIGRTMIN + 338) SIGRTMIN + 4 39) SIGRTMIN + 5 40) SIGRTMIN + 6 41) SIGRTMIN + 7 42) SIGRTMIN + 843) SIGRTMIN + 9 44) SIGRTMIN + 10 45) SIGRTMIN + 11 46) SIGRTMIN + 12 47) SIGRTMIN + 1348) SIGRTMIN + 14 49) SIGRTMIN + 15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-1253 SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-758 59) SIGRTMAX-6 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-263 64) SIGRTMAX jerry @ why:/var/log $ ps auxf (x also displays background processes, if not, only console processes) (f shows the relationship between parent and child processes) kill [-9] 5671 (send the No. 9 signal to the process whose pid is 5671, that is, the process of force killing) (kill is a signal transmitter, it's not just killing processes.) skill-9 root (killing all root processes) skill-9 jerry (all processes of jerry) let's take a look at several states of the process: www.2cto.com S (sleeping) T (stop) R (running) D (deepsleeping (deep sleep) Z (Zombie process) another little thing: jerry @ why :~ $ W 11:04:03 up, 1 user, load average: 1.61, 1.70, 1.77 user tty from login @ idle jcpu pcpu WHATjerry pts/1: 0 0.00 s 0.35 s 0.00 s wjerry @ why :~ $ W check who has logged on to this computer. Skill-9 pts/1 can kill him! Author Jerryz
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.