Tag Info

Hot answers tagged

73

x86 (32-bit a.k.a. i386–i686 and 64-bit a.k.a. amd64. In other words, your workstation, laptop or server.) FAQ: Do I have… 64-bit (x86_64/AMD64/Intel64)? lm Hardware virtualization (VMX/AMD-V)? vmx (Intel), svm (AMD) Accelerated AES (AES-NI)? aes TXT (TPM)? smx a hypervisor (announced as such)? hypervisor Most of the other features are only of interest ...


31

hi is the time spent processing hardware interrupts. Hardware interrupts are generated by hardware devices (network cards, keyboard controller, external timer, hardware senors, ...) when they need to signal something to the CPU (data has arrived for example). Since these can happen very frequently, and since they essentially block the current CPU while they ...


21

ARM On ARM processors, a few features are mentioned in the features: line. Only features directly related to the ARM architecture are mentioned there, not features specific to a silicon manufacturer or system-on-chip. The features are obtained from looking up the CPU id with read_cpuid() and looking it up in the processor type definitions known at compile ...


18

Under Linux, execute the sched_setaffinity system call. The affinity of a process is the set of processors on which it can run. There's a standard shell wrapper: taskset. For example, to pin a process to CPU #0 (you need to choose a specific CPU): taskset -c 0 mycommand --option # start a command with the given affinity taskset -c -p 0 1234 # ...


17

Look in /proc/cpuinfo. If you have the aes flag then your CPU has AES support. You can use this command: grep aes /proc/cpuinfo If you have some output, which will be like flags : a bunch of flags aes another bunch of flags , then you have AES.


17

man ps in NOTES section. CPU usage is currently expressed as the percentage of time spent running during the entire lifetime of a process. This is not ideal, and it does not conform to the standards that ps otherwise conforms to. CPU usage is unlikely to add up to exactly 100%. And, guess you know, but you can also do: top -p <PID> ...


16

There is cpulimit tool (also is present in debian repo and should be in other distros). It's usage is pretty simple: cpulimit -p PID -l MAX_CPU_LEVEL You can also use process name, or full path to binary. Details you can find on the man page.


16

lscpu is telling you that your architecture is i686 (an Intel 32-bit CPU), and that your CPU supports both 32-bit and 64-bit operating modes. You won't be able to install x64 built applications since they're built specifically for x64 architectures. Your particular CPU can handle either the i386 or i686 built packages. There are a number of ways to verify ...


15

I have used taskset for this. If you have taskset installed, something like: taskset -c 1,3 -p 45678 would set the process with id 45678 to have an affinity to cpus 1 and 3.


12

From Wikipedia: “In 2004, the initial 32-bit x86 instruction set of the Pentium 4 microprocessors was extended by the 64-bit x86-64 set.” Your /proc/cpuinfo output shows flags: … lm …. The flag lm stands for “long mode“ which means 64-Bit extension. Thus, you have indeed a 64-bit processor.


12

Use cron (or anacron). Cron is designed for running things at intervals. That is the only thing it does, and there has been a lot of work put into cron for many years to make it what it is today. The chances that you're going to write a better scheduler in your script are effectively nil. Using cron will work better, avoid having unnecessary code in your ...


11

To set niceness (CPU bound) use nice. To set IO niceness (IO bound) use ionice. Refer to the respective man pages for more information. You can use them together as follow: ionice -c 2 -n 0 nice -n -20 mplayer Note: the lowest level of niceness (lower means more favorable) you can define is determined by limits.conf. On my computer the file is located at ...


10

A hardware interrupt is not really part of CPU multitasking, but may drive it. Hardware interrupts are issued by hardware devices like disk, network cards, keyboards, clocks, etc. Each device or set of devices will have its own IRQ (Interrupt ReQuest) line. Based on the IRQ the CPU will dispatch the request to the appropriate hardware driver. (Hardware ...


10

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) ))


9

I don't know that limiting CPU to the whole system is something that's possible without a lot of hacking, but you can easily limit the amount of CPU used by a single process using cpulimit The only way I can think of you being able to use this effectively is writing a wrapper script (can't really call it a script, it's so small) for the applications which ...


9

