How to View System Logs in Real-Time

If you are having an issue especially with hardware or some other reproducible manner, here is a solution to see just what is getting written to the sys log in real-time. Perhaps this will aid in trouble shooting the issue. I know it has helped me in the past identify a device’s mount point when it would not show with the mount command. I ran across this string a few years ago in a forum and have saved it ever sense. I want to share it with you here.

The command is the tail command run in a separate terminal window if needed as root or with escalated privileges with sudo.

# tail -f /var/log/syslog

That’s all there is to it. Of course adjust the path if your logs are in a different directory and read the man page if you want or need additional options. You can expect some output like this:

johnny@polarbear ~ $ sudo tail -f /var/log/syslog
[sudo] password for johnny:
Jan 17 20:29:25 polarbear rtkit-daemon[1811]: Successfully made thread 2111 of process 1809 (n/a) owned by ’1000′ RT at priority 5.
Jan 17 20:29:25 polarbear rtkit-daemon[1811]: Supervising 3 threads of 1 processes of 1 users.
Jan 17 20:29:29 polarbear NetworkManager[877]: <info> (eth1): IP6 addrconf timed out or failed.
Jan 17 20:29:29 polarbear NetworkManager[877]: <info> Activation (eth1) Stage 4 of 5 (IPv6 Configure Timeout) scheduled…
Jan 17 20:29:29 polarbear NetworkManager[877]: <info> Activation (eth1) Stage 4 of 5 (IPv6 Configure Timeout) started…
Jan 17 20:29:29 polarbear NetworkManager[877]: <info> Activation (eth1) Stage 4 of 5 (IPv6 Configure Timeout) complete.
Jan 17 21:17:01 polarbear CRON[2279]: (root) CMD (   cd / && run-parts –report /etc/cron.hourly)
Jan 17 21:48:19 polarbear goa[2395]: goa-daemon version 3.6.0 starting [main.c:112, main()]
Jan 17 22:17:01 polarbear CRON[2728]: (root) CMD (   cd / && run-parts –report /etc/cron.hourly)
Jan 17 23:17:01 polarbear CRON[3044]: (root) CMD (   cd / && run-parts –report /etc/cron.hourly)
Jan 17 23:31:20 polarbear anacron[3408]: Anacron 2.3 started on 2013-01-17
Jan 17 23:31:20 polarbear anacron[3408]: Normal exit (0 jobs run)
Jan 17 23:31:27 polarbear kernel: [10938.411516] usb 1-1.2: USB disconnect, device number 3
Jan 17 23:31:32 polarbear kernel: [10942.680548] usb 1-1.2: new full-speed USB device number 5 using ehci_hcd
Jan 17 23:31:32 polarbear kernel: [10942.775553] usb 1-1.2: New USB device found, idVendor=046d, idProduct=c52f
Jan 17 23:31:32 polarbear kernel: [10942.775563] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 17 23:31:32 polarbear kernel: [10942.775569] usb 1-1.2: Product: USB Receiver
Jan 17 23:31:32 polarbear kernel: [10942.775573] usb 1-1.2: Manufacturer: Logitech
Jan 17 23:31:32 polarbear kernel: [10942.778371] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input13
Jan 17 23:31:32 polarbear kernel: [10942.778814] hid-generic 0003:046D:C52F.0003: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:1a.0-1.2/input0
Jan 17 23:31:32 polarbear mtp-probe: checking bus 1, device 5: “/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2″
Jan 17 23:31:32 polarbear kernel: [10942.781280] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.1/input/input14
Jan 17 23:31:32 polarbear kernel: [10942.782247] hid-generic 0003:046D:C52F.0004: input,hiddev0,hidraw1: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:1a.0-1.2/input1
Jan 17 23:31:32 polarbear mtp-probe: bus: 1, device: 5 was not an MTP device
^C johnny@polarbear ~ $

You can see where I disconnected and reconnected both my power cable and USB receiver for the mouse. A control c will stop the output. Put this tip away for the one time you may need it and if you ever do please come back and tell us how you used it and if it helped you solve a problem.

penguin2sm3

Introduction to Synaptic Package Manager

