Linux Journal

Microsoft Joins the Open Invention Network, NVIDIA Announces RAPIDS, Asterisk 16.0.0 Now Available, BlockScout Released and Security Advisory for Debian GNU/Linux 9 "Stretch"

3 months 1 week ago

News briefs for October 10, 2018.

Microsoft has joined the Open Invention Network (OIN), an open-source patent consortium. According to ZDNet, this means "Microsoft has essentially agreed to grant a royalty-free and unrestricted license to its entire patent portfolio to all other OIN members." OIN's CEO Keith Bergelt says "This is everything Microsoft has, and it covers everything related to older open-source technologies such as Android, the Linux kernel, and OpenStack; newer technologies such as LF Energy and HyperLedger, and their predecessor and successor versions."

NVIDIA has just announced RAPIDS, its open-source data analytics/machine learning platform, Phoronix reports. The project is "intended as an end-to-end solution for data science training pipelines on graphics processors", and NVIDIA "laims that RAPIDS can allow for machine learning training at up to 50x and is built atop CUDA for GPU acceleration".

The Asterisk Development Team announces that Asterisk 16.0.0 is now available. This version includes many security fixes, new features and tons of bug fixes. You can download it from here.

BlockScout, the first full-featured open-source Ethereum block explorer tool, was released yesterday by POA Network. The secure and easy-to-use tool "lets users search and explore transactions, addresses, and balances on the Ethereum, Ethereum Classic, and POA Network blockchains". And, because it's open source, anyone can "contribute to its development and customize the tool to suit their own needs".

Debian has published another security advisory for Debian GNU/Linux 9 "Stretch". According to Softpedia News, CVE-2018-15471 was "discovered by Google Project Zero's Felix Wilhelm in the hash handling of Linux kernel's xen-netback module, which could result in information leaks, privilege escalation, as well as denial of service". The patch also addresses CVE-2018-18021, a privilege escalation flaw. The Debian Project recommends that all users of GNU/Linux 9 "Stretch" update kernel packages to to version 4.9.110-3+deb9u6.

News Microsoft open source NVIDIA Machine Learning Asterisk BlockScout Ethereum Cryptocurrency Security Debian GNU/Linux
Jill Franklin

Creating the Concentration Game PAIRS with Bash, Part II

3 months 1 week ago
by Dave Taylor

Dave finishes up the PAIRS concentration game, only to realize it's too hard to solve!

In my last article, I tossed away my PC card and talked about how I was a fan of the British colonial-era writer Rudyard Kipling. With that in mind, I do appreciate that you're still reading my column.

I was discussing the memory game that the British spy plays with the orphan boy Kim in the book of the same name. The game in question involves Kim being shown a tray of stones of various shapes, sizes and colors. Then it's hidden, and he has to recite as many patterns as he can recall.

The card game Concentration is clearly inspired by the same pattern memorization game, and it's considerably easier to set up: shuffle a deck of cards, place them face down in a grid, then flip pairs to find matches. In the beginning, it's just guessing, of course, but as the game proceeds, it becomes more about spatial memory than luck. Someone with an eidetic memory always will win.

Using letters makes things easy, so I suggested a row, column, notational convention like this:

1 2 3 4 5 6 7 8 9 10 11 12 13 1: [-] [-] [-] [-] [-] [-] [-] [-] [-] [-] [-] [-] [-] 2: [-] [-] [-] [A] [-] [-] [-] [-] [-] [-] [-] [-] [-] 3: [-] [-] [-] [-] [-] [-] [-] [-] [E] [-] [-] [-] [-] 4: [-] [-] [-] [-] [-] [-] [-] [-] [-] [-] [-] [-] [Z]

You can represent uppercase letters as a shell array like this:

declare -a letters=(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)

Unfortunately, Bash doesn't support multidimensional arrays, so you're going to have to represent the grid as a one-dimensional array. It's not too hard though, because the grid is straightforward. Here's an index formula if firstvalue is the first digit and rest is the remainder of the index value:

index=$(( ( ( $firstvalue - 1 ) * 13 ) + $rest ))

The letter "E" in the above grid, at 3,9, would show up in the array as ((3-1)*13)+9 or slot 35.

Shuffle Those Values

The script from my last article already initializes everything in sequential order and defaults to 2 * 13 slots (for simplicity in debugging). The work of the script is really in the shuffle, but it turns out that there's a pretty elegant little shuffle algorithm (shown in a kind of sloppy C for illustrative purposes) floating around the internet that can be tapped for this task:

