20140811-3 选题

This commit is contained in:
DeadFire 2014-08-11 16:12:33 +08:00
parent 2a9a8c46c0
commit 7baac3f61f
3 changed files with 315 additions and 0 deletions

View File

@ -0,0 +1,77 @@
Check how much do you type with WhatPulse on Linux
================================================================================
![](http://cdn.linuxaria.com/wp-content/uploads/2014/08/whatpulse.png)
If, like me, you are a statistics freak you must install this small application on all your computers: [WhatPulse][1]
The software tracks a users pressed keys, mouse clicks and used [bandwidth][2] and the uptime of the system. Periodically, or by hand, the user can upload to the server the number of keystrokes made; this is called “pulsing”.
Users can see where they are in a leaderboard of people who have joined the program and compare themselves against people from their own countries. Users can also join teams, which enables them to compare themselves against people with similar interests (Go Linux Users !!).
There is a basic, and free, version where you can easily see and check all the basic statistics and a premium account where you can see some more stats.
The software is available for Linux, Windows and Mac.
### Registration on the website ###
As first step you have to register your account on the [WhatPulse Website][1] or as alternative when you first start the WhatPulse client there is a practical wizard through which each user has the option to create an account to upload their own statistics (you can also log in with Facebook).
You will be prompted to login, once you login, you have to search for your computers name, this is because you can login to several computers with this and theyll all collectively go to the same statistic count. Once youve logged in, a small W will appear in your system tray, thats it, your set up!
### Installation of WhatPulse on Linux ###
The official website offer on the [download page][3] a generic version distributed via a .tar.gz archive (available for 32 and 64 bit) and a debian package.
Personally Ive installed the debian package on my Mint Qiana and the [Aur Package][4] on My Arch Linux, no problems at all.
If you want to go with the generic installation please keep in mind that WhatPulse requires several libraries to function. Mainly Qt, because WhatPulse is built on Qt. Heres a list of requirements:
- libQtCore
- libQtWebKit
- libqt4-sql
- libqt4-sql-sqlite
- openssl-devel (libssl-dev)
- libQtScript
#### Input Statistics ####
The client needs permissions to be allowed to read your keyboard/mouse input. Run the included interactive .sh script to set up these permissions.
#### [Network][5] Statistics ####
To enable the network measurements, you also need the package **libpcap** to allow WhatPulse to hook into the network traffic. If WhatPulse does not find libpcap, it will run but it will not display any network statistics.
![](http://cdn.linuxaria.com/wp-content/uploads/2014/08/heatmap.png)
### Using the Application ###
By default WhatPulse will start automatically at the login of your graphical session and clicking on the W on your systray youll go to the Overview tab that gives a birds-eye view of all the different information gathered about your machine, for instance, the Linux version installed on your PC, processor model, RAM, GPU, total click counts, keystrokes and bandwidth usage. Clicking Pulse under these information will upload the gathered data to the main server.
Its also possible to select when automatically Pulse the data to the server, such as every 50.000 clicks or 1 GB downloaded.
For further details, you can switch to each categorys pertaining tab. For example, the Input tab shows you the amount of key strokes and clicks your PC has registered during a certain time period. The time period can be sorted on a daily, weekly, monthly, yearly and all-time basis. The all setting will show stats since the program was installed.
Below the keystrokes, youll find the keyboard heat map, which basically uses light and warm colors to shows what keys were used more than others during the selected time period, as shown in the screenshot above. Below that, the app displays the total amount of clicks registered in the selected period.
Under the Network tab, its possible to view the daily Internet usage. The application can monitor bandwidth usage of all the network devices, and even shows you bandwidth usage by country. Once again, you can navigate between available data using the arrow buttons at the top-right.
On the website youll see the sum of all your computer statistics with the same information available on the client.
Disclaimer: The link above to the WhatPulse website contains my referral link, using it when you register will give me a premium account for some time.
--------------------------------------------------------------------------------
via: http://linuxaria.com/recensioni/check-how-much-do-you-type-with-whatpulse-on-linux
作者:[linuxari][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:https://plus.google.com/100563597940685405833?rel=author
[1]:http://whatpulse.org/ref/833872/
[2]:http://linuxaria.com/article/tool-command-line-bandwidth-linux
[3]:http://www.whatpulse.org/downloads/
[4]:https://aur.archlinux.org/packages/whatpulse/
[5]:http://linuxaria.com/tag/network

View File

@ -0,0 +1,92 @@
How to Image and Clone Hard Drives with Clonezilla
================================================================================
![Figure 1: Creating a partition on the USB stick for Clonezilla.](http://www.linux.com/images/stories/41373/fig-1-gparted.jpeg)
Figure 1: Creating a partition on the USB stick for Clonezilla.
Clonezilla is a partition and disk cloning application for Linux, Free-, Net-, and OpenBSD, Mac OS X, Windows, and Minix. It supports all the major filesystems including EXT, NTFS, FAT, XFS, JFS, and Btrfs, LVM2, and VMWare's enterprise clustering filesystems VMFS3 and VMFS5. Clonezilla supports 32- and 64-bit systems, both legacy and UEFI BIOS, and both MBR and GPT partition tables. It's a good tool for backing up a complete Windows system with all of your installed applications, and I like it for making copies of Linux test systems so that I can trash them with mad experiments and then quickly restore them.
Clonezilla can also copy unsupported filesystems with the dd command, which copies blocks rather than files, so it doesn't need to understand filesystems. So, the short story is Clonezilla can copy anything. (A quick note on blocks: disk sectors are the smallest addressable storage units on hard disks, and blocks are logical data structures made up of single or multiple sectors.)
Clonezilla comes in two versions: Clonezilla Live and Clonezilla Server Edition (SE). Clonezilla live is ace for cloning single computers to a local storage device or network share. Clonezilla SE is for larger deployments, and fast multicast cloning an entire network of PCs at once. Clonezilla SE is a wonderful bit of software that we shall cover in the future. Today we shall create a Clonezilla Live USB stick, clone something, and restore it.
### Clonezilla and Tuxboot ###
When you visit the download page you'll see [Stable and Alternative Stable releases][1]. There are also Testing releases, which I recommend if you're interested in helping to improve Clonezilla. Stable is based on Debian and includes no non-Free software. Alternative Stable is based on Ubuntu, includes some non-Free firmwares, and it supports UEFI Secure Boot.
After you [download Clonezilla][2], install [Tuxboot][3] to copy Clonezilla to a USB stick. Tuxboot is a modification of Unetbootin that supports Clonezilla; you can't use Unetbootin because it won't work. Installing Tuxboot is a bit of pain, though Ubuntu users can install Tuxboot the easy way from a personal packages archive (PPA):
$ sudo apt-add-repository ppa:thomas.tsai/ubuntu-tuxboot
$ sudo apt-get update
$ sudo apt-get install tuxboot
If you're not running Ubuntu and your Linux distribution doesn't include a packaged version of Tuxboot, [download the source tarball][4] and follow the instructions in the README.txt file to compile and install it.
Once you get Tuxboot installed, use it to create your nice live bootable Clonezilla USB stick. First create a FAT32 partition of at least 200 megabytes; figure 1 (above) shows how it's done in GParted. I like to use labels, like "clonezilla", so I know what it is. This example shows a 2GB stick formatted as a single partition.
Then fire up Tuxboot (figure 2). Check "Pre-downloaded" and click the button with the ellipsis to select your Clonezilla file. It should find your USB stick automatically, and you should check the partition number to make sure it found the right one. In my example that is /dev/sdd1. Click OK, and when it's finished click Exit. It asks you if you want to reboot now, but don't worry because it won't. Now you have a nice portable Clonezilla USB stick you can use almost anywhere.
![Figure 2: Fire up Tuxboot.](http://www.linux.com/images/stories/41373/fig-2-tuxboot.jpeg)
Figure 2: Fire up Tuxboot.
### Creating a Drive Image ###
Boot up your Clonezilla USB stick on the computer that you want to backup, and the first thing you'll see is a normal-looking boot menu. Boot to the default entry. You'll be asked language and keyboard questions, and when you arrive at the Start Clonezilla menu select Start Clonezilla. In the next menu select device_image, then go to the next screen.
This screen is a little confusing, with options for local_dev, ssh_server, samba_server, and nfs_server. This is where you select the location for your backup image to be copied to. The size of your destination partition or drive must be the same size or larger than the volume you're copying. If you choose local_dev, then you'll need a local partition with enough room to store your image. An attached USB hard drive is a nice fast and easy option. If you choose any of the server options you'll need a wired Ethernet connection, the IP address of your server, and your login. I'll use a local partition, which means selecting local_dev.
When you select local_dev Clonezilla scans all of your locally-attached storage, including hard disks and USB storage devices, and makes a list of your partitions. Select the one you want to store your new image in, and then it asks which directory to use and shows you a list. Select your desired directory, and the next screen shows all of your mounts and used/available space. Press Enter, and the next screen gives you the option of Beginner or Expert mode. I choose Beginner.
In the next screen you can choose savedisk, which creates an image of an entire hard disk, or save_parts, which allows you to select individual partitions. I want to select partitions.
The next screen asks for a name for your new image. After accepting the default or entering your own name, go to the next screen. Clonezilla scans your partitions and creates a checklist so you can pick the ones you want to copy. After making your selections, the next screen gives you the option to do a filesystem check and repair. I'm impatient, so I skip this part.
The next screen asks if you want Clonezilla to check your newly-created image to make sure it is restorable. I always say yes. Next, it gives you a command-line hint in case you ever want to use the command-line instead of the GUI, and you must press Enter again. You get one more confirmation, and then type y for Yes to make the copy.
You get to watch a nice red, white, and blue progress screen while Clonezilla creates your new image (figure 3).
![Figure 3: Watch the creation of your new image.](http://www.linux.com/images/stories/41373/fig-3-export.jpeg)
Figure 3: Watch the creation of your new image.
When it's all finished press Enter and then select reboot, and remember to remove your Clonezilla USB stick. Boot up your computer normally, and go look at your nice new Clonezilla image. You should see something like this:
$ ls -l /2014-08-07-11-img/
total 1241448
-rw-r--r-- 1 root root 1223 Aug 7 04:22 blkdev.list
-rw-r--r-- 1 root root 636 Aug 7 04:22 blkid.list
-rw-r--r-- 1 root root 3658 Aug 7 04:24 clonezilla-img
-rw-r--r-- 1 root root 12379 Aug 7 04:24 Info-dmi.txt
-rw-r--r-- 1 root root 22685 Aug 7 04:24 Info-lshw.txt
-rw-r--r-- 1 root root 3652 Aug 7 04:24 Info-lspci.txt
-rw-r--r-- 1 root root 171 Aug 7 04:24 Info-packages.txt
-rw-r--r-- 1 root root 86 Aug 7 04:24 Info-saved-by-cmd.txt
-rw-r--r-- 1 root root 5 Aug 7 04:24 parts
-rw------- 1 root root 1270096769 Aug 7 04:24 sda6.ext4-ptcl-img.gz.aa
-rw-r--r-- 1 root root 37 Aug 7 04:22 sda-chs.sf
-rw-r--r-- 1 root root 1048064 Aug 7 04:22 sda-hidden-data-after-mbr
-rw-r--r-- 1 root root 512 Aug 7 04:22 sda-mbr
-rw-r--r-- 1 root root 750 Aug 7 04:22 sda-pt.parted
-rw-r--r-- 1 root root 625 Aug 7 04:22 sda-pt.parted.compact
-rw-r--r-- 1 root root 514 Aug 7 04:22 sda-pt.sf
### Restoring a Clonezilla Image ###
Restoring your image is similar to creating it. Again, boot up Clonezilla, go through the same initial steps, select dev_image, and then on the local_dev screen select the location of your image that you want to restore, whether it's on a local device or network share. Then continue through the rest of the screens, making sure that you have the correct restore image and target locations selected.
You can learn more of Clonezilla's amazing powers at the [Clonezilla Live Documentation page][5].
--------------------------------------------------------------------------------
via: http://www.linux.com/learn/tutorials/783416-how-to-image-and-clone-hard-drives-with-clonezilla
作者:[Carla Schroder][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.linux.com/community/forums/person/3734
[1]:http://www.linux.com/learn/tutorials/783416-how-to-image-and-clone-hard-drives-with-clonezilla#57_why_ubuntu_based_clonezilla_live.faq
[2]:http://clonezilla.org/downloads.php
[3]:http://tuxboot.sourceforge.net/
[4]:http://sourceforge.net/projects/tuxboot/files/
[5]:http://clonezilla.org/clonezilla-live-doc.php

View File

@ -0,0 +1,146 @@
How to improve your productivity in terminal environment with Tmux
================================================================================
The introduction of the mouse was a wonderful innovation in making computers more accessible to average people. But for programmers and sysadmins, moving our hands off the keyboard while working on a computer can be distracting.
As a sysadmin, I spend most of the time working in the terminal environment. Opening tabs and moving around windows through multiple terminals slows me down, and I just can't waste any second when something is going really wrong with my server.
![](https://farm6.staticflickr.com/5563/14853747084_e14cf18e8f_z.jpg)
[Tmux][1] is one of those tools that are essential for my daily work. With Tmux, I can create complex development environments, and have SSH connections side by side. I can create multiple windows, split panes, attach and detach sessions, etc. After mastering Tmux, you will throw out your mouse away ( just kidding don't do it :D ).
Tmux (short for "Terminal Multiplexer") lets us launch multiple terminals in a flexible layout on a single screen, so that we can work with them side by side. For example, on one pane we can edit some config files with Vim, while on the other we are using irssi to chat and on other pane, tailing some logs. Then open another window to update your system, and another to SSH to some servers. Navigating through them is just as easy as creating all these windows and panes. It is perfectly configurable and customizable so it can become an extension of your mind.
### Install Tmux on Linux/OSX ###
You can install Tmux by compiling it from sources or via your operating system package manager. I recommend you to use a package manager. It's faster and easier than compiling.
#### OSX: ####
# sudo brew install tmux
# sudo port install tmux
#### Debian/Ubuntu: ####
$ sudo apt-get install tmux
RHEL/CentOS/Fedora (RHEL/CentOS require [EPEL repo][2]):
$ sudo yum install tmux
Archlinux:
$ sudo pacman -S tmux
### Working with Different Sessions ###
The best way to use Tmux is working with sessions, so that you can organize your tasks and applications into different sessions the way you want. If you need to change a session, whatever runs inside the session won't stop or get killed. Let's see how it works.
Let's start a new session named "session", and run top command in it.
$ tmux new -s new session
$ top
then type **CTRL-b d** to detach from this session. To re-attach to it:
$ tmux attach-session -t session
And you will see top still running in the re-attached session.
Some commands to manage sessions:
$ tmux list-session
$ tmux new-session <session-name>
$ tmux attach-session -t <session-name>
$ tmux rename-session -t <session-name>
$ tmux choose-session -t <session-name>
$ tmux kill-session -t <session-name>
### Working with Different Windows ###
Often you will need to run multiple commands and perform different tasks in a session. We can organize all of them on multiple windows in one session. A window can be seen as a tab on modern GUI terminal (such iTerm, or Konsole). After configuring our default environment in a session, we will be able to create as many windows as we would need within the same session. Windows, like our apps running in sessions, persist when we detach from the current session. Let's check out an example:
$ tmux new -s my_session
![](https://farm6.staticflickr.com/5583/14853747014_442b3742fa_z.jpg)
Press **CTRL-b c**
This will create a new window and move focus into it. Now you can start up another application in the new window. You can write down the name of your current window. In this case I was running top so that's the window's name.
To rename it just type:
**CTRL-b** ,
The status bar changes to let you rename the current window.
![](https://farm6.staticflickr.com/5579/14855868482_d52516a357_z.jpg)
Once we create multiple windows in a session, we need a way to move through them. Windows are organized as an array, so every window has a number starting at 0. To jump quickly to other windows:
**CTRL-b <window number>**
If we have named our windows, we can look for them with:
**CTRL-b f**
and to list all windows:
**CTRL-b w**
and to move to a different window one by one:
**CTRL-b n** (go to the next window)
**CTRL-b p** (go to the previous window)
To leave a window, just type exit or:
**CTRL-b &**
You have to confirm if you want to kill off the window.
### Splitting a Window into Panes ###
Sometimes you need to type in your editor and check a log at the same time, and having your editor and tail side by side is really useful. With Tmux, we can divide a window into multiple panes. So for example, we can create a dashboard to monitor our servers and a complex development environment with the editor, the compiler and debugger running together side by side.
Let's create another Tmux session to work with panes. First let's detach from any Tmux session in case we are in a running session.
**CTRL-b d**
Start a new session named "panes".
$ tmux new -s panes
You can split a window horizontally or vertically. Let's start horizontally by pressing:
**CTRL-b** "
Now you have two new panes. Now vertically by pressing:
**CTRL-b** %
and now two more:
![](https://farm4.staticflickr.com/3881/14669677417_bc1bdce255_z.jpg)
To move through them:
**CTRL-b <Arrow keys>**
### Conclusion ###
I hope this tutorial has been helpful to you. As a bonus, tools such as [Tmuxinator][3] or [Tmuxifier][4] can streamline the process of creating and loading Tmux sessions, windows and panes, so that you can configure Tmux easily. Check them out if you haven't.
--------------------------------------------------------------------------------
via: http://xmodulo.com/2014/08/improve-productivity-terminal-environment-tmux.html
作者:[Christopher Valerio][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/valerio
[1]:http://tmux.sourceforge.net/
[2]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html
[3]:https://github.com/tmuxinator/tmuxinator
[4]:https://github.com/jimeh/tmuxifier