Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
elearning:workbooks:redhat:rh124en:l109 [2024/11/12 10:08] adminelearning:workbooks:redhat:rh124en:l109 [2024/11/27 08:50] (Version actuelle) admin
Ligne 39: Ligne 39:
   * A list of open files..   * A list of open files..
  
-This information is stored in the **/proc** directory. The /proc directory contains virtual files and directories. The contents of these files are created dynamically during consultation. Only root can view all the information in the /proc directory.  +This information is stored in the **/proc** directory:
- +
-Enter the following command:+
  
 <code> <code>
Ligne 127: Ligne 125:
   * **daemon** - processes that do not have a parent terminal.   * **daemon** - processes that do not have a parent terminal.
  
-A process can be in one of nine states or //process states// :+A process can be in one of nine //process states// :
  
   * //user mode// - the process is executing in user mode,   * //user mode// - the process is executing in user mode,
Ligne 143: Ligne 141:
 ====1.1 - The ps command====  ====1.1 - The ps command==== 
  
-This command displays the user'processes attached to the terminal:+The output from this command shows the processes attached to the current terminal:
  
 <code> <code>
Ligne 155: Ligne 153:
 </code> </code>
  
-For more details, use the **-l** option:+You can get more details by using the **-l** switch:
  
 <code> <code>
Ligne 183: Ligne 181:
  
  
-To view the process table, use the ps command with the l and x options - the command displays all the processes with a long display :+To view the process table, use the ps command with the l and x switches:
  
 <code> <code>
Ligne 252: Ligne 250:
 ^ STAT | The same thing as S in the previous example  | ^ STAT | The same thing as S in the previous example  |
  
- +Using the a, u and x switches you obtain the following output:
-With options a,u and x the command displays the following result:+
  
 <code> <code>
Ligne 528: Ligne 525:
 ====1.3 - The pstree command====  ====1.3 - The pstree command==== 
  
-This command displays processes in a tree structure, showing parent processes as children:+This command displays processes in a tree structure:
  
 <code> <code>
Ligne 646: Ligne 643:
 ====1.4 - The top command==== ====1.4 - The top command====
  
-This command shows the processes in memory :+**top** shows a continuous real time list of running processes:
  
 <code> <code>
Ligne 709: Ligne 706:
 ...                                                                          ...                                                                         
 </code> </code>
 +
 To display the **top** command help, press **h** : To display the **top** command help, press **h** :
  
Ligne 739: Ligne 737:
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** - To return to the previous display, press **q** or **echap**.+**Important** - To return to the previous display, press **q** or **escape**.
 </WRAP> </WRAP>
  
-At launch, the list refresh time is 3 seconds. To change this to 1 second, press **s** then 1 and confirm:+When launched top'refresh rate is 3 seconds. To change this to 1 second, use the **s** key:
  
 <code> <code>
Ligne 817: Ligne 815:
 </code> </code>
  
-If you do not want to see zombie processes or waiting processes, press i :+To see the zombie and waiting processes, use the **i** key:
  
 <code> <code>
Ligne 845: Ligne 843:
 ====1.5 - The fg, bg and jobs commands==== ====1.5 - The fg, bg and jobs commands====
  
-Normally these commands run in the foreground. You can also run processes in the background. If you are running a command in the background, you must add **(space)&** to the end of the command:+Normally commands are executed in the foreground of a terminalHowever you can also execute a command in what is known as the background by adding **(space)&** to the end of the command:
  
 <file> <file>
Ligne 852: Ligne 850:
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** - Note that a background process is said to be **asynchronous** because it continues independently of its parent, which is the shell. In the foreground the process is said to be **synchronous**.+**Important** - Note that a background process is said to be **asynchronous** because it continues independently of its parent, which is the shell. The foreground the process is said to be **synchronous**.
 </WRAP> </WRAP>
  
-Linux numbers all processes that are placed in background tasks. This is called a **task number**.+Linux identifies processes sent to the back ground by **job numbers**.
  
-The **jobs** command is used to find out about background processes:+The **jobs** command shows a list of all the current jobs associated with the current terminal:
  
 <code> <code>
Ligne 868: Ligne 866:
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** - Note that the job number is enclosed in [square brackets] whereas the PID is not. The **+** sign after job number [1] indicates that the job is the last to be handled.+**Important** - The job number is between square brackets whilst the PID is not. The **+** sign indicates that this is the last job to have been modified.
 </WRAP> </WRAP>
  
 If you wish to send a process into the background to free up the shell for other commands, you must first suspend the process in question. Normally we suspend a process using the key combination <key>Ctrl</key><key>Z</key>. If you wish to send a process into the background to free up the shell for other commands, you must first suspend the process in question. Normally we suspend a process using the key combination <key>Ctrl</key><key>Z</key>.
  
-For example, press :+For example:
  
 <code> <code>
Ligne 881: Ligne 879:
 </code> </code>
  