shuffle { for (i = n-1; i > 0; i-) { int j = rand() % (i+1); swap( array[i], array[j]); } }

Translating this into a shell script and using better variable names, here's what I created:

Go to Full Article
Dave Taylor

Redis Labs and the "Common Clause"

3 months 1 week ago

So, the short version is that with the recent licensing changes to several Redis Labs modules making them no longer free and open source, GNU/Linux distributions, such as Debian and Fedora, are no longer able to ship Redis Labs' versions of the affected modules to their users.

As a result, we have begun working together to create a set of module repositories forked from prior to the license change. We will maintain changes to these modules under their original open source licenses, applying only free and open fixes and updates.

We are committed to making these available under an open source license permanently, and welcome community involvement.

You can find more background info here:

Redis GoodFORM Debian Fedora licensing open source
Chris Lamb and Nathan Scott

New Open-Source GoodFORM Project, Made by Google 2018 Event Today, Asus Chromebook C423, HP Chromebook x360 14 and KDE Launches Plasma 5.14

3 months 1 week ago

News briefs for October 9, 2018.

Redis labs recently added the Commons Clause on top of the Redis open-source, in-memory data structure store, and now open-source developers are forking the code in a new project called GoodFORM. ZDNet quotes Debian project leader Chris Lamb and Fedora developer Nathan Scott's explanation for the need to fork the code: "With the recent licensing changes to several Redis Labs modules making them no longer free and open source, GNU/Linux distributions such as Debian and Fedora are no longer able to ship Redis Labs' versions of the affected modules to their users."

The Made by Google 2018 event kicks off today at 11am ET. 9To5Google reports the company is expected to announce the Pixel 3 and 3 XL, the Google Home Hub and the Google Pixel Slate. You can watch the Made by Google 2018 live event here.

Asus just announced its super-thin Chromebook C423. The company has not released any pricing info or availability date. According to Engadget, it will have a 14" screen, and you can choose between a full HD touchscreen or a non-touchscreen with a 1366x768 pixel resolution. You also will be able to install Android apps on it via Google Play.

And, HP yesterday announced the HP Chromebook x360 14, which is "HP's thinnest Chromebook convertible device" and is "designed make the most of the seamless integration of the Google and Chrome OS ecosystem". It will be available October 21st, starting at $599.

KDE today launched the first release of Plasma 5.14. This release has several new features and bug fixes. Much work went into improving the Discover software manager, a new Firmware Update feature was added and "many subtle user interface improvements give it a smoother feel". Download live images from here.

News Redis licensing Google Hardware Chromebooks HP Asus Android KDE Plasma
Jill Franklin

Linus' Behavior and the Kernel Development Community

3 months 1 week ago
by Zack Brown

WARNING: This article contains profanity.

On September 16, 2018, Linus Torvalds released the 4.19-rc4 version of the kernel, and he also announced he was taking a break from Linux development in order to consider his own behavior and to come up with a better approach to kernel development. This was partly inspired by his realization that he wasn't looking forward to the Kernel Summit event, and he said that "it wasn't actually funny or a good sign that I was hoping to just skip the yearly kernel summit entirely."

He also wrote that it was partly inspired when:

...people in our community confronted me about my lifetime of not understanding emotions. My flippant attacks in emails have been both unprofessional and uncalled for. Especially at times when I made it personal. In my quest for a better patch, this made sense to me. I know now this was not OK and I am truly sorry.

So he said, "I am going to take time off and get some assistance on how to understand people's emotions and respond appropriately."

He compared the situation to the kind of "pain points" the Linux kernel project has experienced on a technical level in the past, like moving from tarballs to BitKeeper, and from BitKeeper to git. And he remarked that "We haven't had that kind of pain-point in about a decade. But this week felt like that kind of pain point to me."

He also added, by way of clarification, that "This is not some kind of 'I'm burnt out, I need to just go away' break. I'm not feeling like I don't want to continue maintaining Linux. Quite the reverse. I very much *do* want to continue to do this project that I've been working on for almost three decades."

That was the last post Linus sent to the mailing list, up to the time of this writing. However, he and several other kernel developers signed off on a patch to the kernel tree, incorporating a new code of conduct policy. It's fairly boilerplate—basically, don't be mean, don't discriminate, violations will be investigated, and appropriate measures taken.

It's not a new idea. Long ago, Richard Stallman used to troll the mailing list trying to start an argument about "Linux" vs. "GNU/Linux", until the mailing list maintainers threatened to ban him if he kept it up. They phrased it as a general rule, not unlike a code of conduct.

