Home Blog Page 1535

Troubleshooting Linux Applications Without Using the Command Line

Linux is one of the most stable platforms available. That doesn’t mean every application that runs on the system will enjoy the same incredible stability. Truth is, apps crash. It’s almost an inevitability that you’re going to experience a rogue application now and then. When it happens, you need to know how to close the app to get rid of any negative impact the wayward app might have. If it happens rarely, you’re good to force close the app and move on. If, however, you find it happening frequently, you need to have the tools available to help you figure out why this is occurring.

The most powerful tool at your disposal is the command line. With tools like the gdb and strace commands, you have everything you need to help figure out what is causing that application to die. For those unwilling to learn the command line, your tools are a bit less powerful, but still quite helpful. Although the GUI tools won’t give you the raw data needed to send to developers, they will help you troubleshoot the issue at hand. These tools will also give you a deep peek into your system…and who doesn’t want that?

Let’s dive into these tools and see how they can help you when a piece of software isn’t behaving as it should. I’ll be demonstrating on an Ubuntu 13.10 system using tools that are installed by default or found in the Ubuntu Software Center.

Where is the information?

The first thing you must understand is that Linux has an incredibly powerful log file system. These logs (found in /var/log/) are your best friends in troubleshooting a system. The two most important log files for troubleshooting your system are:

  • /var/log/syslog

  • /var/log/dmesg

Thing is, the normal process of checking these logs is done through the command line. Opening up a terminal window and running the command:

less /var/log/syslog

will spit out the entire contents of the log for you to look through. But the command line isn’t something most new users want to work with. In fact, I get a lot of email stating “I’d try Linux, but I don’t want to have to run commands all the time!” Well, thankfully, you can avoid the command line – even to view your log files.

Glogg

This is the first (and only) tool in the group you have to install. The glogg tool is a multi-platform GUI that allows you to browse through your system log files. This tool is actually far more powerful than that (allowing for the use of regular expressions as search tools), but it’s still one of the best ways to view your log files without opening up a terminal window. You’ll find glogg in the Ubuntu Software Center. To install it, follow these steps:

  1. Open up the Ubuntu Software Center

  2. Search for “glogg” (no quotes)

  3. Click the listing for Glogg

  4. Click Install

  5. When prompted type your sudo password

  6. Allow the installation to complete

When the installation is finished, you should see a new icon on your Unity Launcher. Click the new launcher to open up glogg. When the application opens, you won’t find a log loaded. To do this, click on the folder icon in the upper left corner. Using the file manager, navigate to /var/log and double-click syslog. You should now see plenty of text loaded in glogg (Figure 1).

glogg

What you can do now is search this log for any string that might be related to trouble. Understand, a lot of applications won’t be logging to syslog directly, but you might find hints that can lead you to critical information about that application. Another method that can be helpful is to notate the exact time the application crashes and compare that to a time stamp in /var/log/syslog. You can also open up an application log file in glogg. You will need to know exactly where that application houses its log files, otherwise this method will do you no good.

Let’s say, for example, you cannot find the location of the log file for the app; so, instead, you turn to /var/log/syslog. You know the app crashed at precisely 2:15 PM, so you open up the log file and search for 14:15 (since the logs are in 24 hour time). You will find the search results marked in red (Figure 2); look through those results to see if you find any clues as to why your app crashed.

glogg 2

One of the best things about glogg is that it allows you to follow a log file. With this, you can open up a log file, follow it, and view (in real time) anything written to the file. This can help you troubleshoot by seeing if, when you open an application, anything is written to the log file.

To follow a log file, do the following:

  1. Open glogg

  2. Open up the log file in question

  3. Click View > Follow File.

At this point, glogg will automatically refresh the log view when any data is written to said log.

But what if looking in the log files either is diving too deep into the Linux system, or it simply bears no results? You can also opt for Occam’s Razor and look at the simplest solution.

System Monitor

If you’ve used Windows, then you know about the Task Manager and how it can help you resolve issues. Many Linux distributions have very similar tools. You will find Ubuntu’s take on Task Manager in the System Monitor. Click on your Super Key (aka “Windows” key), type “system” (no quotes), and click on the System Monitor icon. When this tool opens, you will find three easy-to-use tabs:

  • Processes: Lists all running processes by name, user, percentage of CPU used, ID, memory used, and priority.

  • Resources: Shows the history for CPU, Memory and Swap, and Network.

  • File Systems: Shows devices, where the devices are mounted, the size of each device, how much space is available, and how much space is used.

Key to troubleshooting applications will be the Processes and Resources tab. If you have an app that has frozen (and won’t quit), you can do the following:

  1. Open System Monitor

  2. Click on the Processes tab

  3. Locate the process name

  4. Right-click the process name

  5. Select Open Files

  6. From the resulting window (Figure 3), check for any clues

