Linux program management and SELinux

Source: Internet
Author: User

Linux program management and SELinux

1. jobs [-lrs]: Observe the working status and parameters in the current background,

-L: Besides listing the job number and command string, the PID number is also listed.

-R: enter to list jobs in the background run.

-S: only list jobs paused in the background

The "+" after the command is executed indicates the work number that was last placed in the background, and "-" indicates the work number that was last and second placed in the background. After the third node is exceeded, there will be no more +/-numbers.

2. fg % jobnumber: Get the job in the background to the foreground for processing. parameters:

1) % jobnumber is the work number (number). This % is dispensable. If no parameter is added, it means that the background work of + (last) is taken to the foreground for execution, fg-indicates that the worker number is taken out to the foreground for running.

3. bg: run the command in the background from the paused state (ctr + z can suspend the program in the background). The parameter is the same as that of fg.

4. kill-signal % jobnumber; kill-l: Manage jobs in the background, parameters,

1)-l: lists the signals currently available for kill.

2) signal: indicates how to give the subsequent job instructions. man 7 signal can be used to know:

-1: Read the parameter configuration file again.

-2: indicates the same operation of ctr + c input by the keyboard.

-9: Force delete a job immediately

-15: terminate a job as a normal program

5. background refers to a scenario in the terminal mode that can avoid ctr + c interruption, rather than putting it in the background of the system. Therefore, the background of work management is still related to the terminal, in this case, if you connect to a linux host remotely and put the work in the background in an & manner, it will be taken offline if the work is not finished, this job will not continue and will be terminated.

6. nohup [commands and parameters]: Work in the foreground of the terminal; nohup [commands and parameters] & work in the background of the terminal. Note that nohup does not support bash built-in commands. Therefore, your commands must be external commands.

7. ps: several common combinations of program operations at a certain point in time,

1) ps aux: observes all Program Data

2) ps-IA: Observe all system data

3) ps axjf: Along with the sub-program tree status

4) ps-l: only check your own bash Program

Parameters:

1)-A: all processes are displayed, which has the same effect as-e.

2)-a: All processes not related to terminal

3)-u: process related to valid users

4) x: usually used with a to list complete information.

Output Format planning:

5) l: Long. List the PID information in detail.

6) j: working format

7)-f: make a more complete output

Ps-l: Meaning of parameters in:

F: indicates the flag of the program. Common examples include:

4: indicates that the permission of this program is root.

1: indicates that this subprogram only performs fork but does not actually execute exec.

S: indicates the state of the program. The main states are:

R: The program is running.

S: The program is currently in sleep state, but can be awakened.

D: The sleep state that cannot be awakened. Generally, this program is waiting for IO.

T: Stop status, which may be in the work control (background pause) or debugging status

Z: botnet. The program has been terminated but cannot be removed from the memory.

UID/PID/PPID: represents the PID Number of the program owned by the UID/the PID Number of the program

C: CPU usage, in percentage

PRI/NI: Abbreviation of priority/nice, indicating the priority of the Program executed by the CPU. The smaller the value, the faster the program is executed by the CPU.

ADDR/SZ/WCHAN: both of them are related to the memory. ADDR is the kernel function, indicating which part of the program is in the memory. If it is a running program, it usually displays -, /SZ indicates the amount of memory used by the Program/WCCHAN indicates whether the program is currently running

, If-indicates that the operation is in progress

TTY: the location of the login terminal. If the logon is remote, use the dynamic Terminal interface (pts/n)

TIME: the cpu time used, which is the actual cpu TIME spent by the program, rather than the system TIME.

CMD: Command

Meanings of parameters in ps aux,

USER: which USER account does the process belong?

PID: process ID

% CPU: CPU utilization

% MEM: Percentage of memory used

VSZ: virtual memory used by the process (Kbytes)

RSS: The fixed memory occupied by the process (Kbytes)

TTY: The program to run the terminal device, the tty1-6 is the local, ps/0, indicating the program connected to the host by the Network

STAT: Current State of the program

START: the time when the process is triggered.

TIME: the actual cpu time used by the process.

COMMAND: the actual instruction used by the program.

8. botnets: Generally, the cause of a botnet program is that the program should have been executed or terminated for some reason, but the parent process of the program cannot completely end the program, the program is always in the memory. Such a program will be connected to <defunct> after cmd, indicating that the program is a zombie program.

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • 3
  • 4
  • Next Page

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.