2022 Developer Survey is open! Take survey.

Questions tagged [top]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
35 views

Explanation about free, available and buff/cache and how to find what process is buff/cache saved for in a server in the command "free -mh "

I see explanation for free -mh as: free displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is ...
user avatar
  • 1
1 vote
0 answers
80 views

How can I hide all the idle processes in htop?

top hides all the idle processes with the -i flag. From man of the top: PERFORMANCE/ACCURACY TRADEOFF Calculating detailed memory statistics is fundamentally resource-intensive. To reduce the ...
user avatar
  • 230
4 votes
1 answer
210 views

How can I determine which browser tab is the most network intensive?

top not only shows 'firefox' but also its individual tabs, each identified as 'Isolated Web Co'. So it is possible to find which tab is hogging the processor and kill it with kill <PID>. Is ...
user avatar
  • 41
0 votes
0 answers
12 views

AWS Ubuntu 20.04 memory 4G: not enough memory for running any app?

AWS E2 Ubuntu 20.04 memory 4G: not enough memory for running any app? $ top Tasks: 119 total, 1 running, 118 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, ...
user avatar
  • 101
1 vote
0 answers
37 views

load average calculation using top

I'm working on performance testing of application and would like to validate the performance of the server during testing. Currently, the server is a 16 multiprocessor with single core on each CPU. I'...
user avatar
  • 11
0 votes
0 answers
97 views

High CPU utilization showing in CPU

We are running Two Node cluster using Redhat Pacemaker running on RHEL 7. Last thursday (3/2/2022) i updated kernel to latest version. And on Friday at 3:49 First node rebooted(Reason unknow) and ...
user avatar
  • 3,834
0 votes
1 answer
50 views

top command and + and * symbols

I am trying to fetch memory usage with below top command. KiB Mem : 8009480 total, 1438848 free, 1964392 used, 4606240 buff/cache KiB Swap: 7340028 total, 5302364 free, 2037664 used. 5202692 ...
user avatar
0 votes
1 answer
36 views

Print values of %CPU over time for a particular process

The top command gives information on running processes. The %CPU column gives the percentage of CPU each process is using (CPU usage). Is there a simple way to print values of %CPU over wall clock ...
user avatar
  • 14.3k
21 votes
2 answers
2k views

Why does 'top' fail to run via 'xargs'?

I am trying to run top with multiple PIDs using -p option and xargs. However, top fails to run with error top: failed tty get: $ pgrep gvfs | paste -s -d ',' | xargs -t top -p top -p 1598,1605,1623,...
user avatar
  • 1,577
0 votes
0 answers
28 views

Unexpected output of top when started by systemctl

Repost from StackOverflow because it belongs here: I want to log the cpu and memory usage of a service which starts some time after startup (webappmgr.service). For this I have created another simple ...
user avatar
  • 151
1 vote
1 answer
148 views

top shows different pid for threads of same process. How to fix it?

when i do a ps -efT (where -T = Show threads, possibly with SPID column.), i see all the threads have the same PID, which is as expected. myroot 24958 24958 7942 0 20:20 pts/12 00:00:00 java -...
user avatar
  • 554
0 votes
2 answers
60 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 ...
user avatar
2 votes
1 answer
80 views

Linux CPU usage appears incorrect

I'm familiar with how the top is supposed to work. The individual processes are relative to 1 vcpu, and the summary is relative to all vcpus. I have a process that does a lot of sleeping, and I'm ...
user avatar
0 votes
2 answers
33 views

How is the information displayed by "top" ordered by default?

Been looking at top command as I'm new to Linux, but I can't see any correlations on how the displayed information is sorted. Can anyone sched any light on that?
user avatar
0 votes
0 answers
49 views

Is there a program that will show me the average CPU usage over the last minute for every process?

One feature I miss from Windows is that the Resource Monitor program would show, among other statistics, the average CPU usage over the last minute for each program. On Linux I use either Gnome system ...
user avatar
2 votes
0 answers
75 views

TOP says 90% CPU Idle, but processes showing 100% usage

I am experiencing a strange issue on my Linux machine. I am using 6 CPUs, 12 Hyper threads. Top summary tab shows 90% idle. For 12 threads, 1200% should me the max usage. For 90% idle individual ...
user avatar
0 votes
1 answer
27 views

Finding page faults using top command

Using top’s sorting capabilities in Linux, how to find the process that has generated the most page faults? I have tried top then f then choose nMaj I then got a list of processes, but what sorting ...
user avatar
1 vote
1 answer
42 views

