The CPU (Central Processing Unit), is the chip in the computer that actually performs the operations and calculations that are done as a program runs. It is essentially what executes a program.

learn more… | top users | synonyms (1)

56
votes
3answers
30k views

What do the flags in /proc/cpuinfo mean?

How can I tell whether my processor has a particular feature? (64-bit instruction set, hardware-assisted virtualization, cryptographic accelerators, etc.) I know that the file /proc/cpuinfo contains ...
53
votes
1answer
63k views

In Linux “top” command what are us, sy, ni, id, wa, hi, si and st (for CPU usage)?

When I issue $ top in linux, I get a result similar to this (see here). One of the lines has CPU usage information represented like this: Cpu(s): 87.3%us, 1.2%sy, 0.0%ni, 27.6%id, 0.0%wa, ...
24
votes
1answer
2k views

High CPU usage with CFS?

I asked a previous question to try and isolate the source of an increase in CPU usage when moving an application from RHEL 5 to RHEL 6. The analysis that I did for that seems to indicate that it is ...
20
votes
3answers
2k views

How can I set the processor affinity of a process on Linux?

The question is all in the title: How can I set the processor affinity of a process on Linux?
20
votes
2answers
21k views

Limit process to one cpu core

How to limit process to one cpu core ? Something similar to ulimit or cpulimit would be nice. (Just to ensure: I do NOT want to limit percentage usage or time of execution. I want to force app (with ...
18
votes
6answers
1k views

Is there a way to limit overall CPU consumption?

My laptop (an HP with an i3 chip) overheats like crazy every time I run a resource heavy process (like a large compilation, extracting large tarballs or ... playing Flash). I am currently looking ...
13
votes
2answers
763 views

Is it possible to limit how much CPU power a process can take?

I'm wondering, is there way to tell a process how much processor power it can take? The problem is I'm converting video with Arista (video converter) and I'm annoyed by the fan running like crazy, ...
12
votes
3answers
9k views

How to check that AES-NI is supported by my CPU?

Howcan I check if my CPU supports the AES-NI instruction set under Linux/UNIX.
12
votes
2answers
13k views

Top and ps not showing the same cpu result

This is linked to this question. When I run top I get the following result: pid 3038 is using 18% cpu, however when running the result is 5.5%. And this number does not appear to be changing ...
12
votes
3answers
2k views

How can I have 400% CPU occupied on 2 cores

I understand that Σ(%CPU) ≤ logicalcores*(1+ε) (where ε is measure and rounding error). But, how can I have on a 2 core system 2 different processes, each taking 200% of CPU (as measured by htop)? ...
11
votes
3answers
4k views

How can I receive top-like CPU statistics from the shell?

I'm trying to get an accurate read of my used CPU (in percent) from top. This is the command I'm running for testing: top -n1 | awk '/Cpu\(s\):/ {print $2}' This returns: 10.7%us, Which is the ...
11
votes
1answer
2k views

How can I monitor CPU usage by user?

I need to monitor CPU usage by users of two servers' (Ubuntu and CentOS). For example: user1 5% user2 10% ... Is there a tool similar to top or htop that can do that?
10
votes
1answer
10k views

What are software and hardware interrupts, and how are they processed?

I am not sure if I understand the concept of hardware and software interrupts. If I understand correctly, the purpose of a hardware interrupt is to get some attention of the CPU, part of implementing ...
9
votes
4answers
4k views

32-bit, 64-bit CPU op-mode on Linux

I'm confused. Running Fedora Linux, lscpu yields: Architecture: i686 CPU op-mode(s): 32-bit, 64-bit ... But when I try to install a 64-bit program (Chrome) I get error like: ...
9
votes
2answers
8k views

Run process with higher priority

I want to run mplayer with higher priority than any other processes, including the IO-processes. How can I do that?
9
votes
4answers
11k views

Why is kworker consuming so many resources on Linux 3.0.0-12-server?

Last Friday I upgraded my Ubuntu server to 11.10, which now runs with a 3.0.0-12-server kernel. Since then the overall performance has dropped dramatically. Before the upgrade the system load was ...
9
votes
1answer
3k views

Isolating cause of higher CPU usage on RHEL 6 vs RHEL 5

I'm currently looking to move our system from RHEL 5 to RHEL 6, but I've run into a snag with unexpectedly high CPU usage on the RHEL 6 machines. It appears that this may be due at least in some part ...
8
votes
7answers
2k views

cron Vs. sleep - which is the better one in terms of efficient cpu/memory utilization?

The Case: I need to run some commands/script at certain intervals of time and for this I have two options - 1. set up a cron-job or, 2. implement a loop with sleep in the script itself. Question: ...
8
votes
2answers
512 views

Overheating results in system shutdown

I have been having an overheating issue which makes my laptop shutdown immediately. Is there anyway to monitor the temperature from the sensor and scale down the CPU frequency to avoid that problem? ...
8
votes
6answers
9k views

Getting cpu usage same every time.

When I execute following command to get cpu usage , I get nice + user cpu usage. top -b -n1 | grep "Cpu(s)" | awk '{print $2 + $4}' Output: 14.5 Here I am getting problem is that the output ...
8
votes
3answers
3k views

Understanding top and load average

I'm observing a high load average on a certain machine (about 9) in all three load fields. I understand load as the number of processes in state "run" / currently desiring CPU time. Am I correct at ...
8
votes
1answer
91 views

Does QEMU/KVM use Intel AES instructions for encrypted qcow2 images if the host CPU has them?

The qcow2 image file format for KVM can use AES encryption. The encryption is applied at the cluster level: Each sector within each cluster is independently encrypted using AES Cipher Block ...
8
votes
1answer
203 views

What does a computer actually do with its spare CPU cycles?

When a computer is not running at full load, in the context of Linux, what does it actually do? Between scheduled threads, if there is nothing to do, does it spin wait? Does it enter some sleep state? ...
8
votes
2answers
1k views

lshw and lscpu disagree on caches - which is right?

I am trying to find out specifics about caches (in particular which caches are shared between cores and which are not) and have stumpled onto a inconsistency. sudo lshw says *-cache:0 ...
7
votes
2answers
8k views

How can I know which IRQ is responsible of high CPU usage

I've moved a server from one mainboard to another due a disk controller failure. Since then I've noticed that constantly a 25% of one of the cores goes always to IRQ however I haven't managed myself ...
7
votes
3answers
830 views

How to enable safeguards for CPU temperature

My desktop has a nasty habit. When I have several high intensity applications running and my CPU is at maximum usage for a period of time, the core temperature rises and my computer auto-shuts off. ...
7
votes
1answer
2k views

Is the sum of all PIDs “utime” the total system utime?

In order to measure a user's total CPU time, I'm using the "utime" field out of /proc/[pid]/stat: utime %lu Amount of time that this process has been scheduled in user mode, measured in ...
7
votes
1answer
540 views

Can I run multiple cores at different clock speeds?

I see the cores on an Intel i5 machine I'm looking at can only be run at the same clockspeed: /sys/devices/system/cpu/cpu1/cpufreq/related_cpus lists all of the CPUs. Setting cpu1's clockspeed changes ...
6
votes
2answers
1k views

How does load average work with modern CPU's?

My understanding of load average lead me to be quite shocked with my current system. The CPU in my workstation is an i7 with hyperthreading enabled, and cat /proc/cpuinfo produces 4 'cpu's. That all ...
6
votes
2answers
199 views

How can I chase a program who is rising up my laptop's temperature?

After 40 days of non-upgrading I came back from a trip and I decided to dist-upgrade my Debian Sid box. Everything went fine but after rebooting I noticed that the temperature was 15°C over its ...
6
votes
2answers
973 views

Java problem - nearly looks like a virus?

I have a weird problem since about a week. When I wake up my computer from suspend, a java process starts and consumes about 170 % CPU capacity. I analyzed the java process a bit: it connects to ...
6
votes
2answers
4k views

Get CPU utilization stats from C program

I want to read the CPU utilization stats from a C program, I am interested in the percentage of use of CPU, steal time etc. These stats are shown in the 3rd row from the top command. I tried to parse ...
6
votes
1answer
142 views

KVM reports strange CPU usage peaks (bash infinite recursion)

On a KVM machine running Fedora 20 I ran ulimit -s unlimited (this removes limit on stack size) and an experimental torturing testing script. All this script does is just infinite recursion: ...
5
votes
4answers
3k views

Limiting processes to not exceed more than 10% of CPU usage

I operate a Linux system which has a lot of users but sometimes an abuse occurs; where a user might run a single process that uses up more than 80% of the CPU/Memory. So is there a way to prevent ...
5
votes
3answers
729 views

Determining the particular processor on which a process is running

I have access to an 8-core node of a Linux cluster. When logged in to the node, I can see a list of processors using this command: more /proc/cpuinfo In my 8-core node, the processors are numbered ...
5
votes
3answers
17k views

How to find which Process is causing High CPU usage

Is there any way to find out from terminal which process is causing high CPU Usage ? It would also be useful to order processes in descending order of cpu Usage
5
votes
5answers
433 views

performance monitoring

Is there some performace monitoring tool which would run in background gathering info about all system activity? Somethimes my system (Arch linux, 32 bit) slows down terribly and the top utility ...
5
votes
2answers
6k views

So what are logical cpu cores (as opposed to physical cpu cores)?

I was googling about how I could find the number of CPUs in a machine and I found some posts but I am confused as some mentioned that you get the logical cores vs physical cores etc. So what is the ...
5
votes
2answers
319 views

Why do I have four CPUs listed in /proc/cpuinfo?

When I bought my Lenovo Thinkpad 520, it had Windows installed. I promptly cleaned that out and installed Fedora 16. I recently visited the /proc/cpuinfo and, much to my surprise, discovered that it ...
5
votes
2answers
626 views

Does linux kill heavy and long running background processes after they reach some threshold?

If I start a really heavy (memory/cpu intensive) running really long running process will the OS terminate it after a period of time arbitrarily? I.e. are there any limits beyond which the OS would ...
5
votes
1answer
100 views

Whats the history behind the fork bomb?

I read other question about its work and other things that Fork bombs operate both by consuming CPU time in the process of forking, and by saturating the operating system's process table. A basic ...
5
votes
1answer
377 views

How to set the CPU freq. in Linux?

I'm using this ARM9 SAM9G25 embedded system, that when switched on, is only online for a few seconds and because I want to speed up the whole process, I'd like to check the CPU frequency, and set it ...
5
votes
1answer
628 views

How to find out how many cores (including emulated via HT and such) are avaliable to user?

I wonder how to get how many cores (including emulated via HT and such) are avaliable to user via bash shell-script command?
5
votes
1answer
83 views

How the network packets are transferred to the memory on linux?

Is there some command or tool for monitoring network packets and how those packets are handled by the memory and than proceeded to the CPU on linux platform? Using tcpdump I can capture many apache ...
5
votes
2answers
3k views

Slow down the CPU

I tried to slow down my CPU with powernowd and cpufreq-selector. I hoped that with lower frequency it will be less hot and I won't hear my fan every time I will run internet radio. I used the ...
5
votes
1answer
341 views

Get CPU usage for single process

I've got a problem getting a real-time CPU usage of a single process (by its PID). I'd like to setup a watchdog for the CPU usage of a process because it's suddenly reaching 100% of the CPU usage ...
5
votes
2answers
224 views

Externaly limiting number of CPU cores used

I need to externally limit a process/session to a certain number of cores. Are there any other possibilities than CPU affinity (I don't like the need to specify the actual cores) and cgroups (hard to ...
5
votes
1answer
2k views

Why Process CPU % Usage larger than Total CPU Time

When I run the TOP command, a process shows 1208% cpu usage and the total CPU usr time is 81.7% with IRIX mode on. When I change to IRIX mode off, the process shows 99% cpu usage and the total user ...
5
votes
1answer
3k views

Setting CPU frequency guidelines

I'm changing my CPU frequency because of noisy fan. I used sudo cpufreq-selector -g powersave for this purpose, but I replaced my Linux system Xubuntu with Lubuntu because it utilizes better ...
5
votes
1answer
31 views

High %sy in top output, how to debug?

We have 2 identically configured servers and one of them is showing a high %sy while the other does not. This would seem to indicate that the system is busy doing something. Cpu(s): 28.1%us, ...