0

Episode 114 – Triskaidekaphilia or Peggy

Posted by Tony on December 15, 2013 in Show-mp3, Show-ogg |
Play

http://smlr.us

Downloads:

MP3 format (for Freedom Haters!)
OGG format (for Freedom Lovers!)
Total Running Time: 1:50:12

Un-edited Live session – http://youtu.be/-IPCVFDYThQ

Contact Us:

show (at) smlr.us or the Contact us page

Summary

Kernel News: Mat
Time:
Distro Talk: Tony
Time:
Tech News:
Time:
Toolbox
Time:
Security Bit
Time:
Listener Feedback
Time:
Outtro Music
Time:


Intro:

Tony Bemus, Mat Enders, and Mary Tomich
Sound bites by Mike Tanner

Kernel News: Mat

Time:
Release Candidate:
No rc

Mainline:
3.13-rc3

Stable Updates:
On Wed, 11 Dec 2013 22:50:45 PST
Greg Kroah-Hartman released kernel 3.4.74
With 29 files changed, 142 lines inserted, and 89 lines deleted

On Wed, 11 Dec 2013 22:51:20 PST
Greg Kroah-Hartman released kernel 3.10.24
With 74 files changed, 456 lines inserted, and 256 lines deleted

On Wed, 11 Dec 2013 22:51:52 PST
Greg Kroah-Hartman released kernel 3.12.5
With 84 files changed, 676 lines inserted, and 297 lines deleted

Kernel Developer Quote:
None


Distro Talk: Tony

Time:

Distrowatch.com

  • 12-07 – PCLinuxOS 2013.12
  • 12-10 – SparkyLinux 3.2 “LXDE”, “Ultra”, “Razor-qt”
  • 12-11 – Tails 0.22
  • 12-13 – MakuluLinux 4.0
  • 12-13 – GParted Live 0.17.0-1

Distro of the Week: Tony

  1. Debian – 1584
  2. Mageia – 1676
  3. Ubuntu – 1699
  4. PCLinuxOS – 2002
  5. Mint – 4157

Tech News:

Time:

 

FSF responds to Microsoft’s privacy and encryption announcement

https://www.fsf.org/news/fsf-responds-to-microsofts-privacy-and-encryption-announcement
http://www.theguardian.com/world/2013/sep/30/microsoft-privacy-chief-nsa
IBM’s losing ground with Unix — and Oracle may follow
http://www.infoworld.com/t/unix/ibms-losing-ground-unix-and-oracle-may-follow-232234

http://www.serverwatch.com/server-news/server-market-continues-to-decline-in-2013.html

EU warns Nokia not to become a “patent troll”

http://www.pcpro.co.uk/news/385906/eu-warns-nokia-not-to-become-a-patent-troll#ixzz2mzJbAk9Q

IBM will be bringing KVM Linux virtualization to Power in 2014
http://www.zdnet.com/ibm-will-be-bringing-kvm-linux-virtualization-to-power-in-2014-7000024039/

KDE Korner

Love and maintenance needed: Kaffeine

http://linuxgrandma.blogspot.com/2013/12/love-and-maintenance-needed-kaffeine.html

A brief history of Dolphin’s performance and memory usage

http://freininghaus.wordpress.com/2013/12/12/a-brief-history-of-dolphins-performance-and-memory-usage/

KShutdown

http://kde-apps.org/content/show.php/KShutdown?content=9754

 


The Toolbox

Time:
Using sar to monitor your system.

The sar utility collects on going performance statistics on your system to allow for troubleshooting when things go awry.

The systat package contains the sar utility, along with other useful utilities, this article is going to focus on the sar utility. You can use sar to monitor the following system information.

For the following:

Collective CPU usage
Individual CPU statistics
Memory used and available
Swap space used and available
Overall I/O activities of the system
Individual device I/O activities
Context switch statistics
Run queue and load average data
Network statistics
Get sar data from a specific time

First we have to install and configure the systat package, then set it up to monitor our system.

Installation:

yum install sysstat
(or)
apt-get install sysstat
(or)
Whatever method your prefered distribution uses to install software.

After installation you can run the command sar -V, that will tell you the version. The most recent stable version is 10.2.0 released on 11/03/2013. The version in fedora 19 is 10.1.5, and the version I am using in my examples is:

$ sar -V
sysstat version 9.0.4
(C) Sebastien Godard (sysstat orange.fr)

On:

$ cat /etc/redhat-release
CentOS release 6.4 (Final)

Now we have to set it up to gather statistics on an ongoing and regular basis. We do this with a cron job. You will nee to create a file in /etc/cron.d/ called sysstat. Below is a copy of the cron we use at work to run sar regularly.

$ vim /etc/cron.d/sysstat
# Run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib64/sa/sa1 1 1
# Generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib64/sa/sa2 -A

Under CentOS sa1 and sa2 live in /usr/lib64/sa/ if you are using another distribution or installing from source may different consult your documentation.

