Tag Archives: Server

Configuring HP iLO through Linux automatically

Rate this post

We only use HP servers and we get more and more every week. Someone has to keep track of all those servers and be able to configure them using iLO in case of a disaster
Installation almost runs automatically, except for iLO configuration.
I have to first find the iLO ip, then login to the web interface, create users, set static IP and what not. It takes time, a lot of it.
If only there was some way to automate it without having to use HP’s software.. but wait, THERE IS!

I already posted how to scan for all HP ILO devices in your subnet, but the basics in the following post on how to configure iLO from your guest Linux OS might make everything a little easier for the sysadmins out there

How to configure HP iLO in Linux

First I will show you the useful commands and an example output for each, and then how to automate the configuration of your HP iLO interface using bash scripting
The script for configuring iLO automatically will be included at the end of this post

Needed packages:

OpenIPMI OpenIPMI-libs OpenIPMI-tools

These packages can be installed through your favorite package manager, below you’ll see the defaults in Debian and CentOS/RHEL

Debian:

apt-get install OpenIPMI OpenIPMI-libs OpenIPMI-tools

CentOS/RHEL:

yum install OpenIPMI OpenIPMI-libs OpenIPMI-tools

Once you got those installed, you can move on and configure or fetch info from iLO through the guest Linux

Continue reading

Fixing /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Rate this post

Today I had to run a script on a 64Bit server, but was met with the following error:

/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Reason for the /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory error

The /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory error will happen only on 64 bit systems, the cause is the that 32 bit libraries are missing from the system and the script/program needs them, so it can’t run.

How to fix the /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory error

Continue reading

MySQL get size of all databases in megabytes

MySQL get size of all databases in megabytes
5 (100%) 1 vote

Why would you want to get the size of all databases in my MySQL?

Reason for this could be many, in my case I wanted to make sure replication worked as expected, I wanted to see the size of my database be the same on all my MySQL servers. Also I was a little curious how big some of my databases was.

There’s not much to write on this matter, just thought somebody could use this query, I know I am going to use this query many times in the future again.

The query for showing databae sizes in MySQL

It’s one tiny query actually. Just fire up a mysql client – phpmyadmin, mysql in terminal or you can even do this in a script.

The query:

SELECT table_schema AS "Database name", SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema;

Sample output:

+----------------------------+-------------+
| Database name              | Size (MB)   |
+----------------------------+-------------+
| information_schema         |  0.15625000 |
| mysql                      |  1.12139893 |
| performance_schema         |  0.00000000 |
| phpmyadmin                 |  0.04900742 |
+----------------------------+-------------+
4 rows in set (0.01 sec)

View network bandwidth for each process in Linux using Nethogs

Rate this post

Have you ever been in the saturation that your Linux server is using a lot of network bandwidth, but it’s a guesswork to find the process using it all?

I just stumbled upon this tool, it’s not a new tools, but it’s extremely useful!

Let’s say you have a server running apache, mysql, ftp, btsync and a lot of other network services. and somehow that server is using up 100Mbit constantly. You want to find out what it is but only got tools like iftop, atop, iptraf and others which are all great tools, but they only show which connections are using the network bandwidth.

Continue reading

How to install a CentOS 7 64Bit server

How to install a CentOS 7 64Bit server
3.82 (76.36%) 11 votes

With CentOS 7 just released, I thought it would be a great time to make a CentOS 7 64Bit server installation step-by-step guide, with pictures and everything just like the old CentOS 6.5 64Bit server installation guide.

Requirements for installing a CentOS 7 64Bit server

You don’t need much for this, of course you need a computer or server to install this on, and the only other things you need are a working internet connection on the server and the CentOS 7 64Bit iso.

You can download the iso here: http://centos.skarta.net/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso

Continue reading

Creating and mounting a partition lager than 2 TB in Linux

Creating and mounting a partition lager than 2 TB in Linux
4.55 (90.91%) 11 votes

This might be basics for some, but it’s a good thing to have bookmarked for the day you might need it. It helped me a lot.