TOP command combined with printf

I have a simple while true statement: #!/bin/bash while true; do printf -- '-%.0s' {1..100}; echo "" | top -l 1 >> file.txt sleep 10 done The issue I am facing is that the ...
user avatar
1 vote
1 answer
90 views

Why the value of PRI is different in ps and top?

nginx PID is 19910 The value is 19 in ps -eo pri ps -eo pid,ppid,ni,pri,psr,pcpu,stat,cmd |head -n1;ps -eo pid,ppid,ni,pri,psr,pcpu,stat,cmd |grep nginx PID PPID NI PRI PSR %CPU STAT CMD 19910 ...
user avatar
  • 31
1 vote
1 answer
520 views

Show absolute memory usage for each process with `top`

By default, top will show, for each process, the fraction of physical memory used by that process: top - 12:39:34 up 87 days, 18:25, 3 users, load average: 4.73, 4.89, 4.23 Tasks: 255 total, 2 ...
user avatar
1 vote
1 answer
98 views

How do you get top to show wall clock time?

Is there a way to configure top to show wall clock time rather than CPU time? I'm sure CPU time is useful in some contexts, but in mine I want to know how long the process has been running since I ...
user avatar
  • 215
0 votes
0 answers
50 views

How am I able to check what triggered a process to run at a certain time?

I'm seeing a process popping up every 6h in one of my machines. I've checked the cron files and no user has anything that would trigger a cron job every 6h. I'm trying to understand what is triggering ...
user avatar
  • 1
0 votes
0 answers
70 views

Can someone explain the usefulness of Top's %CPU_ME and %CPU_OTHRS?

I'm looking at the top output and I notice there is a column for %CPU_ME and %CPU_OTHRS. The definition on the man page is: cpu_me - CPU time charged to me by other processes. cpu_others - CPU time ...
user avatar
  • 101
0 votes
1 answer
56 views

Script to display swap utilisation in top command

I need to write the script for displaying swap utilisation in top command, I am able to display top command but next shift+f needed to be included in script can you guys help me here
user avatar
0 votes
0 answers
29 views

top with -c corrupts stdbuf output [duplicate]

I want to show only 5 top processes from top's output, and I'm using stdbuf to filter it and show lines only below "PID USER": top -d 5 -b | stdbuf -o0 grep --line-buffered "PID USER&...
user avatar
  • 111
1 vote
1 answer
54 views

Is it possible to display NodeJS app path inside top command's output?

I'm trying to monitor system processes cpu & memory usage on a Ubuntu server with many running NodeJS applications. top command only shows "node" without specifying which script is it. ...
user avatar
  • 111
0 votes
0 answers
47 views

How can I monitor whether disk activity is sychronous or asynchronous?

My Google-fu simply cannot find an answer to this. If I have a process with heavy I/O activity, how can I check whether it's using asynchronous or synchronous writes? (I want this information to ...
user avatar
0 votes
1 answer
61 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, ...
user avatar
  • 103
1 vote
1 answer
102 views

Take snapshot of top [duplicate]

I am trying to take a snapshot of top so that I can save it to a file. For example top -n 10 > top.txt. However top will of course continue to run, and I just want a snapshot. All the examples I ...
user avatar
  • 121
0 votes
1 answer
65 views

How to check my total memory, used memory and free memory from top command?

How to check my total memory, used memory and free memory according to this result? free -m total used free shared buff/cache available Mem: 128658 ...
user avatar
  • 111
0 votes
0 answers
69 views

Is there a commandline monitoring tool integrating the functionality of htop, nvtop. intel-gpu-top?

