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
16 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 ...
joker's user avatar
  • 594
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/...
Pierre's user avatar
  • 1,793
0 votes
1 answer
41 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 ...
Samveen's user avatar
  • 165
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 ...
ron's user avatar
  • 6,607
0 votes
1 answer
85 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 ...
jin's user avatar
  • 3
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: ...
zhang's user avatar
  • 133
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 ...
michaelloop's user avatar
0 votes
0 answers
33 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 ...
supmethods's user avatar
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 -...
POtaoPereiraRosen's user avatar
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 ...
just a student's user avatar
2 votes
1 answer
204 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: ...
Oleg Skydan's user avatar
0 votes
2 answers
91 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 ...
SolaceBeforeDawn's user avatar
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 ...
Mellowcandle's user avatar
0 votes
0 answers
206 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, ...
unebonnevie's user avatar
1 vote
1 answer
164 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, ...
Vlastimil Burián's user avatar
0 votes
1 answer
22 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 ...
anjama's user avatar
  • 151
0 votes
1 answer
112 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 ...
Rocky's user avatar
  • 3
0 votes
2 answers
157 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 ...
BowPark's user avatar
  • 4,895
0 votes
0 answers
241 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 ...
Jakub Hořínek's user avatar
0 votes
0 answers
35 views

monitor multiple server load averages

I'm helping to manage around 6 linux servers that host public websites. I'd like to monitor the live load averages (e.g. using TOP) and have these display in a Windows GUI that takes up minimal space ...
SolaceBeforeDawn's user avatar
0 votes
0 answers
46 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 ...
Jeff Learman's user avatar
1 vote
0 answers
36 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 ...
TomSawyer's user avatar
  • 133
0 votes
2 answers
48 views

How to get load averages and compulsory memory from a script?

uptime piped to sed fixes the first part but what about memory usage? top runs, at least by default, interactively. So: I need to watch used RAM excluding opportunistic caching(which gets dropped as ...
Vorac's user avatar
  • 3,077
2 votes
0 answers
319 views

ssh shell freezes with incomplete output after running top or tmux a

I'm sshing from my Mac into an Ubuntu Server 20.04 instance (using key-based authentication). When I type any variety of commands, I get partial output, and then the shell becomes unresponsive to any ...
mark's user avatar
  • 165
3 votes
1 answer
335 views

Equivalent to "ps -p"

I'm using a board without the full ps command installed. What I need is ps -p equivalent (something that sets $? if a specific PID is found or not). Is there a way to accomplish this with another ...
DDS's user avatar
  • 323
0 votes
1 answer
234 views

Do 'finger' and 'pinky' always show all users currently logged in?

I've been playing around on my university's system and I noticed that sometimes the lists of logged in users I get from finger and pinky appear incomplete. For one thing, there were times when a ...
Isaac D. Cohen's user avatar
0 votes
2 answers
483 views

Find out which process is using CPU 0

I've applied CPUAffinity to certain systemd services. I've checked Cpus_allowed_list from /proc/PID/status, and it works fine. Now I want to find out which process is using CPU 0 or CPU 1, how can I ...
daisy's user avatar
  • 54.6k
0 votes
1 answer
2k views

How to make the top command calculate the CPU usage per second?

I am using top in Solaris mode via top -d 1 and it shows that one of my processes is using around 45% of CPU. Question: Since I'm using -d 1 does that mean that process is using around half of my ...
Sinux's user avatar
  • 128
0 votes
0 answers
276 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 ...
Stephen Boston's user avatar
0 votes
1 answer
122 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 ...
shubmishra's user avatar
0 votes
1 answer
429 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 ?
kakachi_hatake's user avatar
1 vote
1 answer
480 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 ...
ahron's user avatar
  • 402
1 vote
2 answers
824 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 ...
Euchidna's user avatar
2 votes
1 answer
468 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 ...
Erwin Zangwill's user avatar
1 vote
0 answers
61 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 -)...
codepoet's user avatar
  • 586
1 vote
2 answers
194 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 ...
Enlico's user avatar
  • 1,616
2 votes
0 answers
243 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 := ...
Stephen Boston's user avatar
0 votes
1 answer
1k 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. ...
yashlodhi's user avatar
0 votes
1 answer
574 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 ...
rkg1's user avatar
  • 15
9 votes
1 answer
22k 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 ...
netrunner's user avatar
  • 105
0 votes
2 answers
4k 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 ...
Tayto's user avatar
  • 1
1 vote
0 answers
1k 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 ...
alper's user avatar
  • 469
7 votes
2 answers
1k 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 ...
AlanQ's user avatar
  • 71
1 vote
0 answers
364 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'...
nimmi's user avatar
  • 11
0 votes
0 answers
1k 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 ...
OmiPenguin's user avatar
  • 4,318
1 vote
1 answer
463 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 ...
Sreeraj Chundayil's user avatar
0 votes
1 answer
152 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 ...
Andrew's user avatar
  • 16.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,...
ks1322's user avatar
  • 1,656
0 votes
0 answers
37 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 ...
fleetingbytes's user avatar
1 vote
1 answer
1k 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 -...
samshers's user avatar
  • 678

1
2 3 4 5
10