Posts
Troubleshooting SSSD, realm, kerberos, and SSH
SSSD (System Security Services Daemon) allows Linux systems (specifically, Red Hat, CentOS, and Fedora) to verify identity and authenticate against remote resources. If you have a CentOS or Red Hat enterprise system, and you need to authenticate against a domain controller such as FreeIPA or Active Directory, SSSD is the way to go. I use SSSD on CentOS 7 systems, but it is now available on CentOS 6 as well. A few years ago, adclient (an open-source project from Centrify) was your only option to make a CentOS 6 server authenticate against Active Directory. adclient seems to have reached end of life, so SSSD is definitely the path forward. I won’t repeat the procedure for using Active Directory as an identity provider on a Red Hat 7 system. Instead, I want to provide a few troubleshooting tips, since limited information is available on SSSD and related tools.
ODEPACK: Numerical Solutions to ODEs
ODEPACK is a library for the numerical solution of systems of ordinary differential equations. It is written in Fortran 77, but can be accessed from C and C++ with only a little effort. The permanent home of ODEPACK is in the ODEPACK directory at netlib. Surprisingly, there are very few open-source libraries that perform the functions of ODEPACK.
A friendlier distribution of ODEPACK
https://github.com/cfinch/odepack
ODEPACK is distributed as fixed-format Fortran 77 source with plain text files offering documentation and examples. It is not the friendliest distribution, because there are no makefiles and even the examples are buried in commented-out sections of the solver source code. It seems that ODEPACK was designed to be used in source form, perhaps by copying relevant functions and pasting them into your own Fortran program, or compiling ODEPACK right into your program. In an effort to get ODEPACK running for my own use, I have developed a friendlier distribution. I created a Makefile that will compile ODEPACK as a shared library, using the Gnu compiler collection (gcc), and separated the demonstration code into a directory of standalone programs. I intended to make it publicly available…but I never did. Ask me if you want it!
LVM device-mapper: reload ioctl failed: Invalid argument
LVM2 (Logical Volume Management) is pretty amazing, but when something goes wrong, it’s not easy to troubleshoot. This is not the fault of the tools, but a reflection that LVM is relatively new in Linux, and not widely understood.
What I Tried to Do
I tried to increase the size of a logical volume with the lvextend command:
lvextend --extents 100%FREE /dev/VolumeGroup1/varThis form of the command is supposed to use all of the free space in the volume group.
GPG Public Key
For secure communication, please use this public key with a program such as GPG.
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFG/wr8BCADEHyfWln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DKVFd0xE76vDwG
LVZGhyobt81v8aFt0M+YqRUGvyt4pcJj53bfLQF2vK/mafTFiz+2mra4iWz4qsOC
cgOjxRl+qs2MDgmcZJyovZcJYfMAEQEAAYkCPgQYAQoACQUCUb/CvwIbLgEpCRBD
LppvS2eaH8BdIAQZAQoABgUCUb/CvwAKCRBXsWWtFiBEh/y5B/46B/8FtVRu3TW5
mLaZ0uI1L/GH1CbwnMWrGSoV6duzNio35ERrXLcjoEpyRyrjzR0RabicOedoBXA1
s0Jo9QqZipVIwd3EOpUEOB7eeEtyeEHrqmv9MrCNw/ikWCATrSDamt338TnxzFxs
rTEjL8N6/v61U9vfwwsxenyVXijMpBJMHpA8SkWs2O734FtMeHyvteSlqrVa6B+0
g9qNJegoqWGWIJeT01zElVY+JSaR+/ddv7Qg7DNA3M1X+lvgAa9/tqjcXfDsumDJ
TGaTOZPdLBLlV7JUu0FB9hKGOtKfClm0kX4+n5JXvFClw02wE+/Jvw57EhCiCs56
/upV7LVm+QsH/R2GOxEL1NUzWbRprl65o3siWiDQpDR9x9drJftwpMuHXGeZ5j9j
beBl4gXMqmfNHBg9xOD3Mdq0YpC/BE+LMytHleXNG6oQ9aYzmExcCfRMy9fF3pgJ
hkcHrv4LMUvfh7eRQ/24DO9TJKwFKEKged6VPFzd1AZRWq6VA7oBVVjaQ0dBnPv8
P3NeeizEkswQJ2eiL6nS5iXlxDKt4pTXLmiVIFaJpKM3wn0ynVM+5UKvTpIsQosk
ce77x7fVQvNFkeXKFMLcofKIOxIPSwp0b9f+t7YsDW9Fef7A6J9e1jseUabt2pqq
joE4qHsXUV2ZsL7kIKGg4vJMO1yeUntRsqk=
=Tl2n
-----END PGP PUBLIC KEY BLOCK-----Is it worthwhile to embed structured data in Web content?
Short answer: not really! A few years ago, I was fascinated with the idea of microformats. The concept is to add structural data to common HTML tags so that certain types of data on a web page can be clearly identified. Adding structural information makes it easier to automate the parsing and indexing of web content. The original microformats included common data sets that contain well-defined data, such as contact information or a calendar event. In the intervening years, microformats were replaced by microformats2, with additional draft standards for more items such as recipes, resumes, etc. I decided to use my resume as a “use case” for structured HTML data. My original plan was to use the h-resume draft specification from microformats2. I modified my plan when I realized that major search engines (Bing, Google, Yahoo! and Yandex) have decided to parse another semantic technology, microdata (microdata W3C spec). There is no point in creating semantic web pages if nobody is going to parse them, so I used the microdata specifications that are available at schema.org and placed them into an h-resume framework. I used the event class to represent each position I held or educational achievement, because the event class is the only one with start and end dates. Is it worth the effort to add structured data to HTML pages? Generally, no. Here’s why:
Monitoring with SNMP, Part 3: Automate active monitoring with Nagios
My last post showed how to monitor networked devices with SNMP. You could try to remember to manually check the status of things periodically, but that would be missing the point of computers. Instead, automate your monitoring with Nagios, a web-based monitoring tool for Linux that automates the process of actively querying devices and doing something with the information. Nagios is available as free open source software (Nagios Core), and the company offers additional non-free products with premium features. The open-source version is fine for getting started and setting up basic monitoring. Nagios does a lot more than just SNMP monitoring. I’ll refer you to the Nagios Core documentation to get Nagios up and running, and I’ll focus on how to set up Nagios to actively monitor devices with SNMP.
Monitoring with SNMP, Part 2: Command-line tools for active SNMP
In Part 1, I summarized the basic concepts of SNMP and defined the terms and acronyms used in this post. Now, I will show how to use SNMP to monitor actual devices. As an example, I will monitor an enterprise-grade uninterruptible power supply (UPS) and power distribution unit (PDUs) from Tripp-Lite. These devices have an SNMPWEBCARD installed to support communication over Ethernet. Command-line tools for SNMP communication should be available for any Linux distribution (or any other UNIX-derived OS). Documentation for the basic SNMP tools is available online. The challenge with SNMP is figuring out what parameters are supported by a particular device. Most devices support a set of standard OIDs that return basic information such as device name, uptime, etc.
Monitoring with SNMP, Part 1: Fundamentals of SNMP
SNMP is a protocol for conveying information and controlling devices over a network. SNMP can be used in two ways:
Active: a device sends a command to set a parameter or request information for another device Passive: a device sends an alert (called a trap) to another device, which is configured to receive traps and do something with the information.
The “payload” of an SNMP message is called an Object Identifier, or OID. An OID is an ordered list of non-negative numbers, such as:
"Exporting" a project from a Git repository
What do you do when you want to distribute or release source code that is stored in a Git repository? Obviously, if your target audience is using Git, you can just compress the directory that contains the repository and distribute the copies, or give the users a way to clone your repository (such as GitHub). However, your audience may not be Git users, or the hidden .git directory may be very large and you don’t want to distribute it. The solution is the git archive command, which packs the files from a tree-ish into an achive (ZIP or TAR). By “tree-ish”, they mean that you can specify a branch, commit, HEAD, etc. git archive is somewhat analagous to the svn export command. I find the most useful form of this command to be: cd example git archive --output ~/example.zip --format=zip --prefix=example/ HEAD Do not forget the trailing slash after the directory that you specify with the --prefix flag! REFERENCE: How to do a “git export” (like svn export)