Linux Troubleshooting 101-Log Files
Have you checked the system logs?
$ sudo egrep -i ‘error|warning’ /var/log/*log
will find issues in the logs.
Almost any issue will leave a trace in the system logs.
Start with that to see any issues.
Log files are usually protected for security reasons, hence the need to use sudo.
Of course, sometimes it isn’t a system problem, but an application issue, so the important log file(s) will be with the application or in /tmp/ somewhere. Not all applications provide logging by default, but many support increased logging levels through an application setting. Sometimes an option passed into the program will control verbosity.
$ program -v
or
$ program -vvv
enable and increases the amount of logging output by the program. For some programs using more v s means more verbosity.
For networking issues, check the logs on other devices, especially the router.
If the commands above are not understood, then you probably should ask for more individual help from someone knowledgeable who can be in the same room. Getting help like that is possible from your local LUG, Linux Users Group. Also check with your local university or college for a LUG.
Out of Disk Space-inodes! 4
Some days we just can’t win.
This little blog VM is out of disk space … er … sorta.
It is out of inodes. Fortunately, it is at 93% use for sector storage, but unfortunately, there are less than 3K inodes available.
apt-get update cannot complete. Out of disk error.
The VM has 1.5G of swap that never gets used. The RAM amount is set to prevent that need on purpose, so I decided to
- change the swap partition into a data partition,
- rsync over a few thousand files from /var/www,
- mount /var/www from the other partition (vda5) and
… life would be good. Yes, everything under /var/old-www was removed after mounting.
It was all scripted to minimize downtime. AND there is a good backup from last night should anything terrible happen. Downtime was a little over 30 seconds. Good enough. Heck, www.amazon.com was down for at least 10 minutes today, so my 30 seconds should be fine.
After all that, now there are fewer inodes available on /!!!
$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vda1 296000 293371 2629 100% /
/dev/vda5 97344 3751 93593 4% /var/www
Looks like it is time to build a larger VM file. The blog storage was already expanded last year – which is probably why the inodes are so tight. Copying the entire VM will take longer than a few minutes.
What a pain. I hate downtime, but I hate leaving a system sorta-patched must more.
Some days we just can’t win.
FreeNAV POI 5
Using FreeNAV on Android is mostly good, but it lacks a few capabilities that would be really nice for any GPS user.
- Add POI data
- Import POI files
- Export Favorites
- Transfer Favorites
The POI DB is definitely missing many, many, many POIs. Looking for a specific pizza place found 6, but none of them are the two within 3 miles of home that have been there longer than I’ve lived here. It seems to list places 100+ miles away.
RDP and Media Center Woes
For the last 18 months or so, I’ve been running a Windows7 Media Center inside a KVM virtual machine. Windows7 Ultimate x32 is the version of MS-Windows in use thanks to a free copy after attending the local Windows launch party. I manage recordings through either an RDP session or Remote-Potato. RDP is the native Windows Remote Desktop Protocol. I do not watch or listen to any media over this connection. The only purpose is to managed and schedule recordings. That’s it.
I’ve been mostly happy with this setup. It works, until …
Of Spice and KVM 1
Whatever we ain’t got, that’s what you want.
- Steinbeck
About a year ago, I learned of Spice. No, not spices, but Spice, the remote desktop protocol with tools for Windows and Linux desktops. It was promising. The goal of the project is near-native video streaming performance with perfect audio. They intend to make virtual desktops viable for large enterprise customers. Since then, I’ve dreamed about it working. Last week, this dream took a step towards reality.
Free Audiobooks 2
Looking for free audiobooks?
- www.booksshouldbefree.com/
- www.openculture.com/freeaudiobooks
Both sites also have links to free eBooks too.
These are well-known authors with well-known books. Many are classics, certainly a few books that you’ve always meant to read, but just never got around to reading. Very few new books there.
I use audiobooks when on long drives. I suspect that War and Peace will outlast any drive most people have planned. ;) Book 1
or
eBook
will get you started.
Have you read Asimov’s Foundation Trilogy? Now is your chance!
Annual Digital Cleanup 4
When ever a new year arrives, it is time to do some digital cleanup. Going through old files, new files, old emails, new emails, archiving important things and deleting as much as possible. Heck, if I didn’t respond to that email yet, it probably wasn’t all that important.
Anyway, here’s how I do it, and more importantly, how you can setup your systems to make it easier next year and every year after that.
I won’t pretend to know all about your digital files, so it is unlikely these techniques will work for every situation. Still, I think there is some value with just a little organization.
2012 Most Popular Articles
Most Popular Articles for 2012, in order
- Solution for Slow Ubuntu in VirtualBox
- DIY HTTV Antenna Building
- Quicken on Linux
- Installing VirtualBox Guest Extensions
- Improving VirtualBox Performance
So it seems that our readers use VirtualBox, want to run Quicken on Linux and are tired of paid TV.
The Quicken article is from 2010 and so is the last VirtualBox Performance article. Both are still extremely popular articles. I wish more people used KVM than VirtualBox. It is a better solution for servers – by far.
Blog Growth
Our little blog has really grown since it was first brought on-line in August 2006. Before that time, I had been writing my notes into a tiddlywiki file before outgrowing it.
About 17K pages are viewed by different people monthly here and over 1M pages per year with non-unique visitors. Not many hits for a commercial website, but just right for this blog. Thanks.
Older Articles
Anyway, we are happy you’ve decided to stop by. Enjoy. You may find some interesting articles here if you look into the archives. Accessing older articles is easy … just use URLs like blog.jdpfu.com/yyyy/mm/
An article that I refer to myself is about the dangers of web-based system administrative tools.
Another article on Reducing IT License Costs over 50% also isn’t as popular as I would like. With the release of Samba4 from Beta, we don’t even need to have Microsoft for ActiveDirectory anymore. Start with small F/LOSS deployments that have been proven, gain experience, and slowly switch more and more of your infrastructure over. Every replacement will save upfront, license and maintenance costs. I’m 100% serious folks. Only keep proprietary software were it is absolutely required – it definitely has a critical place in businesses. Heck, even my businesses use proprietary software and we happily pay the license+maintenance costs. But we don’t use it were it isn’t required.
I’d think more of our readers would be interested in those types of articles. Oh well. After reading them, forward to your CxO for more consideration.
Here is us wishing you the best in 2013!
smbtree - Discovering Windows Shares
If you use Linux for any time, you’ll probably need or want to connect to MS-Windows shares at some point using Samba. While it has become easier to point-n-click a connection, sometimes we want to use other connection tools to have the SMB share connected even when we are not logged in, but the machine is running.
Knowing which shares are available is the first step. Normally, I’d attempt to use
smbclient -u windows-user -L //server/to discover shares on a specific server. There’s an easier way.
$ smbtree -U windows-user
This will check the entire subnet for guest and user specific connections on all servers. The output list is easy to read and includes any CUPS printer shares.
As always, to learn more, just check the man page – man smbtree
An old dog can be taught a new trick.