There's been a wide range of responses to Linus' announcement and to the code of conduct itself. Some felt that Linus' earlier behavior had been community-strengthening, encouraging people to respond as equals and duke it out with Linus on the issues they cared about.

Some felt that Linus was taking a really wonderful step, seeking feedback and reflecting on the issues, and they in turn offered their own insights and assistance.

Go to Full Article
Zack Brown

Linux 4.19-rc7 Released, Calculate Linux Version 18 Announced, Linux Code of Conduct Patches, Emmabuntus Debian Edition 2 1.03 Now Available and Several Improvements to the KDE Software Stack

3 months 2 weeks ago

News briefs from October 8, 2018.

Linux 4.19-rc7 was released yesterday. Greg KH says it's a bigger release than rc6 was, with networking fixes and lots of driver subsystem fixes. It also looks like there will be an -rc8 next week "just to be sure 4.19 is solid".

Calculate Linux version 18 was announced yesterday. In this version, "Calculate Utilities were ported to Qt5, your network is managed in a different way, and binary packages get checked using their index signature". See the announcement for more details. You can download LiveUSB images here.

The Linux Code of Conduct may see changes with the upcoming 4.19 kernel release, Phoronix reports. James Bottomley submitted a couple fixes over the weekend, and Geert Uytterhoeven submitted a patch as well.

The Emmabuntus Collective yesterday announced the release of Emmabuntus Debian Edition 2 1.03, based on Debian 9.5 and featuring the XFCE desktop environment. This distro was "designed to facilitate the reconditioning of computers donated to humanitarian organizations, starting with the Emmaüs communities (which is where the distribution's name obviously comes from), to promote the discovery of GNU/Linux by beginners, as well as to extend the lifespan of computer hardware in order to reduce the waste induced by the overconsumption of raw materials".

There has been a "veritable flood of improvement throughout KDE's software stack over the past few days", Nate Graham writes in his Adventures in Linux and KDE blog. See the post for details on all the new features, UI improvements and bug fixes.

News kernel Code of Conduct Calculate Linux Emmabuntus KDE Desktop
Jill Franklin

Now Is the Time to Start Planning for the Post-Android World

3 months 2 weeks ago
by Glyn Moody

We need a free software mobile operating system. Is it eelo?

Remember Windows? It was an operating system that was quite popular in the old days of computing. However, its global market share has been in decline for some time, and last year, the Age of Windows ended, and the Age of Android began.

Android—and thus Linux—is now everywhere. We take it for granted that Android is used on more than two billion devices, which come in just about every form factor—smartphones, tablets, wearables, Internet of Things, in-car systems and so on. Now, in the Open Source world, we just assume that Android always will hold around 90% of the smartphone sector, whatever the brand name on the device, and that we always will live in an Android world.

Except—we won't. Just as Windows took over from DOS, and Android took over from Windows, something will take over from Android. Some might say "yes, but not yet". While Android goes from strength to strength, and Apple is content to make huge profits from its smaller, tightly controlled market, there's no reason for Android to lose its dominance. After all, there are no obvious challengers and no obvious need for something new.

However, what if the key event in the decline and fall of Android has already taken place, but was something quite different from what we were expecting? Perhaps it won't be a frontal attack by another platform, but more of a subtle fracture deep within the Android ecosystem, caused by some external shock. Something like this, perhaps:

Today, the Commission has decided to fine Google 4.34 billion euros for breaching EU antitrust rules. Google has engaged in illegal practices to cement its dominant market position in internet search. It must put an effective end to this conduct within 90 days or face penalty payments.

What's striking is not so much the monetary aspect, impressive though that is, but the following: "our decision stops Google from controlling which search and browser apps manufacturers can pre-install on Android devices, or which Android operating system they can adopt."

Go to Full Article
Glyn Moody

Weekend Reading: Gaming

3 months 2 weeks ago
by Carlie Fairchild

Games for Linux are booming like never before. The revolution comes courtesy of cross-platform dev tools, passionate programmers and community support. Join us this weekend as we learn about Linux gaming.

 

Crossing Platforms: a Talk with the Developers Building Games for Linux

In the last five years, the number of mainstream games released for Linux has increased dramatically, with thousands of titles now available. These range from major AAA releases, such as Civilization VI and Deus Ex: Mankind Divided, to breakout indie hits like Night in the Woods. For this article, K.G. Orphanides spoke to different developers and publishers to discover the shape of the Linux games market and find out what's driving its prodigious growth.

 