As the question title may suggest I am looking for a monitoring tool that integrates the functionality of htop and furthermore detects available GPUs and monitors them. Is there a tool like this? (...
user avatar
  • 171
0 votes
1 answer
30 views

in what situations will ni% in top is not 0

I learnt that ni represents the cpu used for userspace processes whose niceness or priority value is changed, but in my system, which is CentOS Linux release 7.9.2009 (Core), I did below test, all the ...
user avatar
0 votes
0 answers
92 views

Linux top command hang about 25 seconds before works fine

On my Linux server, top command hang about 25 seconds before works fine: $ time top -b -n 1 Output: ... real 0m25.199s user 0m0.018s sys 0m0.014s When top command is hang, I found the ...
user avatar
  • 223
1 vote
0 answers
66 views

When using atop as a systemd service it only runs and logs to file once

I am on CentOS 7 and using atop v2.6.0 If I run atop manually with the following command everything runs as expected and the log is written to every 10 seconds: /usr/bin/atop -w /var/log/atop/...
user avatar
  • 11
1 vote
1 answer
60 views

I want to merge the output of top with the start time from ps

I have several services running and a bash script that displays their current state using top e.g. top -b -n1 -p `pgrep -f "proc1|proc2|proc3|proc4|proc5" | tr '\n' ',' | # ...
user avatar
1 vote
1 answer
177 views

top TIME+ Is using a comma delimiter instead of the usual colon. Does this signify different units?

I have been running a process for quite a while, so long that the usual TIME+ format in top is not the usual MM:SS.milliseconds. Instead my process time is reported like this PID USER PR NI ...
user avatar
2 votes
1 answer
214 views

command 'top' and 'ps' take a long time to show result

Recently, I find when I run commands like top or ps -aux on a server, it is very slow to show the result (STDOUT). I have checked the usage of disk space, memory, and CPU, all of them are OK. After ...
user avatar
0 votes
1 answer
127 views

How to add width to a specific column in TOP

I would like to have the nTH (Number of threads column) wider on the top output I have configured. right now it is truncated a 4 place value (2K+ thread count). to 28+ I would like it to display all ...
user avatar
  • 141
0 votes
1 answer
130 views

What's the difference between memory shown with the free command and the top command? [duplicate]

I am new to running a linux server and wanted to know the difference between the total memory shown with the top command (which appears to be 78GB) and the free command which shows that I have 743GB ...
user avatar
2 votes
1 answer
421 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 ...
user avatar
0 votes
0 answers
57 views

How to grep on a ncurses display (refreshed every second)?

When running the useful tool tcptrack in the terminal (over SSH), it displays this: Client Server State Idle A Speed 1.2.3.4:44054 5.5.5.5:443 ...
user avatar
  • 2,243
0 votes
2 answers
184 views

Unix Commands Questions - mv, pwd, chmod, and others

I wanted to make sure Im matching the correct command to the description, including possible tags I may need and I'd really appreciate if someone could confirm them for me: Show file permissions for ...
user avatar
  • 1
1 vote
1 answer
58 views

Is RAM usage of IPC a part of the RAM usage of a program

I'm learning how to use Message Queue in Linux and I've found a simple example: https://www.geeksforgeeks.org/ipc-using-message-queues/. With the reader and writer in this link, I can read and write ...
user avatar
  • 2,819
2 votes
1 answer
1k views

Firefox taking 200+% CPU Usage

What is wrong with firefox (Web content)? Is this an issue? Is there a way to reduce it? This 'Web content' always pops-up when I start Firefox (I guess these are different tabs because I closed this ...
user avatar
  • 131
0 votes
1 answer
554 views

Difference between CPU usage in top and /proc/stat

I'm trying to write a little script that, among other things, calculates the cpu usage by reading /proc/stat, and I can't seem to get consistent results. I'm basically doing a grep cpu /proc/stat and ...
user avatar
0 votes
1 answer
853 views

What value of "wa" from the top command is too high?

I have a server with 64 GB of ram, 16 CPU cores and an SSD drive. I am running a relational database on the machine. I would like to increase the writes to the database, and my guess would be that the ...
user avatar
  • 101
1 vote
1 answer
37 views

How to use top or htop to gather filtered time series

My goal is to track the resource usage of a certain command in a easily parse-able time-series. Here's an example where I'm tracking all the node commands for 3 batches: top -b -n3 | grep node ...
user avatar
0 votes
1 answer
2k views

How come the top command displays >80% CPU idle time but individual processes use >80% CPU?

Please see screenshot below. The values highlighted jump between 80 and 95 percent. As you can see, the postgres process is taking up all the CPU. However, the user processes percentage is only 5%. ...
user avatar
  • 1
0 votes
1 answer
80 views

get the wrong value when trying to get it by column name and process name

I'm writing a script to monitor CPU and MEMORY utilization during stability test and in the end I want to present it in a graph or another visual tool. to do so I'm trying to extract %CPU and %MEM ...
user avatar
  • 1
6 votes
1 answer
547 views

How to make `top` only display a group of processes matching a specific pattern?

I want to show all processes whose command line includes .*git.* using top. I've considered the following command: top -p $(pgrep -d',' -f '.*git.*') However, the above command has several caveats: ...
user avatar
  • 3,317

1
2 3 4 5
10