In this short video we will go over the Synaptic Package Manager and at the end you should have enough information to be able to use and explore this terrific tool.

I hope you enjoyed the video and will continue to explore. Synaptic is quite powerful and capable of so much more than I have covered here.

penguin2sm3

How To Use Software Manager

This is a short ‘How To’ video I created on how to use the Software Manager in Linux Mint 14 XFCE. This is a basic instructional video and is mainly aimed at the newer Linux users. We welcome comments and suggestions from the more experienced users too. This was created using the Record My Desktop utility and after the upload to You Tube has lost a bit of its clarity unless you run it in 720p. In the native ogv format it was very sharp. I hope you enjoy it. Click the link to view the video.

penguin2sm3

What App Do I Use?

Now that you have Linux installed you may be wondering what do I use to replace (insert any Windows or Mac application name here)? This is a very common question even with the distributions that come with an application for almost every need and purpose. What makes this so tough to answer? In my opinion it is mostly we simply do not know what is available and what the new applications do that are already installed. Linux distributions can and do provide hundreds to thousands of applications for many uses. So many in the mainstream distributions that it can be mind-boggling.

Even the lesser known Linux distributions such as AntiX can pull applications from the repositories of the much more widespread distribution Debian. And that adds another question for some people, what is a repository? (Answer: A collection of software maintained, tested and updated for a particular version or distribution chain.) This can all be very confusing to newer users of Linux. (Note also that I used the Debian tree of Linux as an example but could have picked several others, Slackware, Red Hat, Fedora all have distros based on them that pull from upstream repositories and also maintain their own repositories supporting themselves and this listing is certainly not all-inclusive at all.) Some distributions use packages they either create or bundle all while maintaining the main distribution giving their users many choices for applications of all types.

I think that most users will figure out the replacements for Office software like Writer and Calc. We will get used to seeing Rhythmbox instead of Media Player. Nemo, Nautilus or Thunar will become very familiar for interfacing with the file system. But what many do not know is there are alternatives and sometimes several to do the same thing. For example, music players is a category most of us will use. I named Rhythmbox above but could have named Banshee, Clementine, VLC, Kaffeine, MPlayer or Totem and this list is not totally inclusive and even crosses boundaries for other media types many of them can handle just as Windows Media Player handles multiple media types. This is just one category and one example, there are many applications that have alternatives.

Knowing what we want to do is the first step, finding the application is step two. This can be as easy as learning the name of an application that is already installed but we did not know the name of or learning how to pull from the repositories one of the thousands of applications that are there waiting to be used.

Nearly all of the distributions are making finding what you want easier than ever and installation of the software is extremely easy too. But what do you do if you have this favourite Mac or Windows program and want a Linux alternative but do not know the name of one? Well you can search the Internet, that may or may not tell you the name of the package to install. And you are definitely much better off installing from the repositories for your distribution even if you do find it on the Internet. This ensures better security and the meeting of all dependencies for the application.

Or you can use a tool like this one, the Linux App Finder. This is a really cool website where you enter the name of the program you want to replace and it turns out choices for alternatives. Many if not all of them will be in your repositories or a repository you can add as an additional source. You can even install some of the programs from the site but the repositories for your distribution are the preferred method.

Here is a screen capture for a search of notepad replacements as an example.

Search for notepad alternatives.

This is a decent list to get someone started and I doubt it is all of the available replacements for notepad. I stumbled onto this website a few years ago and found it to be very helpful. I hope you find it helpful too.

penguin2sm3

How To Unfreeze a Linux Session

I know that this really does not happen very often but when it does a gentler shutdown method is generally best. Programs can freeze for a variety of reasons and I will try to list a few of the most common examples.

 

 

 

  • Beta software errors
  • Bad coding
  • Bad memory
  • Heat
  • Out of RAM
  • Disk errors
  • Memory leaks
  • Bad power supply or overloaded

I am sure there are many more or you can have any number of combinations of errors. These types of issues are often hard to diagnose or track. But with some persistence and careful scanning of system logs, the answers usually become very apparent. Some of the errors will be obvious as there will be actually physical or visual clues like heat or smoke. Turn the computer off right away if you see or feel these and start planning the upgrade. :)