Would You Like to Play a Linux Game?

A look at several games native to Linux. There are, of course, tons of games for the Linux platform if you're willing to install Steam. For the sake of this article, however, Marcel Gagne want to show you some games that are available native to Linux—none of this firing up Java so you can play something on your Ubuntu, or Fedora, or Debian or whatever your personal flavor of Linux happens to be.

 

Two Portable DIY Retro Gaming Consoles

A look at Adafruit's PiGRRL Zero vs. Hardkernel's ODROID-GO.

 

Review: Thrones of Britannia

A look at the recent game from the Total War series on the Linux desktop thanks to Steam and Feral Interactive.

 

Meet TASBot, a Linux-Powered Robot Playing Video Games for Charity

Can a Linux-powered robot play video games faster than you? Only if he takes a hint from piano rolls...and doesn't desync.

 

Build Your Own Arcade Game Player and Relive the '80s!

In this old but gold Linux Journal article, Shawn Powers describes how to construct a fully functional arcade cabinet. When complete, you'll be able to play all the old coin-op games from your childhood in the coin-free luxury of your living room (or garage—depending on the tolerance of individual spouses).

 

 

Go to Full Article
Carlie Fairchild

Qt 5.12 LTS Beta Released, Yabits Now Available, Manjaro-Illyria and New Bladebook Coming Soon, First DNSSEC Rollover Next Week and Secret Text Adventure Game Found on Google.com

3 months 2 weeks ago

News briefs for October 5, 2018.

Qt 5.12 LTS beta was released this morning. Qt 5.12 will be a long-term supported release, and it'll be supported for three years. Improved performance and reduced memory consumption have been a focus for this version, and it also now provides the TableView control. See the Qt 5.12 wiki for an overview of all the new features.

Yabits, a new UEFI Coreboot payload alternative, made its debut last month. According to Phoronix, Yabits "aims to deliver the same UEFI x86_64 booting capabilities as TianoCore but with a much smaller code-base for environments like embedded systems and the cloud". Future plans for Yabits include "ARM support, Secure Boot capabilities, Graphical Output Protocol handling, and the ability to boot Windows".

Manjaro-Illyria 18.0 is coming soon. Appuals reports that eight updates have been released in this past week, including updates to the 4.19-rc6 kernel, NVIDIA 410.57 drivers added, Wine upgraded to 3.17, upstream fixes to Haskell and Python packages, a new "smooth bootup experience", and Deepin and GNOME package updates. In addition, the Manjaro team is also working on the Bladebook Fall 2018, which will run Manjaro KDE 18.0 preinstalled "with the Intel Apollo Lake Quad-Core HD APU, a fanless metal material, and utilize eMMC as its primary storage, although the dev states that additional M2-SSD could be possible." See https://manjaro.org/hardware for more information.

The first DNSSEC root key rollover will happen on October 11, 2018. See the Red Hat Blog post for what you need to know about the rollover.

Users have discovered a secret text adventure game hidden in Google.com. You need to be using Chrome, Firefox or Edge for it to work. See the story on The Verge for details.

News qt Yabits UEFI Manjaro DNSSEC gaming
Jill Franklin

Introducing Genius, the Advanced Scientific Calculator for Linux

3 months 2 weeks ago
by Joey Bernard

Genius is a calculator program that has both a command-line version and a GNOME GUI version. It should available in your distribution's package management system. For Debian-based distributions, the GUI version and the command-line version are two separate packages. Assuming that you want to install both, you can do so with the following command:

sudo apt-get install genius gnome-genius

If you use Ubuntu, be aware that the package gnome-genius doesn't appear to be in Bionic. It's in earlier versions (trusty, xenial and arty), and it appears to be in the next version (cosmic). I ran into this problem, and thought I'd mention it to save you some aggravation.

Starting the command-line version provides an interpreter that should be familiar to Python or R users.

Figure 1. When you start Genius, you get the version and some license information, and then you'll see the interpreter prompt.

If you start gnome-genius, you'll see a graphical interface that is likely to be more comfortable to new users. For the rest of this article, I'm using the GUI version in order to demonstrate some of the things you can do with Genius.

Figure 2. The GUI interface provides easy menu access to most of the functionality within Genius.

You can use Genius just as a general-purpose calculator, so you can do things like:

genius> 4+5 = 9

Along with basic math operators, you also can use trigonometric functions. This command gives the sine of 45 degrees:

