Tag Info

Hot answers tagged

11

F1 or h will show you the legend. It looks like in this color scheme: CPU: blue is for low priority threads green is normal priority threads black is for io-wait see below for more. Memory: green is memory in use blue is buffer orange is cache


9

I use this script (from this thread on the Arch boards): #!/bin/bash read cpu a b c previdle rest < /proc/stat prevtotal=$((a+b+c+previdle)) sleep 0.5 read cpu a b c idle rest < /proc/stat total=$((a+b+c+idle)) CPU=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) ))


6

The fan Mine does this too, running Fedora 14. Try getting a compressed can of air and blowing out the vents on the back and side of the case. Also periodically you'll wan to remove the keyboard and blow compressed air directly on the fan's blades. They get caked with dust and start to effect its effectiveness by weighting it down. The best thing about ...


5

Here is the laziest way (or homebrew way) First install Homebrew if you haven't Second brew install htop Third, done


5

You're asking the wrong question: you've got an overheating system which should be solved by cooling the system. Playing games with process load is going to yield an unsatisfying hack. And since you've got hardware running at its thermal limits, you can fairly expect that problem to worsen. If you cannot remedy the hardware, see if you can slow the whole ...


5

Check out sar, as well. Implementations can vary widely from nix to nix, but it should give you basic system stats, at given snapshots. I'm not sure how accurate the values are at the point at which the command is first initialized, but you might play around to see how it compares to top, iostat, etc. The output is column-based, like top, so you should be ...


4

From man htop: INTERACTIVE COMMANDS Space Tag or untag a process. Commands that can operate on multiple processes, like "kill", will then apply over the list of tagged processes, instead of the currently highlighted one. U Untag all processes (remove all tags added with the Space key). F9, k "Kill" process: sends a ...


4

If I understand that script correctly, it doesn't actually enable swap in any way. Instead it just pretends that the system has swap by replacing /proc/meminfo so that free and htop believe that the system has swap, but the kernel is in no way able to use this fake swap. If you look at the script, you may notice that no swap file or partition is mentioned ...


3

You have greatly misunderstood what that post means by "fake swap". There are some programs that for various reasons insist on a system having swap space enabled (cough Oracle cough). If it isn't, the program—or at least its installer—complains. Of course with the aforementioned database there are ways to tell it to continue anyway, but people often don't ...


3

This is more of a long comment but you should have a look at thinkwiki.org it is the resource for Linux on ThinkPads. As for the temperature, I had similar problems with my t4500 and sorted it out by playing with The CPU governor which controls CPU frequency scaling. Your choices are: Performance keeps the CPU at the highest possible frequency Powersave ...


3

This is not possible, as of htop 0.8.3. Source: the source code. The best you can do is sort processes by user, root's processes will be conveniently lumped together.


3

