Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [top]

A command-line system monitor tool that produces a frequently-updated list of processes.

Filter by
Sorted by
Tagged with
94 votes
3 answers
161k views

What do the "buff/cache" and "avail mem" fields in top mean?

Within the output of top, there are two fields, marked "buff/cache" and "avail Mem" in the memory and swap usage lines: What do these two fields mean? I've tried Googling them, but the results only ...
0 votes
0 answers
30 views

bash function to monitor resources [duplicate]

I've written the following fn to monitor my cpu usage: cpu_info() { local bg \ cpu_usage=$(top -b -n1 | awk '/Cpu\(s\)/ {print $2 + $4}' | awk '{printf "%.0f\n", $1}')...
0 votes
0 answers
16 views

Process names that begin with "-" [duplicate]

I am using a piece of software that includes a scripting language that has builtins that allow me to call system functions, for example I may write the script: system("whoami") and the ...
4 votes
1 answer
2k views

System Usage 80% and User CPU usage 20%

Company purchased HP Gen 9 Server to be used for Oracle Applications. Today while doing daily system check Top show that System Area CPU Usage is 80%(Certainly not normal)while User Area Usage is 17-...
1 vote
2 answers
194 views

Wondering about my `top` output = IRQ (nvidia, iwlwifi)

I am deeply wondering about this top (man page) output in uptime 5 hours 30 minutes only: top - 00:41:41 up 5:48, 1 user, load average: 0.36, 0.44, 0.63 Tasks: 281 total, 1 running, 280 sleeping, ...
0 votes
3 answers
6k views

top, top&, top & commands in linux

i don't understand the difference between "top, top&, top &" commands in linux.
0 votes
0 answers
20 views

top memory summary and process RES summation don't add up

I'm having hard time understanding memory usage reported by top. The memory summary section lists the following. All numbers in MiB. MiB Mem : 31884.1 total, 13562.7 free, 7881.9 used, 10439.4 ...
1 vote
0 answers
12 views

Script/Daemon to kill specific resource-consuming tools?

I'm working on a SGE linux cluster and beginners often run memory/resource consuming tools on the login node instead of using qsub or qlogin ( https://gridscheduler.sourceforge.net/htmlman/htmlman1/...
1 vote
1 answer
5k views

Why is memory (rss) from ps command different than memory seen in top command?

Here on MacOS Catalina, when checking the memory usage of a process I see that the ps command shows a RSS value which is different from the memory usage shown in top: $> ps e -o command,vsize,rss,%...
4 votes
1 answer
2k views

Virtual Memory Usage Exceeding Physical Drive Space

I have a machine running Ubuntu on Amazon EC2. The machine has a 43 Gb root drive and 30 Gb of RAM. I am running a processor and memory intensive process and I've noticed that it sometimes stalls for ...
266 votes
3 answers
142k views

Why does `htop` show more process than `ps`

In ps xf 26395 pts/78 Ss 0:00 \_ bash 27016 pts/78 Sl+ 0:04 | \_ unicorn_rails master -c config/unicorn.rb 27042 pts/78 Sl+ 0:00 | ...
0 votes
1 answer
46 views

Finding root cause of high software interrupt percentage on a cloud instance

I have a cloud instance that's showing a weird load pattern when checked with top: top - 21:39:28 up 456 days, 8:39, 2 users, load average: 1.44, 1.19, 1.10 Tasks: 100 total, 1 running, 99 ...
10 votes
4 answers
22k views

Get CPU utilization stats from C program

I want to read the CPU utilization stats from a C program, I am interested in the percentage of use of CPU, steal time etc. These stats are shown in the 3rd row from the top command. I tried to parse ...
0 votes
1 answer
30 views

getting %CPU value from top for all cores in a system

I have a 4 socket server having 24 core cpu's. 96 cores total. How can I, in RHEL 7/8 Linux, get the value that is %CPU as shown by top for every core in the system? I plan on writing C code that ...
0 votes
1 answer
102 views

What does top KiB Mem percent data mean?

When I use top, the memory data is displayed in the overview area as follows: KiB Mem : 16092836 total, 143168 free, 11005184 used, 4944484 buff/cache Then I use m (interactive command) to switch ...
0 votes
1 answer
338 views

Track CPU load of a process

