terminal.cab

All commands

top

Topic: Processes

Program: top

Shows the processes using the most CPU or memory.

Package: proc-anzeige

Usage

top [options]

Description

Show the processes with the most CPU first, under five lines about load, tasks, CPU and memory. Keys: P, M, N, T sort, R reverses, k sends a signal, q or Esc closes. In the simulator top does not refresh by itself.

Options in the simulator

13 more options of the real program, not in the simulator yet
  • -c, --cmdline-toggle not in the simulator yet

    Explanation to come

  • -d, --delay needs a value not in the simulator yet

    Explanation to come

  • -E, --scale-summary-mem needs a value not in the simulator yet

    Explanation to come

  • -e, --scale-task-mem needs a value not in the simulator yet

    Explanation to come

  • -H, --threads-show not in the simulator yet

    Explanation to come

  • -i, --idle-toggle not in the simulator yet

    Explanation to come

  • -O, --list-fields not in the simulator yet

    Explanation to come

  • -S, --accum-time-toggle not in the simulator yet

    Explanation to come

  • -s, --secure-mode not in the simulator yet

    Explanation to come

  • -U, --filter-any-user needs a value not in the simulator yet

    Explanation to come

  • -w, --width value optional not in the simulator yet

    Explanation to come

  • -1, --single-cpu-toggle not in the simulator yet

    Explanation to come

  • -V, --version not in the simulator yet

    Explanation to come

Examples

From the lesson Finding and ending processes
top -b -n 1
top - 09:02:00 up 12 days,  3:02,  1 user,  load average: 3.92, 2.84, 1.70
Tasks:   8 total,   1 running,   7 sleeping,   0 stopped,   0 zombie
%Cpu(s): 91.2 us,  6.1 sy,  0.0 ni,  2.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st 
MiB Mem :   7860.0 total,   5092.0 free,   1472.0 used,   1680.0 buff/cache     
MiB Swap:      0.0 total,      0.0 free,      0.0 used.   6388.0 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   4711 lerner    20   0 3600000   3.0g 786432 S 397.0  39.1  80:00.00 python3
   2114 app       20   0  412000  98304  24576 S   1.2   1.2   0:00.00 python3
   3021 lerner    20   0  180000  40960  10240 S   0.8   0.5   0:00.00 python3
    901 root      20   0   55000   7424   1856 S   0.1   0.1   0:00.00 nginx
    902 www-data  20   0   55000   5120   1280 S   0.1   0.1   0:00.00 nginx
      1 root      20   0   22416  13056   3264 S   0.0   0.2   0:02.00 systemd
   4242 lerner    20   0    8608   5120   1280 S   0.0   0.1   0:00.00 bash
   4712 lerner    20   0    6788   4136   1034 R   0.0   0.1   0:00.00 top

Try it in the terminal

Where you learn it

Lessons

All commands