• Complain

Chris Binnie - Practical Linux Topics

Here you can read online Chris Binnie - Practical Linux Topics full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2016, publisher: Apress, Berkeley, CA, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Chris Binnie Practical Linux Topics
  • Book:
    Practical Linux Topics
  • Author:
  • Publisher:
    Apress, Berkeley, CA
  • Genre:
  • Year:
    2016
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Practical Linux Topics: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Practical Linux Topics" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Teaches you how to improve your hands?-on knowledge of Linux using challenging, real-world scenarios. Each chapter explores a topic that has been chosen specifically to demonstrate how to enhance your base Linux system, and resolve important issues. This book enables sysadmins, DevOps engineers, developers, and other technical professionals to make full use of Linux?s rocksteady foundation. Explore specific topics in networking, e?mail, filesystems, encryption, system monitoring, security, servers, and more-- including systemd and GPG. Understand salient security concerns and how to mitigate them. Applicable to almost all Linux flavors--Debian, Red Hat, Ubuntu, Linux Mint, CentOS--Power Linux Topics c an be used to reference other Unix-?type systems with little modification. Improve your practical know?-how and background knowledge on servers and workstations alike, increase your ability to troubleshoot and ultimately solve the daily challenges encountered by all professional Linux users. Empower your Linux skills by adding Power Linux Topics to your library today. What Youll Learn Solve a variety of challenges faced by sysadmins and DevOps engineers Understand the security implications of the actions you take Study the history behind some of the packages that you are using for a greater in-?depth understanding Become a professional at troubleshooting Extend your knowledge by learning about multiple OSs and third-party packages Who This Book Is For Having mastered the basics of running Linux systems this book takes you one step further to help you master the elements of Linux which you may have struggled with in the past. You have progressed past the basic stages of using Linux and want to delve into the more complex aspects. Practical Linux instantly offers answers to problematic scenarios and provides invaluable information for future reference. It is an invaluable addition to any Linux library. Read more...
Abstract: Teaches you how to improve your hands?-on knowledge of Linux using challenging, real-world scenarios. Each chapter explores a topic that has been chosen specifically to demonstrate how to enhance your base Linux system, and resolve important issues. This book enables sysadmins, DevOps engineers, developers, and other technical professionals to make full use of Linux?s rocksteady foundation. Explore specific topics in networking, e?mail, filesystems, encryption, system monitoring, security, servers, and more-- including systemd and GPG. Understand salient security concerns and how to mitigate them. Applicable to almost all Linux flavors--Debian, Red Hat, Ubuntu, Linux Mint, CentOS--Power Linux Topics c an be used to reference other Unix-?type systems with little modification. Improve your practical know?-how and background knowledge on servers and workstations alike, increase your ability to troubleshoot and ultimately solve the daily challenges encountered by all professional Linux users. Empower your Linux skills by adding Power Linux Topics to your library today. What Youll Learn Solve a variety of challenges faced by sysadmins and DevOps engineers Understand the security implications of the actions you take Study the history behind some of the packages that you are using for a greater in-?depth understanding Become a professional at troubleshooting Extend your knowledge by learning about multiple OSs and third-party packages Who This Book Is For Having mastered the basics of running Linux systems this book takes you one step further to help you master the elements of Linux which you may have struggled with in the past. You have progressed past the basic stages of using Linux and want to delve into the more complex aspects. Practical Linux instantly offers answers to problematic scenarios and provides invaluable information for future reference. It is an invaluable addition to any Linux library

Chris Binnie: author's other books


Who wrote Practical Linux Topics? Find out the surname, the name of the author of the book and a list of all author's works by series.

