This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
other:newppl:starting [2024/02/05 15:53] jypeter [Determining the load of a Linux server] Added M and P options |
other:newppl:starting [2024/03/20 10:27] jypeter [Determining the load of a Linux server] Added details about TIME and mem usage |
||
---|---|---|---|
Line 272: | Line 272: | ||
</code> | </code> | ||
| | ||
- | The top lines give you some summary information about the system, but you should monitor the memory usage (''VIRT'' and ''RES''), ''CPU'' and ''TIME'' columns. By default, ''top'' will will put the processes using the more CPU at the top (as shown above). You can see above that the ''emacs'' text editor has clearly crashed, because it should not use 100% CPU for such a long time | + | The top lines give you some summary information about the system, but you should monitor the memory usage (''VIRT'' and ''RES''), ''CPU'' and ''TIME+'' columns. By default, ''top'' will will put the processes using the more CPU at the top (as shown above). You can see above that the ''emacs'' text editor has clearly crashed, because it should not use 100% CPU for such a long time |
+ | |||
+ | * The ''TIME+'' information is in //minutes// (e.g. ''5432:01'' means //5432 minutes and 1 second//, ''25:15.20'' means //25 minutes, 15 seconds and 20% of 1 second//) | ||
+ | |||
+ | * Memory usage: | ||
+ | * ''%MEM'' (Kb): percentage of the total available **physical memory** used by a process. This is based on ''RES'', the **non-swapped physical memory** used by a process | ||
+ | * ''VIRT'' (Kb): total amount of **virtual memory** (i.e. memory temporarily swapped/saved to disk) used by a process. It includes all code, data and shared libraries plus pages that have been swapped out and pages that have been mapped but not used | ||
+ | * The ''free'' command can display the memory usage of a server at a given time. ''available'' is an estimation of how much memory is available for starting new applications, without swapping | ||
+ | * <code> % free -ht | ||
+ | total used free shared buff/cache available | ||
+ | Mem: 62G 1.5G 56G 11M 5.0G 60G | ||
+ | Swap: 62G 1.7G 60G | ||
+ | Total: 125G 3.3G 116G</code> | ||
If you type ''M'', the processes will be sorted my memory usage, as shown below | If you type ''M'', the processes will be sorted my memory usage, as shown below | ||
Line 293: | Line 305: | ||
| **P** | Sort by CPU usage (''%CPU'' columun) (Default) | | | **P** | Sort by CPU usage (''%CPU'' columun) (Default) | | ||
+ | ==== Using the kill command to terminate processes ==== | ||
+ | |||
+ | FIXME | ||
+ | |||
+ | ''kill proc_number'' | ||
+ | |||
+ | ''kill -9 -1'' | ||
+ | |||
+ | ''qdel'' | ||
===== Which disks should you use? ===== | ===== Which disks should you use? ===== | ||
Line 398: | Line 419: | ||
...</code> | ...</code> | ||
+ | FIXME Add something about ''df'' | ||
===== Which programs should you use? ===== | ===== Which programs should you use? ===== | ||