system monitor 2

If open files gives you nothing, your best bet might be to simply kill the application. To do that, select the process in question and then click End Process. This will forcibly close the application. At this point you can go back to glogg, open a log file, follow the file, and re-launch the application.

Troubleshooting application crashing can be a rabbit hole most users don’t want to dive into. Unless you’re willing to put the power of the command line at your fingers, you’ll have to get creative. With the help of a few tools, you can begin the process of narrowing down those issues. Hopefully, by using these tools, you’ll start to understand the systems and processes necessary to administer a Linux machine – even if only one tiny step at a time.

Nuclear Dawn Update Has Full Linux Support

Nuclear Dawn, the post-apocalyptic first-person RTS hybrid video game powered by Valve’s Source Engine, is now out of beta on Linux — two years after the game was formally released for Windows gamers…

Read more at Phoronix

5 Key Insights on the Transition from Windows to Linux

Linux system administration

When I began my current job at Algoma University as the systems librarian, I really had no idea what I was getting into. Despite a decade in library information technology (IT), I felt nervous over my primary task: to help develop and administer Evergreen, an open source library catalogue system. The problem? My experience was almost totally in the world of Windows.

read more

Read more at OpenSource.com

How Open Compute has Shaped Facebook’s Forest City Data Center

The North Carolina data center is built upon the bare bones, power-optimized premise of the Open Compute Project, with design efficiencies that Facebook says saved $1.2 billion in infrastructure costs.

How to Download Webcomics from the Command Line on Linux

Do you never miss a new strip from xkcd? Read webcomics regularly? Or would you like to back up all the strips of your favorite website? Hopefully, the open source community has the solution: a command line program to download all your favorite webcomics from your terminal. Before we begin, remember that you should keep […]
Continue reading…

Read more at Xmodulo

Development Release: Qubes OS 2 RC1

Joanna Rutkowska has announced the availability of the first release candidate for Qubes OS 2, a Fedora-based distribution with strong desktop security via integrated Xen virtualisation: “Today we’re releasing Qubes OS R2 RC1 (release candidate), which is expected to be the last milestone before the final Qubes OS….

Read more at DistroWatch

Schedule Your Jobs in Linux With CRON

    Most of the Linux users are aware of how commands are run, processes are manipulated and scripts are executed in terminal. But, if you are a Linux system administrator, you might want them to start and execute automatically in the background. As an example, you might consider running a backup job every day, at a specific time, automatically. Or you might consider an example of collecting inventory data of the systems deployed across your network, by running a script automatically on monthly basis. But, how to schedule these jobs and execute them automatically in Linux?

    There is an utility in Linux known as CRON with which you can start your jobs automatically at a desired time and schedule them to get executed periodically.

    Cron utility consists of two parts: The cron daemon and the cron configuration files. Cron daemon is just like any service that is started automatically whenever your system boots. Cron configuration files hold the information of what to do and when to do. The main job of cron daemon is to inspect the configuration regularly (every minute to be more precise) and check if there is any job to be completed.

    In the /etc directory, you will find some sub-directories namely cron.hourlycron.dailycron.weekly and cron.monthly. You can put your scripts in these directories, and as their names suggest, they will be automatically executed after certain period of time. For example, if you wish to run a job or service regularly after every week, simple put the script in /etc/cron.weekly directory.

In case you need to execute a script after every fortnight, keeping the script in any of the above mentioned directories will not help. But, every problem has a solution. You can launch crontab (CRON TABle) editor which provides an interface that is very much similar to vi editor using the command crontab –e. This will start the crontab editor to create cron job for the root user. If you are root and you wish to create cron job for other user, you can use command like crontab -u [USER] -e.

 

Read More at YourOwnLinux.

HP Chromebook 14 Review – New Chromebook Adds Style and Size

I expected the HP Chromebook 14 to be like a tablet, slow and simple, but it has surprised me in its functionality, ease of use, and power over the week.

The post HP Chromebook 14 Review – New Chromebook adds style and size appeared first on Muktware.

Read more at Muktware

AmazonBasics External USB 2.0 DVD Writer For Linux

Those in need of an affordable external DVD writer that’s USB 2.0 based and will work with Linux, Amazon has a simple yet reliable and Linux-friendly slim external DVD burner that doesn’t cost too much…

Read more at Phoronix

Wasteland 2: Early Access Now Available for Linux

The game is finally out of closed beta and is available in the Early Access Mode over at Steam.

The post Wasteland 2: Early Access now available for Linux appeared first on Muktware.

Read more at Muktware