genius> sin(45) = 0.850903524534

These types of calculations can be of essentially arbitrary size. You also can use complex numbers out of the box. Many other standard mathematical functions are available as well, including items like logarithms, statistics, combinatorics and even calculus functions.

Along with functions, Genius also provides control structures like conditionals and looping structures. For example, the following code gives you a basic for loop that prints out the sine of the first 90 degrees:

for i = 1 to 90 do ( x = sin(i); print(x) )

As you can see, the syntax is almost C-like. At first blush, it looks like the semicolon is being used as a line-ending character, but it's actually a command separator. That's why there is a semicolon on the line with the sine function, but there is no semicolon on the line with the print function. This means you could write the for loop as the following:

Go to Full Article
Joey Bernard

Fedora 29 GNOME 3.30 Test Day Tomorrow, Kernel Update for Debian GNU/Linux 9 "Stretch", Jigsaw Introduces Intra App to Prevent Censorship, Russian Subway Dogs Now Available for Linux and AT&T Releases Router Specs to the Open Compute Project

3 months 2 weeks ago

News briefs for October 4, 2018.

Tomorrow, October 5, 2018, is a Fedora 29 GNOME 3.30 Test Day. If you're interested in participating, see the wiki page. All you need is Fedora 29 (which you can grab from the wiki), and the event will be held in #fedora-test-day on Freenode IRC.

Debian released a kernel update for Debian GNU/Linux 9 "Stretch" that addresses several vulnerabilities. If you haven't done so already, update to version 4.9.110-3+deb9u5. See the security announcement for details. (Source: Softpedia News.)

Jigsaw, a cyber unit division owned by Google's parent company Alphabet, recently introduced Intra, a new app with the goal of protecting users from state-sponsored censorship. According to TechCrunch, Intra "aims to prevent DNS manipulation attacks" and that "by passing all your browsing queries and app traffic through an encrypted connection to a trusted Domain Name Server, Intra says it ensures you can use your app without meddling or get to the right site without interference."

The game Russian Subway Dogs, the "systemic arcade game inspired by the real life stray dogs of the Moscow metro", is getting a content update and also is now supported on Linux. It's available now on Steam, itch.io and Humble Bundle for $14.99 USD, and you can view the trailer here.

AT&T this week is releasing specifications for a cell site gateway router to the Open Compute Project. According to the press release, this "white box" blueprint will allow any hardware maker to build these routers, which will be installed at tens of thousands of cell towers during the next several years. These routers then will "eventually form the infrastructure that will enable not just phones and tablets to connect to our mobile 5G network, but new technologies like autonomous cars, drones, augmented reality and virtual reality systems, smart factories, and more".

News Fedora GNOME kernel Security Debian Privacy censorship gaming AT&T
Jill Franklin

Dealing with printk()

3 months 2 weeks ago
by Zack Brown

It's odd that printk() would pose so many problems for kernel development, given that it's essentially just a replacement for printf() that doesn't require linking the standard C library into the kernel.

And yet, it's famously a mess, full of edge cases, corner cases, deadlocks, race conditions and a variety of other tough-to-solve problems. The reason for this is, unlike printf(), the printk() system call has to produce reasonable behavior even when the entire system is in the midst of crashing. That's really the whole point—printk() needs to report errors and warnings that can be used to debug whatever strange and unexpected catastrophe has just hit a running system.

Trying to fix all the deadlocks and other problems at the same time would be too large a task for anyone, especially since each one is a special case defined by the particular context in which the printk() call appeared. But, sometimes a bunch of instances in a particular region of code can be addressed all together.

Sergey Senozhatsky recently tried to address some printk() deadlocks, although he acknowledged he wouldn't address any instances that were caused by the printk() code itself triggering a separate recursive printk() call. He wanted to concern himself with non-recursion-based deadlocks only.

Sergey focused on the console code, which was where printk() generally sent its output, and which was one place where printk() could deadlock. He added a very small safeguard to the code, but the result seemed to be that drivers all throughout the kernel would have to be updated to use the new safeguard.

His code was not met with universal acclaim. Alan Cox noticed that Sergey's safeguard added code to the "fast path"—a region of code that needed to be as fast and efficient as possible, because it was run all the time, many times per second. Slowing down the fast path would slow down the whole system. Alan suggested instead of this, it would be better for the kernel simply not to call printk() if the console code would be in a position to deadlock.