While it can be an abuse for memory, it isn't for CPU: when a CPU is idle, a running process (by "running", I mean that the process isn't waiting for I/O or something else) will take 100% CPU time by default. And there's no reason to enforce a limit. Now, you can set up priorities thanks to nice. If you want them to apply to all processes for a given user, ...


8

You can probably achieve something like that by using cgroups with the Memory resource controller. I guess you'd put all your resource-consuming tasks in a limited (CPU & RAM) cgroup, and leave sshd "outside" so that it isn't restricted. (Adding more swap, even in the form of a swap file, might be a good option though.)


8

I found this thread on lkml that answers your question a little. (It seems even Linus himself was puzzled as to how to find out the origin of those threads.) Basically, there are two ways of doing this: $ echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event $ cat /sys/kernel/debug/tracing/trace_pipe > out.txt (wait a few secs) ...


8

Well, since you're specifically asking how to know which IRQ is responsible for the number in mpstat, you can assume it's not the local interrupt timer (LOC), since those numbers are fairly equal, and yet mpstat shows some of those cpus at 0 %irq. That leaves IRQ 0, which is the system timer, and which you can't do anything about, and IRQ 177, which is tied ...


8

Use lscpu. It's in Debian package “util-linux”.


8

1.0 is an average of one job waiting over the given time period, not 1 core at 100% utilisation. An idle computer has a load number of 0 and each process using or waiting for CPU (the ready queue or run queue) increments the load number by 1. Most UNIX systems count only processes in the running (on CPU) or runnable (waiting for CPU) states. However, Linux ...


8

From the T520's specs: Intel® Core™ i5-2520M processor (dual-core, 2.50GHz, 3MB Cache), The i5-2520M has 2 cores + hyper threading, for a total of 4 cores seen by the system.


8

Is this process interfering with other processes on your system? Why do you want to limit the CPU bzip2 uses? You can use the nice command to change a process's priority: $ nice -n 19 bzip2 <file> Additionally, you can try lowering the bzip2 compression level: $ bzip2 -1 <file>


8

I don't think so. It just means that the CPU is overheating. And your building of a huge program probably is the cause (I'm assuming that after the build finishes things get back to normal, and if you repeat the build the message appears again). You might want to check your system cooling (eg. fans, dust), as the message suggests.


8

Physical cores are just that, physical cores within the CPU. Logical cores are the abilities of a single core to do 2 or more things simultaneously. This grew out of the early Pentium 4 CPUs ability to do what was termed Hyper Threading (HTT). It was a bit of a game that was being played where sub components of the core weren't being used for certain types ...


8

Here is a script to print the total CPU usage for each user currently logged in, showPerUserCPU.sh: own=$(id -nu) for user in $(who | awk '{print $1}' | sort -u) do # print other user's CPU usage in parallel but skip own one because # spawning many processes will increase our CPU usage significantly if [ "$user" = "$own" ]; then continue; fi ...


7

In general, as a non-root user, you can only decrease the priority of your tasks, not increase them. So, one approach would be to lower the priority of everything else. Or, you can set up something at the system level which handles your priorities. If you're using a relatively modern Linux distribution, the most powerful way would be with control groups. ...


7

Inside the process, the call would be sched_setaffinity(), or for pthreads stuff, pthread_setaffinity_np() On a related note, if you're worrying about CPU affinity of your program, it may be worthwhile to pay attention to how it's doing memory allocation as well. Larger systems with memory attached to more than one controller (i.e. multiple CPU sockets, ...


7

You should have a look at cpufreq-set and cpufreq-info. On Debian and derived distros they are in the cpufrequtils package. For example, on an old laptop with a bad fan that I use as a file server at home I have made these settings: sudo cpufreq-set -c 0 -g ondemand -u 800000 sudo cpufreq-set -c 1 -g ondemand -u 800000


7

BitcoinPlus is a web-based Bitcoin mining application written in Java. It uses your CPU to perform intensive calculations in an attempt to solve difficult math problems - this is part of the Bitcoin creation and security process. I've not heard of any *nix trojans or virii for Bitcoin generation (the only one I'm aware of is, ironically, MacOSX exclusive) ...



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