Archive for the ‘Linux’ Category
Aug
28
Recently I ran into an odd recurring message in the log files of some 64-bit Debian servers I had setup, and although it wasn’t causing me any problems per se, I hate for things to just go on like that and not know why and what to do about it. Now, these were virtual machines (VMs on ESX 4), running the latest Debian Linux 64-bit, and therefore being virtual they had to specialized RAID hardware or anything like that dedicated to the servers themselves. The servers just had your regular virtual SCSI disks as if it was a physical box with single drives in it.
What I noticed in the logs was an error pertaining to mpt-statusd, and that it was detecting “non-optimal” RAID status. Well, duh, there’s no RAID in it! Of course it won’t be optimal. Here is what I was getting, and you can see from the time stamps of this snippet that I was getting quite a few:
Aug 3 18:58:36 mail mpt-statusd: detected non-optimal RAID status
Aug 3 19:08:36 mail mpt-statusd: detected non-optimal RAID status
Aug 3 19:18:36 mail mpt-statusd: detected non-optimal RAID status
Aug 3 19:28:36 mail mpt-statusd: detected non-optimal RAID status
Aug 3 19:38:36 mail mpt-statusd: detected non-optimal RAID status
Aug 3 19:48:36 mail mpt-statusd: detected non-optimal RAID status
Aug 3 19:58:36 mail mpt-statusd: detected non-optimal RAID status
Aug 3 20:08:36 mail mpt-statusd: detected non-optimal RAID status
Aug 3 20:18:36 mail mpt-statusd: detected non-optimal RAID status
Aug 3 20:28:36 mail mpt-statusd: detected non-optimal RAID status
After I did some digging into this mpt-statusd package, I found that it’s main purpose is to check on the RAID status out of mpt and other controllers, which explains why it was complaining since as I said above, there was no RAID installed. Here is the full description of mpt-statusd:
“Description: get RAID status out of mpt (and other) HW RAID controllers The mpt-status software is a query tool to access the running configuration and status of LSI SCSI HBAs. mpt-status allows you to monitor the health and status of your RAID setup. Tag: role::program”
The fix for this is to uninstall mpt-status, assuming you don’t have RAID setup on your server. Once I removed the package, my log files where free from the unnecessary clutter! I still don’t know what the trigger was that got it installed in the first place, but at least it was easy enough to remove once I found out I didn’t need it.
Aug
27
This is one of the coolest and most useful things to add to my UNIX/Linux profile that I have come across in a long time. I use the locate command a lot (slocate naturally) as I am sure all of us command line monkeys do. How many times have you been frustrated by the billions of lines of results flying by your screen, piping through more or less, trying to find the one nugget of goodness that you really need? Especially when you actually know the correct name of it, just not where it lives? This is where this comes in handy (this is where this? man I am eloquent)! Add this function to your bash profile (for some that’s .bash_profile and for others it might be .bashrc, depending on your nix flavor) and you can stop all of that. I haven’t tried this with other shells aside from bash, but I don’t see why it wouldn’t work.
Basically, this function uses the locate command to find whatever you are looking for just like you do, only it uses a bit of scriptology to filter it down to the exact match of what you are looking for. Yep, that’s right, the exact match! This little tidbit can really help out when you are looking for something, take a look:
## BASH locate function for exact match
## Thanks Dark_Helmet : http://solarum.com/v.php?l=1149LV99
function flocate
{
if [ $# -gt 1 ] ; then
display_divider=1
else
display_divider=0
fi
current_argument=0
total_arguments=$#
while [ ${current_argument} -lt ${total_arguments} ] ; do
current_file=$1
if [ "${display_divider}" = "1" ] ; then
echo "----------------------------------------"
echo "Matches for ${current_file}"
echo "----------------------------------------"
fi
filename_re="^\(.*/\)*$( echo ${current_file} | sed s%\\.%\\\\.%g )$"
locate -r "${filename_re}"
shift
(( current_argument = current_argument + 1 ))
done
}
It’s just that easy! Copy and paste this into your profile and add a cool helper addon companion function thingy
I wish I could say I came up with this myself, but I didn’t, I found it in some forums posted by someone named Dark_Helmet (just like the attribution link in the script). I don’t know who you are Mr. Helmet, but I thank you for your sharing this with us all, and I am passing it on! Enjoy!
Aug
1
Linux web hosting refers to web hosting services that are based on a server that is running the Linux operating system. It is probably the most widely used type of web hosting, especially for individuals and small to medium sized businesses, simply because Linux web hosting is cheaper than other options like Windows based hosting. The reason for this is that Linux is an open source software product and as such does not incur the high licensing fees that other operating systems do; you can freely download and use it at no cost. On the other hand, a web hosting service that offers Windows based hosting has to pay for the software and maintenance fees.
Some of the advantages of Linux web hosting are: cheaper than Windows, support for PHP scripts and MySQL databases and some hosts may offer telnet accounts at no or little additional cost. In many circles Linux is believed to be more secure than Windows, and for that reason it is also the more popular choice for web designers and programmers. Linux web hosting also offers users many configuration and customization options.
The Linux operating system is also very stable, so you can expect high uptime from a Linux web hosting service. Linux supports most scripting languages and types of web files, and you can use files with all the following extensions: .html, .htm, .pl, .php, .shtml, .asp, .xml and others. The biggest disadvantage of a Linux based web hosting solution is that it is not compatible with Microsoft technologies, like ASP scripts.
On the other side of the coin is Windows based hosting, which is generally more expensive, but it does support ASP and, usually for an extra fee, can support Cold Fusion, Access databases and SQL Server databases.
In conclusion, if you are new to building websites and web design, Linux web hosting is the better, and cheaper, option. However, if you need specialized services that are Windows specific, then you will have to use a Windows web hosting service.
May
17
Codebank,
Fun Stuff,
Linux,
Misc,
PERL,
Reviews,
Scripts,
Software,
Tech News,
UNIX,
Windows
I thought I would post some information about a project that I started a few months ago called nix32. It’s hosted on SourceForge for the most part, with a handy website that I host myself mainly because it’s just easier to manage that way. The basic goal of this project is to create native command line tools for Windows that operate much like the commands that we know and love from Linux and UNIX. Things like ls, mv, cp, df and so on. I have become so used to, comfortable with and productive with the UNIX/Linux command line environment, that when I have to leave it behind on Windows, it’s pretty tough. Not just changing from what I am used to, but also because I think the command line of a UNIX/Linux server is much more powerful and flexible than the Windows command line, even including the power shell.
I have been working on the more popular commands, and I have a few basics out now with basic functionality. I hope to have more and better (improved) tools in the future. I am writing everything in PERL and then compiling each one on Windows as a standalone exe using tools from ActiveState, and so far, they run very nicely. It’s all completely open source, you can download the PERL scripts as well as the executable files if you want to take a look or help improve them.
Now, I know you can get similar results with other projects and products out there, CYGWIN comes to mind first. However, that’s a whole separate shell and almost a little mini-Linux setup in and of itself, especially looking at the directory structure after it’s installed. Here with the nix32 project I wanted to have native Windows executables that you can stick in your path somewhere and call right from the Windows Command Prompt, without ever leaving the Windows environment and without having to install anything. So far that is exactly what we have, just copy the files somewhere, make sure it’s within or added to your PATH variable, and you are good to go!
So check it out, see what you think, spread the word and maybe even help out a bit and crunch a little code too. Do whatever you feel and keep both feet on the wheel … or, keyboard maybe.
May
11
I suppose this might work for an iPod touch as well, but the ones I have and have seen don’t have cameras. OK, on to the tip! Recently I wanted to get all of my pictures copied off of my iPhone and onto my computer running Linux, specifically Debian 5.0. Normally with something like a USB thumb drive this is easy, once you plug it in, even if it doesn’t auto mount itself you can at least look in your messages file to see the actual device path in order to mount it manually. However, what I noticed with my iPhone (3GS version 3.1.2) is that not only did it not auto mount, my messages file didn’t list any information about a device path for me to mount it manually.
From here naturally I turned to Google, but everything I came across talked about installing iFuse and some kind of ipod-convenience package or said it couldn’t be done, or my favorite that you had to have a jail-broken phone in order to do it. Now, I didn’t want to install a bunch of packages I wasn’t familiar with just for this, and I darn sure didn’t want to jail-break my phone either. If for no other reason than because I was convinced that if I could do it in Windows (connect to my iPhone and copy my pics off), there had to be a way to do it in Linux too, without having to alter the device. I am hard headed that way, but in this case it worked.
Now this might be obvious and simple to everyone else, and if so I am sorry to bore you, but it wasn’t something I was familiar with. I did have an inspiration though, something so simple I just knew it wouldn’t work but I decided to try it out anyway. I fired up gthumb which was conveniently installed already, and is a tool for doing just what I wanted to do, importing pictures from a digital camera among other things. I then plugged in my iPhone and gthumb picked it up immediately and started pulling up a list of all my pics on the phone. From there I could import, rotate, delete originals and more, easy as pie. It worked perfect, and was very simple, just like it should be.
In the end, I found that I didn’t have to install any software hacks or jail-break my phone, just use the right tool for the job. Ain’t Linux grand?
Oct
4
You have heard me share information about the fiasco that Verizon created. In case you haven’t heard, I’ll recap quickly. In the name of fighting SPAM, Verizon decided that they would block ALL port 25 SMTP traffic on their network for all of their ISP customers. That means that anyone and everyone that uses Verizon as their ISP (DSL, FIOS, Dial-up, etc) cannot use any third party mail server or service that is configured to use the industry standard port 25. That’s just plain stupid, but I have complained about that already.
I was in a quandary with this one, or maybe a catch-22 is a better term. If I didn’t do anything about this “problem” that Verizon created, then all the people that I host email services for that use Verizon as their ISP are now out of luck. They can’t send mail through their (read: my) mail servers. So, I can just change the port that sendmail listens on, right? Yeah, I could, and then my Verizon tethered customers can send mail again … but, all my other customers that don’t use Verizon have to change their email client settings too, since they would still be sending through port 25. OK, I didn’t want to go down that road. I wanted to fix the problem with the least impact on everyone. Read the rest of this entry »