Questions tagged [htop]

htop is an interactive process viewer for Linux. It is a text-mode application (for console or X terminals) and requires ncurses.

126 questions
1
vote
2 answers

Why my java long running Threads (5k+ thread) not utilizing all machines cores (12 cores)?

I've Worte a simple multithread java application, The main method just creates 5k threads, each thread will loop over a list having 5M records to process. My Machine specs: CPU cores: 12 cores Memory: 13Gb RAM OS: Debian 64-bit My jar is now…
Tamer Saleh
  • 473
  • 9
  • 21
1
vote
1 answer

free the memory from a process in linux?

when I run pmap It is giving me below list 00007f545bbc5000 1016K rw--- [ anon ] 00007f545bd0c000 76K r-x-- /opt/openmrs/.openmrs-lib-cache/bahmnimsf/org/bytedeco/javacpp/linux-x86_64/libjniswscale.so 00007f545bd1f000 2044K…
Maharjun M
  • 853
  • 4
  • 11
  • 24
1
vote
0 answers

Low CPU usage for a process

I don't want to limit my process's cpu usage. Rather I want to write it in a way that it consumes less cpu. The system I'm dealing with doesn't allow making any system call. So I can't put it to sleep, I can't do any I/O. The only thing I'm left…
user3834119
  • 411
  • 9
  • 21
1
vote
1 answer

How can I gracefully recover from an attached Docker container terminating?

Say I run this Docker command in one Terminal window: $ docker run --name stackoverflow --rm ubuntu /bin/bash -c "sleep 5" And before it exits I run this in a second Terminal window: $ docker run -it --rm --pid=container:stackoverflow…
jpsim
  • 14,329
  • 6
  • 51
  • 68
1
vote
0 answers

Multithreaded Python program starting multiple processes

This simple Python program : import threading import time import os def run_test(): print("run_test pid : " + str(os.getpid())) while True: time.sleep(100) print("main pid : " + str(os.getpid())) thread1 =…
Kalessar
  • 293
  • 5
  • 9
1
vote
1 answer

Docker does not set the RAM via docker run command

The command that I run is docker run --rm --cpuset-cpus="0-3" --memory="8g" -v ~/IdeaProjects:/sources --name dsetup -it harit/akka-dev-setup:1.0 When I do htop inside my container I see that it still uses 2g I am sure, I am wrong, but not sure…
daydreamer
  • 87,243
  • 191
  • 450
  • 722
1
vote
1 answer

Huge difference between htop and ps aux output

I am running a test on Ubuntu 14.04. When I check my CPU usage using 'ps aux|grep service' then CPU usage is 0.1 of a process, while in htop for the same process the CPU% is 12.3. Can anyone tell me the reason? or which value should I consider the…
anonymous255
  • 108
  • 10
1
vote
1 answer

exit and clean up python fork

i am trying to code socket server with fork in python. somehow a new fork will be created when a client is connected and this fork process will handle the connection including send/receive. i ran this script on Linux centOS and monitor resources…
Mehrdad Dadvand
  • 340
  • 4
  • 19
1
vote
1 answer

How to get CPU usage on a multi core system

How to know the CPU usage in percentage on multi core system. I tried the below sample code using os npm but it does not return the result what I am actually looking into it. I am expecting the result something similar to linux top command. Any help…
user4324324
  • 559
  • 3
  • 7
  • 25
1
vote
2 answers

Why the memory do not release after funciton call?

See my code below: void foo() { std::ifstream f("data"); string line; vector r; while(getline(f, line)) { r.push_back(line); } f.close(); r.resize(0); } int main(int argc, char *argv[]) { foo(); cout << "load done" <<…
xunzhang
  • 2,838
  • 6
  • 27
  • 44
1
vote
1 answer

TOP showing Multi Process with same name

I'm trying to figure out why in top (CentOS) There are several programs that have a lot of processes with same name , instead one single instance. I tried to understand this clearly, I hope someone here will help with good explaination. from…
Alex
  • 11
  • 1
1
vote
1 answer

C++ Stack and Heap in RAM

I'm running the following c++ code on Ubuntu with 4GBs of RAM const long long nSize = 400000000; double Array1[nSize]; for(int i=0; i
Kian
  • 3,189
  • 3
  • 18
  • 16
1
vote
1 answer

Memory report confusion shown by top and htop commands?

I'm on Slicehost 256 plan running one single Rails app on Ubuntu Hardy 64 bit server. This is the shot taken using top command sorted by memory% (Shift+M) Memory by top http://www.freeimagehosting.net/uploads/7d35d548bf.png And this is the…
millisami
  • 9,931
  • 15
  • 70
  • 112
1
vote
1 answer

Web Server extremely slow, while CPU at 0-5% and RAM at 500/1024

I programmed a web chat, which displayed new entries by refreshing a via an ajax command. This command launched a php file which then created the chat log showing the latest 25 entries. Ajax refreshed this every second for every user. Then, when…
user1211030
  • 2,680
  • 2
  • 19
  • 22
0
votes
0 answers

Threads not showing up in htop on MacOS

So here's what I'm seeing. I run some code on my MacOS laptop that will start threads (jump down to see python code). I get output like the following: Starting the task 1... Starting the task 2... Starting the task 3... Starting the task…
Brian Peterson
  • 2,800
  • 6
  • 29
  • 36
1 2 3
8 9