I have a process foo that I would like to run from the Terminal. At the same time, I'm interested in identifying how much this process is consuming the CPU, and so I want, for example, to go into top, ...
314 votes
17 answers
489k views

How to monitor CPU/memory usage of a single process?

I would like to monitor one process's memory / cpu usage in real time. Similar to top but targeted at only one process, preferably with a history graph of some sort.
6 votes
2 answers
2k views

Equivalent of nvtop (NVIDIA graphics cards) for AMD graphics card on MacOS Big Sur 11.1

I have a AMD Radeon Pro 5600M 8 Go graphic card on my MacBook pro 16" and I would like to know if there exists a tool like nvtop for AMD cards on MacOS Big Sur : this would be for seeing the ...
589 votes
10 answers
975k views

How to display `top` results sorted by memory usage in real time?

How can I display the top results in my terminal in real time so that the list is sorted by memory usage?
1 vote
0 answers
90 views

htop always show one cpu usage full [closed]

I have a server with two cpus (24 core * 2), recently, I noted that htop always report one cpu is fully usage But I cant find any threads with highly cpu usage by htop, top or ps -ef I have tried: ...
3 votes
2 answers
276 views

Getting error when using FILTERING in a Window on top command

Trying to filter results of top command by Filtering in a Window, pressing o then typing filter, like described in a tutorial here: http://man7.org/linux/man-pages/man1/top.1.html but when I typing ...
2 votes
1 answer
2k views

Average CPU utilization of a process

I am trying to conduct some experiments for determining what the CPU utilization of my process is. I am familiar with the top and ps commands. Which would be a better solution for getting the average ...
0 votes
0 answers
45 views

Why top command shows different results depending on sort mode

When used with -o%CPU: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 58641 mysql 20 0 26.9g 17.0g 21108 S 5800 13.5 2890:39 /usr/sbin/mysqld --basedir=/usr ...
0 votes
0 answers
37 views

Service load is high - service_process listed in top

I can't find any information on service_process which appears intermittently when server load is high. Is there any information about this process? Is there a way to see which other process is using ...
24 votes
5 answers
46k views

Top Command - How to reduce the displayed Columns

Can we get specific column in a top command, for eg I'm interested in only the memory utilization and CPU usage column. How do I reduce the displayed columns of the top command to only the above two ...
2 votes
1 answer
212 views

Sum of processes CPU is higher than the total CPU consumption shown in top/htop

Why both top/htop as well as /proc/stat report so low CPU utilization? The process CPU utilization number (67.5% on the screenshot) seems to be correct. From time to time I see expected results like: ...
0 votes
0 answers
60 views

Why is it possible that the combined processes CPU usage is higher than the total CPU usage, as reported by top? [duplicate]

When I check top, with a delay of 0.5 seconds, sometimes the total CPU state percentage is lower than the sum of the CPU usage of individual processes. Here is an example, where that is observed: top -...
25 votes
4 answers
30k views

Is there an equivalent to top but for network I/O?