A complete re-write of my previous post. Got a bit curious and checked out further. In short: the reason for the difference is that openSUSE uses a patched version of top and free that adds some extra values to `cached'. A) Standard version top, free, htop, ...: Usage is calculated by reading data from /proc/meminfo: E.g.: #free: Row Column | ...


3

This sort of inconsistency is usually indicative of high processor usage by kernel threads, which aren't displayed in htop by default. To display them, in htop go to Setup, then Display options, and then uncheck Hide kernel threads. This should allow you to see the thread(s) that are responsible. You can also disable this behaviour by setting ...


3

Have you looked at collectl? It's handy because you can tailor the output to your needs. See: http://collectl.sourceforge.net/


2

htop is unaware it is running on a kernel level virtualized environment. It is then showing the CPU usage for all the OS instances sharing the same kernel, not just yours. The regular top might not present this issue. Have a look to vtop output too.


2

Don't you have colors? Green Blue Orange Mem[|||||||||||||||||||||||||||||||||||||||||||| 1978/7847MB] Where green should be 1978 MiB. Else you can enter F2 -> Under setup stay on "Meters" -> Right arrow to get to "Left column". -> Down 1 to get to "Memory Bar". Then press enter to view various ways of display. When it comes to ...


2

System load isn't really directly related to how much work the system is doing. You could have a load average of only 2.0 and be doing a lot more work than a load average of 8.0. All the load tells you is the average number of programs eligible to be run. If they are all waiting on your overloaded disk, your CPU won't be doing much of anything, but your ...


2

If you add up MEM% for all the identical looking chrome processes, then you have well over 100%, which is impossible. That's because those are not, in fact, separate processes, they're threads, which share the same memory space. htop shows these by default, but see here for how to change that and get a view that will make more sense to you. Your total used ...


2

If you run a fake job such as sleep 120 and then watch it in htop you'll notice that its state is S aka "SLEEP" and the processes TIME remains at 0:00.00 for the duration. That's because that process is consuming 0 CPU time, which is the intent of the TIME column. It tracks the amount of CPU time a given process has used. ...


2

Q#1: make the CPU/Memory at the top only count those PIDs. Is this possible? Unfortunately no top and htop do not provide a mechanism for only showing the individualized load in the upper portion of their output. However the CPU/Memory resources are displayed per process as 2 of the columns of output for each PID. enter 'tree' mode on startup, or ...


2

The problem is either with your display setup or htop itself. To eliminate that it's an issue with htop can you attempt to redirect its output to a file? $ htop > htop_dump.txt After running this then hit Ctrl+C. If there's content in the file, more htop_dump.txt, then the issue likely lies with your screen setup in your terminal/shell. If on the ...


1

The issue may be due to shared memory, which isn't taken into account by many utilities because shared between several processes. You can check with the smemstat utility ("report memory usage with shared memory divided proportionally"). EDIT: A significant part of the memory can also be taken by the kernel (included in the used value of free output). Look ...


1

Top shows usage over some time period - by default, something like 3 seconds. It basically tells you what percentage of CPU time a particular process ID used over that interval. And note that this percentage can be over 100% - if you had one process running two threads and keeping both cores of a dual core system busy, you'd see a number around 195% in the ...


1

If you check man atop, you'll see that it has the -c flag, like top, that will show the full command line used to launch the program: c Show the command line of the process. Per process the following fields are shown: process-id, the occu‐ pation percentage for the choosen resource and the command line including arguments. ...


1

Since manually ramping up the fan solves the problem, this would be a excellent place to start troubleshooting, since this seems to suggest that the automatic fan control isn't working. Now, you run arch linux, which is a brilliant distro (yes, i run it too) with a terrific wiki. So, I have to ask, did you RTFM? ;p ...


1

sensors shows my fan buzzing along at ~3900 RPM Even with temp like ~75-90°C? as manually ramping up the fan will cool the machine temporarily So one problem is just that the fan speed isn't working automatically? Forget about the auto, you can read the temperature correctly and you can control the fan speed manually, right? If so all you need to ...


1

You could hijack htop's s command. In htop, pressing s invokes strace -p <the-pid-of-the-selected-process>. Then what you could do is create a strace command that contains something like: #! /bin/sh - pids=$(ps -eo pid= -o ppid= | awk -v exclude="$PPID" -v pid="$2" ' function descends(p) { if (p == exclude) return 0 if (p == pid) ...


1

From the htop manpage: F5, t Tree view: organize processes by parenthood, and layout the relations between them as a tree. Toggling the key will switch between tree and your previously selected sort view. Selecting a sort view will exit tree view. So hit F5, and you may have to then hit 't'. That'll let you kill the entire tree.


1

You could run top in batch mode -b with 1 iteration -n1. You grep it, pipe it to awk, SUM the result and print it. top -b -n1 | grep chrome | awk '{ SUM += $9} END { print SUM }' I don't know which column you want to output. Change $9 to fit your needs.



Only top voted, non community-wiki answers of a minimum length are eligible