Tag: linux

  • e1000 device eth4 does not seem to be present, delaying initialization

    0E4CEAFF-049A-4912-9057-6F3403FCB285-27600-0001E173F78AF5D7 The moral of the story today is beware of servers that have had a long history of changing networking configurations and network interfaces, as you never know what you are going to run into.

    While working on a RHEL 5.4 box and attempting to make few minor changes to eth4 and up the interface, I was smacked with the error below.

    e1000 device eth4 does not seem to be present, delaying initialization

    This was very much suck.

    Ifconfig-eth4 contained what you see below

    DEVICE=eth4
    BOOTPROTO=static
    ONBOOT=yes
    IPADDR=192.168.13.11
    NETMASK=255.255.255.0

    So first i hit up /etc/modprobe.conf and verifed that the correct driver module was being aliased for the interface.

    alias eth4 e1000

    Ok check. Modprobe.conf looks good.

    Now re-initialize driver

    modprobe eth100

    Then onto check lspci to make sure that the driver initialized all the interfaces. Note that there are two different versions of the 82546EB driver, which tells me that the driver was only initialized for two of the interfaces initially.

    2a:01.0 Ethernet controller: Intel Corporation 82546EB Gigabit Ethernet Controller (Copper) (rev 01)
    2a:01.1 Ethernet controller: Intel Corporation 82546EB Gigabit Ethernet Controller (Copper) (rev 01)
    2f:02.0 Ethernet controller: Intel Corporation 82546GB Gigabit Ethernet Controller (rev 03)
    2f:02.1 Ethernet controller: Intel Corporation 82546GB Gigabit Ethernet Controller (rev 03)

    Turned my attention back to the ifconfig-eth4 and the fact that there was not a MAC address defined in the config file. Grabbed the mac address out of /etc/sysconfig/hwconf and added it to the ifconfig-eth4 config file

    class: NETWORK
    bus: PCI
    detached: 0
    device: eth4
    driver: e1000
    desc: "Intel Corporation 82546GB Gigabit Ethernet Controller"
    network.hwaddr: 00:04:23:cb:89:2e
    vendorId: 8086
    deviceId: 1079
    subVendorId: 8086
    subDeviceId: 1179
    pciType: 1
    pcidom:    0
    pcibus: 2f
    pcidev:  2
    pcifn:  0

    Then ifup works. Day is saved.

  • Meld — Graphical Merge and Diff Tool for Linux

    Mind-meldMeld is a very nice tool for those who cant stand to use diff to compare the differenced between two text files. If you have either the rpmforge repo or the epel repo configured you can install it via yum. Note: I am using Centos 5.4 which is a bit dated, so you might find a newer version in your repo depending on the OS that you are running.

    Anyway, once installed you can compare two files like so

    >meld syslog.conf syslog.conf.orig

    This  will pop up a side by side comparison of the two files in an Xwindow, so make sure that you have forwarding enabled. You might need to ssh -X to your server.

    Meld is not new by any means – the project's sourceforge page shows that its the latest meld version (1.5) was release. The version that I installed via my rpmforge repo is even older (1.1.5). Again I am running Centos 5.4.

    Meld can also be used to merge two files together and perform a diff on directory structures, however just having a nice looking diff is enough for me. 

    http://meld.sourceforge.net/

     

  • Systemd/Systemctl in Fedora 15 — WTF is this?

    Nausea_smiley Fresh install of Fedora 15 on my home machine… feeling great, running great. Got myself a fast new SSD, and upgraded to a new quad core and 8gb of ram. Then i run into this.

    [root@fedora15 ~]# service nscd start
    Starting nscd (via systemctl):                             [  OK  ]

     

    Oh man whats this — systemctl. If this is anything like upstart I am going to be ill.  Well guess what, it is. Even worse, its also kinda like svcadm in Solaris10.

    "systemd is a replacement for the System V init daemon for Linux. It is intended to provide a better framework for expressing services' dependencies, allow more work to be done in parallel at system startup, and to reduce shell overhead"

    Seriously, was there something wrong with systemV init scripts that i was not aware of.  Looks like systemd is enabled by default in Fedora15,

    Anway, the link directly below will take you to a nice cheatsheet for systemd commands. Looks like they are also mucking around with the sysivinit Runlevels. Scroll down for that little gem.

    http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet

    Below is also a FAQ on systemd

    http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions

    And a bit more insight into what it is and where it comes from

    http://www.h-online.com/open/news/item/Systemd-presented-as-SysV-Init-and-Upstart-alternative-991875.html

    Finally the blog post from the developer announcing systemd. Apparently from last year.

    http://0pointer.de/blog/projects/systemd.html

    Wondering now when we are going to see this in RHEL and if and when systemVinit will be completely deprecated.

  • Tracking Down I/O Hotspots in Linux w/ Veritas

    MagTapeDrive Got a heads up from a DBA today stating that one of the their database servers was running hot from an i/o perspective. So in order to troubleshoot jumped on the server and ran an iostat

    >iostat -d -x 5 3

    Based on the output below i was able to determine which disks where the most utilized by looking at the last column which is %utilized. Two other columns to take note of are await and svctime,where await time is the average response time in ms for an i/o request to the device, including any time spent waiting in a queue. Svctime is the average time it took to service a request after it was sent to the disk and out of the queue. In this case service times are low so i can pretty much rule out SAN issues.

    VxVM65519     0.00     0.00 230.80 20.80  5753.60   556.80    25.08     1.77    6.94   3.50  99.08
    VxVM65516     0.00     0.00 257.60 21.80  6022.40   467.20    23.23     1.68    6.02   3.01  93.22
    VxVM65515     0.00     0.00 265.80 18.80  6563.20   364.80    24.34     1.42    4.89   2.69  94.58
    VxVM65513     0.00     0.00 233.20 24.00  6032.00   969.60    27.22     1.41    5.47   2.99  88.92
    VxVM65493     0.00     0.00 308.80 21.00  7590.40   944.00    25.88     1.74    5.27   2.52  98.14
    VxVM65492     0.00     0.00 262.80 20.40  6502.40   716.80    25.49     1.76    6.10   2.94  99.22

    In this case svctimes are ok so i know that the disks are performing well, however i do know that the hot disks are under Veritas control, so i take a quick look at the disk groups on the box

    >vxdg list

    Then do i vxstat on each disk group individually to look for the ones with high number or reads and rights. Then i can advise the dbas which specific database is causing the load on the box.

    >vxstat -g example_dg -i 1

     

  • ProLiant System Management Homepage

    Prod-shot-170x190 The HP Systems management homepage is a web based utility for managing and monitoring Proliant Servers. It can be installed via the ProLiant Support Pack DVD (on linux its just an rpm). Once installed you can modify the default settings via the perl script, hpSMHSetup.pl located in /usr/local/hp.

    To access your server's homepage navigate to https://<yourhostname&gt;:2381 in your browser. You must include the https:// part of the url. Use your root user and password to access.

    From the homepage you can monitor system, subsystems and status views of your server. Any critical, major, minor, or warning alerts will appear in the Overall Status Summary.

     

  • Linux Load Generating Script

    Daemon_hammer Nice little Linux load generating script courtesy of unixfoo.

    http://unixfoo.blogspot.com/2008/11/linux-cpu-hammer-script.html 

    More information on stress testing Linux can be found here

    There are also several additional stress test tools available for RHEL/CentOS in the Dag repo, such as stress, hammerhead,  and fio,

  • How to Configure NTP in a RHEL/CentOS Vmware Guest

    HourglassSuccessful time keeping in a Virtual Machine can be a bit confusing. At times I have been told to use Vmware Tools to sync time between the Guest and the Host, and at time I have been advised to avoid this functionality and use NTP. The following information is direct from a VMware KB article (updated, 4/16/2010) so I am going to follow their lead on this and use NTP exclusively.

    First off VMware advises using the NTP service to keep time in sync, but it suggests
    using an additional kernel parameter that you add to your grub.conf. See the KB Article for more info on how to do this.

    • notsc for RHEL/Centos 4.6 64bit
    • notsc divider=10 for  RHEL/Centos 5.3 64bit

    Note that there are no additional params needed for 5.4

    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427

    Also, inside the ntp.conf the following line should be added to the top of the file.

    tinker panic 0

    This configuration directive instructs NTP not to give up
    if it sees a large jump in time. This is important for coping with large
    time drifts and also resuming virtual machines from their suspended state.

    It is also important not to use the local clock as a time source, often
    referred to as the Undisciplined Local Clock. NTP has a tendency to fall
    back to this in preference to the remote servers when there is a large
    amount of time drift.

    An example of such a configuration is below. You should comment out both
    lines.

    server 127.127.1.0

    fudge 127.127.1.0 stratum 10

    Also, if you are using ntp, you want to make sure that you disable
    Vmware tools time sync. You can do so with the following command via the
    guest OS.

    vmware-guestd –cmd “vmx.set_option synctime 1 0”