Archive for February, 2010

25
Feb

netbeans ile php debug

   Posted by: İsmail ÇAKIR    in php

idesinde kodlarınıza yapmak isterseniz;

paketini kurun

sudo apt-get install php5-xdebug

daha sonra

/etc/php5/apache2/php.ini dosyasını editleyip aşağıdaki satıları ekleyin;

xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000

apacheyi restart edip hatalarınızı bulmaya başlıyabilirsiniz.

Bookmark and Share
Tags: , , , ,

Tags: , , , ,

25
Feb

Linux sistemlerinde benchmark (SysBench)

   Posted by: İsmail ÇAKIR    in Bilgi Ve Deneyim, Linux

uyguladığım programları içinde sunucu konfigurasyonu test için en hoşuma giden paket SysBench oldu.

Peki SysBench ile neleri test edebiliriz?

dosya I/O performansını
hafıza ayırma ve transfer hızını
POSIX threadleri performansını
mysql database server performansını

Benchmarkımızu kullanmak için

veya kullanıyorsak

sudo apt-get install sysbench dememiz yeterli, kaynaktan kurmak istersek;

SourceForge SysBench yansısından
kaynak kodlarımız inidiyoruz.

tar -zxvf sysbench-0.4.12.tar.gz

komutu ile açıyoruz.

cd sysbench-0.4.12
./configure
make
make install

komutları ile sisteme kuruyoruz.

örnek komutlar:

için;
$ sysbench --num-=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw prepare
$ sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw run
$ sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw cleanup

ilk komut 3 gb lık dosya hazırlıyor test için, ikinci testleri gerçekleştiriyor, üçüncü de geçici dosyaları siliyor.

hafıza için;
$ sysbench --num-threads=16 --test= ---block-size=4K ---total-size=4G
(memtest paketi daha iyi bu iş için)

threadler için;
sysbench --num-threads=64 --test=threads --thread-yields=100 --thread-locks=2 run

için;
sysbench --test=cpu --cpu-max-prime=20000 run
asal sayı hesabı ile test ediyor.

mysql için;
$ sysbench --test= --mysql-table-type=myisam ---table-size=1000000 --mysql-socket=/tmp/mysql.sock prepare
$ sysbench --num-threads=16 --max-requests=100000 --test=oltp --oltp-table-size=1000000 --mysql-socket=/tmp/mysql.sock --oltp-read-only run

testi anlamak için aynı makinada farklı kernellerle test edebilirsiniz.

örnek çıktı;
ripper@ubuntu:~$ sysbench --test=cpu --cpu-max-prime=20000 run
sysbench 0.4.10: multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 20000

Test execution summary:
total time: 36.1809s
total number of events: 10000
total time taken by event execution: 36.1756
per-request statistics:
min: 3.60ms
avg: 3.62ms
max: 5.70ms
approx. 95 percentile: 3.62ms

Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 36.1756/0.00

karşılaştırmak istersek 16 threadle

ripper@ubuntu:~$ sysbench --test=cpu --cpu-max-prime=20000 --num-threads=16 run
sysbench 0.4.10: multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 16

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 20000

Test execution summary:
total time: 9.1494s
total number of events: 10000
total time taken by event execution: 144.8304
per-request statistics:
min: 3.60ms
avg: 14.48ms
max: 147.61ms
approx. 95 percentile: 63.75ms

Threads fairness:
events (avg/stddev): 625.0000/107.60
execution time (avg/stddev): 9.0519/0.05

Bookmark and Share
Tags: , , , , , , , , , ,

Tags: , , , , , , , , , ,

24
Feb

linux capslock notify

   Posted by: Muhammed YÜRÜRDURMAZ    in Linux, python

Eer benim gibi durumunu dizüstünüzde ışık olmadığından dolayı göremiyorsanız aşağıdaki script işinizi görebilir.

bu scripti capsnotify.py ismiyle bir yere kaydedin.

daha sonra kullandığınız masaüstü ortamının otomatik başlangıç bölümüne ayarlayın.


#!/usr/bin/
import pygtk
pygtk.require(’2.0′)
import pynotify
import sys
import gtk
import os
import time

__author__="xmaster"
__date__ ="$Feb 24, 2010 11:14:16 AM$"

def get_status():
    status = None
    p = os.popen("/usr/bin/xset q")
    while 1:
        line = p.readline()
        if not line: break
        if line.find("Caps") > -1:
            status = line[21:25].strip()
            break
    p.close()
    return status

def show_status(status):
    if status == "on":
        uri = "file:///usr/share/icons/gnome/scalable/devices/keyboard.svg"
        n = pynotify.Notification("Caps Lock On", "", uri)
    else:
        uri = "file:///usr/share/icons/gnome/scalable/devices/keyboard.svg"
        n = pynotify.Notification("Caps Lock Off", "", uri)

    n.set_timeout(500)
    if not n.show():
        print "Failed to send notification"
        sys.exit(1)