Practical Linux Topics — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Practical Linux Topics" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Chris Binnie 2016
Chris Binnie Practical Linux Topics 10.1007/978-1-4842-1772-6_1
1. Real-Time Network Statistics with Iftop
Chris Binnie 1
(1)
Edinburgh, UK
Monitoring network connections certainly can be frustrating, mainly because they can be established and then disappear within a matter of seconds. In this chapter, I show you how to achieve a Zen-like approach to monitoring network connections on your servers using a command linebased tool called iftop . I then finish by walking through the creation of a configuration file that you can use again on different servers once you have your monitoring set up as you prefer.
Monitoring Network Connections with netstat
The netstat command-line tool has been a staple among system admins. Although rich in features, including an auto-refresh parameter (continuous mode), netstat is certainly not designed to do much more than output raw numbers and names (from hosts and ports). To run netstat in continuous mode, for example, you can use:
# netstat -c
I usually end up running it alongside watch to give me the kind of clean screen refreshes I need for different scenarios; for example:
# watch -n2 "netstat -tu"
In this example, watch lets me configure a two-second gap prior to running the command again and updating its output (see Figure ).
Figure 1-1 The watch command executing netstat -tu every two seconds In - photo 1
Figure 1-1.
The watch command executing netstat -tu every two seconds
In this scenario, the -tu switch tells netstat to output both TCP and UDP statistics. Using the watch option is far slicker than the continuous -c parameter, because it adds information to the foot of the last output, although the output is still a little messy and difficult to follow. Incidentally, the following netstat command is the one I use the most:
# netstat tulpnc
In Figure , I ask netstat to show all local listening ports and then the processes that they belong to. However, lsof -i , a command concerned with listing open files, is probably more effective.
Figure 1-2 netstat output displays changing information by repeating the - photo 2
Figure 1-2.
netstat output displays changing information by repeating the output at the foot of the screen upon refresh
Introducing iftop
Thankfully, theres a utility that takes away painful eyestrain: iftop ( http://www.ex-parrot.com/pdw/iftop/ ). iftop is to networks what top is to CPUs. And, in the same way ifconfig refers to configuring an interface, the friendly iftop stands for interface top.
The main difference between iftop and other command linebased tools is that iftop instantly draws highly useful bar graphs (among other graphical options) and I cant emphasize enough how many times it has saved the day when diagnosing an urgent server or network issue.
The fact that theres no pained preamble with device drivers or libraries iftop just worksmakes all the difference when youre in a hurry. Its small footprint might also be helpful in diagnosing a customer server that doesnt have iftop installed: the tiny package can be easily dropped on a memory stick when the networking is broken on the problematic server.
Installing iftop
On Debian-based systems, you can install iftop with the following command:
# apt-get install iftop
On Red Hat derivatives, you can install the EPEL (Extra Packages for Enterprise Linux) RPM, using for example:
# rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
For older versions of the Red Hat family, you can follow the instructions at http://www.cyberciti.biz/faq/fedora-sl-centos-redhat6-enable-epel-repo/ .
You should then be able to install iftop as usual:
# yum install iftop
If you execute iftop with just an interface to examine, you can spawn it using the following command:
# iftop -i eth0
Figure shows a sample output of this command. The output shows a number of remote hosts (including nicknames added to the file /etc/hosts , as well as fully qualified domain names, which are really just normal hostnames that Ive abbreviated) in the middle column and the local machine named Sula in the left column.
Figure 1-3 The default iftop -i eth0 output listening to an interface enabled - photo 3
Figure 1-3.
The default iftop -i eth0 output listening to an interface enabled
On the right side, you can see three columns. The excellent iftop refers to this as its display order and the columns deal with different time-delay averages. By default, this appears (at least) to be two-second, ten-second, and forty-second averages. These values can be configured separately, so dont let that confuse you too much initially. In addition, its easy to change the overall display using those columns by pressing the 1, 2, or 3 keys to respectively filter by the aforementioned 2s, 10s, or 40s averages.
As an aside, a two-second average is really short; I love it having come from a background filled with what felt like lengthy five-minute SNMP averages. I can see very quickly whats just changed on the network and although two seconds isnt real-time, its very close to it and certainly has its place on todays busy Internet. I find that its just long enough for you to be able to spot something without worrying about freezing the screen in case you missed it.
When youre running the default config without specifying any options, iftop outputs the busiest hosts in the last ten seconds (in other words, by using a ten-second average). It also groups hosts in pairs to choose the busiest pair of combined inbound and outbound traffic.
Finally, at the end of the output, you are presented with a number of totals. These include useful statistics, such as the amount of data transferred in megabytes (MB) as well as forty-second averages of traffic, usually in megabits (Mb), but also sometimes in kb for kilobytes.
Controlling iftop from the Keyboard
In addition to providing a slick graphical display, even through an SSH terminal, iftop lets you modify your configuration at the press of a key. For example, in the course of a sysadmins work day, you could be checking all sorts of bad networking habits: from monitoring the misconfiguration of a network interface to mitigating a hideously hazardous ARP storm. With iftop , you can cycle through a number of options and confidently choose a config parameter to suit your current scenario instantly.
Here are some examples of how iftop can make your sysadmin life easier at the press of key:
  • To change the source and destination displays, press the s key or the d key while iftop is running. This helps isolate who is sending what, especially if iftop is being run on a Linux router (which Ill touch in Using iftop on Busy Routers later in this chapter) and forwarding traffic.
  • To quickly see which ports are in use, press the p key. You can also use the Shift+S and Shift+D keys to expose source and destination ports, respectively. Figure demonstrates how friendly iftop is with its options and how it dutifully reports, in the top-left of the screen, the result of the keypress that it has just received.
    Figure 1-4 This output shows all the ports that are visible and an option - photo 4
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Practical Linux Topics»

Look at similar books to Practical Linux Topics. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Practical Linux Topics»

Discussion, reviews of the book Practical Linux Topics and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.