Is there a program that I can use to list processes based on their current network I/O usage? top does CPU, and on FreeBSD at least, it will also do disk I/O if you pass it -m io (I assume that there'...
3 votes
3 answers
2k views

Can I show process tree for 1 program?

I need to show all processes under a certain program. If I do top -p PID I will only get one program. I want to type top -p 381 extra_args to get PID USER PR NI VIRT RES %CPU %MEM ...
7 votes
1 answer
2k views

When redirecting top to a file, why does cat command on that file display output of multiple top attempts?

I am customizing a Linux system with a kernel of 6.4.0, and I have noticed a strange issue. When I execute top > a.txt and then open a window to execute cat a.txt, I find that the cat a.txt result ...
133 votes
10 answers
372k views

How to view a specific process in top

Are there any relatively strightforward options with top to track a specific process? Ideally by identifying the process by a human readable value? e.g. chrome or java. In other words, I want to view ...
0 votes
2 answers
104 views

What command like Top will provide client IP visibility?

I am fairly new to sysadmin and running an apache Linux server - I like to live monitor traffic on my instance in solarputty using TOP TOP is great, but I can't seem to find a suitable command that ...
0 votes
0 answers
20 views

Shared server resources limits per users

We have an on-prem Xeon server running Ubuntu LTS that is shared across few developers. Each developer logs in with his on user and run various workloads on it. The problem we experience is when ...
0 votes
0 answers
235 views

What does QNX's top CPU idle percentage really means?

I am using QNX (ARM Cortex A53 with FOUR cores) and when I do top, I have the below. According to the below idle percentages for each of the core, I'd like to confirm CPU/Core 0 is the most idle, ...
122 votes
11 answers
415k views

How to find which processes are taking all the memory?

I'm looking for somthing like top is to CPU usage. Is there a command line argument for top that does this? Currently, my memory is so full that even 'man top' fails with out of memory :)
16 votes
5 answers
28k views

Killing a tree of processes in top/htop

htop allows me to nicely see trees of processes within the shell. I can kill processes by pressing F9 (KILL) and then selecting which signal (e.g. 15 SIGTERM) I want to send to a job to kill. However,...
0 votes
2 answers
2k views

Why is load average being reported as 0.00 though system is busy doing work?

uptime, top, cat /proc/loadavg all reporting load averages for the last 1/5/15 minutes as 0.00, but the system is definitely busy doing work. Why is this? Server is running Red Hat Enterprise Linux ...
18 votes
5 answers
5k views

Is it possible to freeze task order in htop?

In htop I would like to order processes by CPU utilization but the top processes bounce back and forth so it is difficult to view the details of each process. I would like to be able to sort in ...
12 votes
4 answers
10k views

How to view summaric memory usage of groups of commands (instead of processes)

Is there a way to group similar processes when using tools like top/htop? Sometimes I just want to know what's eating my memory and some programs (browsers mostly) are using multiple processes, which ...
0 votes
1 answer
23 views

Using top for fine grain memory logging of process slowing down said process

I'm trying to log memory consumption spikes in R code, but none of the R profilers can measure the memory consumption of compiled modules. So I've been using top as an alternative, and it works well ...
0 votes
1 answer
118 views

TOP vs df -h command memory shows different

I am using solaris 10. Can someone please help me why both command shows different total memory? df -h command shows memory total memory SIZE is 900G ~=>df -h /test Filesystem Size Used ...
9 votes
4 answers
2k views

Htop sorting CPU% column incorrectly

Sometimes when I'm trying to diagnose what process is hogging all of my laptop's resources, I notice that htop will sort the CPU% column incorrectly. Example below: The “CPU%” column is highlighted ...
0 votes
2 answers
175 views

Get CPU core id executing a process which suddenly exits

In Linux, in a multi-core processor, ps, top and similar tools can show the CPU logical core id running a specific process. If the process runs for a certain amount of time, it's easy to identify it ...
0 votes
0 answers
275 views

How do I calculate current CPU consumption of Processes in Linux (To get value as from TOP command) from /PROC/

I have a problem with calculating process CPU load in Linux. I have a bash script which is getting all the information about Linux processes from /PROC/PID/STAT during time period of 30s. I am also ...
0 votes
0 answers
49 views

Does `top` account for all CPU usage?

Does the linux top command account for all CPU time used by the system? I'm trying to understand bottlenecks for IPsec processing on a linux system. In a particular case in point, the system is a VM ...
7 votes
3 answers
2k views

Start top with particular sorting

I'd like to start top with sorting set to resident memory size, instead of the default CPU usage. I don't see a way to do that from command line arguments or startup file. Obviously I can't echo "Oq" ...
17 votes
4 answers
19k views

htop / top with specifying process name filter on the command line - at program startup?

I'm on Ubuntu 18.04. I'm already aware that I can start htop, and then hit F4 for filter, then type or paste a process name search query (say, gphoto2 for looking for gvfs-gphoto2-volume-monitor....
300 votes
9 answers
446k views

How to display meminfo in megabytes in top?

Sometimes it is not comfortable to see meminfo in kilobytes when you have several gigs of RAM. In Linux, it looks like: And here is how it looks in Mac OS X: Is there a way to display meminfo in ...
18 votes
1 answer
54k views

"buff/cache" is very high, how I can free it? [duplicate]

The output of the top command shows that 29GB of memory is used by "buff/cache". What does it mean and how I can free it? It is near to 90% of memory.
1 vote
0 answers
37 views

How do i list all consuming program by cpu, memory

I wanna list down all consuming cpu, memory programs. there are bunch of top and questions about it, but all of them not list them by programs. like for example a python webservice could spawn ...

1
2 3 4 5
10