The first entry collects data every ten minutes, and writes it to a file in /var/log/sa/ called saXX where XX is the day of the month. This is a binary file and can not be viewed with a text editor. You can pass sa1 two parameters interval and count. In the above example we are collecting the sar data 1 time with a 1 second interval.

The second one runs in the 53rd minute of the 23rd hour of every day creating a daily summary of the sar data. The sa2 script creates the file sarXX in /var/log/sa/ where XX is the day of the month. This differs from the saXX file in that it is a plain ascii file and can be viewed in the text editor of your choice. It also deletes all sarXX files older than a week, so if you want those saved for historical research you would need another cron to rotate them to another directory.

There are two ways of running sar. You can invoke sar with any options you want without specifying a saXX. It will then parse through the current days file to generate its answer. If however you specify an historical file, by adding “-f /var/log/sa/saXX” at the end, it will generate stats for that particular day.

Now let’s look at the first line sar will always output, it will something like this, yours will be slightly different as you are running it on a different machine.

Linux 2.6.32-358.18.1.el6.x86_64 (foo.com) 12/11/2013 _x86_64_ (16 CPU)

Let’s break that down:

Linux 2.6.32-358.18.1.el6.x86_64 – Linux kernel version of the machine
(foo.com) – The hostname of the machine where the sar data was collected
12/11/2013 – The date when the sar data was collected
_x86_64_ – The machines architecture
(16 CPU) – The CPUs available, on machines with multiple cores, this is total number of cores

Now lets look at some examples of the kinds of stats you can generate with sar.

First up we have some processor information:

sar -u 1 3
Linux 2.6.32-358.18.1.el6.x86_64 (foo.com) 12/11/2013 _x86_64_ (16 CPU)

06:41:11 AM CPU %user %nice %system %iowait %steal %idle
06:41:12 AM all 3.19 0.00 0.13 0.00 0.00 96.69
06:41:13 AM all 0.00 0.00 0.12 0.00 0.00 99.88
06:41:14 AM all 0.00 0.00 0.06 0.00 0.00 99.94
Average: all 1.06 0.00 0.10 0.00 0.00 98.83

The “-u” is supposed to display cpu information however I can not find a machine or version that does not display the same information with “sar” or “sar -u”. The only time I find the “-u” flag necessary is when using the additional “ALL” flag. Just in case it is me I will continue to use the -u when getting cpu info.

To get statistics on the individual cpus in the machine use the “-P” flag, in conjunction with the “ALL” flag it will generate statistics for all of the processors individually.

sar -P ALL 1 1
Linux 2.6.32-358.18.1.el6.x86_64 (foo.com) 12/11/2013 _x86_64_ (16 CPU)

07:19:01 AM CPU %user %nice %system %iowait %steal %idle
07:19:02 AM all 2.25 0.00 1.63 0.00 0.00 96.12
07:19:02 AM 0 7.14 0.00 1.02 0.00 0.00 91.84
07:19:02 AM 1 1.00 0.00 1.00 0.00 0.00 98.00
07:19:02 AM 2 5.94 0.00 1.98 0.00 0.00 92.08
07:19:02 AM 3 0.00 0.00 0.00 0.00 0.00 100.00
07:19:02 AM 12 2.00 0.00 6.00 0.00 0.00 92.00
07:19:02 AM 13 1.01 0.00 4.04 0.00 0.00 94.95
07:19:02 AM 14 0.00 0.00 0.00 0.00 0.00 100.00
07:19:02 AM 15 0.00 0.00 0.99 0.00 0.00 99.01

Average: CPU %user %nice %system %iowait %steal %idle
Average: all 2.25 0.00 1.63 0.00 0.00 96.12
Average: 0 7.14 0.00 1.02 0.00 0.00 91.84
Average: 1 1.00 0.00 1.00 0.00 0.00 98.00
Average: 2 5.94 0.00 1.98 0.00 0.00 92.08
Average: 3 0.00 0.00 0.00 0.00 0.00 100.00
Average: 12 2.00 0.00 6.00 0.00 0.00 92.00
Average: 13 1.01 0.00 4.04 0.00 0.00 94.95
Average: 14 0.00 0.00 0.00 0.00 0.00 100.00
Average: 15 0.00 0.00 0.99 0.00 0.00 99.01

The machine I am using for my examples has 16 cores so I am chopping out the middle 8 to make it easier to read. You can also get the the stats for an individual processor by us a number between 0 and the total number of cores instead of the “ALL” flag. Like so:

$ sar -P 1 1 1
Linux 2.6.32-358.18.1.el6.x86_64 (foo.com) 12/11/2013 _x86_64_ (16 CPU)

07:34:13 AM CPU %user %nice %system %iowait %steal %idle
07:34:14 AM 1 42.00 0.00 1.00 0.00 0.00 57.00
Average: 1 42.00 0.00 1.00 0.00 0.00 57.00