But for the rest there is an often ignored command or rather a set of commands, that will re-boot your computer in a much safer mode. The commands involve the sysreq key usually associated with the print screen (prt sc in my case) key. To invoke the commands press the alt key plus sysreq plus the following keys in order: REISUB. (Minus the period.) Try allowing a slight pause in between each sequence. This allows the system to process the commands individually.

I had read about this sequence quite some time ago and even posted to my old blog Techbits about the function. I recommended back then to read the Wiki pages on this and I still do, (Link is on Techbits.), but recently while researching a suspend issue I ran across a more technical article straight from the kernel devs. I bookmarked this and want to share it here too. Thanks to dasian in the Debian forums for posting the link and to kevmitch for explaining how to activate this if not already. This is the kind of help you can find in the Linux community if you just ask or search.

In my current system, the homemade Debian server, it was not active so I followed kevmitch’s instructions and set it to active. I don’t know if I will ever need to use this but I like knowing that I can.

So the next time your Linux computer misbehaves and locks up, try the commands alt+sysrq+reisub in order and allow Linux to shutdown and re-boot.

 

Open Source Projects Are Free But Need to be Funded

I love open source software because it gives me so many choices. But I feel we as consumers tend to take advantage of the free price tag.

Many projects are not funded at all unless we contribute. I believe in contributing to projects I use the most. My most recent contribution was to Parted Magic. This wonderful set of tools are made available and continually updated and refined all while being 100% free. Parted Magic depends entirely on donations to survive. This type of project, just like other distributions, are not backed by multimillion dollar companies but are still free and available for us to use. It simply does not arrive with plastic around it. So if you have not contributed lately, think about what goes into getting the tools, software and distributions for you to use for free and then if possible make a donation to one or more of your favorites. Lastly if funding with money is difficult or simply not your thing, then you can always support projects by being active in forums, translating documentation or contributing directly to the code base if you are so inclined.

Thanks for reading,

Mobile Posting From Android Galaxy Tab 2

Since I made my site mobile ready finally, I found the desire to post in the same way. So I acquired the Samsung Galaxy Tab2 and I love it.

image

After downloading and installing the WordPress app, I was promptly met with a PHP error 405. I am glad that WordPress also included information about resolution of the error. After a quick check in the posting from RPC/XML option I am posting this from the app.

This is like way cool for me :-) and I know it may be old hat (red maybe?) to some but I am late to the Android market. I suspect this is going to be fun!

 

Upgraded RAM Today: Dmidecode Command for Details

Well I have been living with only 2 GB’s for sometime now on a 64-bit edition of LMDE. I finally upgraded to 4 GB’s and wow what a difference. I ordered the RAM from Amazon and I can’t stress enough to do your homework on what is right for your system. They offer literally 1000′s of modules, I searched 4 GB SODIMM Crucial, Crucial 4GB PC2-6400 2GBx2 200-Pin CL6 DDR2-800 SODIMM RAM Kit and there were 764 pages of results. Many of which would have been wrong for this system.

Before and after installation you might want to run this command for information on your memory installed. This applies to desktops as well as laptops and most versions of Linux.

The command is run as root or sudo and goes like this:

# dmidecode -t memory

This is the output I received after installing the RAM:

# dmidecode 2.11
SMBIOS 2.4 present.

Handle 0×0009, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: Unknown
Error Information Handle: Not Provided
Number Of Devices: 2

Handle 0x000A, DMI type 17, 21 bytes
Memory Device
Array Handle: 0×0009
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: SODIMM
Set: None
Locator: SODIMM1
Bank Locator: Bank 0
Type: DDR2
Type Detail: Unknown

Handle 0x000B, DMI type 17, 21 bytes
Memory Device
Array Handle: 0×0009
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: SODIMM
Set: None
Locator: SODIMM2
Bank Locator: Bank 1
Type: DDR2
Type Detail: Unknown

As you can see this is a lot of good information and your results may contain more information. I can clearly see the RAM installed properly and I have 2048 MB’s in each slot. Try it on your system and see what you get. As a side note, dmidecode will let you know many things about your hardware. Type man dmidecode for all the switches and uses you can use it for or for the simpler version dmidecode –help.