Sergey was not in any way satisfied, however. He pointed out that his patch solved real-world problems that users had reported experiencing directly. He didn't see how it would help anything simply to pull out the printk() instances that triggered the problem, especially if those instances were doing important work like reporting on the real reason the system was crashing and so on.

Sergey wanted to keep the printk() instances and implement the safeguards to protect them. However, at this point Linus Torvalds joined the discussion, saying:

The rule is simple: DO NOT DO THAT THEN.

Don't make recursive locks. Don't make random complexity. Just stop doing the thing that hurts.

Go to Full Article
Zack Brown

Android Security Patch for October, Google Pixel Slate, Skype on Debian Vulnerability, PyTorch Beta 1.0 Released and XCOM 2: War of the Chosen - Tactical Legacy Pack Coming Soon to Linux

3 months 2 weeks ago

News briefs for October 3, 2018.

Google this week released the Android Security Patch for October 2018. Softpedia News reports that the patch fixes 26 vulnerabilities, the most severe of which could allow remote attackers to execute arbitrary code. See the Android Security Bulletin for more information.

Rumor has it that Google Pixel Slate will be the official name for the first detachable Pixelbook 2-in-1, which may be coming out soon. According to Appuals, a Google Pixel Slate benchmark was leaked recently and Android Police also mentioned in a tweet that "Google Pixel Slate is the name of Google's first Chrome OS tablet." Further details on the tablet are slim.

Skype on Debian is vulnerable to attack. On installation, the package automatically inserts Microsoft's apt repository, which means "after obtaining control of Microsoft's Debian apt repository, an attacker would be able to inject malicious content in various distro packages using the update system, as well as replace legitimate packages with maliciously crafted ones". See the Softpedia News post for more details and steps you can take to protect your computer after installing Skype.

A beta of PyTorch 1.0 has been released. Facebook recently open-sourced the Python-based project, which "provides developers with the power to seamlessly move from research to production in a single framework". ZDNet reports that the project now has many new supporters, and "with deeper cloud service support from Amazon Web Services (AWS), Google Cloud, and Microsoft Azure, and tighter integration with technology providers ARM, Intel, IBM, NVIDIA, and Qualcomm, developers can easily deploy PyTorch's ecosystem of compatible software, hardware, and developer tools."

Feral Interactive is releasing another game for Linux! XCOM 2: War of the Chosen - Tactical Legacy Pack, the expansion for the XCOM 2 award-winning strategy game, will be released for Linux and macOS soon after the Windows release on October 9, 2018. See this video for a gameplay overview.

News Security tablets ChromeOS skype Debian PyTorch Feral Interactive gaming
Jill Franklin

What's Your System's Uptime?

3 months 2 weeks ago
by Ricardo Fraile

Keep track of your system's uptime and downtime with the tuptime tool.

Finding your system's uptime is easy if the "beginning" means the last startup; the historical uptime command reports that information. But what happens if by "beginning" you mean the first startup ever of the system? Or the last 365 days? Or the last month?

Is there any way to have an accumulated uptime—or even better, a look at the whole system's life? For example, cars have odometers, and you can see the miles/kilometers since the first day. For computers, a tool was developed exactly for this task: tuptime.

tuptime reports the historical and statistical running and stopped time of your system, keeping track between restarts. Its main goals are:

  • Count system startups.
  • Register the first boot time (since installation).
  • Count intended and accidental shutdowns.
  • Show the uptime and downtime percentage since the first boot time.
  • Show the accumulated system uptime, downtime and total.
  • Show the longest, shortest and average uptime and downtime.
  • Show the current uptime.
  • Print a formatted table or list with most of the previous values.
  • Register used kernels.
  • Create reports since and/or until a given startup or timestamp.
  • Create reports in CSV format.

It works very simply. tuptime falls to the init manager for execution at startup and shutdown, and then into a cron task that launches regular executions in the meantime—there isn't any dæmon to worry about. Internally, it looks at the btime value (available in /proc/stat) and the uptime value (from /proc/uptime), and that's basically it.

The installation process is easy in Debian, Ubuntu and derivative distributions, using their respective package managers, and it should be available in all the official repositories. As prerequisites, it needs Python 3 and the SQLite library, which usually are included in core packages by default.

Once it's available on your system, you can get the information. It has three output formats: the default is a summary, and there also are table and list outputs to print the registered behavior.

Figure 1. Example tuptime Execution after Installation

The first execution reports the time since the system was booted, and the lines are self-explanatory (note that the date format is based on the system's locale settings):

Go to Full Article
Ricardo Fraile