Key Switches for the 'top' Command
Although you invoke top just by typing the name in a shell session, a few switches modify the utility's behavior:
-h: Show the current version-c: This toggles the command column between showing command and program name-d: Specify the delay time between refreshing the screen-o: Sorts by the named field-p: Only show processes with specified process IDs-u: Show only processes by the specified user-i: Do not show idle tasksPress F to show the list of fields displayable in the table. Use the arrow keys to move up and down the list of fields.
To display or hide a field on the screen, press D to toggle it. An asterisk appear next to manually displayed fields.
Set the field to sort the table by simply by pressing the "S" key on the field you wish to sort by.
Press the enter key to commit your changes and press "Q" to quit.
Whilst running top press A to toggle between the standard display and an alternate display.
Change the Display While Running 'top'
While the command runs in the foreground, toggle many features on and off by pressing relevant keys.
The following table shows the key to press and the function it provides:
Function KeyDescriptionAAlternative display (default off)dRefresh screen after specified delay in seconds (default 1.5 seconds)HThreads mode (default off), summarises taskspPID Monitoring (default off), show all processesBBold enable (default on), values are shown in bold textlDisplay load average (default on)tDetermines how tasks are displayed (default 1+1)mDetermines how memory usage is displayed (default 2 lines)1Single cpu (default off) - i.e. shows for multiple CPUsJAlign numbers to the right (default on)jAlign text to the right (default off)RReverse sort (default on) - Highest processes to lowest processesSCumulative time (default off)uUser filter (default off) show euid onlyUUser filter (default off) show any uidVForest view (default on) show as branchesxColumn highlight (default off)zColor or mono (default on) show colors
%CPU -- CPU Usage : The percentage of your CPU that is being used by the process. By default, top displays this as a percentage of a single CPU. On multi-core systems, you can have percentages that are greater than 100%. For example, if 3 cores are at 60% use, top will show a CPU use of 180%. See here for more information. You can toggle this behavior by hitting Shifti while top is running to show the overall percentage of available CPUs in use.
Source for above quote.
You can use htop instead.
Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 32 On-line CPU(s) list: 0-31 Thread(s) per core: 2 Core(s) per socket: 8 Socket(s): 2 NUMA node(s): 2 Vendor ID: GenuineIntel CPU family: 6 Model: 45 Stepping: 7 CPU MHz: 2599.928 BogoMIPS: 5199.94 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 20480K NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30 NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31
To answer your question about how many cores and virtual cores you have:
According to your lscpu output:
You have 32 cores (CPU(s)) in total.You have 2 physical sockets (Socket(s)), each contains 1 physical processor.Each processor of yours has 8 physical cores (Core(s) per socket) inside, which means you have 8 * 2 = 16 real cores.Each real core can have 2 threads (Thread(s) per core), which means you have real cores * threads = 16 * 2 = 32 cores in total.So you have 32 virtual cores from 16 real cores.
Also see this, this and this link.