This give us the statistics for the 2nd cpu because we start counting at 0. When using “-P” you must use either “ALL” or an individual processors number.

The next one generates memory stats:

$ sar -r 1 3
Linux 2.6.32-358.18.1.el6.x86_64 (foo.com) 12/11/2013 _x86_64_ (16 CPU)

09:46:39 AM kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit
09:46:40 AM 599380 23990452 97.56 604708 13464868 10141416 38.00
09:46:41 AM 606912 23982920 97.53 604708 13464964 10133224 37.97
09:46:42 AM 607064 23982768 97.53 604708 13464968 10133224 37.97
Average: 604452 23985380 97.54 604708 13464933 10135955 37.98

All of the columns here are pretty self explanatory, except the two commit columns. They represent the amount of memory needed for the currently running processes.

Then we look at the stats for swap:

$ sar -S 1 3
Linux 2.6.32-358.18.1.el6.x86_64 (sip4-237.nexcess.net) 12/12/2013 _x86_64_ (16 CPU)

01:57:10 AM kbswpfree kbswpused %swpused kbswpcad %swpcad
01:57:11 AM 1821512 275632 13.14 15340 5.57
01:57:12 AM 1821512 275632 13.14 15340 5.57
01:57:13 AM 1821512 275632 13.14 15340 5.57
Average: 1821512 275632 13.14 15340 5.57

If “kbswpused” and “%swpused” are both at 0, then your system is not swapping.

For additional memory information you can use the following:

sar -R to identify number of memory pages freed, used, and cached per second by the system.
sar -H to identify the hugepages (in KB) that are used and available. (not available before 9.1.6)
sar -B to generate paging statistics. i.e Number of KB paged in (and out) from disk per second.
sar -W to generate page swap statistics. i.e Page swap in (and out) per second.

Now how about some IO stats

$ sar -b 1 3
Linux 2.6.32-358.18.1.el6.x86_64 (foo.com) 12/12/2013 _x86_64_ (16 CPU)

11:12:51 PM tps rtps wtps bread/s bwrtn/s
11:12:52 PM 0.00 0.00 0.00 0.00 0.00
11:12:53 PM 4.00 0.00 4.00 0.00 96.00
11:12:54 PM 10.10 0.00 10.10 0.00 153.54
Average: 4.68 0.00 4.68 0.00 82.94

This is what the fields mean:

tps – Total transactions per second (sum of both reads and writes)
rtps – Read transactions per second
wtps – Write transactions per second
bread/s – Bytes read per second
bwrtn/s – Bytes written per second

You can use “sar -v” to show the number of inode handlers, file handlers, and pseudo-terminals in use by the system

Now let’s look at the run queue and load average:

$ sar -q 1 3
Linux 2.6.32-358.18.1.el6.x86_64 (sip4-237.nexcess.net) 12/13/2013 _x86_64_ (16 CPU)

12:20:57 AM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
12:20:58 AM 2 735 1.17 1.17 1.09
12:20:59 AM 3 735 1.17 1.17 1.09
12:21:00 AM 2 735 1.15 1.17 1.09
Average: 2 735 1.16 1.17 1.09

And lastly when looking at the historic data you can specify a start time with the “-s hh:mi:ss”

To show the load average on the 10th day of the month from 10 a.m, use the -q and -s option as shown below.

$ sar -q -f /var/log/sa/sa10 -s 10:00:01

While there is not an option to set the end-time. You can accomplish this with the use of the “head” command. Like this, starting at 10 a.m, now say you want to see the first 7 entries, you would pipe to this command “head -n 10″. You have to use 10 to see the top 7 because the first line is the system informational line, the second one is blank , and the third one is the headers.

$ sar -q -f /var/log/sa/sa10 -s 10:00:01 | head -n 10
Linux 2.6.32-358.18.1.el6.x86_64 (foo.com) 12/10/2013 _x86_64_ (16 CPU)

10:00:01 AM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
10:10:01 AM 4 744 1.17 1.23 1.06
10:20:01 AM 4 750 1.00 1.25 1.15
10:30:01 AM 6 745 1.51 1.46 1.26
10:40:01 AM 4 760 0.76 1.13 1.20
10:50:01 AM 10 857 4.26 3.23 2.25
11:00:01 AM 5 792 1.97 2.28 2.21
11:10:01 AM 3 746 0.67 1.36 1.83


The Security Bit

Time:

Snapshot
Wickr – secure messenger on android – https://www.mywickr.com
Twitter to start using Perfect Forward Secrecy
https://blog.twitter.com/2013/forward-secrecy-at-twitter-0


Listener Feedback:

show (at) smlr.us or 313-626-9140
Time:


Outtro Music

Time:
Disk Read Error By Ewan Dobson
http://www.youtube.com/watch?v=IXrYOM0VSKI

This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2011-2014 Sunday Morning Linux Review All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.2.4.1, from BuyNowShop.com.