With the rise of containers and virtual machines, some system administrators have been neglecting their system logs. That’s a mistake.
Even if your containerized applications spin up and down several times an hour, you still need to keep and analyze logs. To find the root cause of a failure or to track down a system attack, you must be able to review what happened, when it happened, and what components of your software and hardware stack were affected. Otherwise, you’ll waste time looking for problems in the wrong place — time that you don’t have to spare in an emergency. Or, worse still, you may miss hidden issues such as performance problems, security violations, or costly use of system resources.
Without system logs, you’re not administering a system; you’re running a black box and hoping for the best. That’s no way to run servers, whether they are physical, virtual, or containerized.
So, here are some of the basics to keep in mind as you approach server logging in the 21st century. These are all practices that I either use myself or picked up from other sysadmins, including many from the invaluable Reddit/sysadmin group.
Linux manages hardware peripherals using kernel modules. Here’s how that works.
A running Linux kernel is one of those things you don’t want to upset. After all, the kernel is the software that drives everything your computer does. Considering how many details have to be simultaneously managed on a live system, it’s better to leave the kernel to do its job with as few distractions as possible. But if it’s impossible to make even small changes to the compute environment without rebooting the whole system, then plugging in a new webcam or printer could cause a painful disruption to your workflow. Having to reboot each time you add a device to get the system to recognize it is hardly efficient.
To create an effective balance between the opposing virtues of stability and usability, Linux isolates the kernel, but lets you add specific functionality on the fly through loadable kernel modules (LKMs). As shown in the figure below, you can think of a module as a piece of software that tells the kernel where to find a device and what to do with it. In turn, the kernel makes the device available to users and processes and oversees its operation.
Unlike most other IoT threats, malware can survive reboot.
A new threat which targets a range of routers and network-attached storage (NAS) devices is capable of knocking out infected devices by rendering them unusable. The malware, known as VPNFilter, is unlike most other IoT threats because it is capable of maintaining a persistent presence on an infected device, even after a reboot. VPNFilter has a range of capabilities including spying on traffic being routed through the device. Its creators appear to have a particular interest in SCADA industrial control systems, creating a module which specifically intercepts Modbus SCADA communications.
While VPNFilter has spread widely, data from Symantec’s honeypots and sensors indicate that unlike other IoT threats such as Mirai, it does not appear to be scanning and indiscriminately attempting to infect every vulnerable device globally.
Q: What devices are known to be affected by VPNFilter?
A: To date, VPNFilter is known to be capable of infecting enterprise and small office/home office routers from Linksys, MikroTik, Netgear, and TP-Link, as well as QNAP network-attached storage (NAS) devices. These include:
Linksys E1200
Linksys E2500
Linksys WRVS4400N
Mikrotik RouterOS for Cloud Core Routers: Versions 1016, 1036, and 1072
Attempts to establish Linux as a gaming platform have failed time and time again, with Valve’s SteamOS being the latest high-profile casualty. Yet, Linux has emerged as a significant platform in the much smaller niche of retro gaming, especially on the Raspberry Pi. Atari has now re-emerged from the fog of gaming history with an Ubuntu-based Atari VCS gaming and media streaming console aimed at retro gamers.
In addition to games, the Atari VCS will also offer Internet access and optional voice control. With a Bluetooth keyboard and mouse, the system can be used as a standard Linux computer. The catch is that the already delayed systems won’t ship until July 2019.
Indiegogo deals
Shortly after appearing on Indiegogo this week, the Atari VCS vaulted over its $100,000 funding goal to hit $1.7 million and counting. Indiegogo packages that are discounted by $50 include a basic Atari VCS Onyx model that goes for $199 or $229 with a classic joystick. These are both Early Bird deals that expire June 4.
There is also a wood-paneled Collector’s Edition version that sells for $299 with a classic joystick or $339 with a modern game controller. Other deals, including a $319 package with both the joystick and modern controller, are available for the next month.
The Atari VCS was unveiled as the Ataribox last September. The new prototype looks the same, with a design borrowed from the circa-1977 Atari 2600, but with sleek, tapered edges.
The Ataribox was originally said to run a Linux stack on an AMD customized processor with Radeon Graphics technology. Some observers had hoped that the delay in launching the Indiegogo campaign meant that Atari would tap one of AMD’s new, gaming-friendly AMD Ryzen processors. However, it settled for one of AMD’s two-year old Bristol Ridge A1 chips with Radeon R7 graphics. This is overkill for most retro games, but, depending on the A1 model, may be too underpowered to attract developers thinking of porting more modern games.
Back in the ’70s and ’80s, Atari offered one of the largest game platforms around, combining a console with a large catalog of 2D titles. The company faded later under the onslaught of major 3D gaming consoles from Nintendo, Sony, and others, and its last console — the 1993 Jaguar — disappeared quickly. After filing for bankruptcy protection in 2013, Atari rebounded as a mobile games developer, and has licensed its name for the Blade Runner 2049 movie.
Features
Atari offers an Atari Vault library with more than 100 classic games in their original arcade and/or Atari 2600 formats. Next year, it will launch a new Atari VCS Store in partnership with “a leading industry partner to be announced shortly.”
By the launch date, Atari plans to have “new and exclusive” games for download or streaming, including “reimagined classic titles from Atari and other top developers,” as well as multi-player games. The Atari VCS Store will also offer video, music and other content. For now, Atari has listed 14 content partners.
The hardware is not open source, and the games will be protected with HDCP. However, the Ubuntu Linux stack based on Linux kernel 4.10 is open source, and includes a “customizable Linux UX.” A Linux “sandbox” will be available for developing or porting games and apps.
Developers can build games using any Linux compatible gaming engine, including Unity, Unreal Engine, and Gamemaker. Atari also says that “Linux-based games from Steam and other platforms that meet Atari VCS hardware specifications should work.” Developers must register with Atari, and the games must be pre-approved. Atari VCS Store will take an “industry-standard percentage” of the sale price.
Manufactured by Flex, the Atari VCS ships with 4GB DDR4 RAM, as well as 32GB eMMC and a microSD slot. The 14.5×5.3×1.6-inch system is further equipped with dual-band WiFi and Bluetooth 5.0, as well as HDMI 2.0, Gigabit Ethernet, and 4x USB 3.0 ports. A 4-mic array supports voice commands, and the system is compatible with typical Bluetooth and USB controllers in addition to Atari’s Bluetooth-connected joystick and controller.
The platform will offer live streaming using Twitch.tv and will support cross-game chat using Skype and Discord. Optional cloud storage and other Internet services will be available via subscription.
Despite its Indiegogo success, there’s no guarantee the Atari VCS won’t go the way of the Steam Machine in the larger gaming market. However, the competition is less daunting in retro gaming, and the fact that at least 6,300 backers are willing to wait over a year for their Linux gaming box is promising indeed.
Artificial Intelligence (AI) has quickly evolved over the past few years and is changing the way we interact with the world around us. From digital assistants, to AI apps interpreting MRIs and operating self-driving cars, there has been significant momentum and interest in the potential for machine learning technologies applied to AI.
The Acumos AI Challenge, presented by AT&T and Tech Mahindra, is an open source developer competition seeking innovative, ground-breaking AI solutions from students, developers, and data scientists. We are awarding over $100,000 in prizes, including the chance for finalists to travel to San Francisco to pitch their solutions during the finals on September 11, 2018. Finalists will also have the chance to have their solutions featured in the Acumos Marketplace, exposure, and meetings with AT&T and Tech Mahindra executives.
Linux is a family of free, open source software operating systems built around the Linux kernel. Originally developed for personal computers based on the Intel x86 architecture, Linux has since been ported to more platforms than any other operating system. Thanks to the dominance of the Linux kernel-based Android OS on smartphones, Linux has the largest installed base of all general-purpose operating systems. Linux is also the leading operating system on servers and “big iron” systems such as mainframe computers, and it is the only OS used on TOP500supercomputers.
To tap this functionality, many enterprise companies have adopted servers with a high-powered variant of the Linux open source operating system. These are designed to handle the most demanding business application requirements, such as network and system administration, database management, and web services. Linux servers are often chosen over other server operating systems for their stability, security, and flexibility. Leading Linux server operating systems include CentOS, Debian, Ubuntu Server, Slackware, and Gentoo.
What features and benefits on an enterprise-grade Linux server should you consider for an enterprise workload?
Containerd integration is now generally available as a runtime option for the open source Kubernetes container orchestration system.
While Docker is the dominant player among container runtimes, some experts in the field believe other options such as containerd can sometimes be the better choice.
With that in mind, engineers from Google, Docker, IBM, ZTE and ZJU have developed a way to use containerd instead of Docker. While it may seem strange that Docker Inc. is involved what appears to be a competing project, the company actually initiated the containerd project before donating it to the community, and the Docker engine is based on it.
The backers of containerd describe it as an industry-standard container runtime with an emphasis on simplicity, robustness and portability.
Linux users have for many decades been using simple cp and mv commands to copy and rename files. These commands are some of the first that most of us learned and are used every day by possibly millions of people. But there are other techniques, handy variations, and another command for renaming files that offers some unique options.
First, let’s think about why might you want to copy a file. You might need the same file in another location or you might want a copy because you’re going to edit the file and want to be sure you have a handy backup just in case you need to revert to the original file. The obvious way to do that is to use a command like “cp myfile myfile-orig”.
The open-source project simplifies roll out and operation of container-based applications on Kubernetes.
Kubernetes may rule the data center but if you have hundreds and thousands of containers running on it, it can be difficult to understand which applications they belong to, who owns them, why they were created, what’s no longer in use and the impact of changes.
Enter Aptomi, an open-source project that simplifies roll out and operation of container-based applications on Kubernetes. It introduces a service-centric abstraction, allowing dev teams to compose applications from multiple components connected together. These components can be packaged via Helm, k8s YAMLs, ksonnet, or defined in any other Kubernetes-friendly way.
Learn how to use the Kate text editor in this tutorial from our archives.
The powerhouse Kate text editor has advanced search-and-replace, including support for escape sequences and regular expressions, so you can make complex corrections without leaving your document.
The Kate text editor is my favorite and has been my main workhorse for years. Kate has a lot of great features and is friendly to both touch-typing and pointy-clicky. It doesn’t quite have the eleventy-million features of Vim or Emacs, but then you don’t need the dexterity of a concert pianist to use it, either. I think it is the most user-friendly of the powerhouse text editors. Some of its noteworthy features are:
Configurable keyboard shortcuts
Zoom view (My dear friends with perfect vision, please think of us who are not so fortunate)
File > Open With, to open your document in any app you desire.
Bookmarks
Sessions
Word count
Integrated terminal
Excellent syntax highlighting
Plugins
Tabs
Projects
Code folding
Split views
Snippets, which is a multi-item clipboard
And a whole lot more excellent and useful features we don’t need to get bogged down in now. (You can read about some of them in Expert Tips and Tricks With Kate and Konsole.) Let’s get going with Kate’s wonderful search-and-replace.
Simple Searches
A quick way to launch a basic search is to highlight a word, and then Kate performs a case-insensitive search for all matching words and highlights them (Figure 1). You can highlight a word with your mouse cursor, or with your keyboard: place the cursor at the end of the word, and then press Shift+Ctrl+Left Arrow.
Figure 1: Kate highlights all matching words.
Navigate through your matches with the F3 key and press Shift+F3 to navigate backwards. You may also use Ctrl+H and Ctrl+Shift+H. If you don’t like the default keyboard shortcuts, go to Settings > Configure Shortcuts to change them. The highlight color and other colors are configured in Settings > Configure Kate > Fonts & Colors.
Ctrl+F opens a simple search form at the bottom, where you type your search term. Kate searches as you type, and highlights your search term in light green when it finds matches, and pink when it doesn’t. The default search is case-insensitive. Click the little button to the right with the “a” on it for a case-sensitive search. There are also little arrows for navigating your matches, and a button to open the search and replace bar (Figure 2).
Figure 2: The search and replace bar.
Search and Replace
Now we’re at the fun part. One of my regular tasks is cleaning up the horrid HTML created in documents by Drupal, LibreOffice Writer, and Microsoft Word. Here is a tiny snippet of the raw dreadfulness:
Figure 3: Raw text.
What IS all that gobbledygook? It’s as though our good friends Drupal et al. think every word needs its own special HTML tags. Kate helps me speed through deleting the junk with pleasing ease. I highlight one tag at a time and then delete it and all of its duplicates at once (Figure 4).
Highlight the text you want to delete and press Ctrl+R to open the search and replace form. To delete your search term, leave the Replace field blank, then click Replace to verify and delete each occurrence one at a time, or Replace All to nuke the whole lot. Kate tells you how many occurrences were deleted.
Sometimes I don’t need to delete the tags but just remove all the rubbish, and turn something like <p style="margin-bottom: 0in; line-height: 100%"> into a nice normal <p>.
Figure 4: Deleting all duplicates at once.
This is a great tool for inserting text, for example target="_blank" in URLs, so they look like this: <“https://example.com” target=”_blank”>example.com</a>. All I have to do is highlight ">, and then replace it with target="_blank"> (Figure 5).
Figure 5: Search and replace.
Another common task is replacing “smart” quotes, which really are not smart, with normal quotes.
Kate treats spaces as plain text, so you can replace double spaces with single spaces, or whatever numbers of spaces you want. To select the spaces you want to replace with the keyboard, position the cursor at the left of the spaces, and then press Shift+Ctrl+Left Arrow.
Kate is good at not making you do useless extra steps. Your text in the Find field is automatically replaced when you perform a new search, so you don’t have to manually clear it. When you want to manually clear it there is a nice “clear” button to the right, or use Ctrl+A and Ctrl+C. If you make a mistake, press Ctrl+Z to undo, or use the Undo button at the top.
Another slick time-saver is Kate saves your search history in the Find field, and you can navigate through it with the up and down arrows.
Using Escape Sequences
Note that there is a Mode dropdown menu beneath the Replace field with these options: Plain Text, Whole Words, Escape Sequences, and Regular Expressions. The default is Plain Text. This finds any match for your search term. Whole Words narrows your search to exact whole word matches. Escape Sequences are the standard C/C++ escape sequences.
Sometimes I get articles to edit that are already nicely formatted, but without line breaks between the paragraphs. Web browsers don’t care, but I do. Set the mode to Escape Sequences, find </p> and replace it with </p>n. This inserts a newline after every closing paragraph tag.
I haven’t found other escape sequences that are useful, but if you know of any please mention them in the comments.
Regular Expressions
You can really go nuts with using regular expressions for super-powered search and replace. Come back soon for a nice regular expression cheat sheet to help you on your way.
Search Other Files
When you click the Search and Replace button at the bottom, this opens the most advanced search form. (There is no default keyboard shortcut, so you can create your own.) This form searches all open documents, and other files (Figure 6).
Figure 6: Search all open files.
Too Much?
If you’re thinking this is a bewildering trove of riches, don’t worry about it. You’re not obligated to use every last bit of functionality, but rather use the bits that let you work the way you want to.