RealTechTalk (RTT) - Linux/Server Administration/Related

We have years of knowledge with technology, especially in the IT (Information Technology) industry. 

realtechtalk.com will always have fresh and useful information on a variety of subjects from Graphic Design, Server Administration, Web  Hosting Industry and much more.

This site will specialize in unique topics and problems faced by web hosts, Unix/Linux administrators, web developers, computer technicians, hardware, networking, scripting, web design and much more. The aim of this site is to explain common problems and solutions in a simple way. Forums are ineffective because they have a lot of talk, but it's hard to find the answer you're looking for, and as we know, the answer is usually not there. No one has time to scour the net for forums and read pages of irrelevant information on different forums/threads. RTT just gives you what you're looking for.

Latest Articles

  • OpenVZ avoid vzctl 4.7 and ploop


    OpenVZ has made vzctl version 4.7 default to using ploop which is a big annoyance.  No one wants it otherwise we'd use Xen or KVM.

    Make sure to manually specify vzctl 4.6.1 or you will have issues with old scripts breaking since it defaults to using ploop (a single image like Xen/KVM).

    Here's a list to old versions of vzctl.


  • Wordpress Security Hole, Plug it by manually installing themes and plugins


    It's always bothered me how Wordpress basically forces the user to provide their hosting credentials to install themes and plugins.  How do know for sure the data is not being saved, intercepted and being provided backdoor access to the NSA or other agencies or even just being misused by others with access?

    Here's how to close the security hole above and if you're already given Wordpress your credentials make sure you change everything associated it with it.  Eg. change your ftp username and password, database password and if the same login gives you access to your hosting account/control panel you'll need to change all of your e-mail passwords too.

    1. Search for themes from their website directly.
    2. Download it to your computer, extract the zip file.
    3. FTP/Upload the extracted directory to your hosting account to the "wp-content/themes" directory for your domain.
    4. Activate it from your Wordpress

    Yes the above takes a few extra steps but is well worth the peace of mind.

     


  • LVM Tutorial how to create a Physical Volume (PV), Volume Group (vg), and a Logical Volume (LV) within it


    # first we need a physical volume which we use the pvcreate tool to create

    # I create mine on /dev/sdb3
    pvcreate /dev/sdb3
      dev_is_mpath: failed to get device for 8:19
      Physical volume "/dev/sdb3" successfully created

    # pvdisplay shows the newly created volume
    pvdisplay
      "/dev/sdb3" is a new physical volume of "1.35 TiB"
      --- NEW Physical volume ---
      PV Name               /dev/sdb3
      VG Name              
      PV Size               1.35 TiB
      Allocatable           NO
      PE Size               0  
      Total PE              0
      Free PE               0
      Allocated PE          0
      PV UUID               gpMwTX-JNA7-oTXT-YoCJ-RsKF-ceJd-3hin8w

    # we need to create a new volume group within the physical volume of /dev/sdb3
    # below I call it "kvmvm" on /dev/sdb3
    vgcreate kvmvm /dev/sdb3
      Volume group "kvmvm" successfully created

    # we can see below with vgdisplay that it has been created
    vgdisplay
      --- Volume group ---
      VG Name               kvmvm
      System ID            
      Format                lvm2
      Metadata Areas        1
      Metadata Sequence No  1
      VG Access             read/write
      VG Status             resizable
      MAX LV                0
      Cur LV                0
      Open LV               0
      Max PV                0
      Cur PV                1
      Act PV                1
      VG Size               1.35 TiB
      PE Size               4.00 MiB
      Total PE              352925
      Alloc PE / Size       0 / 0  
      Free  PE / Size       352925 / 1.35 TiB
      VG UUID               2d42cr-3f92-wF25-l288-JThZ-GGGQ-ttYvI6

    # now that I have a volume group I need to create a logical volume (basically a mini-usable/resizeable partition within LVM's PV /dev/sdb3 on the VG kvmvm

    # create a 60GB partition on the VG kvmvm and call it "kvmuserrdp"  
    lvcreate -L 60G kvmvm -n kvmuserrdp
      Logical volume "kvmuserrdp" created

    # shows the newly created lv (logical volume) which is accessible like a normal drive under /dev/kvmvm/kvmuserrdp

    lvdisplay
      --- Logical volume ---
      LV Path                /dev/kvmvm/kvmuserrdp
      LV Name                kvmuserrdp
      VG Name                kvmvm
      LV UUID                HQhCr0-S2WS-DJEn-eHcc-axYn-uA8M-6bnYro
      LV Write Access        read/write
      LV Creation host, time testbox, 2014-03-26 16:52:56 +0800
      LV Status              available
      # open                 0
      LV Size                60.00 GiB
      Current LE             15360
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Block device           253:0
     


  • Howto Convert Xen Image to KVM


    #count=10000 makes an image of 10000MB make sure your image is at least the same as your existing
    dd if=/dev/zero of=yourimage.img bs=1M count=10000


    # losetup -fv newimage.raw
    # fdisk -cu /dev/loop0


    # kpartx -a /dev/loop0

    # dd if= of=/dev/mapper/loop0p1
    # e2fsck -f /dev/mapper/loop0p1
    # resize2fs /dev/mapper/loop0p1



    # a lot of guides tell you to edit /etc/fstab and /boot/grub/menu.conf and make everything vda or vda1 but I have no idea why
    # You need to make it /sda1 or whatever the root partition is

    for i in dev sys proc; do mount -o bind /$i mnt/$i; done
    mount -o bind mnt/mnt
    chroot mnt

    yum -y install grub

    [root@testbox /]# echo "(hd0) /dev/vda" > /boot/grub/devices.map
    [root@testbox /]# grub --no-floppy
    Probing devices to guess BIOS drives. This may take a long time.


        GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

     [ Minimal BASH-like line editing is supported.  For the first word, TAB
       lists possible command completions.  Anywhere else TAB lists the possible
       completions of a device/filename.]
    grub> device (hd0) /mnt/kvmuser5900.img
    device (hd0) /mnt/kvmuser5900.img
    grub> root (hd0,0)
    root (hd0,0)
     Filesystem type is ext2fs, partition type 0x83
    grub> setup (hd0)
    setup (hd0)
     Checking if "/boot/grub/stage1" exists... no
     Checking if "/grub/stage1" exists... no

    Error 15t: File not found
    grub>

    grub
    Probing devices to guess BIOS drives. This may take a long time.


        GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

     [ Minimal BASH-like line editing is supported.  For the first word, TAB
       lists possible command completions.  Anywhere else TAB lists the possible
       completions of a device/filename.]
    grub> device (hd0) /mnt/kvmuser5900.img
    device (hd0) /mnt/kvmuser5900.img
    grub> root (hd0,0)
    root (hd0,0)
     Filesystem type is ext2fs, partition type 0x83
    grub> setup (hd0)
    setup (hd0)
     Checking if "/boot/grub/stage1" exists... yes
     Checking if "/boot/grub/stage2" exists... yes
     Checking if "/boot/grub/e2fs_stage1_5" exists... yes
     Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  27 sectors are embedded.
    succeeded
     Running "install /boot/grub/stage1 (hd0) (hd0)1+27 p (hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
    Done.
    grub> quit
    quit



    #edit grub.conf with the right options obviously dev=xvda is wrong you'll likely want /dev/sda1 as your root or whatever the partition is
    [root@testbox /]# vi /boot/grub/grub.conf
    #edit fstab to mount the right partition
    [root@testbox /]# vi /etc/fstab
    #setup inittab properly
    #Comment the line containing xvc0.
    [root@testbox /]# vi /etc/inittab
    [root@testbox /]# exit


    [root@testbox kvmuser5900]# umount mnt/*
    umount: mnt/bin: not mounted
    umount: mnt/boot: not mounted
    umount: mnt/etc: not mounted
    umount: mnt/home: not mounted
    umount: mnt/lib: not mounted
    umount: mnt/lost+found: not mounted
    umount: mnt/media: not mounted
    umount: mnt/mnt: not mounted
    umount: mnt/opt: not mounted
    umount: mnt/root: not mounted
    umount: mnt/sbin: not mounted
    umount: mnt/selinux: not mounted
    umount: mnt/srv: not mounted
    umount: mnt/tmp: not mounted
    umount: mnt/usr: not mounted
    umount: mnt/var: not mounted

    [root@testbox kvmuser5900]# umount mnt/
    [root@testbox kvmuser5900]# kpartx -d /dev/loop0
    [root@testbox kvmuser5900]# losetup -d /dev/loop0


  • yum error "Error: database disk image is malformed" solution


    yum -y install mathtools
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: centos.mirror.rafal.ca
     * epel: mirror.steadfast.net
     * extras: mirror.agmn.ca
     * rpmforge: repoforge.mirror.constant.com
     * updates: centosb5.centos.org
    extras                                                                                        | 3.4 kB     00:00    
    rpmforge                                                                                      | 1.9 kB     00:00    
    updates                                                                                       | 3.4 kB     00:00    
    updates/primary_db                                                                            | 1.9 MB     00:00    
    vz-base                                                                                       |  951 B     00:00    
    vz-updates                                                                                    |  951 B     00:00    
    Error: database disk image is malformed

    Solution:
    yum clean all


  • drbd howto solve splitbrain or WFConnection


    On primary node

    drbdadm connect all


    On secondary node
    drbdadm -- --discard-my-data connect all

     


  • How to view GPT/EFI Windows Partition Table


    fdisk unfortunately can't do this and I'm not sure if there's any updated version that handles it but parted can do it.

    Here's an example of how to do it:

    parted /dev/sda print

    1      17.4kB  1024MB  1024MB  ntfs         primary
    2      1024MB  16144MB  15120MB  ntfs          primary

    /dev/sda1 would be the first partiton

    /dev/sda2 would be the second partition

    You can then just access them like any other normal partition.


  • Howto Restore Acer Aspire E1-531-4406


    Hit Alt + F10 before the system boots and you'll boot into the recovery drive and be able to restore your system, of course note that all of your data will be wiped out.


  • How to Enable RDP Remote Desktop in Windows 2008 Server


    Start -> Administrative Tools -> Server Manager

    Under "Computer Information" click "Configure Remote Desktop".

    Under "System Properties" choose the type of "Allow connections" you want.

    That's all there is to enabling RDP Access in 2008 server.


  • virtio KVM drivers download location


    http://realtechtalk.com/downloads/virtio-win-0.1-74.iso

    Originally from https://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/bin/bin/images/


  • "Detecting hardware, please wait..." Ubuntu Install Error Solution


    "Detecting hardware, please wait..."

    Solution

    This occurs if you are installing with low RAM such as 128MB
    Bump it up at least to 512MB for the install


  • lvm how to resize and extend a volume


    lvextend -L +10G /dev/kvmvm/w2k8r2evalstandard
      Extending logical volume w2k8r2evalstandard to 20.00 GiB
      Logical volume w2k8r2evalstandard successfully resized

    The above adds 10GB to the logical volume.  Of course you must resize the filesystem using other tools to take advantage of the space.


  • Asterisk VOIP Sipura/Linksys PAP2T Calls Not Being Received Solution


    This problem seemed to happen recently but was likely causing issues before.

    Now there are a few reasons why this can happen especially if your adapter has DND mode enabled (disable it).

    However that wasn't my issue and I only figured it out the other day  when  by fluke if you're on the phone (making a call) then  calls will come in.

    That's when I figured out the solution:

    This likely applies to other adapters but in a Sipura/Linksys you'll find this under "Advanced" settings for your line.

        NAT Mapping Enable:   NAT Keep Alive Enable:

    Enable both of those especialy the Keep Alive as otherwise the PBX/Asterisk/server won't realize your phone is alive and ready to receive calls.

    The above seems to have solved it for me.


  • OpenVZ mismatched kernel and dev when compiling.


    ./configure
    ./configure: line 91: cd: /lib/modules/2.6.32-042stab084.25/build: No such file or directory

    Error: kernel version not found.
    Please make sure your kernel is configured.

    dr-xr-xr-x.  4 root root   4096 Feb 21 06:13 ..
    lrwxrwxrwx   1 root root     45 Feb 21 06:13 build -> ../../../usr/src/kernels/2.6.32-042stab084.25
    drwxr-xr-x   2 root root   4096 Feb 12 20:18 extra
    drwxr-xr-x  11 root root   4096 Feb 21 06:13 kernel
    -rw-r--r--   1 root root 567702 Feb 21 06:15 modules.alias
    -rw-r--r--   1 root root 547061 Feb 21 06:15 modules.alias.bin
    -rw-r--r--   1 root root   1376 Feb 12 20:19 modules.block
    -rw-r--r--   1 root root     69 Feb 21 06:15 modules.ccwmap
    -rw-r--r--   1 root root 198500 Feb 21 06:15 modules.dep
    -rw-r--r--   1 root root 289392 Feb 21 06:15 modules.dep.bin
    -rw-r--r--   1 root root     68 Feb 12 20:19 modules.drm
    -rw-r--r--   1 root root    665 Feb 21 06:15 modules.ieee1394map
    -rw-r--r--   1 root root    141 Feb 21 06:15 modules.inputmap
    -rw-r--r--   1 root root   1775 Feb 21 06:15 modules.isapnpmap
    -rw-r--r--   1 root root     29 Feb 12 20:19 modules.modesetting
    -rw-r--r--   1 root root   1929 Feb 12 20:19 modules.networking
    -rw-r--r--   1 root root     74 Feb 21 06:15 modules.ofmap
    -rw-r--r--   1 root root  75547 Feb 12 20:17 modules.order
    -rw-r--r--   1 root root 405413 Feb 21 06:15 modules.pcimap
    -rw-r--r--   1 root root   6259 Feb 21 06:15 modules.seriomap
    -rw-r--r--   1 root root 220302 Feb 21 06:15 modules.symbols
    -rw-r--r--   1 root root 280714 Feb 21 06:15 modules.symbols.bin
    -rw-r--r--   1 root root 837314 Feb 21 06:15 modules.usbmap
    lrwxrwxrwx   1 root root      5 Feb 21 06:13 source -> build
    drwxr-xr-x   2 root root   4096 Feb 12 20:18 updates
    drwxr-xr-x   2 root root   4096 Feb 21 06:13 vdso
    drwxr-xr-x   2 root root   4096 Feb 12 20:18 weak-updates
    [root@testbox 2.6.32-042stab084.25]# ls /usr/src/kernels/2.6.32-
    2.6.32-042stab084.26/  2.6.32-431.el6.x86_64/
    [root@testbox 2.6.32-042stab084.25]# ls /usr/src/kernels/2.6.32-042stab084.26/
    arch   c rypto   firmware  include  ipc     lib       Makefile.common  Module.symvers  samples  security  System.map  usr
    block  drivers  fs        init     kernel  Makefile  mm               net             scripts  sound     tools       virt
    [root@testbox 2.6.32-042stab084.25]# ls
    build          modules.alias.bin  modules.dep.bin      modules.isapnpmap    modules.order     modules.symbols.bin  vdso
    extra          modules.block      modules.drm          modules.modesetting  modules.pcimap    modules.usbmap       weak-updates
    kernel         modules.ccwmap     modules.ieee1394map  modules.networking   modules.seriomap  source
    modules.alias  modules.dep        modules.inputmap     modules.ofmap        modules.symbols   updates
    [root@testbox 2.6.32-042stab084.25]# ls ../../../usr/src/kernels/2.6.32-042stab084.25
    ls: cannot access ../../../usr/src/kernels/2.6.32-042stab084.25: No such file or directory

    Linux testbox 2.6.32-042stab084.25 #1 SMP Wed Feb 12 16:04:42 MSK 2014 x86_64 x86_64 x86_64 GNU/Linux
    [root@testbox 2.6.32-042stab084.25]# ls /boot/grub/
    device.map     fat_stage1_5  grub.conf         jfs_stage1_5  minix_stage1_5     splash.xpm.gz  stage2         vstafs_stage1_5
    e2fs_stage1_5  ffs_stage1_5  iso9660_stage1_5  menu.lst      reiserfs_stage1_5  stage1         ufs2_stage1_5  xfs_stage1_5
    [root@testbox 2.6.32-042stab084.25]# ls /boot/grub/^C
    [root@testbox 2.6.32-042stab084.25]# ls /boot/
    config-2.6.32-042stab084.25   initramfs-2.6.32-042stab084.25.img     symvers-2.6.32-042stab084.25.gz   vmlinuz-2.6.32-042stab084.25
    config-2.6.32-431.el6.x86_64  initramfs-2.6.32-431.el6.x86_64.img    symvers-2.6.32-431.el6.x86_64.gz  vmlinuz-2.6.32-431.el6.x86_64
    efi                           initrd-2.6.32-042stab084.25kdump.img   System.map-2.6.32-042stab084.25
    grub                          initrd-2.6.32-431.el6.x86_64kdump.img  System.map-2.6.32-431.el6.x86_64
    [root@testbox 2.6.32-042stab084.25]# rpm -aq|grep vzkernel
    vzkernel-2.6.32-042stab084.25.x86_64
    vzkernel-devel-2.6.32-042stab084.26.x86_64
    [root@testbox 2.6.32-042stab084.25]# yum -y install vzkernel-2.6.32-042stab084.25.x86_64
    Loaded plugins: fastestmirror, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.hustunique.com
     * extras: mirror.bit.edu.cn
     * openvz-kernel-rhel6: ftp.iij.ad.jp


    yum installed the wrong version, the devel does not match the actual running kernel!
     


  • Microsoft Updates suddenly stops at 50% downloading solution


    This seems to mainly affect new installs of Windows and especially on XP randomly.

    There are whole pages dedicated to the subject but none of them have a simple proper solution.

    They and Microsoft say to use "Microsoft Fix It", the only problem is it requires .NET and many new installs of Windows don't have it by default.

    The simple solution you asked for

    Just reboot Windows and that is how I fixed it.


  • Enable Multiple RDP Sessions on Windows XP, Vista, 7 Howto


    http://deepxw.blogspot.ca/search/label/Universal%20Termsrv.dll%20Patch

    The above site has the patch that does this essentialy turning a Desktop Windows into a full fledged RDP server.


  • mencoder howto trim split edit time of mp4 from Samsung Note


    mencoder -fps 30 -ss 00:00:38 -oac lavc -ovc copy 152408.mp4 -o soundedit.mp4

    The -ss flag means to start at 38 seconds (so the first 38 seconds of video will be removed).


  • How to read a conf file without the comments


     cat /etc/some.conf|grep -Ev '^#|^;|^$'

    This assumes that comments start with # or ; (adjust as necessary).  Also note that the ^$ omits blank lines.


  • yum Centos 386 and 64 bit conflict resolution


    This can happen when you install RPMForge or other repos with the wrong architecture and here's how you fix it (simply uninstalling won't usually fix it):

    solution
    yum clean all

    yum -y install openvpn
    Loaded plugins: fastestmirror, presto
    Loading mirror speeds from cached hostfile
     * base: mirror.its.sfu.ca
     * extras: centos.mirror.nexicom.net
     * rpmforge: mirror.cpsc.ucalgary.ca
     * updates: centos.arcticnetwork.ca
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package openvpn.x86_64 0:2.2.2-1.el5.rf will be installed
    --> Processing Dependency: lzo for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: libcrypto.so.6()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: libssl.so.6()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: libpkcs11-helper.so.1()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: liblzo2.so.2()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Running transaction check
    ---> Package lzo.x86_64 0:2.06-1.el5.rf will be installed
    ---> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed
    ---> Package pkcs11-helper.x86_64 0:1.08-1.el5.rf will be installed
    --> Processing Dependency: libgnutls.so.13(GNUTLS_1_3)(64bit) for package: pkcs11-helper-1.08-1.el5.rf.x86_64
    --> Processing Dependency: libgnutls.so.13()(64bit) for package: pkcs11-helper-1.08-1.el5.rf.x86_64
    --> Finished Dependency Resolution
    Error: Package: pkcs11-helper-1.08-1.el5.rf.x86_64 (rpmforge)
               Requires: libgnutls.so.13()(64bit)
    Error: Package: pkcs11-helper-1.08-1.el5.rf.x86_64 (rpmforge)
               Requires: libgnutls.so.13(GNUTLS_1_3)(64bit)
     You could try using --skip-broken to work around the problem
    ** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
    rpmforge-release-0.5.2-2.el6.rf.x86_64 is a duplicate with rpmforge-release-0.5.1-1.el5.rf.i386
    yum -y install openvpn
    Loaded plugins: fastestmirror, presto
    Loading mirror speeds from cached hostfile
     * base: mirror.its.sfu.ca
     * extras: centos.mirror.nexicom.net
     * rpmforge: mirror.cpsc.ucalgary.ca
     * updates: centos.arcticnetwork.ca
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package openvpn.x86_64 0:2.2.2-1.el5.rf will be installed
    --> Processing Dependency: lzo for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: libcrypto.so.6()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: libssl.so.6()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: libpkcs11-helper.so.1()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Processing Dependency: liblzo2.so.2()(64bit) for package: openvpn-2.2.2-1.el5.rf.x86_64
    --> Running transaction check
    ---> Package lzo.x86_64 0:2.06-1.el5.rf will be installed
    ---> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed
    ---> Package pkcs11-helper.x86_64 0:1.08-1.el5.rf will be installed
    --> Processing Dependency: libgnutls.so.13(GNUTLS_1_3)(64bit) for package: pkcs11-helper-1.08-1.el5.rf.x86_64
    --> Processing Dependency: libgnutls.so.13()(64bit) for package: pkcs11-helper-1.08-1.el5.rf.x86_64
    --> Finished Dependency Resolution
    Error: Package: pkcs11-helper-1.08-1.el5.rf.x86_64 (rpmforge)
               Requires: libgnutls.so.13()(64bit)
    Error: Package: pkcs11-helper-1.08-1.el5.rf.x86_64 (rpmforge)
               Requires: libgnutls.so.13(GNUTLS_1_3)(64bit)
     You could try using --skip-broken to work around the problem
    ** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
    rpmforge-release-0.5.2-2.el6.rf.x86_64 is a duplicate with rpmforge-release-0.5.1-1.el5.rf.i386


  • OpenVZ Quick Install Copy & Paste for Centos 6


    yum -y install wget
    wget -P /etc/yum.repos.d/ http://ftp.openvz.org/openvz.repo
    rpm --import http://ftp.openvz.org/RPM-GPG-Key-OpenVZ
    yum -y install vzkernel vzctl

    After that just reboot and you may also have to enable ip_forward in /etc/sysctl.conf


  • NVIDIA GeForce GT 610 not working in Linux solution - use older 304.117 driver


    I used the slightly older "304.117" version and it worked.

    With the newest version I couldn't get X to start and kept getting these errors in messages/dmesg.

    [ 2346.083660] nvidia 0000:01:00.0: irq 44 for MSI/MSI-X
    [ 2350.608342] NVRM: RmInitAdapter failed! (0x12:0x2b:1831)
    [ 2350.608354] NVRM: rm_init_adapter failed for device bearing minor number 0
    [ 2350.608369] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5


  • nf_conntrack: table full, dropping packet solution


    nf_conntrack: table full, dropping packet

    The above in some cases I've seen is a sign of a DOS attack or can occur if users are using services like torrenting, proxy, VPN etc...  Do not take it lightly as the above can knock a server offline if the table becomes full and I've also seen full crashes and kernel panics shortly after.

     


  • yum error installing php solution - exclude php from being installed from third party repos


    Error: Package: php-Monolog-dynamo-1.7.0-1.el6.noarch (epel)
               Requires: php-aws-sdk
    Error: php-pecl-zendopcache conflicts with 1:php-eaccelerator-0.9.6.1-1.el6.x86_64
    Error: php-xcache conflicts with php-pecl-apc-3.1.9-2.el6.x86_64
    Error: php-pecl-zendopcache conflicts with php-pecl-apc-3.1.9-2.el6.x86_64
    Error: Package: php-horde-Horde-Vfs-2.1.2-2.el6.noarch (epel)
               Requires: php-pecl(ssh2) >= 0.12
               Installing: php-pecl-ssh2-0.11.0-7.el6.x86_64 (epel)
                   php-pecl(ssh2) = 0.11.0
    Error: php-pecl-apc conflicts with 1:php-eaccelerator-0.9.6.1-1.el6.x86_64
    Error: php-pecl-apcu conflicts with php-pecl-apc-3.1.9-2.el6.x86_64
    Error: php-pecl-gmagick conflicts with php-magickwand-1.0.9-1.el6.x86_64
    Error: php-xcache conflicts with 1:php-eaccelerator-0.9.6.1-1.el6.x86_64
    Error: php-pecl-zendopcache conflicts with php-xcache-3.0.4-1.el6.x86_64
    Error: php-xcache conflicts with php-pecl-zendopcache-7.0.3-1.el6.x86_64
    Error: php-pecl-http1-devel conflicts with php-pecl-http-devel-2.0.4-1.el6.x86_64
    Error: php-ZendFramework2-common conflicts with php-ZendFramework-1.12.3-1.el6.noarch
    Error: php-pecl-apcu-devel conflicts with php-pecl-apc-devel-3.1.9-2.el6.x86_64
    Error: php-pecl-gmagick conflicts with php-pecl-imagick-2.2.2-4.el6.x86_64
    Error: php-pecl-http1 conflicts with php-pecl-http-2.0.4-1.el6.x86_64
    Error: php-pecl-http conflicts with php-pecl-http1-1.7.6-4.el6.x86_64
     You could try using --skip-broken to work around the problem
     You could try running: rpm -Va --nofiles --nodigest


    Edit all repos in /etc/yum/repos.d/* to exclude=php* (the problem is that repos like rpmforge elrepo, epel have PHP and it ends up conflicting and creating upgrade/install issues with the PHP that comes from the main Centos repo)


  • Centos 6 server crash - " kernel:[735188.961824] Kernel panic - not syncing: Fatal exception in interrupt Write failed: Broken pipe"


     kernel:[735188.961824] Kernel panic - not syncing: Fatal exception in interrupt
    Write failed: Broken pipe

    I'm not sure what is causing this and have never seen it on any server before.


  • CPanel Apache httpd won't start solution: Starting httpd: Syntax error on line 2 of /etc/httpd/conf/httpd.conf: Invalid command 'Alias', perhaps misspelled or defined by a module not included in the server configuration


    root@hkhosting [/]# service httpd start
    Starting httpd: Syntax error on line 2 of /etc/httpd/conf/httpd.conf:
    Invalid command 'Alias', perhaps misspelled or defined by a module not included in the server configuration
                                                               [FAILED]

     

     

    root@hkhosting [/]# vi /etc/httpd/conf/httpd.conf

     

    One way with CPanel is just to use /scripts/easyapache and rebuild everything since who knows what else has gone wrong if the config file got messed up like that.

    This is the entire contents of httpd.conf, it became corrupted somehow.


    Alias /mailman/archives /usr/local/cpanel/3rdparty/mailman/archives/public/
    Alias /pipermail /usr/local/cpanel/3rdparty/mailman/archives/public/
    ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAlias /scgi-bin /usr/local/cpanel/cgi-sys/scgiwrap
    Alias /java-sys /usr/local/cpanel/java-sys/
    Alias /img-sys /usr/local/cpanel/img-sys/
    ScriptAlias /cgi-sys /usr/local/cpanel/cgi-sys/
    ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/whmredirect.cgi
    ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/swhmredirect.cgi
    Alias /bandwidth /usr/local/bandmin/htdocs/
    Alias /sys_cpanel /usr/local/cpanel/sys_cpanel/
    ScriptAliasMatch ^/?securecpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
    ScriptAliasMatch ^/?securecontrolpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
    Include "/usr/local/apache/conf/includes/errordocument.conf"
    ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi
    ScriptAlias /mailman /usr/local/cpanel/3rdparty/mailman/cgi-bin/

    RewriteEngine on
    RewriteMap LeechProtect prg:/usr/local/cpanel/bin/leechprotect


     


  • Setting Ulimit


    I never found a solution to do it live (nothing worked that I found) so it looks like a relogin is required.

    Check your maximum file limit

     cat /proc/sys/fs/file-max
    824460

     

    This is different than your actual's user limit which you'll see below

    ulimit -n
    1024

    Try and set it higher but it won't work

    ulimit -n 65000
    -bash: ulimit: open files: cannot modify limit: Operation not permitted

    Set system wide defaults

    sudo vi /etc/security/limits.conf
    *             hard    nofiles           600000
    *             soft    nofiles           500000

    Making it live from a shell session (it won't work for your GNOME/XWindows session itself)
    sudo su
    root@homebox:/home/one# ulimit -n
    1024
    root@homebox:/home/one# ulimit -n 60000

    ulimit -n
    60000

    root@homebox:/home/one# ulimit -n 60000
    root@homebox:/home/one# ulimit -n
    60000
    root@homebox:/home/one# su - one
    one@homebox:~$ ulimit -n
     


  • Centos Howto Upgrade to PHP 5.3 from 5.2


    It's not as simple as "yum install" as you can see below and it doesn't stop there.

     yum install php53
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * rpmforge: mirror.us.leaseweb.net
     * extras: centos.mirror.rafal.ca
     * updates: centos.mirror.nexicom.net
     * base: centos.mirror.nexicom.net
     * addons: centos.mirror.nexicom.net
    Setting up Install Process
    Parsing package install arguments
    Resolving Dependencies
    --> Running transaction check
    ---> Package php53.i386 0:5.3.3-22.el5_10 set to be updated
    --> Processing Dependency: php53-cli = 5.3.3-22.el5_10 for package: php53
    --> Processing Dependency: php53-common = 5.3.3-22.el5_10 for package: php53
    --> Running transaction check
    ---> Package php53-cli.i386 0:5.3.3-22.el5_10 set to be updated
    ---> Package php53-common.i386 0:5.3.3-22.el5_10 set to be updated
    --> Processing Conflict: php53-common conflicts php-common
    --> Restarting Dependency Resolution with new changes.
    --> Running transaction check
    ---> Package php-common.i386 0:5.1.6-43.el5_10 set to be updated
    --> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-mysql
    --> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-cli
    --> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-pdo
    --> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-imap
    --> Running transaction check
    ---> Package php-pdo.i386 0:5.1.6-43.el5_10 set to be updated
    ---> Package php-imap.i386 0:5.1.6-43.el5_10 set to be updated
    ---> Package php-mysql.i386 0:5.1.6-43.el5_10 set to be updated
    ---> Package php-cli.i386 0:5.1.6-43.el5_10 set to be updated
    --> Processing Conflict: php53-common conflicts php-common
    --> Finished Dependency Resolution
    php53-common-5.3.3-22.el5_10.i386 from updates has depsolving problems
      --> php53-common conflicts with php-common
    Error: php53-common conflicts with php-common

    Run what is below to avoid dependency hell that I decided not to paste.

    yum -y install package-cleanup
    package-cleanup --problems
    package-cleanup --dupes
    package-cleanup --orphans
    rpm -Va --nofiles --nodigest
    #this fixed it
    yum clean all

    This will require downtime but I couldn't fiind another way that worked:

     echo y|yum remove php-*;echo y|yum install php53*

    yum -x php53-odbc64 install php53*


    Stopping httpd:                                            [FAILED]
    Starting httpd: [Wed Jan 22 16:35:58 2014] [warn] module php5_module is already loaded, skipping
    httpd: Syntax error on line 994 of /etc/httpd/conf/httpd.conf: Syntax error on line 3 of /www/conf/a*********-best.com.conf: Syntax error on line 1 of /usr/local/zend/etc/sites.d/zend-default-vhost-80.conf: Include directory '/usr/local/zend/etc/sites.d/http/__default__/0' not found
                                                               [FAILED]

    To solve the above you have to remove some weird stuff that Zend adds to your default vhost.

     

    #ZEND-{DC789661BC47C707017CAF9F2BB500D1}
    #Include "/usr/local/zend/etc/sites.d/zend-default-vhost-80.conf"
    #ZEND-{DC789661BC47C707017CAF9F2BB500D1}


    #ZEND-{15168DADCE0E562BD3FC24EB9302589D}
    #Include "/usr/local/zend/etc/sites.d/globals-*.conf"
    #Include "/usr/local/zend/etc/sites.d/vhost_*.conf"
    #ZEND-{15168DADCE0E562BD3FC24EB9302589D}

    Your php.ini will probably be wiped out and overwritten so make sure you enable short tags or PHP code with


    /etc/php.ini
    short_open_tag = On


  • Directadmin Install Error Cannot find /usr/include/openssl/ssl.h. Did you run the pre-install commands?


    Cannot find /usr/include/openssl/ssl.h.
    Did you run the pre-install commands?
    http://help.directadmin.com/item.php?id=354


    yum -y install openssl*


  • cPanel VPS Server Cannot Login as root


    I was worried the server was hacked, I was logged in already as root but couldn't login to CPanel or a new SSH session.  I even reset the password from the shell and it did not work still.

    The reason is CPanel Hulk, it detected a brute-force attack so it locked down the root account entirely even from the correct password.  According to cPanel the best way around this is to whitelist your IP.

    http://forums.cpanel.net/f5/password-not-working-whm-cpanel-root-administrator-297262.html

    I was aware of CPanel Hulk but didn't know it completely locks an account even if the password is correct from non-offending IPs so this is something to be aware of, someone could potentially create a denial of service against any of your services/accounts just be intentionally bruteforcing them.


  • Gnome Terminal Cannot Open Error "There was an error creating the child process for this terminal" "Failed to create pipe for communicating with child process (Too many open files)"


    There was an error creating the child process for this terminal

    Failed to create pipe for communicating with child process (Too many open files)

    I get this when trying to open a new tab or new window even.  I've had far more sessions open (literally dozens) before without getting this error.


  • Howto edit/rotate Samsung/Android Videos in mencoder solution


    Movie-Aspect is undefined - no prescaling applied.
    videocodec: libavcodec (720x1280 fourcc=34504d46 [FMP4])
    [mpeg4 @ 0x2c91c00] timebase not supported by mpeg 4 standard
    Could not open codec.
    FATAL: Cannot initialize video driver.

    That is the error I would get, I thought it was a codec error something else.  By fluke I saw something about ffmpeg where someone recommended manually telling it to the "fps" and it worked.  My phone uses 30fps so I knew to do the following:

    mencoder -fps 30  -vf rotate=1 -o output-copy.avi -nosound -ovc copy 25825.mp4
    All I had to do was specify "-fps 30" and it worked whereas before the resulting video was just 1 frame with nothing basically.

    This seems like it will be common with Samsung phones or maybe a lot of Androids.


  • SSH HowTo Create Port Forwards


    ssh -L 5905:localhost:5900 root@yourserver.com

    The "-L" means to create a port forward to a port on your server.

    The 5905 means the port on your computer that will be used to access the port 5900 on the remote server.

    localhost is the IP that you use to access the port forward (you can change it to 0.0.0.0 which will be all IPs on your system/computer but localhost is good for security and privacy unless a whole network of people need access).


  • /usr/local/cpanel/bin/apache_conf_distiller 100% cpu


    On some CPanel installs we see complaints of "/usr/local/cpanel/bin/apache_conf_distiller" causing 100% cpu usage without any solution.

    Killing the process causes it to spawn again, actually it seems it tends to spawn multiple processes itself.

    Restarting CPanel itself is a temporary but not permanent solution.


  • [emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.15449) (5) solution



    [Wed Jan 08 18:50:07 2014] [emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.15449) (5)

    This may happen when trying to restart Apache and you find it dies right after starting and check /var/log/httpd/error_logs.

    What is the cause of this?

    1. You could be out of disk space (if you're not then see #2 and below)
    2. You're out of Semaphores, you need to kill all the old ones.


    Check to see current Semaphores, if Apache has stopped it should have none.  If you run the command below and see them you need to manually kill them.


    ipcs -s
    ------ Semaphore Arrays --------
    key        semid      owner      perms      nsems    
    0x00000000 0          apache    600        1        
    0x00000000 229377     apache    600        1        
    0x00000000 262146     apache    600        1        
    0x00000000 294915     apache    600        1        
    0x00000000 327684     apache    600        1        
    0x00000000 360453     apache    600        1        
    0x00000000 1671174    apache    600        1        
    0x00000000 1900551    apache    600        1        
    0x00000000 8781832    apache    600        1        
    0x00000000 8814601    apache    600        1        
    0x00000000 8847370    apache    600        1        
    0x00000000 8880139    apache    600        1        
    0x00000000 8912908    apache    600        1        
    0x00000000 8945677    apache    600        1        
    0x00000000 8978446    apache    600        1        
    0x00000000 13205519   apache    600        1        
    0x00000000 13238288   apache    600        1        
    0x00000000 13271057   apache    600        1        
    0x00000000 13303826   apache    600        1        
    0x00000000 13336595   apache    600        1       
     
     

    The bash script below will kill all the old semaphores and you should be able to start Apache succesfully after that.


    for ipcs in `ipcs -s|awk '{print $2}'`;
    do
    echo "ipcs=$ipcs"
    ipcrm -s $ipcs
    done

     


  • What a hdd hard drive and mdadm RAID array failure looks like in Linux


    [3805108.257042] sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
    [3805108.257052] sd 0:0:0:0: [sda] Write Protect is off
    [3805108.257054] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    [3805108.257066] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [3805108.257083] sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
    [3805108.257090] sd 0:0:0:0: [sda] Write Protect is off
    [3805108.257092] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    [3805108.257102] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [3805157.877358] ata1: exception Emask 0x10 SAct 0x0 SErr 0x90202 action 0xe frozen
    [3805157.877360] ata1: irq_stat 0x00400000, PHY RDY changed
    [3805157.877363] ata1: SError: { RecovComm Persist PHYRdyChg 10B8B }
    [3805157.877366] ata1: hard resetting link
    [3805158.620050] ata1: SATA link down (SStatus 0 SControl 300)
    [3805158.851429] ata1: hard resetting link
    [3805162.862545] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
    [3805162.878238] ata1.00: configured for UDMA/133
    [3805162.878252] ata1: limiting SATA link speed to 1.5 Gbps
    [3805162.878255] ata1: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0xf t4
    [3805162.878257] ata1: irq_stat 0x00400040, connection status changed
    [3805162.878260] ata1: hard resetting link
    [3805163.802544] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
    [3805163.818012] ata1.00: configured for UDMA/133
    [3805163.818016] ata1: EH complete
    [3805163.818088] sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
    [3805163.818098] sd 0:0:0:0: [sda] Write Protect is off
    [3805163.818100] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    [3805163.818112] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [3805163.818129] sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
    [3805163.818135] sd 0:0:0:0: [sda] Write Protect is off
    [3805163.818137] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    [3805163.818147] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [3805199.602103] ata1: exception Emask 0x10 SAct 0x0 SErr 0x90200 action 0xe frozen
    [3805199.602106] ata1: irq_stat 0x00400000, PHY RDY changed
    [3805199.602108] ata1: SError: { Persist PHYRdyChg 10B8B }
    [3805199.602112] ata1: hard resetting link
    [3805200.352548] ata1: SATA link down (SStatus 0 SControl 310)
    [3805200.595987] ata1: hard resetting link
    [3805203.342553] ata1: SATA link down (SStatus 0 SControl 310)
    [3805204.390198] ata1: hard resetting link
    [3805208.272545] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
    [3805208.275964] ata1.00: configured for UDMA/133
    [3805208.275977] ata1: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0x9 t4
    [3805208.275979] ata1: irq_stat 0x00000040, connection status changed
    [3805208.278116] ata1.00: configured for UDMA/133
    [3805208.278120] ata1: EH complete
    [3805208.278191] sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
    [3805208.278201] sd 0:0:0:0: [sda] Write Protect is off
    [3805208.278203] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    [3805208.278214] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [3805208.278241] sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
    [3805208.278257] sd 0:0:0:0: [sda] Write Protect is off
    [3805208.278258] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    [3805208.278269] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [3805211.016992] ata1: exception Emask 0x10 SAct 0x0 SErr 0x90200 action 0xe frozen
    [3805211.016994] ata1: irq_stat 0x00400000, PHY RDY changed
    [3805211.016996] ata1: SError: { Persist PHYRdyChg 10B8B }
    [3805211.017000] ata1: hard resetting link
    [3805211.760051] ata1: SATA link down (SStatus 0 SControl 310)
    [3805216.762533] ata1: hard resetting link
    [3805217.112548] ata1: SATA link down (SStatus 0 SControl 310)
    [3805222.112533] ata1: hard resetting link
    [3805222.462549] ata1: SATA link down (SStatus 0 SControl 310)
    [3805222.462555] ata1.00: disabled
    [3805222.462568] ata1: EH complete
    [3805222.462574] sd 0:0:0:0: rejecting I/O to offline device
    [3805222.462585] ata1.00: detaching (SCSI 0:0:0:0)
    [3805222.462592] end_request: I/O error, dev sda, sector 1887460551
    [3805222.462596] md: super_written gets error=-5, uptodate=0
    [3805222.462599] raid1: Disk failure on sda1, disabling device.
    [3805222.462600] raid1: Operation continuing on 1 devices.
    [3805222.462868] sd 0:0:0:0: [sda] Synchronizing SCSI cache
    [3805222.462964] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
    [3805222.462967] sd 0:0:0:0: [sda] Stopping disk
    [3805222.462972] sd 0:0:0:0: [sda] START_STOP FAILED
    [3805222.462973] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
    [3805227.022869] RAID1 conf printout:
    [3805227.022871]  --- wd:1 rd:2
    [3805227.022874]  disk 0, wo:0, o:1, dev:sdc1
    [3805227.022875]  disk 1, wo:1, o:0, dev:sda1
    [3805227.024931] RAID1 conf printout:
    [3805227.024935]  --- wd:1 rd:2
    [3805227.024938]  disk 0, wo:0, o:1, dev:sdc1
    cat /proc/mdstat
    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
    md_d20 : active raid1 sde1[0]
          1953511936 blocks [2/1] [U_]
          bitmap: 231/233 pages [924KB], 4096KB chunk

    md_d1 : active raid1 sda2[1] sdc2[0]
          20490816 blocks [2/2] [UU]
         
    md12 : active raid1 sdb1[0] sdd1[1]
          1953511936 blocks [2/2] [UU]
          bitmap: 0/233 pages [0KB], 4096KB chunk

    md0 : active raid1 sda1[2](F) sdc1[0]
          943730240 blocks [2/1] [U_]
          bitmap: 67/226 pages [268KB], 2048KB chunk
     


  • MySQL How to add a field/column using alter


    ALTER TABLE yourtable ADD COLUMN info VARCHAR(255)


  • PHP does not reload the php.ini setttings until the webserver is restarted


    Just in case anyone is wondering that is the case, it can make troubleshooting impossible if you're making changes to php.ini but don't realize the webserver must be restarted for those changes to apply (contrary to running php-cgi which always looks up the current .ini settings).


  • PHP Warning: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file


    I was having an issue with only certain random/jpeg files with the functions imagecreatefromjpeg imagecreatetruecolor and other related ones.

    This issue was annoying basically it seems like a libgd issue/bug with newer versions of PHP and it was difficult to trace-out.  One very useful thing that helped me was using "php-cgi" and passing the query string as an argument eg:

    php-cgi images.php source=IMG.jpg (that way you get all the error messages which lead me to below):

    PHP Warning:  imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file

    The solution is to tweak the PHP GD settings to ignore this warning

    /etc/php.ini

    [gd]
    ; Tell the jpeg decode to ignore warnings and try to create
    ; a gd image. The warning will then be displayed as notices
    ; disabled by default
    ; http://www.php.net/manual/en/image.configuration.php#ini.image.jpeg-ignore-warning
    gd.jpeg_ignore_warning = 1

     


  • Linux Centos 6 Weird Kernel Panic


    Kernel panic - not syncing: Attempted to kill init!
    Pid: 1, comm: init Not tained: 3.2.51-3.el6.x86_64 #1
    Call Trace:
     panic+0x8c/0x1a2
    forget_original_parent+0x34d/0x360
    exit_notify+0x12/0x140
    do_exit+0x1d8/0x400
    do_group_exit_+0x50/0xc0
    sys_exit_group+0x12/0x20
    system_call_fastpath+0x16/0x1b
    panic occurred, switching back to text console


  • iptables howto multiport forward in single line example


    -A PREROUTING -p tcp -m multiport --dports 10000,18080,13306 -j DNAT --to-destination 192.168.5.83


  • Linux Ubuntu Debian Howto Manually Update/Install Thunderbird


    wget http://download-location
    sudo tar xjvf thunderbird-24.2.0.tar.bz2 -C /opt
    ln -s /opt/thunderbird/thunderbird /usr/bin/thunderbird
    [sudo] password for one:
    ln: creating symbolic link `/usr/bin/thunderbird': File exists

    sudo rm /usr/bin/thunderbird
    ln -s /opt/thunderbird/thunderbird /usr/bin/thunderbird

    The above is how I did it, if you don't do it properly you'll find that you are still using the old version (so verify in About that it is the new version).  I've verified the above method works perfectly, it's great if you're using an older version of Linux and need to update the most commonly used programs like Thunderbird and Firefox.


  • Linux Ubuntu Debian Howto Manually Update/Install Firefox


    wget http://download-location
    mv /usr/bin/firefox /usr/bin/firefox-old
    sudo tar xjvf firefox-26.0.tar.bz2 -C /opt
    ln -s /opt/firefox/firefox /usr/bin/firefox

    The above is how I did it, if you don't do it properly you'll find that you are still using the old version (so verify in About that it is the new version).  I've verified the above method works perfectly, it's great if you're using an older version of Linux and need to update the most commonly used programs like Thunderbird and Firefox.


  • Howto Execute PHP from within an HTML or other file with an htaccess file on Apache


    Add this to a new ".htaccess" file inside the directory where the .html resides:

    AddType application/x-httpd-php .php .html


  • DD-WRT Set Static DHCP IP Address For Lease


    Services -> Services

    "Static Leases"

    Fill out an empty line:

    MAC Address Host Name IP Address

    Those first 3 fields are mandatory, if you miss it then the changes will be lost even if you try to save.

    Make sure you've done it right but clicking "Save" and then "Apply Changes" at the bottom to make them active.

    Then get a new DHCP lease and make sure the IP is correct.


  • css rounded image and background setting tutorial/example



  • [Hardware Error]: CPU:0 MC4_STATUS[-|CE|MiscV|-|AddrV|CECC]: 0x9c054c84011c011b [Hardware Error]: cache level: L3/GEN, tx: GEN, mem-tx: RD [Hardware Error]: Northbridge Error (node 0): L3 data cache ECC error.


    This server has been running for weeks without issue, it's currently only using 1 of 2 CPUs as it is running in the office as a test bed (mainly due to the handle 12 bay storage/great for testing HDDs).  The errors below seem to mainly be from AMD CPUs, it's only happened a single time and in the days since I got that error it hasn't occurrred.

    Interestingly enough /proc/cpuinfo still shows all 4 cores of the CPU (Opteron 2373 Quadcore HE) and the functionality doesn't seem to be affected (nothing crashed etc..)

    I'm not sure what the issue could be, I wonder if it's the power supply?  It was getting a little whiny/noisy around the time this happened (the pitch it was making is also the beginning stages of power supply failure in my experience).

     

    Message from syslogd@fs12home at Dec  6 18:05:50 ...
     kernel:[3022800.704091] [Hardware Error]: CPU:0 MC4_STATUS[-|CE|MiscV|-|AddrV|CECC]: 0x9c054c84011c011b

    Message from syslogd@fs12home at Dec  6 18:05:50 ...
     kernel:[3022800.704127] [Hardware Error]:     MC4_ADDR: 0x000000042d847a84

    Message from syslogd@fs12home at Dec  6 18:05:50 ...
     kernel:[3022800.704145] [Hardware Error]: Northbridge Error (node 0): L3 data cache ECC error.

    Message from syslogd@fs12home at Dec  6 18:05:50 ...
     kernel:[3022800.704169] [Hardware Error]: cache level: L3/GEN, tx: GEN, mem-tx: RD

     


  • Failed to load VMMR0.r0 (VERR_SUPLIB_OWNER_NOT_ROOT)


    Failed to load VMMR0.r0 (VERR_SUPLIB_OWNER_NOT_ROOT)
     

    In most cases the error above is useful, it generally means /usr or /usb/lib or /usr/lib/virtualbox is not owned by root and this is the cause of the error.

    Solution

    sudo chown root.root /usr/lib


  • cPanel Find/Set Main DNS Servers for Template Howto



    Go to:
    "Server Configuration" -> Basic cPanel & WHM Setup
    Scroll to: "Nameservers" (at the bottom)

    From there you can set the names of the nameserver and their IPs.
    It's very weird and confusing that nothing under IP Functions/DNS has or links to this.


  • openssh-server has no installation candidate Debian/Ubuntu Solution


    I don't know why but some installations don't have this in the database by default.

    To fix it to an:

    sudo apt-get update;sudo apt-get install openssh-server

    and then it will work


  • Fatal error: Out of memory (allocated 6291456) (tried to allocate 7680 bytes)


    Fatal error: Out of memory (allocated 6291456) (tried to allocate 7680 bytes)

    This is usually caused by Wordpress, Drupal or other ridiculously inefficient CMS' out there, as a temporary fix you can increase PHP's memory limit but it's best to find the actual culprit, by disabling add-ons and other scripts etc...


  • Ubuntu/Debian how to update FlashPlayer manually


    Download the latest from Adobe's site and unzip it, enter the directory it creates and type the following:

    sudo cp libflashlayer.so /usr/lib/adobe-flashplugin/
    sudo cp -r usr/* /usr


  • Asterisk iptables block bruteforce attacks howto with fail2ban



    yum -y install fail2ban

    vi /etc/fail2ban/jail.conf

    [asterisk-tcp]

    enabled  = true
    filter   = asterisk
    action   = iptables-multiport[name=asterisk-tcp, port="5060,5061", protocol=tcp]
               sendmail-whois[name=Asterisk, dest=you@example.com, sender=fail2ban@example.com]
    logpath  = /var/log/asterisk/messages
    maxretry = 10

    [asterisk-udp]

    enabled  = true
    filter   = asterisk
    action   = iptables-multiport[name=asterisk-udp, port="5060,5061", protocol=udp]
               sendmail-whois[name=Asterisk, dest=you@example.com, sender=fail2ban@example.com]
    logpath  = /var/log/asterisk/messages
    maxretry = 10

    vi /etc/fail2ban/filter.d/asterisk.conf

    # Fail2Ban configuration file
    #
    # Author: Xavier Devlamynck
    #
    # $Revision$
    #


    [INCLUDES]

    # Read common prefixes. If any customizations available -- read them from
    # common.local
    before = common.conf

    [Definition]

    # Option:  failregex
    # Notes.:  regex to match the password failures messages in the logfile. The
    #          host must be matched by a group named "host". The tag "" can
    #          be used for standard IP/hostname matching and is only an alias for
    #          (?:::f{4,6}:)?(?PS+)
    # Values:  TEXT
    #
    failregex = NOTICE%(__pid_re)s .*: Registration from '.*' failed for '' - Wrong password$
                NOTICE%(__pid_re)s .*: Registration from '.*' failed for '' - No matching peer found$
                NOTICE%(__pid_re)s .*: Registration from '.*' failed for '' - Username/auth name mismatch$
                NOTICE%(__pid_re)s .*: Registration from '.*' failed for '' - Device does not match ACL$
                NOTICE%(__pid_re)s .*: Registration from '.*' failed for '' - Peer is not supposed to register$
                NOTICE%(__pid_re)s .*: Registration from '.*' failed for '' - ACL error (permit/deny)$
                NOTICE%(__pid_re)s failed to authenticate as '.*'$
                NOTICE%(__pid_re)s .*: No registration for peer '.*' (from )$
                NOTICE%(__pid_re)s .*: Host failed MD5 authentication for '.*' (.*)$
                NOTICE%(__pid_re)s .*: Failed to authenticate user .*@.*$

    # Option:  ignoreregex
    # Notes.:  regex to ignore. If this regex matches, the line is ignored.
    # Values:  TEXT
    #
    ignoreregex =
    ~                                                                                                                                                                                                                                           
    ~                                                                                                                                                                                                                                           
    ~                                                                                                                                                                                                                                           
    ~                                             

    chkconfig fail2ban on
    service fail2ban start

    cat /var/log/fail2ban.log
    2013-11-25 09:17:43,789 fail2ban.server : INFO   Changed logging target to /var/log/fail2ban.log for Fail2ban v0.8.7
    2013-11-25 09:17:43,791 fail2ban.jail   : INFO   Creating new jail 'asterisk-udp'
    2013-11-25 09:17:43,828 fail2ban.jail   : INFO   Jail 'asterisk-udp' uses Gamin
    2013-11-25 09:17:43,944 fail2ban.jail   : INFO   Initiated 'gamin' backend
    2013-11-25 09:17:43,985 fail2ban.filter : INFO   Added logfile = /var/log/asterisk/messages
    2013-11-25 09:17:43,987 fail2ban.filter : INFO   Set maxRetry = 10
    2013-11-25 09:17:43,989 fail2ban.filter : INFO   Set findtime = 600
    2013-11-25 09:17:43,991 fail2ban.actions: INFO   Set banTime = 600
    2013-11-25 09:17:44,067 fail2ban.jail   : INFO   Creating new jail 'asterisk-tcp'
    2013-11-25 09:17:44,068 fail2ban.jail   : INFO   Jail 'asterisk-tcp' uses Gamin
    2013-11-25 09:17:44,070 fail2ban.jail   : INFO   Initiated 'gamin' backend
    2013-11-25 09:17:44,072 fail2ban.filter : INFO   Added logfile = /var/log/asterisk/messages
    2013-11-25 09:17:44,074 fail2ban.filter : INFO   Set maxRetry = 10
    2013-11-25 09:17:44,077 fail2ban.filter : INFO   Set findtime = 600
    2013-11-25 09:17:44,078 fail2ban.actions: INFO   Set banTime = 600
    2013-11-25 09:17:44,129 fail2ban.jail   : INFO   Jail 'asterisk-udp' started
    2013-11-25 09:17:44,136 fail2ban.jail   : INFO   Jail 'asterisk-tcp' started
                                                                                                                                                                                                 
    ~                                             


  • service monit status monit dead but subsys locked - solution


    service monit status
    monit dead but subsys locked

     


  • Update wordpress script


    Requirements:

    1.) Enter your root wordpress directory.

    2.) Download the latest wordpress.zip to it.

    #backup your current files just in case

    cp -a . wp-current-bk`date +%Y%m%d`

    unzip wordpress-3.7.1.zip
    rm -rf wp-includes
    rm -rf wp-admin
    echo y|cp -a wordpress/wp-includes .
    echo y|cp -a wordpress/wp-admin .
    echo y|cp -a wordpress/wp-content/* wp-content
    echo y|cp wordpress/* .


  • Centos 6 samba server not showing up in WORKGROUP


    This is different than Centos 5, you have two services btu they are called "smb" and "nmb".

    You need to enable and start "nmb" in order for your samba server to be listed.

    chkconfig nmb on; chkconfig smb on

    service nmb start;service smb start


  • pxelinux slow to enter boot screen/menu


    Trying to load: pxelinux.cfg/default
    boot: _ (why does the cursor flash so long before entering the PXE Boot menu?)


  • htaccess allow only certain IPs howto



    order deny,allow
    deny from all
    allow from your.ip.here

     


  • CPanel Log File Locations for access_log,error_log, mysql


    All Errors (CPanel does not report by domain, but puts everything in a single log which I think is a bit silly and annoying):

    /usr/local/apache/logs/error_log

    Access_Logs

    They are found within the home directory of the site user eg.:

    /home/admin/access-logs/yoursite.com

    MySQL Logs

     /var/lib/mysql/yourhostname.err


  • MySQL DELETE all but specific items or records howto


    DELETE FROM `wp_comments` WHERE NOT comment_author_email IN ('user@hotmail.com','another@hotmail.com')

    The above is an example of specific records you type out, but you could also base it on a subquery.


  • Delete all comments from wordpress (in case of extreme SPAM)


    *Note this will delete all comments indiscriminately.

    DELETE FROM `wp_comments`
     

    To delete all but save specific comments based on "author e-mail use the following".  Add more e-mails below in the same format if you have more.

    DELETE FROM `wp_comments` WHERE NOT comment_author_email IN ('user@hotmail.com','another@hotmail.com')


  • Dell CS24-NV7 Howto Enable LAN/NICs and PXEBoot in the BIOS


    Dell CS24-NV7

    Unusually the Virtualization was enabled when I got this server but all the NICs were diabled in the BIOS including PXE boot!

    Advanced -> Advanced Chipset Control


    PCI Slot 1 Option ROM: Enabled
    Onboard LAN1 Control: Enabled
    LAN1 Option ROM Scan: Enabled (you need it for PXE boot)
    Onboard LAN2 Control: Enabled
    LAN2 Option ROM Scan: Enabled

    *you will need to reboot and enter the BIOS again before the NVIDIA Boot Agents for the NICs/PXE Agent is visible in the Boot section and boot options.  You'll also need to enter the "Boot section" and hit "x" to enable each one of them for booting and assign them the correct boot order ou prefer.


    Boot:

    PCI BEV: 2-NVIDIA Boot Agent 277.05 (eth0)
             NVIDIA Boot Agent 277.0547 (eth1) 


  • Ubuntu 10.10 100% CPU from apt-get solution


    When manually running it for some reason it decided to ask for/use the CD as a source which I never set.

    Disabling the CD as a source stops this from happening, otherwise apt-get will keep respawning and use 100% CPU.


  • wget test without actually downloading howto


    user the "--spider" switch and you can see what it would do.

    wget -r --spider dontryrealtechtalk.com


  • Linux Bash Remove Last Character from string/variable howto


    somestring="309sfjlks39889d"
    removelast="${somestring%?}


  • VBox/Virtualbox solution to NS_ERROR_CALL_FAILED error


    VBox/Virtualbox solution to NS_ERROR_CALL_FAILED error

    This is likely because you have 2D/3D acceleration enabled and your card doesn't support it.
    Eg. you switched video card drivers or video cards that did support it.

    The funny thing is that you CANNOT disable those options as they are "greyed" out in the VBox client GUI.
    The config file has to be manually changed and fixed with these options "accelerate3D="false" accelerate2DVideo="false"



    Here's how you fix it:
    1.) Close all instances of the VBox Client
    2.) Run the sed command below (replace XP.xml with the path to your VBox machine's configuration file)
    *Note I recommend sed because there are actually usually multiple instances where the acceleration is enabled in the config file.

    sed -i 's/accelerate3D="true"/accelerate3D="false"/g' XP.xml
    sed -i 's/accelerate2DVideo="true"/accelerate2DVideo="false"/g' XP.xml


    After the above I didn't get the error and was able to boot.


  • Vbulletin howto resend confirmation e-mail


    Visit that link

    http://yourforums.com/forum/register.php?do=requestemail

    Or in AdminCP it can be done.


  • VBulletin Enhanced Captcha / RegSecure not showing/working images solution.



    This happened after a customer migrated their hosting and the issue was being unable to access PHP sessions.

    Warning: session_start(): open(/var/lib/php/session/sess_3e0oms763m6mrqekdnnmodlhs3, O_RDWR) failed: Permission denied (13) in /register.php(202) : eval()'d code on line 1

    Solution: (use the correct ownership/permissions)


    chown apache.apache -R /var/lib/php


  • Linux shuf program bash script get random line from file


    shuf -n 1 /path/to/your/file.txt

    The above will give you a random line from the file using the "shuf" command.


  • bash Linux basename and directory name, get the actual directory and file


    Example:

    basename /var/log/messages
    messages

    As shown above the "basename" utility gives you the end filename separately.

     

    dirname /var/log/messages
    /var/log

    As shown above the "dirname" utlity gives you just the utility even if you pass it a specific file.

    The above two utilities are very helpful in Bash scripting when working with files and directories constantly.


  • Linux Bash grep howto find line number that contains the result


    cat Xorginfo.txt|grep -nr "xserver-xorg"

    Result:

    9:    sudo apt-get remove --purge xserver-xorg
    13:    sudo apt-get install xserver-xorg
    17:    sudo dpkg-reconfigure xserver-xorg


  • sed replace specific entire line


    sedcommand="$line"s
    sed -i $sedcommand/.*/"$newline"/ $location

    The variable "line" should be the actual line number you want to replace.  The above format is necessary otherwise (to break the "$line"s into it's own variable for it to work.


  • kvm centos cannot compile error


    ./configure
    ./configure: cannot locate gcc 3.x. please install it or specify with --qemu-cc
    yum -y install gcc make

    ./configure
    ./configure: cannot locate gcc 3.x. please install it or specify with --qemu-cc

    yum -y install compat-gcc-*

    ./configure

    Error: Could not find alsa
    Make sure to have the alsa libs and headers installed.

    yum -y install alsa-lib-devel

    ./configure
    which: no texi2html in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
    Install prefix    /usr/local
    BIOS directory    /usr/local/share/qemu
    binary directory  /usr/local/bin
    Manual directory  /usr/local/share/man
    ELF interp prefix /usr/gnemul/qemu-%M
    Source path       /root/kvm/kvm-17/qemu
    C compiler        /usr/bin/gcc34
    Host C compiler   gcc
    make              make
    install           install
    host CPU          x86_64
    host big endian   no
    target list       x86_64-softmmu
    gprof enabled     no
    profiler          no
    static build      no
    SDL support       no
    mingw32 support   no
    Adlib support     no
    CoreAudio support no
    ALSA support      yes
    DSound support    no
    FMOD support      no
    kqemu support     no
    kvm support       yes
    Documentation     no
    ERROR: QEMU requires SDL or Cocoa for graphical output
    To build QEMU without graphical output configure with --disable-gfx-check
    Note that this will disable all output from the virtual graphics card.

    yum -y install SDL-devel

    ./configure
    which: no texi2html in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
    Install prefix    /usr/local
    BIOS directory    /usr/local/share/qemu
    binary directory  /usr/local/bin
    Manual directory  /usr/local/share/man
    ELF interp prefix /usr/gnemul/qemu-%M
    Source path       /root/kvm/kvm-17/qemu
    C compiler        /usr/bin/gcc34
    Host C compiler   gcc
    make              make
    install           install
    host CPU          x86_64
    host big endian   no
    target list       x86_64-softmmu
    gprof enabled     no
    profiler          no
    static build      no
    SDL support       yes
    SDL static link   yes
    mingw32 support   no
    Adlib support     no
    CoreAudio support no
    ALSA support      yes
    DSound support    no
    FMOD support      no
    kqemu support     no
    kvm support       yes
    Documentation     no

    make -C kernel
    make[1]: Entering directory `/root/kvm/kvm-17/kernel'
    make -C /lib/modules/2.6.32-042stab079.6/build M=`pwd` "$@"
    make[2]: Entering directory `/usr/src/kernels/2.6.32-042stab079.6'
      LD      /root/kvm/kvm-17/kernel/built-in.o
      CC [M]  /root/kvm/kvm-17/kernel/svm.o
    In file included from /root/kvm/kvm-17/kernel/kvm_svm.h:9,
                     from /root/kvm/kvm-17/kernel/svm.c:24:
    /root/kvm/kvm-17/kernel/svm.h:175:1: warning: "MSR_VM_HSAVE_PA" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:431:1: warning: this is the location of the previous definition
    In file included from /root/kvm/kvm-17/kernel/kvm.h:15,
                     from /root/kvm/kvm-17/kernel/kvm_svm.h:10,
                     from /root/kvm/kvm-17/kernel/svm.c:24:
    /root/kvm/kvm-17/kernel/vmx.h:290:1: warning: "MSR_IA32_VMX_BASIC" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:413:1: warning: this is the location of the previous definition
    In file included from /root/kvm/kvm-17/kernel/kvm.h:15,
                     from /root/kvm/kvm-17/kernel/kvm_svm.h:10,
                     from /root/kvm/kvm-17/kernel/svm.c:24:
    /root/kvm/kvm-17/kernel/vmx.h:291:1: warning: "MSR_IA32_FEATURE_CONTROL" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:216:1: warning: this is the location of the previous definition
    In file included from /root/kvm/kvm-17/kernel/kvm.h:15,
                     from /root/kvm/kvm-17/kernel/kvm_svm.h:10,
                     from /root/kvm/kvm-17/kernel/svm.c:24:
    /root/kvm/kvm-17/kernel/vmx.h:292:1: warning: "MSR_IA32_VMX_PINBASED_CTLS" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:414:1: warning: this is the location of the previous definition
    In file included from /root/kvm/kvm-17/kernel/kvm.h:15,
                     from /root/kvm/kvm-17/kernel/kvm_svm.h:10,
                     from /root/kvm/kvm-17/kernel/svm.c:24:
    /root/kvm/kvm-17/kernel/vmx.h:293:1: warning: "MSR_IA32_VMX_PROCBASED_CTLS" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:415:1: warning: this is the location of the previous definition
    In file included from /root/kvm/kvm-17/kernel/kvm.h:15,
                     from /root/kvm/kvm-17/kernel/kvm_svm.h:10,
                     from /root/kvm/kvm-17/kernel/svm.c:24:
    /root/kvm/kvm-17/kernel/vmx.h:294:1: warning: "MSR_IA32_VMX_EXIT_CTLS" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:416:1: warning: this is the location of the previous definition
    In file included from /root/kvm/kvm-17/kernel/kvm.h:15,
                     from /root/kvm/kvm-17/kernel/kvm_svm.h:10,
                     from /root/kvm/kvm-17/kernel/svm.c:24:
    /root/kvm/kvm-17/kernel/vmx.h:295:1: warning: "MSR_IA32_VMX_ENTRY_CTLS" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:417:1: warning: this is the location of the previous definition
    /root/kvm/kvm-17/kernel/svm.c:206: warning: ‘inject_db’ defined but not used
      CC [M]  /root/kvm/kvm-17/kernel/vmx.o
    In file included from /root/kvm/kvm-17/kernel/kvm.h:15,
                     from /root/kvm/kvm-17/kernel/vmx.c:18:
    /root/kvm/kvm-17/kernel/vmx.h:290:1: warning: "MSR_IA32_VMX_BASIC" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:413:1: warning: this is the location of the previous definition
    In file included from /root/kvm/kvm-17/kernel/kvm.h:15,
                     from /root/kvm/kvm-17/kernel/vmx.c:18:
    /root/kvm/kvm-17/kernel/vmx.h:291:1: warning: "MSR_IA32_FEATURE_CONTROL" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:216:1: warning: this is the location of the previous definition
    In file included from /root/kvm/kvm-17/kernel/kvm.h:15,
                     from /root/kvm/kvm-17/kernel/vmx.c:18:
    /root/kvm/kvm-17/kernel/vmx.h:292:1: warning: "MSR_IA32_VMX_PINBASED_CTLS" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:414:1: warning: this is the location of the previous definition
    In file included from /root/kvm/kvm-17/kernel/kvm.h:15,
                     from /root/kvm/kvm-17/kernel/vmx.c:18:
    /root/kvm/kvm-17/kernel/vmx.h:293:1: warning: "MSR_IA32_VMX_PROCBASED_CTLS" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:415:1: warning: this is the location of the previous definition
    In file included from /root/kvm/kvm-17/kernel/kvm.h:15,
                     from /root/kvm/kvm-17/kernel/vmx.c:18:
    /root/kvm/kvm-17/kernel/vmx.h:294:1: warning: "MSR_IA32_VMX_EXIT_CTLS" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:416:1: warning: this is the location of the previous definition
    In file included from /root/kvm/kvm-17/kernel/kvm.h:15,
                     from /root/kvm/kvm-17/kernel/vmx.c:18:
    /root/kvm/kvm-17/kernel/vmx.h:295:1: warning: "MSR_IA32_VMX_ENTRY_CTLS" redefined
    In file included from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr.h:4,
                     from /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/processor.h:21,
                     from include/linux/prefetch.h:14,
                     from include/linux/list.h:7,
                     from include/linux/kobject.h:20,
                     from include/linux/sysdev.h:24,
                     from include/linux/cpu.h:22,
                     from /root/kvm/kvm-17/kernel/external-module-compat.h:13,
                     from :0:
    /usr/src/kernels/2.6.32-042stab079.6/arch/x86/include/asm/msr-index.h:417:1: warning: this is the location of the previous definition
    /root/kvm/kvm-17/kernel/vmx.c: In function ‘vcpu_clear’:
    /root/kvm/kvm-17/kernel/vmx.c:131: error: too many arguments to function ‘smp_call_function_single’
    /root/kvm/kvm-17/kernel/vmx.c: In function ‘enter_pmode’:
    /root/kvm/kvm-17/kernel/vmx.c:644: error: ‘IOPL_MASK’ undeclared (first use in this function)
    /root/kvm/kvm-17/kernel/vmx.c:644: error: (Each undeclared identifier is reported only once
    /root/kvm/kvm-17/kernel/vmx.c:644: error: for each function it appears in.)
    /root/kvm/kvm-17/kernel/vmx.c: In function ‘enter_rmode’:
    /root/kvm/kvm-17/kernel/vmx.c:701: error: ‘IOPL_MASK’ undeclared (first use in this function)
    /root/kvm/kvm-17/kernel/vmx.c: In function ‘vmx_free_vmcs’:
    /root/kvm/kvm-17/kernel/vmx.c:1999: error: too many arguments to function ‘on_each_cpu’
    make[3]: *** [/root/kvm/kvm-17/kernel/vmx.o] Error 1
    make[2]: *** [_module_/root/kvm/kvm-17/kernel] Error 2
    make[2]: Leaving directory `/usr/src/kernels/2.6.32-042stab079.6'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/root/kvm/kvm-17/kernel'
    make: *** [kernel] Error 2

    vmx seems to be the issue
     


  • proxychains error solution ERROR: ld.so: object 'libproxychains.so' from LD_PRELOAD cannot be preloaded: ignored.


    Get the new version here that actually works:

    https://github.com/haad/proxychains


  • bash heredoc howto example


    heredoc=$(cat < stuff here
    SETVAR)


  • Linux Howto Mount CD/DVD drive for sharing for other users


    sudo mount -o user /dev/sr0 cd

    You need the "user" option otherwise non-root or non-owners cannot view the CD and this would make it so no anonymous access to the CD/DVD mount would work.  Note that most distributions including Ubuntu DO NOT work unless you manually mount and share as shown above (I couldn't find any other way in Ubuntu).


  • KVM on Centos 6.3 cannot boot FreeBSD 9.2 AMD64


    On the same OS with the same kernels basically I cannot boot FreeBSD installer, I believe the issue is the host CPU.

    One host runs an Intel and works, while an Opteron 2373 does not work despite suggestions from this thread: http://149.20.54.209/showthread.php?t=36761

    I've tried cpu options like "kvm64" "Opteron_G3" and none of them worked.
     

    The bootloader hangs with the following:

     

    I found the solution based on these threads

     

    forums.freebsd.org/viewtopic.php

    freebsd.1045724.n5.nabble.com/amd64-175780-Crash-on-KVM-boot-due-to-xsave-instruction-issue-td5783169.html

    You need to specify these cpu options:

    -cpu core2duo,-xsave

    I couldn't get it to boot with -cpu host and the -xsave (disables the xsave CPU function which is the other cause of the crash).


  • wget howto download all files from web page based on extension/type


    wget --accept "*.pdf" -r http://somewebsite/page


  • MySQL Error : Table 'datastore' is read only Error Number : 1036 solution


    This happens because of a permissions or ownership issue.

    Generally /var/lib/mysql should be all owned by mysql.mysql (check that).

    To fix it use chown -R mysql.mysql /var/lib/mysql

    Also make sure the files are at least readable and writable by mysql (eg. 700).


  • Linux find what processes are swapping


      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP COMMAND      
     7371 on       20   0 1558m 1148  740 S    0  0.0   0:00.02 1.5g services.exe 
     7369 on       20   0 1558m 1084  708 S    0  0.0   0:00.02 1.5g wineboot.exe

    Run top then press 'O' (capital letter o) followed by 'p' then 'enter'. Now processes should be sorted by their swap usage.


  • Migrate Linux Mint OS from one drive to another


    mount -o bind /proc /sda2/proc
    mount -o bind /dev/ /sda2/dev
    mount -o bind /sys /sda2/sys
    chroot /sda2


    mint / # mount -o bind /proc /sda2/proc
    mint / # mount -o bind /dev/ /sda2/dev
    mint / # mount -o bind /sys /sda2/sys
    mint / # chroot /sda2
    mint / # cd ~
    mint ~ # ls
    Desktop
    mint ~ # cd /
    mint / # ls
    bin   Desktop  dev-temp  home        initrd.img.old  lost+found  mnt  proc  run   selinux  sys  usr  vmlinuz
    boot  dev      etc       initrd.img  lib             media       opt  root  sbin  srv      tmp  var
    mint / # vi etc/fstab
    mint / # blkid /dev/sda2
    /dev/sda2: UUID="9db45fda-2519-4359-87f1-d592d6850c9e" TYPE="ext4"
    mint / # vi etc/fstab
    mint / # blkid /dev/sda1
    /dev/sda1: UUID="6a3fbf8a-13bb-4cbf-b0c3-bca046b61eed" TYPE="swap"
    mint / # vi etc/fstab
    mint / # update-g
    update-gconf-defaults   update-grub             update-grub2            update-grub-gfxpayload  update-gsfontmap
    mint / # update-g
    update-gconf-defaults   update-grub             update-grub2            update-grub-gfxpayload  update-gsfontmap
    mint / # update-grub
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.5.0-17-generic
    Found initrd image: /boot/initrd.img-3.5.0-17-generic
    Found memtest86+ image: /boot/memtest86+.bin
    done


    mount -o bind /proc /mnt/proc
    mount -o bind /dev/ /mnt/dev
    mount -o bind /sys /mnt/sys
    chroot /mnt

    diag1002 / # grub-install /dev/sda
    Installation finished. No error reported.


    update-grub
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.5.0-17-generic
    Found initrd image: /boot/initrd.img-3.5.0-17-generic
    Found memtest86+ image: /boot/memtest86+.bin
    done
     


  • Openvz OOM Centos Issue Memory Config Settings Solution


    Linux box13. 2.6.32-042stab076.5 #1 SMP Mon Mar 18 20:41:34 MSK 2013 x86_64 x86_64 x86_64 GNU/Linux


    even setting privvmpages to a specific setting DOES not affect "free -m" in containers.
    This is probably a kernel issue

     23:36:29 up 159 days,  7:12,  4 users,  load average: 0.42, 0.44, 0.33
    [root@box13 ~]# free -m
                 total       used       free     shared    buffers     cached
    Mem:         15914      12620       3294          0       1314       6530
    -/+ buffers/cache:       4774      11139
    Swap:        29998        133      29865


    [13722911.849381] Total 655262 anon:165965 file:489297 a_anon:34353 i_anon:131612 a_file:1556 i_file:487741 unevictable:0
    [13722911.849407] RAM: 65536 / 65536 [8138] SWAP: 131072 / 131072 [8107] KMEM: 17920000 / inf [0] DCSZ: 3982704 / 2147483646 [0] OOMG: 155142 / inf [3681] Dirty 195 Wback 0 Dche 2872 Prnd 10618393
    [13722911.849648] Out of memory in UB: Kill process 32324 (httpd) score -803 or sacrifice child
    [13722911.858363] OOM killed process 32324 (httpd) vm:281004kB, rss:123992kB, swap:30436kB
    [13722911.884909] OOM killed process httpd (pid=32324, ve=50200) exited, free=51056.
    [13722911.884915] UB-50200-Mem-Info:
    [13722911.884923] Node 0 DMA prio:41 portion:60 scan:0 a_anon:0 11591658ms i_anon:0 11591658ms a_file:0 11591658ms i_file:0 11591658ms unevictable:0 reclaim_stat: 0 0 0 0
    [13722911.884931] Node 0 DMA/shadow prio:41 portion:0 scan:0 a_anon:0 2891651ms i_anon:0 2891651ms a_file:0 2891651ms i_file:0 2891651ms unevictable:0 reclaim_stat: 0 0 0 0
    [13722911.884940] Node 0 DMA32 prio:14 portion:14245 scan:0 a_anon:0 11646ms i_anon:1 11646ms a_file:0 11646ms i_file:0 11646ms unevictable:0 reclaim_stat: 1126 910 0 0
    [13722911.884949] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 633962136ms i_anon:2390 633962136ms a_file:200 120071698ms i_file:27975 120851698ms unevictable:0 reclaim_stat: 89 41 2484 75
    [13722911.884958] Node 0 Normal prio:14 portion:51230 scan:76 a_anon:22683 11646ms i_anon:15817 11646ms a_file:1 11646ms i_file:0 11646ms unevictable:0 reclaim_stat: 12407 2819 2 2
    [13722911.884967] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:4025 159791964ms i_anon:91979 159791964ms a_file:1357 67751686ms i_file:459761 67871686ms unevictable:0 reclaim_stat: 7627 6311 32980 3681
    [13722911.884976] Total 626221 anon:136927 file:489294 a_anon:26740 i_anon:110187 a_file:1558 i_file:487736 unevictable:0
    [13722911.884981] RAM: 43602 / 65536 [8138] SWAP: 124166 / 131072 [8107] KMEM: 17379328 / inf [0] DCSZ: 3982704 / 2147483646 [0] OOMG: 155142 / inf [3682] Dirty 195 Wback 0 Dche 2872 Prnd 10618393
    [13722911.884993] <<< 50200 oom generation 3681 ends (task died)
    [13723466.860263] >>> 50200 oom generation 3682 starts
    [13723466.860273] 34149 (httpd) invoked loc oom-killer: gfp 0x200d2 order 0 oomkilladj=0
    [13723466.860278] UB-50200-Mem-Info:
    [13723466.860285] Node 0 DMA prio:16 portion:60 scan:0 a_anon:0 1286627ms i_anon:0 1286627ms a_file:0 1286627ms i_file:0 1286627ms unevictable:0 reclaim_stat: 0 0 0 0
    [13723466.860294] Node 0 DMA/shadow prio:41 portion:0 scan:0 a_anon:0 26601ms i_anon:0 26601ms a_file:0 26601ms i_file:0 26601ms unevictable:0 reclaim_stat: 0 0 0 0
    [13723466.860304] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:6131 26601ms i_anon:5814 26601ms a_file:0 26601ms i_file:2 26601ms unevictable:0 reclaim_stat: 2218 2205 2 0
    [13723466.860314] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 634517112ms i_anon:2862 634517112ms a_file:200 120626674ms i_file:28076 121406674ms unevictable:0 reclaim_stat: 89 41 2484 75
    [13723466.860324] Node 0 Normal prio:13 portion:51230 scan:91 a_anon:24319 26601ms i_anon:24328 26601ms a_file:16 26601ms i_file:14 26601ms unevictable:0 reclaim_stat: 6160 2620 1383 542
    [13723466.860335] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:4025 160346940ms i_anon:98256 160346940ms a_file:1442 68306662ms i_file:459397 68426662ms unevictable:0 reclaim_stat: 7627 6311 33449 3766
    [13723466.860344] Total 654914 anon:165767 file:489147 a_anon:34507 i_anon:131260 a_file:1658 i_file:487489 unevictable:0
    [13723466.860349] RAM: 65536 / 65536 [8139] SWAP: 131072 / 131072 [8108] KMEM: 18399232 / inf [0] DCSZ: 4026164 / 2147483646 [0] OOMG: 155142 / inf [3682] Dirty 130 Wback 0 Dche 2898 Prnd 10618626
    [13723466.860535] Out of memory in UB: Kill process 32116 (httpd) score -887 or sacrifice child
    [13723466.869214] OOM killed process 32116 (httpd) vm:214460kB, rss:82508kB, swap:6104kB
    [13723466.879562] OOM killed process httpd (pid=32116, ve=50200) exited, free=35907.
    [13723466.879570] UB-50200-Mem-Info:
    [13723466.879577] Node 0 DMA prio:16 portion:60 scan:0 a_anon:0 1286646ms i_anon:0 1286646ms a_file:0 1286646ms i_file:0 1286646ms unevictable:0 reclaim_stat: 0 0 0 0
    [13723466.879585] Node 0 DMA/shadow prio:41 portion:0 scan:0 a_anon:0 26620ms i_anon:0 26620ms a_file:0 26620ms i_file:0 26620ms unevictable:0 reclaim_stat: 0 0 0 0
    [13723466.879594] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:6131 26620ms i_anon:5814 26620ms a_file:0 26620ms i_file:2 26620ms unevictable:0 reclaim_stat: 2218 2205 2 0
    [13723466.879603] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 634517131ms i_anon:2861 634517131ms a_file:200 120626693ms i_file:28076 121406693ms unevictable:0 reclaim_stat: 89 41 2484 75
    [13723466.879613] Node 0 Normal prio:13 portion:51230 scan:91 a_anon:24319 26620ms i_anon:12521 26620ms a_file:16 26620ms i_file:33 26620ms unevictable:0 reclaim_stat: 6175 2620 1402 542
    [13723466.879625] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:4025 160346959ms i_anon:97456 160346959ms a_file:1443 68306681ms i_file:459385 68426681ms unevictable:0 reclaim_stat: 7627 6311 33450 3767
    [13723466.879634] Total 642313 anon:153158 file:489155 a_anon:34507 i_anon:118651 a_file:1659 i_file:487496 unevictable:0
    [13723466.879639] RAM: 54408 / 65536 [8139] SWAP: 129916 / 131072 [8108] KMEM: 17915904 / inf [0] DCSZ: 4026164 / 2147483646 [0] OOMG: 155142 / inf [3683] Dirty 130 Wback 0 Dche 2898 Prnd 10618626
    [13723466.879652] <<< 50200 oom generation 3682 ends (task died)
    [13726707.794190] >>> 50200 oom generation 3683 starts
    [13726707.794200] 42508 (httpd) invoked loc oom-killer: gfp 0x200d2 order 0 oomkilladj=0
    [13726707.794205] UB-50200-Mem-Info:
    [13726707.794212] Node 0 DMA prio:24 portion:60 scan:0 a_anon:0 4527561ms i_anon:0 4527561ms a_file:0 4527561ms i_file:0 4527561ms unevictable:0 reclaim_stat: 0 0 0 0
    [13726707.794220] Node 0 DMA/shadow prio:41 portion:0 scan:0 a_anon:0 27535ms i_anon:0 27535ms a_file:0 27535ms i_file:0 27535ms unevictable:0 reclaim_stat: 0 0 0 0
    [13726707.794228] Node 0 DMA32 prio:13 portion:14245 scan:163 a_anon:315 27535ms i_anon:281 27535ms a_file:0 27535ms i_file:0 27535ms unevictable:0 reclaim_stat: 182 160 0 0
    [13726707.794237] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 637758046ms i_anon:12518 637758046ms a_file:200 123867608ms i_file:28705 124647608ms unevictable:0 reclaim_stat: 89 41 2493 84
    [13726707.794246] Node 0 Normal prio:13 portion:51230 scan:273 a_anon:30105 27535ms i_anon:30150 27535ms a_file:20 27535ms i_file:0 27535ms unevictable:0 reclaim_stat: 11778 5001 80 30
    [13726707.794288] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:4025 163587874ms i_anon:88812 163587874ms a_file:1498 71547596ms i_file:459644 71667596ms unevictable:0 reclaim_stat: 7627 6311 34529 3822
    [13726707.794304] Total 656305 anon:166238 file:490067 a_anon:34477 i_anon:131761 a_file:1718 i_file:488349 unevictable:0
    [13726707.794314] RAM: 65536 / 65536 [8140] SWAP: 131072 / 131072 [8109] KMEM: 18591744 / inf [0] DCSZ: 4026145 / 2147483646 [0] OOMG: 155142 / inf [3683] Dirty 130 Wback 0 Dche 2897 Prnd 10620313
    [13726707.794527] Out of memory in UB: Kill process 42508 (httpd) score -874 or sacrifice child
    [13726707.803145] OOM killed process 42508 (httpd) vm:224932kB, rss:89192kB, swap:10060kB
    [13726707.823161] OOM killed process httpd (pid=42508, ve=50200) exited, free=39614.
    [13726707.823167] UB-50200-Mem-Info:
    [13726707.823174] Node 0 DMA prio:24 portion:60 scan:0 a_anon:0 4527589ms i_anon:0 4527589ms a_file:0 4527589ms i_file:0 4527589ms unevictable:0 reclaim_stat: 0 0 0 0
    [13726707.823182] Node 0 DMA/shadow prio:41 portion:0 scan:0 a_anon:0 27563ms i_anon:0 27563ms a_file:0 27563ms i_file:0 27563ms unevictable:0 reclaim_stat: 0 0 0 0
    [13726707.823190] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:27 27563ms i_anon:0 27563ms a_file:0 27563ms i_file:0 27563ms unevictable:0 reclaim_stat: 157 112 2 1
    [13726707.823199] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 637758074ms i_anon:10975 637758074ms a_file:200 123867636ms i_file:28707 124647636ms unevictable:0 reclaim_stat: 89 41 2493 84
    [13726707.823208] Node 0 Normal prio:13 portion:51230 scan:0 a_anon:29591 27563ms i_anon:17907 27563ms a_file:0 27563ms i_file:0 27563ms unevictable:0 reclaim_stat: 13594 6683 80 16
    [13726707.823218] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:4025 163587902ms i_anon:88583 163587902ms a_file:1577 71547624ms i_file:459588 71667624ms unevictable:0 reclaim_stat: 7627 6311 34608 3901
    [13726707.823227] Total 641212 anon:151140 file:490072 a_anon:33675 i_anon:117465 a_file:1777 i_file:488295 unevictable:0
    [13726707.823232] RAM: 52362 / 65536 [8140] SWAP: 129048 / 131072 [8109] KMEM: 18141184 / inf [0] DCSZ: 4026145 / 2147483646 [0] OOMG: 155142 / inf [3684] Dirty 130 Wback 0 Dche 2897 Prnd 10620313
    [13726707.823244] <<< 50200 oom generation 3683 ends (task died)
    [13732772.685609] >>> 50200 oom generation 3684 starts
    [13732772.685619] 67753 (httpd) invoked loc oom-killer: gfp 0x200d2 order 0 oomkilladj=0
    [13732772.685623] UB-50200-Mem-Info:
    [13732772.685629] Node 0 DMA prio:40 portion:60 scan:0 a_anon:0 10592452ms i_anon:0 10592452ms a_file:0 10592452ms i_file:0 10592452ms unevictable:0 reclaim_stat: 0 0 0 0
    [13732772.685638] Node 0 DMA/shadow prio:41 portion:0 scan:0 a_anon:0 1952418ms i_anon:0 1952418ms a_file:0 1952418ms i_file:0 1952418ms unevictable:0 reclaim_stat: 0 0 0 0
    [13732772.685646] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:3982 32418ms i_anon:3990 32418ms a_file:0 32418ms i_file:0 32418ms unevictable:0 reclaim_stat: 1386 859 0 0
    [13732772.685655] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 643822937ms i_anon:6692 643822937ms a_file:200 129932499ms i_file:28803 130712499ms unevictable:0 reclaim_stat: 89 41 2497 88
    [13732772.685664] Node 0 Normal prio:13 portion:51230 scan:0 a_anon:26317 32418ms i_anon:26354 32418ms a_file:23 32418ms i_file:0 32418ms unevictable:0 reclaim_stat: 7844 3350 140 58
    [13732772.685674] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:4024 169652765ms i_anon:95115 169652765ms a_file:1521 77612487ms i_file:461018 77732487ms unevictable:0 reclaim_stat: 7627 6311 35568 4221
    [13732772.685682] Total 658071 anon:166506 file:491565 a_anon:34355 i_anon:132151 a_file:1744 i_file:489821 unevictable:0
    [13732772.685687] RAM: 65512 / 65536 [8141] SWAP: 131072 / 131072 [8110] KMEM: 18464768 / inf [0] DCSZ: 4056222 / 2147483646 [0] OOMG: 155142 / inf [3684] Dirty 260 Wback 0 Dche 2902 Prnd 10625110
    [13732772.685873] Out of memory in UB: Kill process 67479 (httpd) score -864 or sacrifice child
    [13732772.694544] OOM killed process 67479 (httpd) vm:232620kB, rss:97368kB, swap:9376kB
    [13732772.716233] OOM killed process httpd (pid=67479, ve=50200) exited, free=40994.
    [13732772.716240] UB-50200-Mem-Info:
    [13732772.716248] Node 0 DMA prio:40 portion:60 scan:0 a_anon:0 10592482ms i_anon:0 10592482ms a_file:0 10592482ms i_file:0 10592482ms unevictable:0 reclaim_stat: 0 0 0 0
    [13732772.716256] Node 0 DMA/shadow prio:41 portion:0 scan:0 a_anon:0 1952448ms i_anon:0 1952448ms a_file:0 1952448ms i_file:0 1952448ms unevictable:0 reclaim_stat: 0 0 0 0
    [13732772.716265] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:2463 32448ms i_anon:1869 32448ms a_file:0 32448ms i_file:1 32448ms unevictable:0 reclaim_stat: 1514 859 1 0
    [13732772.716274] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 643822967ms i_anon:5056 643822967ms a_file:200 129932529ms i_file:28803 130712529ms unevictable:0 reclaim_stat: 89 41 2497 88
    [13732772.716283] Node 0 Normal prio:13 portion:51230 scan:0 a_anon:25189 32448ms i_anon:15877 32448ms a_file:3 32448ms i_file:154 32448ms unevictable:0 reclaim_stat: 8196 3631 273 32
    [13732772.716292] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:4024 169652795ms i_anon:94969 169652795ms a_file:1525 77612517ms i_file:460879 77732517ms unevictable:0 reclaim_stat: 7627 6311 35572 4225
    [13732772.716302] Total 641043 anon:149478 file:491565 a_anon:31708 i_anon:117770 a_file:1728 i_file:489837 unevictable:0
    [13732772.716307] RAM: 50791 / 65536 [8141] SWAP: 129431 / 131072 [8110] KMEM: 17965056 / inf [0] DCSZ: 4056222 / 2147483646 [0] OOMG: 155142 / inf [3685] Dirty 260 Wback 0 Dche 2902 Prnd 10625110
    [13732772.716346] <<< 50200 oom generation 3684 ends (task died)
    [13735605.022021] >>> 50200 oom generation 3685 starts
    [13735605.022031] 74815 (httpd) invoked loc oom-killer: gfp 0x200d2 order 0 oomkilladj=0
    [13735605.022036] UB-50200-Mem-Info:
    [13735605.022043] Node 0 DMA prio:21 portion:60 scan:0 a_anon:0 1844754ms i_anon:0 1844754ms a_file:0 1844754ms i_file:0 1844754ms unevictable:0 reclaim_stat: 0 0 0 0
    [13735605.022053] Node 0 DMA/shadow prio:30 portion:0 scan:0 a_anon:0 284751ms i_anon:0 284751ms a_file:0 284751ms i_file:0 284751ms unevictable:0 reclaim_stat: 0 0 0 0
    [13735605.022062] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:586 44751ms i_anon:397 44751ms a_file:0 44751ms i_file:1 44751ms unevictable:0 reclaim_stat: 376 304 1 0
    [13735605.022072] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 646655273ms i_anon:6474 646655273ms a_file:200 132764835ms i_file:8178 133544835ms unevictable:0 reclaim_stat: 89 41 1458 2
    [13735605.022083] Node 0 Normal prio:13 portion:51230 scan:145 a_anon:29393 44751ms i_anon:29438 44751ms a_file:20 44751ms i_file:6 44751ms unevictable:0 reclaim_stat: 11664 7629 1810 516
    [13735605.022093] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:4071 172485101ms i_anon:94850 172485101ms a_file:1604 80444823ms i_file:22307 80564823ms unevictable:0 reclaim_stat: 7691 6358 5933 44
    [13735605.022102] Total 197557 anon:165241 file:32316 a_anon:34082 i_anon:131159 a_file:1824 i_file:30492 unevictable:0
    [13735605.022107] RAM: 65536 / 65536 [8142] SWAP: 131072 / 131072 [8111] KMEM: 18604032 / inf [0] DCSZ: 4047344 / 2147483646 [0] OOMG: 155142 / inf [3685] Dirty 130 Wback 0 Dche 2862 Prnd 10625840
    [13735605.022318] Out of memory in UB: Kill process 74815 (httpd) score -876 or sacrifice child
    [13735605.030859] OOM killed process 74815 (httpd) vm:224268kB, rss:94496kB, swap:3036kB
    [13735605.051188] OOM killed process httpd (pid=74815, ve=50200) exited, free=36331.
    [13735605.051195] UB-50200-Mem-Info:
    [13735605.051202] Node 0 DMA prio:21 portion:60 scan:0 a_anon:0 1844783ms i_anon:0 1844783ms a_file:0 1844783ms i_file:0 1844783ms unevictable:0 reclaim_stat: 0 0 0 0
    [13735605.051216] Node 0 DMA/shadow prio:30 portion:0 scan:0 a_anon:0 284781ms i_anon:0 284781ms a_file:0 284781ms i_file:0 284781ms unevictable:0 reclaim_stat: 0 0 0 0
    [13735605.051225] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:37 44781ms i_anon:46 44781ms a_file:0 44781ms i_file:2 44781ms unevictable:0 reclaim_stat: 381 304 2 0
    [13735605.051234] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 646655303ms i_anon:6385 646655303ms a_file:200 132764865ms i_file:8178 133544865ms unevictable:0 reclaim_stat: 89 41 1458 2
    [13735605.051243] Node 0 Normal prio:13 portion:51230 scan:145 a_anon:16961 44781ms i_anon:28006 44781ms a_file:20 44781ms i_file:15 44781ms unevictable:0 reclaim_stat: 13058 9023 1819 516
    [13735605.051252] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:4071 172485131ms i_anon:94843 172485131ms a_file:1604 80444853ms i_file:22303 80564853ms unevictable:0 reclaim_stat: 7691 6358 5933 44
    [13735605.051266] Total 182703 anon:150381 file:32322 a_anon:21101 i_anon:129280 a_file:1824 i_file:30498 unevictable:0
    [13735605.051271] RAM: 50798 / 65536 [8142] SWAP: 130591 / 131072 [8111] KMEM: 18063360 / inf [0] DCSZ: 4047344 / 2147483646 [0] OOMG: 155142 / inf [3686] Dirty 130 Wback 0 Dche 2862 Prnd 10625840
    [13735605.051283] <<< 50200 oom generation 3685 ends (task died)
    [13736335.834400] >>> 50200 oom generation 3686 starts
    [13736335.834409] 77892 (httpd) invoked loc oom-killer: gfp 0x200d2 order 0 oomkilladj=0
    [13736335.834413] UB-50200-Mem-Info:
    [13736335.834420] Node 0 DMA prio:21 portion:60 scan:0 a_anon:0 2575567ms i_anon:0 2575567ms a_file:0 2575567ms i_file:0 2575567ms unevictable:0 reclaim_stat: 0 0 0 0
    [13736335.834428] Node 0 DMA/shadow prio:30 portion:0 scan:0 a_anon:0 1015564ms i_anon:0 1015564ms a_file:0 1015564ms i_file:0 1015564ms unevictable:0 reclaim_stat: 0 0 0 0
    [13736335.834437] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:0 55564ms i_anon:10 55564ms a_file:2 55564ms i_file:0 55564ms unevictable:0 reclaim_stat: 96 30 10 2
    [13736335.834446] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 647386086ms i_anon:8110 647386086ms a_file:200 133495648ms i_file:8228 134275648ms unevictable:0 reclaim_stat: 89 41 1845 5
    [13736335.834455] Node 0 Normal prio:13 portion:51230 scan:69 a_anon:30147 55564ms i_anon:30149 55564ms a_file:10 55564ms i_file:0 55564ms unevictable:0 reclaim_stat: 14938 6529 90 29
    [13736335.834464] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:7554 173215914ms i_anon:89289 173215914ms a_file:1596 1135564ms i_file:13081 1975567ms unevictable:0 reclaim_stat: 11628 9841 2255 363
    [13736335.834473] Total 188408 anon:165291 file:23117 a_anon:37733 i_anon:127558 a_file:1808 i_file:21309 unevictable:0
    [13736335.834478] RAM: 65519 / 65536 [8143] SWAP: 131072 / 131072 [8112] KMEM: 19673088 / inf [0] DCSZ: 4070102 / 2147483646 [0] OOMG: 155142 / inf [3686] Dirty 130 Wback 0 Dche 2902 Prnd 10626081
    [13736335.834678] Out of memory in UB: Kill process 71250 (httpd) score -886 or sacrifice child
    [13736335.843169] OOM killed process 71250 (httpd) vm:218048kB, rss:86820kB, swap:3132kB
    [13736335.855523] OOM killed process httpd (pid=71250, ve=50200) exited, free=1681922.
    [13736335.855530] UB-50200-Mem-Info:
    [13736335.855537] Node 0 DMA prio:21 portion:60 scan:0 a_anon:0 2575588ms i_anon:0 2575588ms a_file:0 2575588ms i_file:0 2575588ms unevictable:0 reclaim_stat: 0 0 0 0
    [13736335.855546] Node 0 DMA/shadow prio:30 portion:0 scan:0 a_anon:0 1015585ms i_anon:0 1015585ms a_file:0 1015585ms i_file:0 1015585ms unevictable:0 reclaim_stat: 0 0 0 0
    [13736335.855555] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:0 55585ms i_anon:12 55585ms a_file:2 55585ms i_file:0 55585ms unevictable:0 reclaim_stat: 98 30 10 2
    [13736335.855564] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 647386107ms i_anon:8107 647386107ms a_file:200 133495669ms i_file:8228 134275669ms unevictable:0 reclaim_stat: 89 41 1845 5
    [13736335.855573] Node 0 Normal prio:13 portion:51230 scan:160 a_anon:25483 55585ms i_anon:21785 55585ms a_file:16 55585ms i_file:0 55585ms unevictable:0 reclaim_stat: 18329 9859 82 30
    [13736335.855582] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:7553 173215935ms i_anon:89094 173215935ms a_file:1620 1135585ms i_file:13058 1975588ms unevictable:0 reclaim_stat: 11628 9841 2279 387
    [13736335.855592] Total 175190 anon:152066 file:23124 a_anon:33068 i_anon:118998 a_file:1838 i_file:21286 unevictable:0
    [13736335.855597] RAM: 52784 / 65536 [8143] SWAP: 130573 / 131072 [8112] KMEM: 19156992 / inf [0] DCSZ: 4070102 / 2147483646 [0] OOMG: 155142 / inf [3687] Dirty 130 Wback 0 Dche 2902 Prnd 10626081
    [13736335.855609] <<< 50200 oom generation 3686 ends (task died)
    [13736348.696196] >>> 50200 oom generation 3687 starts
    [13736348.696206] 77883 (httpd) invoked loc oom-killer: gfp 0x200d2 order 0 oomkilladj=0
    [13736348.696210] UB-50200-Mem-Info:
    [13736348.696217] Node 0 DMA prio:21 portion:60 scan:0 a_anon:0 2588429ms i_anon:0 2588429ms a_file:0 2588429ms i_file:0 2588429ms unevictable:0 reclaim_stat: 0 0 0 0
    [13736348.696227] Node 0 DMA/shadow prio:31 portion:0 scan:0 a_anon:0 1028426ms i_anon:0 1028426ms a_file:0 1028426ms i_file:0 1028426ms unevictable:0 reclaim_stat: 0 0 0 0
    [13736348.696236] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:0 8426ms i_anon:5 8426ms a_file:3 8426ms i_file:1 8426ms unevictable:0 reclaim_stat: 88 22 21 5
    [13736348.696246] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 647398948ms i_anon:8119 647398948ms a_file:200 133508510ms i_file:8227 134288510ms unevictable:0 reclaim_stat: 89 41 1845 5
    [13736348.696269] Node 0 Normal prio:13 portion:51230 scan:114 a_anon:30284 8426ms i_anon:30241 8426ms a_file:0 8426ms i_file:0 8426ms unevictable:0 reclaim_stat: 8599 2503 23 7
    [13736348.696283] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:7553 173228776ms i_anon:89230 173228776ms a_file:1620 1148426ms i_file:13186 1988429ms unevictable:0 reclaim_stat: 11628 9841 2279 387
    [13736348.696298] Total 188701 anon:165464 file:23237 a_anon:37869 i_anon:127595 a_file:1823 i_file:21414 unevictable:0
    [13736348.696308] RAM: 65530 / 65536 [8144] SWAP: 131072 / 131072 [8113] KMEM: 19677184 / inf [0] DCSZ: 4061718 / 2147483646 [0] OOMG: 155142 / inf [3687] Dirty 130 Wback 0 Dche 2899 Prnd 10626081
    [13736348.696532] Out of memory in UB: Kill process 75363 (httpd) score -881 or sacrifice child
    [13736348.705001] OOM killed process 75363 (httpd) vm:232128kB, rss:81476kB, swap:11768kB
    [13736348.718455] OOM killed process httpd (pid=75363, ve=50200) exited, free=1684832.
    [13736348.718462] UB-50200-Mem-Info:
    [13736348.718469] Node 0 DMA prio:21 portion:60 scan:0 a_anon:0 2588451ms i_anon:0 2588451ms a_file:0 2588451ms i_file:0 2588451ms unevictable:0 reclaim_stat: 0 0 0 0
    [13736348.718477] Node 0 DMA/shadow prio:31 portion:0 scan:0 a_anon:0 1028448ms i_anon:0 1028448ms a_file:0 1028448ms i_file:0 1028448ms unevictable:0 reclaim_stat: 0 0 0 0
    [13736348.718486] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:0 8448ms i_anon:5 8448ms a_file:3 8448ms i_file:1 8448ms unevictable:0 reclaim_stat: 88 22 21 5
    [13736348.718494] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 647398970ms i_anon:5996 647398970ms a_file:200 133508532ms i_file:8227 134288532ms unevictable:0 reclaim_stat: 89 41 1845 5
    [13736348.718504] Node 0 Normal prio:13 portion:51230 scan:114 a_anon:19828 8448ms i_anon:26106 8448ms a_file:1 8448ms i_file:7 8448ms unevictable:0 reclaim_stat: 8792 2668 31 8
    [13736348.718513] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:7553 173228798ms i_anon:89042 173228798ms a_file:1711 1148448ms i_file:13082 1988451ms unevictable:0 reclaim_stat: 11628 9841 2370 478
    [13736348.718522] Total 171794 anon:148562 file:23232 a_anon:27413 i_anon:121149 a_file:1915 i_file:21317 unevictable:0
    [13736348.718527] RAM: 51754 / 65536 [8144] SWAP: 128812 / 131072 [8113] KMEM: 19161088 / inf [0] DCSZ: 4061718 / 2147483646 [0] OOMG: 155142 / inf [3688] Dirty 130 Wback 0 Dche 2899 Prnd 10626081
    [13736348.718539] <<< 50200 oom generation 3687 ends (task died)
    [13737437.173423] >>> 50200 oom generation 3688 starts
    [13737437.173432] 81018 (httpd) invoked loc oom-killer: gfp 0x200d2 order 0 oomkilladj=0
    [13737437.173449] UB-50200-Mem-Info:
    [13737437.173459] Node 0 DMA prio:22 portion:60 scan:0 a_anon:0 3676906ms i_anon:0 3676906ms a_file:0 3676906ms i_file:0 3676906ms unevictable:0 reclaim_stat: 0 0 0 0
    [13737437.173476] Node 0 DMA/shadow prio:33 portion:0 scan:0 a_anon:0 2116903ms i_anon:0 2116903ms a_file:0 2116903ms i_file:0 2116903ms unevictable:0 reclaim_stat: 0 0 0 0
    [13737437.173493] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:0 16903ms i_anon:13 16903ms a_file:11 16903ms i_file:1 16903ms unevictable:0 reclaim_stat: 81 26 58 20
    [13737437.173510] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 648487425ms i_anon:2372 648487425ms a_file:200 134596987ms i_file:8202 135376987ms unevictable:0 reclaim_stat: 89 41 1845 5
    [13737437.173525] Node 0 Normal prio:13 portion:51230 scan:0 a_anon:30463 16903ms i_anon:30491 16903ms a_file:0 16903ms i_file:28 16903ms unevictable:0 reclaim_stat: 7932 3743 1334 365
    [13737437.173541] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:7488 174317253ms i_anon:95377 174317253ms a_file:1340 2236903ms i_file:28025 3076906ms unevictable:0 reclaim_stat: 11692 9904 2400 508
    [13737437.173558] Total 204043 anon:166236 file:37807 a_anon:37983 i_anon:128253 a_file:1551 i_file:36256 unevictable:0
    [13737437.173568] RAM: 65536 / 65536 [8145] SWAP: 131072 / 131072 [8114] KMEM: 18427904 / inf [0] DCSZ: 3979138 / 2147483646 [0] OOMG: 155142 / inf [3688] Dirty 195 Wback 0 Dche 2887 Prnd 10627349
    [13737437.173801] Out of memory in UB: Kill process 81012 (httpd) score -871 or sacrifice child
    [13737437.182253] OOM killed process 81012 (httpd) vm:241832kB, rss:35848kB, swap:65420kB
    [13737437.196645] OOM killed process httpd (pid=81012, ve=50200) exited, free=1069563.
    [13737437.196652] UB-50200-Mem-Info:
    [13737437.196660] Node 0 DMA prio:22 portion:60 scan:0 a_anon:0 3676929ms i_anon:0 3676929ms a_file:0 3676929ms i_file:0 3676929ms unevictable:0 reclaim_stat: 0 0 0 0
    [13737437.196668] Node 0 DMA/shadow prio:33 portion:0 scan:0 a_anon:0 2116926ms i_anon:0 2116926ms a_file:0 2116926ms i_file:0 2116926ms unevictable:0 reclaim_stat: 0 0 0 0
    [13737437.196678] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:0 16926ms i_anon:16 16926ms a_file:11 16926ms i_file:5 16926ms unevictable:0 reclaim_stat: 84 26 62 20
    [13737437.196686] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 648487448ms i_anon:2368 648487448ms a_file:200 134597010ms i_file:8194 135377010ms unevictable:0 reclaim_stat: 89 41 1845 5
    [13737437.196696] Node 0 Normal prio:13 portion:51230 scan:0 a_anon:30419 16926ms i_anon:27645 16926ms a_file:1 16926ms i_file:95 16926ms unevictable:0 reclaim_stat: 8101 3883 1402 366
    [13737437.196705] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:7488 174317276ms i_anon:79629 174317276ms a_file:1340 2236926ms i_file:27952 3076929ms unevictable:0 reclaim_stat: 11692 9904 2400 508
    [13737437.196713] Total 185395 anon:147597 file:37798 a_anon:37939 i_anon:109658 a_file:1552 i_file:36246 unevictable:0
    [13737437.196719] RAM: 63028 / 65536 [8145] SWAP: 115535 / 131072 [8114] KMEM: 17924096 / inf [0] DCSZ: 3979138 / 2147483646 [0] OOMG: 155142 / inf [3689] Dirty 195 Wback 0 Dche 2887 Prnd 10627349
    [13737437.196731] <<< 50200 oom generation 3688 ends (task died)
    [13738489.851468] >>> 50200 oom generation 3689 starts
    [13738489.851478] 81018 (httpd) invoked loc oom-killer: gfp 0x200d2 order 0 oomkilladj=0
    [13738489.851482] UB-50200-Mem-Info:
    [13738489.851489] Node 0 DMA prio:25 portion:60 scan:0 a_anon:0 4729584ms i_anon:0 4729584ms a_file:0 4729584ms i_file:0 4729584ms unevictable:0 reclaim_stat: 0 0 0 0
    [13738489.851498] Node 0 DMA/shadow prio:36 portion:0 scan:0 a_anon:0 3169581ms i_anon:0 3169581ms a_file:0 3169581ms i_file:0 3169581ms unevictable:0 reclaim_stat: 0 0 0 0
    [13738489.851506] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:277 49578ms i_anon:254 49578ms a_file:0 49578ms i_file:2 49578ms unevictable:0 reclaim_stat: 314 254 2 0
    [13738489.851515] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 649540103ms i_anon:7800 649540103ms a_file:201 135649665ms i_file:8168 136429665ms unevictable:0 reclaim_stat: 89 41 1245 1
    [13738489.851524] Node 0 Normal prio:13 portion:51230 scan:186 a_anon:30070 49578ms i_anon:30058 49578ms a_file:17 49578ms i_file:14 49578ms unevictable:0 reclaim_stat: 11606 7275 15213 4342
    [13738489.851534] Node 0 Normal/shadow prio:32 portion:0 scan:0 a_anon:1138 1249581ms i_anon:95572 1729581ms a_file:1364 709578ms i_file:13403 769579ms unevictable:0 reclaim_stat: 20788 14720 2262 661
    [13738489.851542] Total 188370 anon:165201 file:23169 a_anon:31517 i_anon:133684 a_file:1582 i_file:21587 unevictable:0
    [13738489.851547] RAM: 65528 / 65536 [8146] SWAP: 131072 / 131072 [8115] KMEM: 18612224 / inf [0] DCSZ: 3988598 / 2147483646 [0] OOMG: 155142 / inf [3689] Dirty 65 Wback 0 Dche 2854 Prnd 10628043
    [13738489.851737] Out of memory in UB: Kill process 81018 (httpd) score -870 or sacrifice child
    [13738489.860203] OOM killed process 81018 (httpd) vm:229916kB, rss:98172kB, swap:4120kB
    [13738489.879514] OOM killed process httpd (pid=81018, ve=50200) exited, free=39369.
    [13738489.879520] UB-50200-Mem-Info:
    [13738489.879527] Node 0 DMA prio:25 portion:60 scan:0 a_anon:0 4729612ms i_anon:0 4729612ms a_file:0 4729612ms i_file:0 4729612ms unevictable:0 reclaim_stat: 0 0 0 0
    [13738489.879536] Node 0 DMA/shadow prio:36 portion:0 scan:0 a_anon:0 3169609ms i_anon:0 3169609ms a_file:0 3169609ms i_file:0 3169609ms unevictable:0 reclaim_stat: 0 0 0 0
    [13738489.879544] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:12 49606ms i_anon:12 49606ms a_file:0 49606ms i_file:2 49606ms unevictable:0 reclaim_stat: 314 254 2 0
    [13738489.879553] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 649540131ms i_anon:7525 649540131ms a_file:201 135649693ms i_file:8168 136429693ms unevictable:0 reclaim_stat: 89 41 1245 1
    [13738489.879562] Node 0 Normal prio:13 portion:51230 scan:186 a_anon:20072 49606ms i_anon:24642 49606ms a_file:17 49606ms i_file:34 49606ms unevictable:0 reclaim_stat: 11726 7395 15233 4342
    [13738489.879571] Node 0 Normal/shadow prio:32 portion:0 scan:0 a_anon:1138 1249609ms i_anon:95411 1729609ms a_file:1364 709606ms i_file:13402 769607ms unevictable:0 reclaim_stat: 20788 14720 2262 661
    [13738489.879581] Total 172032 anon:148844 file:23188 a_anon:21254 i_anon:127590 a_file:1582 i_file:21606 unevictable:0
    [13738489.879586] RAM: 49775 / 65536 [8146] SWAP: 130560 / 131072 [8115] KMEM: 18092032 / inf [0] DCSZ: 3988598 / 2147483646 [0] OOMG: 155142 / inf [3690] Dirty 65 Wback 0 Dche 2854 Prnd 10628043
    [13738489.879598] <<< 50200 oom generation 3689 ends (task died)
    [13747953.818727] >>> 50200 oom generation 3690 starts
    [13747953.818737] 137946 (httpd) invoked loc oom-killer: gfp 0x200d2 order 0 oomkilladj=0
    [13747953.818741] UB-50200-Mem-Info:
    [13747953.818748] Node 0 DMA prio:41 portion:60 scan:0 a_anon:0 14193551ms i_anon:0 14193551ms a_file:0 14193551ms i_file:0 14193551ms unevictable:0 reclaim_stat: 0 0 0 0
    [13747953.818757] Node 0 DMA/shadow prio:41 portion:0 scan:0 a_anon:0 7473545ms i_anon:0 7473545ms a_file:0 7473545ms i_file:0 7473545ms unevictable:0 reclaim_stat: 0 0 0 0
    [13747953.818765] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:18 33540ms i_anon:29 33540ms a_file:0 33540ms i_file:1 33540ms unevictable:0 reclaim_stat: 98 60 1 0
    [13747953.818774] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 659004070ms i_anon:2301 659004070ms a_file:201 145113632ms i_file:7996 145893632ms unevictable:0 reclaim_stat: 89 41 1183 8
    [13747953.818783] Node 0 Normal prio:14 portion:51230 scan:121 a_anon:30105 33540ms i_anon:30126 33540ms a_file:25 33540ms i_file:0 33540ms unevictable:0 reclaim_stat: 11321 6069 143 68
    [13747953.818793] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:826 10713548ms i_anon:101923 11193548ms a_file:1672 10173545ms i_file:40553 10233546ms unevictable:0 reclaim_stat: 20788 14720 2780 1179
    [13747953.818802] Total 215808 anon:165360 file:50448 a_anon:30981 i_anon:134379 a_file:1898 i_file:48550 unevictable:0
    [13747953.818806] RAM: 65536 / 65536 [8147] SWAP: 131072 / 131072 [8116] KMEM: 18743296 / inf [0] DCSZ: 4080319 / 2147483646 [0] OOMG: 155142 / inf [3690] Dirty 130 Wback 0 Dche 2897 Prnd 10634032
    [13747953.818993] Out of memory in UB: Kill process 137946 (httpd) score -872 or sacrifice child
    [13747953.827283] OOM killed process 137946 (httpd) vm:226200kB, rss:97844kB, swap:3012kB
    [13747953.847506] OOM killed process httpd (pid=137946, ve=50200) exited, free=988432.
    [13747953.847512] UB-50200-Mem-Info:
    [13747953.847519] Node 0 DMA prio:41 portion:60 scan:0 a_anon:0 14193580ms i_anon:0 14193580ms a_file:0 14193580ms i_file:0 14193580ms unevictable:0 reclaim_stat: 0 0 0 0
    [13747953.847528] Node 0 DMA/shadow prio:41 portion:0 scan:0 a_anon:0 7473574ms i_anon:0 7473574ms a_file:0 7473574ms i_file:0 7473574ms unevictable:0 reclaim_stat: 0 0 0 0
    [13747953.847537] Node 0 DMA32 prio:13 portion:14245 scan:0 a_anon:18 33569ms i_anon:30 33569ms a_file:0 33569ms i_file:1 33569ms unevictable:0 reclaim_stat: 99 60 1 0
    [13747953.847545] Node 0 DMA32/shadow prio:41 portion:0 scan:0 a_anon:32 659004099ms i_anon:2300 659004099ms a_file:201 145113661ms i_file:7996 145893661ms unevictable:0 reclaim_stat: 89 41 1183 8
    [13747953.847555] Node 0 Normal prio:14 portion:51230 scan:121 a_anon:29687 33569ms i_anon:15395 33569ms a_file:25 33569ms i_file:11 33569ms unevictable:0 reclaim_stat: 15905 10626 154 68
    [13747953.847564] Node 0 Normal/shadow prio:41 portion:0 scan:0 a_anon:826 10713577ms i_anon:101717 11193577ms a_file:1672 10173574ms i_file:40549 10233575ms unevictable:0 reclaim_stat: 20788 14720 2780 1179
    [13747953.847573] Total 200460 anon:150005 file:50455 a_anon:30563 i_anon:119442 a_file:1898 i_file:48557 unevictable:0
    [13747953.847578] RAM: 50553 / 65536 [8147] SWAP: 130738 / 131072 [8116] KMEM: 18251776 / inf [0] DCSZ: 4080319 / 2147483646 [0] OOMG: 155142 / inf [3691] Dirty 130 Wback 0 Dche 2897 Prnd 10634032
    [13747953.847590] <<< 50200 oom generation 3690 ends (task died)


    vzcfgvalidate /etc/vz/conf/50200.conf
    Error: physpages.bar should be = 0 (currently, 1000000)
    [root@box13 vz]# vzctl set 50200 --physpages.bar 0 --save
    vzctl: unrecognized option '--physpages.bar'

    vi /etc/vz/conf/50200.conf
    PHYSPAGES="0"
    didn't work well

    solution is to add some missing options (the issue is mainly that scripts made for older Centos/OpenVZ kernels such as Centos 5 will cause issues seen above until parameters below are added to the config)
    try
    PHYSPAGES="0:unlimited"
    KMEMSIZE="1147483646:1947483646"
    NUMIPTENT="999999"
    OOMGUARPAGES="1000000"


     


  • sudo: sorry, you must have a tty to run sudo solution


     ./rsync.sh
    sudo: sorry, you must have a tty to run sudo
    rsync: connection unexpectedly closed (0 bytes received so far) [sender]
    rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7]

    Solution edit

    /etc/sudoers
    #Defaults    requiretty


  • GIMP Create .ico file for website favicon.ico howto in Linux


    GIMP
    File - Save As
    Microsoft Windows Icon (*.ico)


  • Sipura / Linksys PAP/VOIP/SIP Adapter Issue Can't receiving incoming phone calls and you're behind a NAT router (99% of people)? solution


    Sipura / Linksys PAP/VOIP/SIP Adapter Issue

    Can't receiving incoming phone calls and you're behind a NAT router (99% of people)?

    • 1. Login to the adapter.
    • 2. Click on "Advanced" (location varies but usually somewhere on top)
    • 2. Click on "SIP"
    • 3. Scroll down to "NAT" (usually at the bottom).

    You'll find 2 columns with 4 rows of drop-down boxes (they're probably all set to no and this is your problem).

    Set the first 3 rows in both columns to Yes.

     

    Handle VIA received: yes
    Insert VIA received: yes
    Substitute VIA Addr: yes
    STUN Enable: no
    Handle VIA report: yes
    Insert VIA rport: yes
    Send Resp to Src Port.: yes
    STUN Test Enable: no


    Save the settings and after that you should be able to receive phone calls.


  • mdadm: Cannot open /dev/sda1: Device or resource busy


    This was caused by some weird dmraid setup which kind of takes control of drives even if they're blank/unused.

    1. Check the table.

    dmsetup table
    ddf1_44656c6c202020201000006010281f0b3f5195b77cf86172: 0 3905945600 linear 8:0 0
    ddf1_44656c6c202020201000006010281f0b3f5195b77cf86172p3: 0 37124096 linear 253:0 284547072
    ddf1_44656c6c202020201000006010281f0b3f5195b77cf86172p2: 0 283496448 linear 253:0 1050624
    ddf1_44656c6c202020201000006010281f0b3f5195b77cf86172p1: 0 1048576 linear 253:0 2048

    2.) Delete the entry

    dmsetup remove ddf1_44656c6c202020201000006010281f0b3f5195b77cf86172
    device-mapper: remove ioctl on ddf1_44656c6c202020201000006010281f0b3f5195b77cf86172 failed: Device or resource busy
    Command failed

    *Delete the partitions first (eg. ending with p3 p2 p1 and then delete the main one)

     

    After that mdadm will be happy.


  • tar how to include hidden files solution


    tar -czf yourfile.tar.gz .

    The . dot is the crucial part, normally many will use * and that will exclude hidden files by default which is very undesirable as many hidden files are important such as .htaccess and conf files in your home directory etc..  It seems the default behavior of tar should be the opposite but these are all very old tools.


  • Show Directory/File Listing in httpd/Apache Howto with htaccess


    Add this to htaccess:

    Options +Indexes

    After that people will be able to browse files and directories of your site.


  • vzquota : (error) Quota on syscall for id 42131: No such file or directory vzquota on failed [3]


    Starting container...
    vzquota : (error) Quota on syscall for id 42131: No such file or directory
    vzquota on failed [3]

    Solution

    cd /var/vzquota
    mv quota.42131 quota.42131-disable
     vzctl start 42131

    Starting container...
    Initializing quota ...
    Container is mounted
    Adding IP address(es):
    Setting CPU units: 1000
    Container start in progress...

     


  • strange kernel dmesg errors


    Sep 26 16:56:21 box kernel: 00 00 00 00 00 00 00 00
    Sep 26 16:56:21 box kernel: [37007.155690]   d_alias libdl-2.12.so d_count=9 d_flags=8
    Sep 26 16:56:21 box kernel: [37007.155697] 09 00 00 00 08 00 00 00 9f 05 9f 05 00 00 00 00 c0 71 1d 18 04 88 ff ff 00 00 00 00 00 00 00 00 a0 7e 48 00 00 c9 ff ff 78 a9 21 18 04 88 ff ff 3a 7b fa 4e 0d 00 00 00 98 5c 2d 18 04 88 ff ff 18 5c 2d 18 04 88 ff ff 18 5c 2d 18 04 88 ff ff 00 01 10 00 00 00 ad de 00 02 20 00 00 00 ad de f8 5d 2d 18 04 88 ff ff 18 41 2d 18 04 88 ff ff 48 5c 2d 18 04 88 ff ff 48 5c 2d 18 04 88 ff ff f0 71 1d 18 04 88 ff ff f0 71 1d 18 04 88 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6c e3 19 04 88 ff ff 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 40 f2 fe 1b 04 88 ff ff 6c 69 62 64 6c 2d 32 2e 31 32 2e 73 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Sep 26 16:56:21 box kernel: [37007.156183] mnt=ffff880419e0ec00 count=385 flags=20 exp_mask=0
    Sep 26 16:56:21 box kernel: [37007.156191] f0 f4 48 1e 04 88 ff ff f0 f4 48 1e 04 88 ff ff 00 2e 49 1e 04 88 ff ff b8 1c 00 1e 04 88 ff ff f8 65 90 1c 04 88 ff ff 00 6c e3 19 04 88 ff ff 40 ee e0 19 04 88 ff ff 40 fa 7b 18 04 88 ff ff 30 2e 49 1e 04 88 ff ff 30 2e 49 1e 04 88 ff ff 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 5b 49 1e 04 88 ff ff 68 4d d9 19 04 88 ff ff 68 ae 33 1a 04 88 ff ff 78 ec e0 19 04 88 ff ff 78 ec e0 19 04 88 ff ff 88 ec e0 19 04 88 ff ff 88 ec e0 19 04 88 ff ff 98 ec e0 19 04 88 ff ff 98 ec e0 19 04 88 ff ff a8 ec e0 19 04 88 ff ff a8 ec e0 19 04 88 ff ff 00 00 00 00 00 00 00 00 40 0e c7 1f 04 88 ff ff 16 00 00 00 00 00 00 00 81 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0 13 a0 d7 ff 60 00 00 00 00 00 00 00 00 00 00
    Sep 26 16:56:21 box kernel: [37007.156719] inode = ffff8804181d7aa0, inode->i_count = 1, inode->i_nlink = 1, inode->i_mode = 33261, inode->i_state = 0, inode->i_flags = 0, inode->i_devices.next = ffff8804181d7ca8, inode->i_devices.prev = ffff8804181d7ca8, inode->i_ino = 3018772
    Sep 26 16:56:21 box kernel: [37007.156739] inode dump: 00 00 00 00 00 00 00 00 b8 af 40 01 00 c9 ff ff d0 71 1d 18 04 88 ff ff 30 5a 1d 18 04 88 ff ff 10 66 1d 18 04 88 ff ff e0 71 1d 18 04 88 ff ff 18 5e 2d 18 04 88 ff ff 18 5e 2d 18 04 88 ff ff 14 10 2e 00 00 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 98 3e 1d 00 00 00 00 00 f1 96 44 52 00 00 00 00 e3 d0 c3 23 00 00 00 00 4e 1d 26 51 00 00 00 00 00 00 00 00 00 00 00 00 54 2e ff 51 00 00 00 00 26 64 82 39 00 00 00 00 a0 0e 00 00 00 00 00 00 0c 00 00 00 00 00 ed 81 05 00


  • mdadm how to add additional RAID 1 drives


    This is a great way to upgrade your RAID array or move it/copy it to a new set of hard drives.

    Eg. you have a current RAID 1 array on older/slower drives.

    Just add at least 1 of the new drives to the array, update grub/install it and then boot into it.  Then you have a transparent data migration that is fully synchronized.

     

    mdadm --grow /dev/md126 --raid-devices 3


         
    md127 : active raid1 sdc1[3] sdb1[0] sda1[1]
          153599936 blocks [3/2] [UU_]
          [>....................]  recovery =  0.8% (1281216/153599936) finish=119.7min speed=21202K/sec
     


  • guestmount to mount a disk image


     guestmount -a yourimage.img -m /dev/sda1 --ro /mountpoint
    
    Change "yourimage.img" to the actual disk image.
    Change "/dev/sda1" to the device on the disk image you want to mount.
    --ro is specified only if you don't want write access (good to ensure you don't mess anything up if you just want to recover data).
    

  • mdadm increase recovery sync/resync speed slow solution/fix


    echo 120000 >/proc/sys/dev/raid/speed_limit_min

    This will increase the speed, note that sometimes a rebuild is slow due to current disk activity/iowait.

    If that is not the cause then you may have a hardware issue (controller, cable or a bad drive).


  • rpmforge Centos 6 how to install


    rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

    i686:

    rpm -ivh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

    x64:

    rpm -ivh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

     


  • Dell SAS 6/ir Cards are just LSi 1068E cards


    02:00.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068E PCI-Express Fusion-MPT SAS (rev 08)
    03:00.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068E PCI-Express Fusion-MPT SAS (rev 08)

    Basically these cards are a stripped-down version of Dell Perc 6/i only  they (SAS 6/ir) support JBOD.

    The Dell Perc 6/i are basically useless because it doesn't have JBOD support and requires software or BIOS commands to add or remove any hard drive-defeating the purpose of hot swapping convenience and ease).  I tried loading other firmware to the 6/i's but it wouldn't work or boot with Dell's Perc BIOS.  I tried using other methods which actually bricked the Perc 6/i (never try those ones that erase the BIOS first without testing to see if the program that writes the new BIOS can actually detect your card!).


  • bash date command to convert unix epoch timestamp


    date -d @timestampgoeshere +%c

    It's very handy and simple as shown above.


  • Apache SNI is not needed what is the issue?


    I read this article and still don't understand the issue.

    If I understand correctly the client negotiates after the first SSL connection and then gets the correct hostname and thus correct certificate.

    http://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI

    To their credit I know I'm not using SNI becuase I get this message in the Apache log :)

    [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!!

    But once again I don't get the issue.  SSL works fine with my name based vhosts and allows me to use a shared certificate by default and if I want a "real certificate" I just buy another IP from my provider, assign it to the right domain and buy the new certificate and set it up.

    To put it in perspective I've used this for years on my own manual websites, using Name Based vhosts and a shared SSL certificate AND sites with separate IPs that have their own without issue.  SNI sounds like it is not as widely as supported by clients as normal SSL connections.

    I guess the only real benefit of SNI is the ability to serve multiple unique certificates without a separate IP being required, but I don't see this being an issue for most people unless they're on a real budget.

    I do agree at some point in the future it may be a problem, but by then IPV6 should be widely adopted and IPs will no longer again be an issue.


  • Centos 5/6 Install EPEL from Fedora for extra packages Howto


    http://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F

    Visit the above URL, choose your version and architecture and install it.  EPEL has a lot of missing and extra packages that rpmforge does not.


  • PHP Security - Enable Safe Mode to increase security


    Everyone should be running with safe_mode on in /etc/php.ini (on Centos) as it makes exploiting your system more difficult is PHP can't execute anything on the system if a script is exploited.

    For example with Safe_Mode on the only executable files on the system are ones in the safe_mode_exec_dir = /safephp

    This is crucial, if you must execute anything from PHP then you have to copy the binary and assign to the user that Apache runs your site under.  This makes things much more secure.


  • [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect key file for table 'user'; try to repair it - Solution


    service mysqld start
    MySQL Daemon failed to start.
    Starting mysqld:                                           [FAILED]

    mysqld_safe

    cat /var/lib/mysql/server.err
    130917 17:57:09  InnoDB: Started; log sequence number 0 0
    130917 17:57:09 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect key file for table 'user'; try to repair it

    Solution

    Restore a proper user.* file for mysql and restart


  • PHP5 Centos 6 displays part of code from PHP file for some scripts


    PHP5 Centos 6 displays part of code from PHP file for some scripts

    Solution

    edit /etc/php.ini change  short_open_tag = Off to:
    short_open_tag = On

    Then restart Apache and it should be resolved (assuming the scripts failing used )