Why can I only use 2 TB (TeraByte) of my 2+ TB drive in linux?

The answer is really simple. I guess you formatted the drive using “fdisk” which use a ms-dos partition table.
MS-dos partition table (MBR) is 32 bit, and thereby it can’t handle anything above 2 TeraBytes

How to create a partition above 2TB in linux

To fully use your 2+TB harddrive, you have to use a partition table that supports it. We now know that the MS-DOS partition table (MBR) does not, so what should you use instead? GPT.

GPT supports up to 9.4 ZB (ZetaByte). That’s 9895604649984 GB (GigaByte)!. It’s pretty safe to say, that you will not hit this limit in the near future.

Continue reading

Find all HP ILO interfaces on a subnet in Linux

Find all HP ILO interfaces on a subnet in Linux
5 (100%) 1 vote

By default, HP’s ILO interfaces are set to DHCP.
Yes you could go into your router to see which DHCP lease it got, but here is a much more easy solution that you can use anywhere, even though you don’t have access to the router/DHCP server.

Requirements

You don’t need much. What you need on your Linux computer for this to work is:

  • sudo (You only need this if you are not logged in as root)
  • nmap

Continue reading

Execute commands if load average is above in linux

Rate this post

Description

I needed this to do some testing with a load problem I had. One of our server would spike in load for a minute or two, but at random times.
I needed to see what was generating these spikes, but did not want to sit around waiting for it to happen and being ready to hit enter on the commands i needed to run when the load was spiking. So I made this simple little script that you can edit to your needs.

It’s a bash script, and requires the package “bc” to be installed (install it using your package manager if you don’t already have it installed.)

I have tested the script on CentOS and Debian.

I have tried commenting everything in the script as good as possible, but if you have any changes feel free to post a comment.

Continue reading

Flashing the LSI Megaraid M1015 SAS/SATA controller firmware

Rate this post

If someone would like to take pictures and screenshots of the process for me that I can put into the guide, that would be great. Since I do not have a running Windows computer at the moment I can’t make them myself. (post a comment and I will contact you). This line will be removed once I have the pictures i need.

Some guys a reddit.com requested that I made a quick guide on how to flash a LSI Megaraid M1015 SAS/SATA controller for pass-through firmware.
This guide will be on how to flash it for pass-through OR raid functions, since it’s the same method but with two different files.
I will supply you with the files needed as well.

What you need to flash the Megaraid M1015

You will need the following:

  • A Windows XP/vista/7 computer (I have only tested on Windows 7)
  • Package containing the firmware and tools for flashing, you can download it here
  • A USB stick (I Think 256MB is more than enough), it should not contain any data, since we need to format it!
  • This program (hp flashing utility, easy way to make bootable usb DOS usb stick)
  • Win98 boot files, you can download that here

That’s all you need except for the raid controller itself and a computer/server to install it in!

Continue reading

Realtek network cards and VMware ESXi 5.5

Realtek network cards and VMware ESXi 5.5
4.6 (92%) 15 votes

Yesterday I decided to upgrade my two ESXi servers from ESXi 5.1 to ESXi 5.5 since the update came out some time ago.
The upgrade from ESXi 5.0 to ESXi 5.1 went great, without any problems. But this time, that is not the case.

My two ESXi servers are white boxes made of the following hardware:

  • Motherboard: MSI Z87-G43 (http://www.msi.com/product/mb/Z87-G43.html)
  • CPU: i5-4670K (http://ark.intel.com/products/75048/)
  • RAM: Kingston HyperX DDR3 1600MHz, 8Gb * 2(16GB total) (http://www.newegg.com/Product/Product.aspx?Item=N82E16820104173)

The problem was the motherboard that ships with an onboard Realtek 8111E network adapter.
This problem has been verified to be the same with Realtek 8168 and Realtek 8169.
The reason for this, is that VMware removed the drivers from the new ESXi 5.5 iso.

In this post I will show you how to get ESXi 5.5 working with the Realtek network adapters.

Continue reading