if __name__ == ‘__main__’:
    if not pynotify.init("Caps toggle"):
        print "Unable to initialize Python "
        sys.exit(1)
    old_status = None
    while 1:
        status = get_status()
        if old_status is None:
            old_status = status
        if status != old_status:
            show_status(status)
            old_status = status
        time.sleep(0.5)

Bookmark and Share
Tags: , , , ,

Tags: , , , ,

24
Feb

ati radeon debian bios güncellemesi sonrası

   Posted by: Muhammed YÜRÜRDURMAZ    in Bilgi Ve Deneyim, Linux

(WW) fglrx: No matching Device section for instance (BusID PCI:0@0:17:0) found
(WW) fglrx: No matching Device section for instance (BusID PCI:0@0:18:0) found
(WW) fglrx: No matching Device section for instance (BusID PCI:0@0:18:1) found
(WW) fglrx: No matching Device section for instance (BusID PCI:0@0:18:2) found
(WW) fglrx: No matching Device section for instance (BusID PCI:0@0:19:0) found
(WW) fglrx: No matching Device section for instance (BusID PCI:0@0:19:1) found
(WW) fglrx: No matching Device section for instance (BusID PCI:0@0:19:2) found
(WW) fglrx: No matching Device section for instance (BusID PCI:0@0:20:0) found
(WW) fglrx: No matching Device section for instance (BusID PCI:0@0:20:2) found
(WW) fglrx: No matching Device section for instance (BusID PCI:0@0:20:3) found
(WW) fglrx: No matching Device section for instance (BusID PCI:0@0:20:4) found
(WW) fglrx: No matching Device section for instance (BusID PCI:0@1:5:1) found
(WW) fglrx: No matching Device section for instance (BusID PCI:0@2:0:1) found
(**) ChipID override: 0x9612
(**) Chipset Supported AMD Graphics Processor (0x9612) found
(II) AMD Video driver is running on a device belonging to a group targeted for this release
(II) AMD Video driver is signed

bios güncellemesinden sonra yukarıdaki gibi bir alıyorsanız, önce sürücüsünü yeniden yükleyin sonra makinayı yeniden başlatın.

Bookmark and Share
Tags: , , , ,

Tags: , , , ,

23
Feb

trac utf-8 ayarı

   Posted by: Muhammed YÜRÜRDURMAZ    in Yazılım

kullanıyor ve source browser içinde olan türkçe karakterleri düzgün göremiyorsanız trac.ini içerisinde

 = iso-8859-15

satırını bulun ve

default_charset = utf-8

yapın. daha sonra

trac-admin <trac_dizini> resync

komutu ile güncellemeyi yaptıktan sonra artık türkçe karakterler düzgün görünecektir.

Bookmark and Share
Tags: , , ,

Tags: , , ,

23
Feb

debian xlock

   Posted by: Muhammed YÜRÜRDURMAZ    in Linux

versiyonda içeren paketi kaldırılmış

eğer xlock kullanmak istiyorsanız http://snapshot.debian.net/archive/2007/01/17/debian/pool/main/x/xlockmore/ veya http://http.us.debian.org/debian/pool/main/x/xlockmore/ adresinden indirip dpkg ile kurabilirsiniz.

Bookmark and Share
Tags: , , ,

Tags: , , ,

Hani böylesine zorla yapmak istemeyizde mecbur kalınca, niye olmasın :)
stop
komutuyla durmuyorsa.
#!/bin/

for ind in `ps -aef | grep | grep -v grep | cut -f4 -d ' '`
do
kill -9 $ind
echo "process $ind"
done
if [ $? -eq 0 ]; then
lsnrctl start
fi
exit

Bookmark and Share
Tags: , , , , ,

Tags: , , , , ,

Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log

şeklinde bir alıyorsanız muhtemel sebebi proje dizininizde veya içerisinde birden fazla jar mevcuttur.

Kullanmadığınızı silin veya başka bir yere taşıyın.

Bookmark and Share
Tags: , ,

Tags: , ,

22
Feb

oracle application server Operation failed with error: org/apache/log4j/Category

   Posted by: Muhammed YÜRÜRDURMAZ    in Java

Application Server üzerinde yaparken Operation failed with error: org/apache//Category şeklinde bir alıyorsanız sırasında apache.commons.logging kütüphanesini deploy sırasında ayarlarından kaldırın

Bookmark and Share
Tags: , , , , , ,

Tags: , , , , , ,

22
Feb

amilo pa 3553 linux wireless

   Posted by: Muhammed YÜRÜRDURMAZ    in Linux

dizüstü olanlar bilir kullanmak için Fn+F1 tuşu ile ı açmak gerekir.

Ancak üzerinde bu kombinasyon çalışmaz ve wireless kullanılamaz.

Bu sorunu çözmek için Fujitsu Siemens in kendi sitesine gidip bios güncellemesini indirin ( en azından 1.6 versiyon olmalı ) ve bios güncellemesini yapın. Bundan sonra bios ayarlarından wireless ı kapatıp açabilirsiniz, ancak tuş kombinasyonu yine çalışmıyor. sadece bios üzerinde açıp kapayabiliyorsunuz.

Bookmark and Share
Tags: , , ,

Tags: , , ,

Switch to our mobile site