-Once suspended, use the command **bg** (background) followed by **%** and the task number to send the process to the background:+Once suspended, use the **bg** (background) command followed by **%** and the job number to send the process to the background:
  
 <code> <code>
Ligne 893: Ligne 891:
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** - Note that when the process goes into the backgroundit resumes execution as normal. The **-** character following the task number [1] indicates that the task is the penultimate to have been handled.+**Important** - Note that when the process is sent to the background it resumes normal execution. The **-** character which follows the [1] indicates that this is that last but one job to have been modified.
 </WRAP> </WRAP>
  
-To bring the process back to the foreground, the process concerned must be interrupted again. However, this time we cannot use the <key>Ctrl</key><key>Z</key> commandWe therefore need to send a **signal** to the process using the **kill** command with the **-stop** operator.+To bring the job back to the foreground you cannot suspend it by using the <key>Ctrl</key><key>Z</key> keysIn this case you will have to send a signal to the process. Signals are sent to processes by using the **kill** command:
  
 <code> <code>
Ligne 913: Ligne 911:
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** - Note the use of <key>Ctrl</key><key>c</key> to kill the foreground process.+**Important** - Note that we have used the <key>Ctrl</key><key>c</key> keys to kill the process once in the foreground.
 </WRAP> </WRAP>
  
Ligne 945: Ligne 943:
 ====1.6 - The wait command====  ====1.6 - The wait command==== 
  
-This command is used to give an asynchronous process the same behaviour as a synchronous process. It is used to wait until a background process has finished:+The **wait** command makes an asynchronous process react like a synchronous process:
  
 <code> <code>
Ligne 964: Ligne 962:
 ====1.7 - The nice command==== ====1.7 - The nice command====
  
-This command displays or modifies the priority of a process. The default priority for nice is 10. The highest priority nice value is -20. The lowest priority nice value is 19 :+This command is used to change the process priority. The default nice value when a process is started is **10**. The highest value of nice is **-20**, whilst the lowest value is **19**:
  
 <code> <code>
Ligne 987: Ligne 985:
 </code> </code>
  
-As you can seethe 6th column contains the nice value which applies to the priority in column 5+As you can see the 6th column contains the nice value that is applied to the 5th column. 
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** - Note that only root can start processes with negative value.+**Important** - Note that only root can give a process a value between 0 and -20.
 </WRAP> </WRAP>
  
Ligne 1018: Ligne 1016:
 ====1.8 - The renice command==== ====1.8 - The renice command====
  
-This command changes the priority of a process that is already running. The priority value can only be changed by the process owner or root.+This command is used to change the process priority of an already running processOnly the process owner and root can renice a process:
  
 <code> <code>
Ligne 1051: Ligne 1049:
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** -Note that only root can decrement the priority value with the renice command.+**Important** -Note that only root can decrease the priority value with the renice command.
 </WRAP> </WRAP>
  
Ligne 1080: Ligne 1078:
 ====1.9 - The nohup command==== ====1.9 - The nohup command====
  
-This command allows a process to continue execution after disconnection. A child process dies when the parent process dies or terminates. As a connection is a process, when you disconnect, your processes terminate. To avoid remaining connected after launching a long process, use the nohup command:+This command allows a process to continue after closing the terminal in which is was launched. A child process dies when the parent process dies or terminates. As a connection is a process, when you disconnect, your processes terminate. To avoid remaining connected after launching a long process, use the nohup command:
  
 <file> <file>
Ligne 1112: Ligne 1110:
 </code> </code>
  
-====.10 - The kill==== command+====1.10 - The kill command====
  
 The kill command sends signals to processes. The list of possible signals can be displayed using the **-l** option: The kill command sends signals to processes. The list of possible signals can be displayed using the **-l** option:
Ligne 1133: Ligne 1131:
 </code> </code>
  
-<WRAP centre round important 60%>+<WRAP center round important 60%>
 **Important** - You will notice that each signal has a number. These signal numbers are used instead of options. For example, **-19** instead of the **-stop** option. **Important** - You will notice that each signal has a number. These signal numbers are used instead of options. For example, **-19** instead of the **-stop** option.
 </WRAP> </WRAP>
  
-Some of the most useful signal numbers are :+The most usefull signals are as follows:
  
-Number ^ Description ^ +Numéro ^ Description ^ 
-| -1 | The Hang Up signal is sent to all the children of a process when it terminates. +| -1 | Hang Up is sent to all the child processus of the PID specified 
-| -2 | Process interrupt - equivalent to <key>C</key><key>c</key>+| -2 | Equivalent to the <key>C</key><key>c</key> key combination 
-| -3 | The same as -2 but with the generation of a debug file | +| -3 | The same signal as -2 but it generates de debug file | 
-| -9 | The signal that kills a process suddenly +| -9 | A brutal way of killing a process | 
-| -15 | The signal sent by default by the **kill** command. Process terminates normally |+| -15 | The correct way of killing a process |
  
 The command line switches for this command are : The command line switches for this command are :
Menu