20150916-1 选题

This commit is contained in:
DeadFire 2015-09-16 16:25:27 +08:00
parent 96ada95f48
commit 266b05d021
2 changed files with 129 additions and 0 deletions

View File

@ -0,0 +1,48 @@
Enable Automatic System Updates In Ubuntu
================================================================================
Before seeing **how to enable automatic system updates in Ubuntu**, first lets see why should we do it in the first place.
By default Ubuntu checks for updates daily. When there are security updates, it shows immediately but for other updates (i.e. regular software updates) it pop ups once a week. So, if you have been using Ubuntu for a while, this may be a familiar sight for you:
![Software Update notification in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu.png)
Now if you are a normal desktop user, you dont really care about what kind of updates are these. And this is not entirely a bad thing. You trust Ubuntu to provide you good updates, right? So, you just select Install Now most of the time, dont you?
And all you do is to click on Install Now, why not enable the automatic system updates? Enabling automatic system updates means all the latest updates will be automatically downloaded and installed without requiring any actions from you. Isnt it convenient?
### Enable automatic updates in Ubuntu ###
I am using Ubuntu 15.04 in this tutorial but the steps are the same for Ubuntu 14.04 as well.
Go to Unity Dash and look for Software & Updates:
![Ubuntu Software Update Settings](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Software_Update_Ubuntu.jpeg)
This will open the Software sources settings for you. Click on Updates tab here:
![Software Updates settings in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu-1.png)
In here, youll see the default settings which is daily check for updates and immediate notification for security updates.
![Changing software update frequency](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu-2.png)
All you need to do is to change the action which reads “When there are” to “Download and install automatically”. This will download all the available updates and install them automatically.
![Automatic updates in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu-3.png)
Thats it. Close it and you have automatic updates enabled in Ubuntu. In fact this tutorial is pretty similar to [changing update notification frequency in Ubuntu][1].
Do you use automatic updates installation or you prefer to install them manually?
--------------------------------------------------------------------------------
via: http://itsfoss.com/automatic-system-updates-ubuntu/
作者:[Abhishek][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://itsfoss.com/author/abhishek/
[1]:http://itsfoss.com/ubuntu-notify-updates-frequently/

View File

@ -0,0 +1,81 @@
Linux FAQs with Answers--How to find out which CPU core a process is running on
================================================================================
> Question: I have a Linux process running on my multi-core processor system. How can I find out which CPU core the process is running on?
When you run performance-critical HPC applications or network-heavy workload on [multi-core NUMA processors][1], CPU/memory affinity is one important factor to consider to maximize their performance. Scheduling closely related processes on the same NUMA node can reduce slow remote memory access. On processors like Intel's Sandy Bridge processor which has an integrated PCIe controller, you want to schedule network I/O workload on the same NUMA node as the NIC card to exploit PCI-to-CPU affinity.
As part of performance tuning or troubleshooting, you may want to know on which CPU core (or NUMA node) a particular process is currently scheduled.
Here are several ways to **find out which CPU core is a given Linux process or a thread is scheduled on**.
### Method One ###
If a process is explicitly pinned to a particular CPU core using commands like [taskset][2], you can find out the pinned CPU using the following taskset command:
$ taskset -c -p <pid>
For example, if the process you are interested in has PID 5357:
$ taskset -c -p 5357
----------
pid 5357's current affinity list: 5
The output says the process is pinned to CPU core 5.
However, if you haven't explicitly pinned the process to any CPU core, you will get something like the following as the affinity list.
pid 5357's current affinity list: 0-11
The output indicates that the process can potentially be scheduled on any CPU core from 0 to 11. So in this case, taskset is not useful in identifying which CPU core the process is currently assigned to, and you should use other methods as described below.
### Method Two ###
The ps command can tell you the CPU ID each process/thread is currently assigned to (under "PSR" column).
$ ps -o pid,psr,comm -p <pid>
----------
PID PSR COMMAND
5357 10 prog
The output says the process with PID 5357 (named "prog") is currently running on CPU core 10. If the process is not pinned, the PSR column can keep changing over time depending on where the kernel scheduler assigns the process.
### Method Three ###
The top command can also show the CPU assigned to a given process. First, launch top command with "p" option. Then press 'f' key, and add "Last used CPU" column to the display. The currently used CPU core will appear under "P" (or "PSR") column.
$ top -p 5357
![](https://farm6.staticflickr.com/5698/21429268426_e7d1d73a04_c.jpg)
Compared to ps command, the advantage of using top command is that you can continuously monitor how the assigned CPU changes over time.
### Method Four ###
Yet another method to check the currently used CPU of a process/thread is to use [htop command][3].
Launch htop from the command line. Press <F2> key, go to "Columns", and add PROCESSOR under "Available Columns".
The currently used CPU ID of each process will appear under "CPU" column.
![](https://farm6.staticflickr.com/5788/21444522832_a5a206f600_c.jpg)
Note that all previous commands taskset, ps and top assign CPU core IDs 0, 1, 2, ..., N-1. However, htop assigns CPU core IDs starting from 1 (upto N).
--------------------------------------------------------------------------------
via: http://ask.xmodulo.com/cpu-core-process-is-running.html
作者:[Dan Nanni][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://ask.xmodulo.com/author/nanni
[1]:http://xmodulo.com/identify-cpu-processor-architecture-linux.html
[2]:http://xmodulo.com/run-program-process-specific-cpu-cores-linux.html
[3]:http://ask.xmodulo.com/install-htop-centos-rhel.html