Archive for the ‘Solaris’ Category
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!
Dec
6
I just posted some new goodness for all of the Solaris admins out there. I have compiled a list of return codes from the patchadd command for both Solaris 9 and Solaris 10, and it has come in very handy over the ages. So, I thought I would share. Take a look at it here, and don’t forget to check out the entire library with all sorts of information in it here. Enjoy!
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 »
Aug
3
Thought I would share this with anyone out there that manages Solaris 10 servers. In my case we were working with Sparc, but x86 might be affected as well. I’ll skip all of the gory details, but basically what we ran into was a problem with the dependency matrix for a kernel patch (I believe the patch number is 141414–07). What does that mean, you ask? Well, it means that the kernel patch got applied via the patch cluster install script, but without the requisite dependencies being satisfied. Yeah, ouch.
The servers in question would then panic as soon as you tried to bring them back up, and I mean panic hard. You couldn’t even get into single user mode. We spent hours on the phone with Sun support (this is where we finally found out about the dependency problem) to no avail. Sun has really gone downhill in the last few years, and pretty much like a rock since Oracle bought them. Their answer was that they can’t test everything and we had to figure it out on our own. Yikes, what are we paying for support for again???
We ended up having to go back and restore from tape, but since we couldn’t boot into single user mode we did the old net boot from the jumpstart server trick and then restore from tape. All in all it was not fun, but we made it through it. One last thing, we had some servers that were OK with the patch cluster. I think it depends on the release of Solaris that you are running. The older installs did not have the proper dependencies, but the newer installs did. I just wanted to put this out there as a heads up for anyone else getting ready to patch up a Solaris 10 box, be careful cause you might make a brick.
Hope that helps!
Apr
20
Or, the end of the tech world as we know it. Maybe that’s too harsh, time will tell. I know one thing for sure, Oracle stepped up with an offer that was only $400 million more than IBM was tossing around (I know, “only”, but when you are talking $7+ billion it’s not so much), and I bet IBM is now pretty mad at themselves. Not just because they let Sun get away, but more importantly because Oracle with all of Sun’s technology under their belt, just became a veritable behemoth competitor.
I can’t say that Oracle buying Sun is worse than IBM buying Sun, I think either would have been bad, but I do think that IBM would have made more of the technology that Sun has, especially in the hardware arena. Most people already run Oracle on Sun, but I think Oracle was angling the software more than the hardware. Now they have the whole “stack” sewn up. They have been re-branding Red Hat Linux to provide “their own” operating system, but now they don’t have to because they really do have their own operating system with Solaris. One that lots of people prefer for running Oracle versus Linux and especially Windows. Now Oracle can provide the application, the database, the operating system and the hardware platform to run it all on, all in one nice bundle. I have come to think of it as the “O-Stack”. Now, instead of a LAMP stack, Oracle will be pushing their O-Stack.
I just hope that the folk out there that have a considerable investment in Sun (me included), not only in SPARC, but also their X86 line, didn’t just get screwed. Can Oracle keep the support going? Will they keep the hardware lines going? What will happen to Solaris, MySQL and Java (to name a few)? Only time will tell, but I for one am not pleased with this announcement.
I’ll have more updates as I find information to share.
Feb
22
Here we go folks, I thought I would share a handy little script with you that I use to backup all of the databases on a particular Linux/UNIX server. I do this by getting a list of the databases, and then using mysqldump to dump them all to a text file. This seems to be the best way (short of replication) to get good clean backups of the data. Toss it into a cron job and you can have it done automagically. There isn’t anything yet to rotate files, but I might add that later. Also, I am going to try and rewrite this in PERL so our Windows (and other OS’s that don’t have a shell like Bash) brethren can run this script as well. For now though, it’s written for Bash but almost any shell would work I think.
OK, onto the script. Read the rest of this entry »