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
0 answers
17 views

top batch output/width of command field

top truncates the command field to fit the width of the terminal line. How can I maximise the width of that field for capture through a systemd-service? The assumption seems to be that the systemd ...
0 votes
1 answer
34 views

Why top is not reporting high %wa on too many write sys calls

My HTTP application suddenly started taking extra time to start up. During this phase, it loads the data from the disk to the in-memory data structure. I doubt it is due to the extensive logging ...
0 votes
1 answer
34 views

how to check CPU usage at linux system startup?

I am stuck on finding a way to test CPU usage for a linux system at startup, usuing top or htop is too late for me to see the real usage at startup; is there an efficient way to it ?
1 vote
1 answer
38 views

Pass multiple rows from awk to xargs

I want an easy way to monitor the resource usage of processes matching certain keywords. So I do something like: ps -aux | grep XX | awk 'FNR == 2 {print $2}' | xargs -o -I {} top -p {} (pgrep won't ...
  • 404
1 vote
2 answers
47 views

Best way to get resource usage information for a process?

What would be the best way to go about monitoring resource usage of certain running processes? For example if I wanted to generate log files of CPU and memory usage over time. From what I understand ...
2 votes
1 answer
34 views

How can I use htop or top to monitor CPUs' usage and output the infomation to a file?

I want to monitor the CPUs' usage when a program is running. I came out with the idea, that htop has the CPU usage information on the top. I wonder if I can somehow run htop, make it refresh every 0.1 ...
1 vote
0 answers
12 views

macOS: ps's columns "nswap nvcsw majflt minflt" are always empty, values are correct in top

Is there a system setting to enable reporting "nswap nvcsw majflt minflt" for ps on macOS? These fields are listed in the manual installed on macOS, but their column is always empty (shows -)...
0 votes
2 answers
49 views

How can I obtain a full tabular list of the running process on my system (with their command name and PID at least) for text processing consumption?

When I run top I see a screen similar to this, PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 654 root 20 0 25.5g 147780 70084 S 3.7 0.9 72:08.69 ...
  • 1,076
1 vote
0 answers
21 views

python psutil vs top

I'm confused about the difference between CPU percentage as measured by the top command and by the psutil.cpu_percent Here are two samples from the same second : Python >>> while pct := ...
0 votes
1 answer
119 views

how to open multiple new tabs in qterminal with a bash script in debian 11 lxqt

I am trying to create a bash script that will set up my all development stuff in an instant. What I want the script to do: open 5 different tabs in one window. clear terminal and start firefox-esr. ...
0 votes
1 answer
85 views

perf top not working as expected

I'm completely confused about the output of perf top I'm running a C program called sac2, which burns an entire CPU. Specifically it iterates through a 100 billion byte array adding all the bytes as ...
  • 3
0 votes
1 answer
982 views

what is tracker-miner-f and how to stop it [duplicate]

I noticed lately that my computer heats up and the fans are louder than ever before and the battery life is shorter, so I rand top to see usage of cpu and ram and i noticed two process that consume ...
0 votes
2 answers
404 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 ...
  • 1
2 votes
0 answers
319 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 ...
  • 403
4 votes
2 answers
445 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 ...
  • 41
0 votes
0 answers
24 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, ...
  • 101
1 vote
0 answers
96 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'...
  • 11
0 votes
0 answers
452 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 ...
  • 3,938
0 votes
1 answer
81 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 ...
0 votes
1 answer
46 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 ...
  • 14.9k
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,...
  • 1,596
0 votes
0 answers
29 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 ...
  • 151
1 vote
1 answer
356 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 -...
  • 604
0 votes
2 answers
340 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 ...
2 votes
1 answer
128 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 ...
0 votes
2 answers
34 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?
1 vote
0 answers
154 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 ...
2 votes
0 answers
228 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 ...
0 votes
1 answer
71 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 ...
1 vote
1 answer
67 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 ...
1 vote
1 answer
160 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 ...
  • 31
1 vote
1 answer
1k 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 ...
1 vote
1 answer
199 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 ...
  • 215
0 votes
0 answers
154 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 ...
  • 1
0 votes
1 answer
106 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
1 vote
1 answer
146 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. ...
  • 111
0 votes
0 answers
55 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 ...
0 votes
1 answer
111 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, ...
  • 103
1 vote
1 answer
160 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 ...
  • 113
0 votes
1 answer
136 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 ...
  • 111
0 votes
1 answer
48 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 ...
0 votes
0 answers
167 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 ...
  • 223
1 vote
0 answers
78 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/...
  • 11
1 vote
1 answer
63 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' ',' | # ...
1 vote
1 answer
272 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 ...
2 votes
1 answer
450 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 ...
0 votes
1 answer
205 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 ...
  • 141
0 votes
1 answer
406 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 ...
3 votes
1 answer
607 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 ...
0 votes
0 answers
105 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 ...
  • 2,189

1
2 3 4 5
10