All posts by bsdman

Currently working as an IT Manager. Worked for an OIT company as a Network Engineer in 2011. Worked for a Medical IT company as the Network Administrator 2009-2011. Worked as the Senior Systems Administrator at a computer reseller from 2005-2009. Worked as a Computer Consultant for several small companies from 2007-2009. Worked as a Computer Technician at a computer reseller from 2002-2004.

Supermicro X9SRW-F CPU Temperature Issues

So I was not having a good time with this supermicro box – it’s a 2U with 8 SATA drives (3T each), areca raid controller, 4 core intel, 8gb ram. Not much. It ran wonderfully as a FreeNAS/NAS4Free box for the last 36 months and was just no being repurposed as an Oracle Playground (ie development/POC).

Installed CentOS 6.4 on it and gave it to the developer. Full building power outage later and it wasn’t booting backup. Turns out that my 8 drive RAID10 had some issues; 1 of the drives in a mirror died (click of death) and the other drive had corrupt data blocks. Awesome. Finding some working drives later, I rebuilt it again.

Now it was Fan full throttle, fan not full throttle, random fan issues. The logs stated something like CPU Temperature assertion, CPU Temperature desertion. Overheating? The room temperature is a balmy 72F. So I put the fans on Heavy I/O fan mode. This seemed to work for a few hours but then we were back to throttle up/down again.

I upgraded the IPMI firmware from 1.2.x to 3.0.x. I rebooted the machine. I even cold booted. I then updated the BIOS (download from supermicro, use Rufus to create a new bootable USB device, copy files, run ami.bat BIOSNAME.FILE). Still no dice.

Then I read what user “SpeedKills” posted on a forum board; simply RESET the IPMI to factory defaults.

Did that and no more fan issues.

Clear MSSQL Log Files

So first of all I’m not a SQL expert. Secondly I don’t recommend performing this on a production system. Third, this actually won’t happen on a production system as long as you’re performing backups – and your backup solution supports MSSQL – and I hope if it *is* a production system that you are actually backing it up.

Open the SQL Management Studio
Connect using the windows authentication piece, OR your SA password

Run the following in the query window
DBCC sqlperf(logspace)

This will show you the name of the database and associated size of log files.

Assuming that the INSERTNAMEHERE database is the one eating through the space
USE INSERTNAMEHERE;
GO
ALTER DATABASE INSERTNAMEHERE
SET RECOVERY SIMPLE;
GO
DBCC SHRINKFILE (INSERTNAMEHERE, 1);
GO
ALTER DATABASE INSERTNAMEHERE
SET RECOVERY FULL;
GO

You can then run the logspace again and verify
DBCC sqlperf(logspace)

This all worked nicely on my development system that doesn’t require/have backups in place.

Delete Exchange Users Old Mail

I was tasked with deleting a service account users old mail. Our CRM Mailbox user had 29.5GB of old mail floating around that needed to be purged. Adding access to the account was a no-no (and would probably crash out Outlook for a while) due to company policies. Powershell to the rescue?

I should probably mention that this is on Exchange 2010 in a DAG (2 servers) with SP3 hotfix 4 applied. Yes, I also know hotfix 5 is available.

I attempted to run the following script:
Search-Mailbox -Identity SOMEUSERNAME -SearchQuery '(Received:01/01/2012..12/31/2012)' -Deletecontent -Force

And I was told that the “search-mailbox” command was not found. Great. Verified that I was using the Exchange Management Powershell instead of just Windows PS. True story.

After a lot of searching I realized that our former Exchange Admin wasn’t very good at PowerShell. The Admin Tasks Management Powershell add-in was not available.

Check Available PowerShell Snap-ins
Get-PSSnapin
Notice Exchange Server Admin Tasks is not available.

Verify that the plugin is available
Get-PSSnapin -registered

Add the snap-in
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010

I ended up closing the powershell window and then re-opening it. My search mailbox and delete content commands now work!

Other commands I did:
Added my user to the Discovery Management role in the ECP (https://yourmailserver.tld/ecp)
Created two new groups to allow the import and export of mailboxes, and then the exchange support and diagnostics:
New-RoleGroup -Name "Exchange Mailbox Import Export" -Roles "Mailbox Import Export" -Members "domain\username" -DisplayName "Exchange Mailbox Import Export" -Description "This group handles permissions to the import and export commands in powershell."
New-RoleGroup -Name "Exchange Support and Diagnostics" -Roles "Support Diagnostics" -Members "domain\username" -DisplayName "Exchange Support Diagnostics" -Description "This group handles permissions to the support diagnostics cmdlets in exchange."

Windows 8 Startup Folder

Windows 8, well now 8.1, has a lot of changes to it. Took me a while to get used to it – on dual monitors or with a touch screen it’s pretty decent.

Anyway, I couldn’t find my startup folder easily. Windows 7/Vista you could hit start, then type in “startup” and away you go. Before that you could explore all users by right-clicking on start and then drill down to find your startup folder.

BTW, I know that the startup folder resides in the c:\users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\ directory, but who wants to type out all that?

Win + R, “shell:startup”, enter

Perforce Email Rage

Perforce, a file repository and versioning system, decided that it wants to check to see if it can email/ldap authenticate every minute. And if it cannot connect to either for any reason, it will create an email with the report:

Unable to connect to SMTP host “mail.yourdomain.tld”!
Will try again in 60 seconds.

Awesome. But after an outage of 8 hours due to power issues, we had a queue of 480 emails ready to send. The SMTP relay didn’t like it and was throttling – which gave me time to remove the queue.

CentOS

postsuper -d ALL

Also, if you’d like to edit the AD_auth.pl file, it’s located here:
/p4/common/bin/triggers/AD_auth.pl
At least on our default install.

Speedtest Internet CLI

I’ve always used speedtest.net or speedtest.comcast.net etc to test the speed of my internet connection. Unfortunately this requires a browser that supports java/flash/html5/images etc. What about my linux based servers without a GUI?

Author Sivel made speedtest.cli in python. https://github.com/sivel/speedtest-cli

wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
chmod +x speedtest-cli
./speedtest-cli

Linux Ethernet Fun

So we moved a RHEL6.x server from one colocation to another. Unfortunately since RHEL 6, Redhat decided to include network manager by default. This makes for some fun times when trying to manually change IP information.

Another unfortunate was that the uninstaller of the system failed to document where each ethernet cable was connected. We needed 2x LAN LACP, 1x backup, 1x IPMI. The IPMI was easy, but this server had 4 onboard gig ports and 2 pcie riser gig ports to contend with. And both sets were BCM drivers – Broadcom.

Network manager was less than helpful in telling me which ports to plug into. NM was showing eth4 (configured), eth5, eth6, eth7 (configured), eth8, eth9. WTF.

I needed to find out which ethernet devices were active now that I plugged them in.

ip link show
Showed me all of the interfaces, physical addresses, and if it was up or down (connect)

From there I learned that eth9 was now LAN and eth7 was backup – so I could edit the network files to change those.

NM, however, had different plans. Since the eth4 was still configured with the old IP range, routing wasn’t happy when I tried to access said range over the MPLS.
ifdown eth4

Error: Device ‘eth4’ (/org/freedesktop/NetworkManager/Devices/4) disconnecting failed: This device is not active.

F YOU!

ip link set dev eth4 down
or
ifconfig eth4 down
Worked much better.