วันพฤหัสบดีที่ 26 เมษายน พ.ศ. 2555

memcached-tool


Memcached : memcached-tool display/manage memcached server information


memcached-tool  localhost -h
Usage: memcached-tool [mode]

       memcached-tool 10.0.0.5:11211 display    # shows slabs
       memcached-tool 10.0.0.5:11211            # same.  (default is display)
       memcached-tool 10.0.0.5:11211 stats      # shows general stats
       memcached-tool 10.0.0.5:11211 dump       # dumps keys and values
       memcached-tool 10.0.0.5:11211 move 7 9   # takes 1MB slab from class #7
                                                # to class #9.

You can only move slabs around on a server that supports 'slabs reassign'
messages and only once slab memory is totally allocated, and only
once the target class is full.  (So you can't move from #6 to #9 and #7
to #9 at the same itme, since you'd have to wait for #9 to fill from
the first reassigned page)

วันพฤหัสบดีที่ 19 เมษายน พ.ศ. 2555

Installing virtual box guest addition on ubuntu server

#apt-get install dkms 
#apt-get install build-essential
#apt-get install linux-headers-'uname-r'

reboot

#cd /mnt
#mkdir cdrom 
#mount /dev/cdrom /mnt/cdrom
#cd /mnt/cdrom
#./VBoxLinuxAddition.run 

file system performance : drop caches

#hdparm -tT /dev/sda
#hdparm -I /dev/sda

create test file on the disk
#dd if=/dev/zero of=/home/file.img bs=8k count=256

measuring performance
#iotop -b -n 1 -o
#cat /proc/slabinfo

Before start new test, restart system or clear disk caches
#sync; echo 3 > /proc/sys/vm/drop_caches
#sync; echo 0 > /proc/sys/vm/drop_caches


http://www.linuxinsight.com/proc_sys_vm_drop_caches.html

วันอังคารที่ 3 เมษายน พ.ศ. 2555

LiveCD software raid starting at md125


If you boot existing with live cd it may change the device name (/dev/mdx) starting from 125. This can prevent system from starting up normally.(/etc/fstab still use the old /dev/mdx name starting from md1). To rename software raid, stop and assemble it. :

This will rename md125 ... 127 to md1 ... md3 respectively

#mdadm --stop /dev/md125
#mdadm --assemble /dev/md1 /dev/sda1 /dev/sdb1
#mdadm --stop /dev/md126
#mdadm --assemble /dev/md2 /dev/sda2 /dev/sdb2
#mdadm --stop /dev/md127
#mdadm --assemble /dev/md3 /dev/sda3 /dev/sdb3