Questions tagged [top-command]

Unix/Linux utility providing a "dynamic, real-time view of a running system".

84 questions
2
votes
1 answer

How do I run a Ruby script on Linux and have the name of the script show up in TOP COMMAND instead of Ruby?

I have a bunch of scripts that run periodically as part of Gitorious, they all show up in top under command as Ruby how do I get them to show the actual script name that is running?
user177800
2
votes
1 answer

how to filter out only the running processes using "top" command?

When I run top command it shows all . I am seeing processes that are "Sleeping", "Running" etc., But I just want to see only the processes that are currently running. I mean those with column S value as R. How shall I filter this in top interactive…
Velu narasimman
  • 543
  • 1
  • 5
  • 18
2
votes
0 answers

How to understand top and htop results for tomcat with java threads

Using htop and atop commands show that Java eats much CPU. Here are htop results: . As I understood, the main Tomcat thread with PID=17649 takes 248% of all CPUs. And then other java threads created inside app take small amount of CPU like 4-3% But…
Max Grigoriev
  • 1,021
  • 2
  • 13
  • 29
2
votes
3 answers

How to interpret linux's top correctly?

We're running to profile a java program on its memory usage. We have a 512 ram box and top shows that 500 or so MB of ram is used with very little free. However over at the RES column we can see that the jvm is only using 100MB or so. And all the…
erotsppa
  • 14,248
  • 33
  • 123
  • 181
2
votes
1 answer

Linux top not printing full command name to file in batch mode as a nohup process

I am trying to find the cpu utilization of a process from top.So before that I had to test the below command top -b -c -d1 -n2 I am using -c option to print the full command name as the process name gets truncated without -c. No when I run this as…
crackerplace
  • 5,305
  • 8
  • 34
  • 42
2
votes
1 answer

Efficient way to calculate cpu usage of multiple processes in linux

I need to calculate the cpu usage of multiple processes on a given server. Few of the options are as below a)Though we can use ps to find the cpu usage of processes,ps gives the cpu usage of the process over its lifetime and not for instant.Of…
crackerplace
  • 5,305
  • 8
  • 34
  • 42
2
votes
1 answer

top command to show threads -- is this a delay of some sort?

We had a Java app that showed 100% CPU usage all the time. I was trying to find out if there were a few dominating threads when I noticed some strange results with the top command. If I run top, it showed one java process that had the 100% CPU…
neurite
  • 2,798
  • 20
  • 32
2
votes
1 answer

How to interpret BusyBox top command output for load average?

I've got an embedded device that runs BusyBox v1.16.1, and its top command includes the following Load average output: Load average: 0.00 0.00 0.00 1/304 9357 I can't seem to find any documentation on what the last two values represent, e.g.…
Alan
  • 3,715
  • 3
  • 39
  • 57
2
votes
1 answer

Why does this embedded linux top command fail?

I am trying to use top to prove that my test process on a Leopardboard (embedded-linux) target has a memory leak. Why does this command / # top -b | grep test >> /media/top.txt & seem to die immediately like this? [3]+ Stopped (tty output) …
jacknad
  • 13,483
  • 40
  • 124
  • 194
1
vote
2 answers

Tracking memory usage of piped commands with valgrind

I have a couple processes running a tool I've written that are joined by pipes, and I would like to measure their collected memory usage with valgrind. So far, I have tried something like: $ valgrind tool=massif trace-children=yes…
Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
1
vote
2 answers

Join and process two lines from top command output

I would like to join and process the two lines coming out of the top command: shell> top -p 1 -b -d 1 | egrep '^top|^Cpu' top - 15:17:45 up 736 days, 4:32, 3 users, load average: 0.06, 0.03, 0.00 Cpu(s): 0.7% us, 0.8% sy, 0.0% ni, 97.1% id, …
dabest1
  • 2,347
  • 6
  • 25
  • 25
1
vote
1 answer

bash | How to get value of %MEM from TOP command

How can I grep easily the value of %MEM only from TOP of specific user (e.g tomcat) on console: top -u tomcat | grep ???? expected output: 0.1
ng-User
  • 243
  • 1
  • 6
  • 18
1
vote
1 answer

Output of top into text file, but ranked by memory

I would like to put up a batch script that include a step where I want to output the results of command "top" in Linux to a text file. There is one catch here though, I would like to rank the top results by memory usage. I know it is easy when you…
AZhu
  • 1,312
  • 6
  • 22
  • 40
1
vote
2 answers

Collect output from top command using Paramiko in Python

Here I am trying to execute ssh commands and print the output. It works fine except the command top. Any lead how to collect the output from top ? import paramiko from paramiko import SSHClient, AutoAddPolicy, RSAKey output_cmd_list =…
user_PM
  • 45
  • 7
1
vote
1 answer

Oracle SQLLDR utility no response

I have a java application which is using Oracle SQLLDR utility to upload the CSV file data to the oracle database. Occasionally, the SQLLDR utility doesn't provide the return/response code and whereas we could see the Index are disabled in the table…
Karthick88it
  • 601
  • 2
  • 12
  • 28