Sayfalar

Saturday, January 31, 2015

CentOS 6.6 üzerinde httpd + oracle destekli php5 kurulum notları

Platform: CentOS 6.6 x86_64

Amacımız oracle database ile konuşan php kodlarımıza uygun web sunucu yapılandırmasını gerçekleştirmek.
Sistem kurulumu minimal olacak şekilde gerçekleştirildi.

httpd ve diğer bağımlı paketlerin yüklenmesi:
[root@web2 php5]# yum install httpd openssl098e aspell curl curl-devel wget libjpeg libpng libX11 libXpm libfreetype freetype

ve çalışırken lazım olabilecek diğer bazı paketlerin yüklenmesi:
[root@web2 php5]# yum install vim bind-utils  rsync

oss.oracle altında projelendirilen php epel6 uyumlu rpm paketlerinin indirilmesi:
https://oss.oracle.com/projects/php/
https://oss.oracle.com/projects/php/dist/documentation/installation.html


İndirdiğim dosyalar:

[root@web2 php5]# ls -1
oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
php55-5.5.10-1.el6.x86_64.rpm
php55-bcmath-5.5.10-1.el6.x86_64.rpm
php55-cli-5.5.10-1.el6.x86_64.rpm
php55-common-5.5.10-1.el6.x86_64.rpm
php55-dba-5.5.10-1.el6.x86_64.rpm
php55-devel-5.5.10-1.el6.x86_64.rpm
php55-embedded-5.5.10-1.el6.x86_64.rpm
php55-enchant-5.5.10-1.el6.x86_64.rpm
php55-fpm-5.5.10-1.el6.x86_64.rpm
php55-gd-5.5.10-1.el6.x86_64.rpm
php55-imap-5.5.10-1.el6.x86_64.rpm
php55-intl-5.5.10-1.el6.x86_64.rpm
php55-ldap-5.5.10-1.el6.x86_64.rpm
php55-mbstring-5.5.10-1.el6.x86_64.rpm
php55-mysql-5.5.10-1.el6.x86_64.rpm
php55-oci8-12cR1-5.5.10-2.el6.x86_64.rpm
php55-opcache-5.5.10-1.el6.x86_64.rpm
php55-pdo-5.5.10-1.el6.x86_64.rpm
php55-pgsql-5.5.10-1.el6.x86_64.rpm
php55-process-5.5.10-1.el6.x86_64.rpm
php55-pspell-5.5.10-1.el6.x86_64.rpm
php55-recode-5.5.10-1.el6.x86_64.rpm
php55-snmp-5.5.10-1.el6.x86_64.rpm
php55-soap-5.5.10-1.el6.x86_64.rpm
php55-tidy-5.5.10-1.el6.x86_64.rpm
php55-xml-5.5.10-1.el6.x86_64.rpm
php55-xmlrpc-5.5.10-1.el6.x86_64.rpm



php paketlerinin yüklenmesi:

[root@web2 php5]# rpm -ivh php55-common-5.5.10-1.el6.x86_64.rpm php55-cli-5.5.10-1.el6.x86_64.rpm php55-5.5.10-1.el6.x86_64.rpm
Preparing...                ########################################### [100%]
   1:php55-common           ########################################### [ 33%]
   2:php55-cli              ########################################### [ 67%]
   3:php55                  ########################################### [100%]





Oracle desteği için bağımlı oracle instant client paketinin yüklenmesi:
(http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html adresinden indirildi.)

[root@web2 php5]# rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:oracle-instantclient12.########################################### [100%]




php oci8 modülünün yüklenmesi:

[root@web2 php5]# rpm -ivh php55-oci8-12cR1-5.5.10-2.el6.x86_64.rpm
Preparing...                ########################################### [100%]
   1:php55-oci8-12cR1       ########################################### [100%]



ve webci arkadaşlarımızın ihtiyaç duyabilecekleri gd ve diğer bazı modüllerin yüklenmesi:


[root@web2 php5]# rpm -ivh php55-gd-5.5.10-1.el6.x86_64.rpm  php55-mbstring-5.5.10-1.el6.x86_64.rpm php55-xmlrpc-5.5.10-1.el6.x86_64.rpm
Preparing...                ########################################### [100%]
   1:php55-gd               ########################################### [100%]
   2:php55-xmlrpc           ########################################### [ 50%]
   3:php55-mbstring         ########################################### [100%]



kurulum sonrası httpd başlatmadan önce /etc/php.ini dosyasında short_open_tag = On olarak ayarladım. ( <? tag i ile yazılan php kodlarının sorunsuz çalışması için.)

[root@web2 php5]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for web2
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                           [  OK  ]

Son olarak istediğimiz şekilde modüllerin aktif olduğunu teyid etmek için phpinfo(); fonksiyonunu çağırdığımız bir php dosyası yaratıp browser'dan çağırıyoruz. Ve aktif modüllere göz atıyoruz.

[root@web2 php5]# echo '<?php phpinfo(); ?>' > /var/www/html/phpinfo.php

Visit: http://<server_ip_address>/phpinfo.php


Friday, January 30, 2015

Yerel ntp sunucu bilgileri

http://support.ntp.org/bin/view/Servers/WebHome
http://www.pool.ntp.org/zone/tr

time.ume.tubitak.gov.tr
ntp.ulakbim.gov.tr
time.deu.edu.tr


server 0.tr.pool.ntp.org
server 1.tr.pool.ntp.org
server 2.tr.pool.ntp.org
server 3.tr.pool.ntp.org
   

Örnek komut çağrısı:

root@aokan-VirtualBox:~# ntpdate -u  time.ume.tubitak.gov.tr
30 Jan 22:17:18 ntpdate[7763]: step time server 194.27.222.5 offset -2.502604 sec





Thursday, January 29, 2015

linux shell: ssh / scp warning mesajlarını görmezden gelme

Uyarı mesajları:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is..

Warning: Permanently added to the list of known hosts

Çözüm:

mesajlarını görmezden gelmek için

~/.bashrc dosyasında 

alias ssh=‘/usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=error’
alias scp=‘/usr/bin/scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=error’


tanımlanmalı.

veya

script içinde kullanım için scp / ssh komutlarını aşağıdaki şekilde tanımlayarak kullanabilirsiniz.


SSHCMD="/usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=error"
SCPCMD="/usr/bin/scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=error” 

veya 

~/.ssh/config dosyası aşağıdaki satırlar eklenmeli.
 
Host *
    StrictHostKeyChecking no
    UserKnownHostsFile /dev/null
    LogLevel error

Wednesday, January 28, 2015

linux shell: rsync kullanım notları

# rsync --remove-source-files -varh <local-directory> root@192.168.1.2:./<remote-directory>
v - Verbose
a - archive mode ( "archive" mode, which ensures that symbolic links, devices, attributes, permissions, ownerships, etc. are preserved in the transfer.)
r - Recursive
h - Human-readable format of file sizes
z - compress file data during the transfer (DO NOT use if files are already compressed)
Eğer rsync/ssh transfer hızı sizi tatmin etmiyor ise nfs mount alanı üzerinde rsync komutu çalıştırmayı deneyebilirsiniz.

Örnek aktarım:

Aktarılacak dizin aaa/ içinde 1 dosya var 5.7 mb
aokan@aokan-VirtualBox:~$ cp Downloads/net-snmp-5.6.2.tar.gz aaa/
aokan@aokan-VirtualBox:~$ ls aaa/
net-snmp-5.6.2.tar.gz

Aktarım işlemi:
*Eğer aktarım işlemini screen ile arka planda çalışacak şekilde bırakırsanız rsync loglarını aynı anda bir dosyaya yönlendirerek durum takip işlemini kolaylaştırabilirsiniz.

aokan@aokan-VirtualBox:~$ rsync --remove-source-files -varh aaa root@192.168.1.2:./ddd | tee -a /tmp/rsync-transfer.log
root@192.168.1.2's password:
sending incremental file list
created directory ./ddd
aaa/
aaa/net-snmp-5.6.2.tar.gz
sent 5.96M bytes  received 74 bytes  111.36K bytes/sec

Aktarım sonrası local path kontrolü:
Dizin boş, taşındıktan sonra silinmiş.
aokan@aokan-VirtualBox:~$ ls aaa/

Karşı tarafta remote path kontrolü:
aokan@aokan-VirtualBox:~$ ssh root@192.168.1.2 "find ./ddd -type f -exec du -sh {} \;"
root@192.168.1.2's password:
5,7M    ./ddd/aaa/net-snmp-5.6.2.tar.gz

linux shell: sudo komut çağrılarının loglanması


Bu işlem için aşağıdaki satır eklendi.

# cat /etc/sudoers.d/inseptra2
aokan        ALL=(ALL)       NOPASSWD: LOG_INPUT: LOG_OUTPUT: ALL
Defaults iolog_dir=/var/log/sudo-io/%{user}

aokan kullanıcısına şifresiz tam kullanım yetkisi verildi ve yaptığı tüm komut çağrıları /var/log/sudo-io/ dizini altında loglanacak şekilde yapılandırıldı.

Oluşan logları formatlı şekilde aşağıdaki komut ile görüntüleyebilirsiniz.

# find /var/log/sudo-io/ -name log -exec cat {} \; | grep "::" -A 2 | awk -F: '$1 ~ /^[0-9]+$/{printf  "%s%s",(NR>1)?"\n":"",$1;next} {printf ";" $0} END{printf "\n"}'



linux shell: awk ile belirli kolondan sonraki tüm kolon bilgilerini yazdırma

$ cat file.1
A1 B1 C1 D1 E1
A2 B2 C2 D2 E2
A3 B3 C3 D3 E3
A4 B4 C4 D4 E4
A5 B5 C5 D5 E5

# 3 numaralı kolon itibariyle kalan tüm kolonları yazdırmak için:

$ cat file.1 | awk '{ s = ""; for (i = 3; i <= NF; i++) s = s $i " "; print s }'
C1 D1 E1
C2 D2 E2
C3 D3 E3
C4 D4 E4
C5 D5 E5

Tuesday, January 27, 2015

linux shell: comm komutu kullanımı hakkında

comm - compare two sorted files line by line
 
iki dosyayı satır satır kıyaslayarak yapabileceğiniz işlemler için kullanılır.
 
örn: file1 ve file2  de tekrar eden satırları görmek istediğimiz durum için:


 
VirtualBox:~$ cat file1
A
B
C
D
E
F
G
 
 
 
VirtualBox:~$ cat file2
C
E
X
Y
Z
 
olsun

  
### file1 ve file2'de tekrar eden satırlar
 
VirtualBox:~$ comm -12 file1 file2
C
E
 
 
 
 
### file1'de olup file2'de olmayan satırlar
 
VirtualBox:~$ comm -32 file1 file2
A
B
D
F
G
 
 
 



EXAMPLES
       comm -12 file1 file2
              Print only lines present in both file1 and file2.

       comm -3 file1 file2
              Print lines in file1 not in file2, and vice versa

Monday, January 26, 2015

linux: create .dialogrc and change dialog colors

dialog konsol ekranında grafik oluşturmanızı sağlayan bir araç.

dialog --create-rc ~/.dialogrc

To customize ~/.dialogrc, enter:

vi ~/.dialogrc
Turn on shadow dialog boxes

use_shadow = ON
Turn on color support ON

use_colors = ON
Change default blue background color to BLACK

screen_color = (CYAN,BLACK,ON)

Sunday, January 25, 2015

python: web scraping with BeautifulSoup

BeautifulSoup html, xml parse işlemleri için kullanabileceğiniz bir modül. iterating, searching, ve modifying işlemleri gerçekleştirebilirsiniz.

https://pypi.python.org/pypi/beautifulsoup4/4.3.2 adresinden temin edilebilir.

Xubuntu ortamında kurulumu pip ile aşağıdaki şekilde gerçekleştirdim.
Testlerimde Python 2.7.6 (default, Mar 22 2014, 22:59:56) sürümü kullandım.


Kurulum:

aokan$ sudo pip install beautifulsoup4

Örnekler:
#!/usr/bin/python
from bs4 import BeautifulSoup, NavigableString
import urllib2

url="http://www.siyahsapka.org"
soup=BeautifulSoup(urllib2.urlopen(url).read())
# style tanimi olan span'ların style'larini temizle
for span in soup('span',style=True):
    del span['style']


# tekrar eden break tag'larini (<br> veya <br />) teke indir. arada strong olsa dahi calis.
for br in soup('br'):
    sibling = br.next_sibling
    while sibling:
        if isinstance(sibling, NavigableString):
            sibling = sibling.next_sibling
            continue
        if sibling.name == 'br':
            sibling.decompose()
        elif sibling.name != 'strong':
            break
        sibling = sibling.next_sibling

# strong tag'i arasinda bulunan break (<br> veya <br />) ifadelerini temizle.
for strong in soup('strong'):
    for br in strong('br'):
        br.decompose()


# <a tag'i ile belirtilen link'leri  sadece icerisindeki text kalacak sekilde temizle.
for a in soup('a'):
    a.unwrap()

# gelen html'de yer alan <iframe tag ve içeriğini temizle.
for iframe in soup('iframe'):
    iframe.decompose()

# formatlama isleminden sonra istedigim div icindeki veriyi al
content=unicode(soup.find('div',attrs={'class':'txtIn'}))

Detaylar için http://www.crummy.com/software/BeautifulSoup/bs4/doc/



Eğer biçimlendireceğiniz html veya url sayısı 1000 üzerinde ise bu işlemleri multithread yapmanıza imkan sağlayan scrapy ile gerçekleştirmek daha doğru olacaktır.

Tuesday, January 20, 2015

bash one line: create linux system user without prompt

# useradd -d /home/usernameim -s /bin/bash -p $(echo "sifrem" | openssl passwd -1 -stdin) usernameim

Monday, January 19, 2015

oracle 11gr2 memory_target boyutunu artırma işlemi

database i kapat
su - oracle
sqlplus
sys as sysdba
shutdown immediate;

tmpfs boyutunu artır

[root@localhost:~]# cat /etc/fstab | egrep "^tmpfs"
tmpfs                   /dev/shm                tmpfs   size=8000m      0 0
umount /dev/shm && mount /dev/shm

[root@localhost:~]# df -kh | grep tmpfs
tmpfs             7,9G  3,6G  4,3G  46% /dev/shm   

database i aç
su - oracle
sqlplus
sys as sysdba
startup

database ayarlarını gerçekleştir.
su - oracle
sqlplus
sys as sysdba
create pfile='/tmp/calisan_pfile_backup.ora' from spfile;
alter system set memory_target=6G SCOPE=SPFILE;
alter system set memory_max_target=6G SCOPE=SPFILE;

database i kapat ve tekrar aç
su - oracle
sqlplus
sys as sysdba
shutdown immediate; 
startup


freeradius: allow all external ip connections

Platform: FreeBSD  8.x

add to /usr/local/etc/raddb/clients.conf
client 0.0.0.0/0 {
  secret = 12345
  shortname = name
}

Saturday, January 17, 2015

httperf ile http performance testing

httperf - HTTP performance measurement tool

manual:
http://www.hpl.hp.com/research/linux/httperf/httperf-man-0.9.txt

Örnekler:

httperf --hog --server <server_ip_address> --port 80 --uri /index.php --rate 150 --num-conn 10 --num-call 500


       httperf --hog --server www
          This  command causes httperf to create a connection to host www,
          send a request for the root document (http://www/), receive  the
          reply,  close  the  connection,  and then print some performance
          statistics.

       httperf --hog --server www --num-conn 100 --ra 10 --timeout 5
          Like above, except that a total of 100 connections  are  created
          and  that connections are created at a fixed rate of 10 per sec‐
          ond.  Note  that    option    ``--rate''  has     been  abbreviated  to
          ``--ra''.

       httperf --hog --server=www --wsess=10,5,2 --rate 1 --timeout 5
          Causes httperf to generate a total of 10 sessions at a rate of 1
          session per second.  Each session consists of 5 calls  that  are
          spaced out by 2 seconds.

       httperf --hog --server=www --wsess=10,5,2 --rate=1 --timeout=5 --ssl
          Like  above,  except that httperf contacts server www via SSL at
          port 443 (the default port for SSL connections).

       httperf --hog --server www --wsess=10,5,2  --rate=1  --timeout=5     --ssl
       --ssl-ciphers=EXP-RC4-MD5:EXP-RC2-CBC-MD5   --ssl-no-reuse  --http-ver‐
       sion=1.0
          Like above, except that httperf will inform the server  that  it
          can   only   select  from     two  cipher  suites  (EXP-RC4-MD5  or
          EXP-RC2-CBC-MD5); furthermore, httperf will use HTTP version 1.0
          which requires a new TCP connection for each request.  Also, SSL
          session ids  are    not  reused,  so  the  entire  SSL  connection
          establishment  process  (known  as the SSL handshake) occurs for
          each connection.

Faker: a Python package that generates data for you.

Faker is a Python package that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you.

https://github.com/joke2k/faker

Basic Usage

    from faker import Factory
    fake = Factory.create()

    # OR
    from faker import Faker
    fake = Faker()

    fake.name()
    # 'Lucy Cechtelar'

    fake.address()
    # "426 Jordy Lodge
    #  Cartwrightshire, SC 88120-6700"

    fake.text()
    # Sint velit eveniet. Rerum atque repellat voluptatem quia rerum. Numquam excepturi
    # beatae sint laudantium consequatur. Magni occaecati itaque sint et sit tempore. Nesciunt
    # amet quidem. Iusto deleniti cum autem ad quia aperiam.
    # A consectetur quos aliquam. In iste aliquid et aut similique suscipit. Consequatur qui
    # quaerat iste minus hic expedita. Consequuntur error magni et laboriosam. Aut aspernatur
    # voluptatem sit aliquam. Dolores voluptatum est.
    # Aut molestias et maxime. Fugit autem facilis quos vero. Eius quibusdam possimus est.
    # Ea quaerat et quisquam. Deleniti sunt quam. Adipisci consequatur id in occaecati.
    # Et sint et. Ut ducimus quod nemo ab voluptatum.

Full Stack Python

This guide branches out on topic because your learning needs depend on what you're currently trying to do.

http://www.fullstackpython.com/introduction.html

Inject arbitrary code into a running Python process

$ pyrasite-shell $(pgrep -f "ipython")
Pyrasite Shell 2.0beta9
Connected to 'ipython'
Python 2.7.2 (default, Oct 27 2011, 01:40:22)
[GCC 4.6.1 20111003 (Red Hat 4.6.1-10)] on linux2
>>> print(x)
foo

>>> globals()['x'] = 'bar'


https://pyrasite.readthedocs.org/en/latest/index.html

random string generation with python

#!/usr/bin/python2.7

import random, string, sys
length=10
if len(sys.argv)>1:
        length=sys.argv[1]
rand_str = ''.join(random.choice(
                    string.ascii_lowercase
                    + string.ascii_uppercase
                    + string.digits)
               for i in range(int(length)))
print rand_str

Tuesday, January 13, 2015

Tools to Capture Signals

Software Defined Radio (SDR)  

Hardware Options  
– TV Tuner: $20    (capture only)  
– HackRF: $300  
– USRP2: $2000



RFCat + Hardware Radio

Hardware Options
- IM-Me    dongle: $35   
– CC1111EMK dongle: $49   
– TI EZ430 Chronos CC1111 Access Point:    $58   

screen komutu kullanımı

Yeni oturum açma:
# screen

Çalışılan oturumu arka plana atma:
<CTRL> + a + d
tuş kombinasyonu ile arka plana atılmalı. bu işlem sonrası ekranda
[detached]
şeklinde bir mesaj görürsünüz.


Mevcut oturumları listeleme:
# screen -list

ile ekran listesi alınır ve

# screen -a -r 20458
çağrısı yapılır. (Yukarıda 20458 "screen -list" ile öğrenilen tekrar erişilmek istenilen screen numarası)

add a certificate authority (CA) to Ubuntu

# cp /home/user/workspace/SecureCommunication/certs/valid3/cacert.pem /usr/local/share/ca-certificates/custom-cacert.crt
# update-ca-certificates
Updating certificates in /etc/ssl/certs... WARNING: Skipping duplicate certificate UbuntuOne-ValiCert_Class_2_VA.pem
WARNING: Skipping duplicate certificate UbuntuOne-ValiCert_Class_2_VA.pem
WARNING: Skipping duplicate certificate UbuntuOne-Go_Daddy_Class_2_CA.pem
WARNING: Skipping duplicate certificate UbuntuOne-Go_Daddy_Class_2_CA.pem
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....
Adding debian:custom-cacert.pem
done.
done.

Wednesday, January 7, 2015

ZFS arc size (ram kullanımı) sınırlandırılması

Platform

ZFSonlinux - OEL 6.5 x86_64

Konfigurasyon

ZFS ayar değişiklikleri için düzenlemeler /etc/modprobe.d/zfs.conf dosyası üzerinde yapılmalıdır.

vi /etc/modprobe.d/zfs.conf

options zfs zfs_arc_max=8589934592

Değişikliğin aktif olması için sistem yeniden başlatılmalıdır.
# reboot

Mevcut ARC size kullanımının gözlemlenmesi

arcstat.py zfsonlinux kurulu sistemlerde bulunmaktadır.
[root@localhost ~]# arcstat.py 1 5
    time  read  miss  miss%  dmis  dm%  pmis  pm%  mmis  mm%  arcsz     c
10:46:52     0     0      0     0    0     0    0     0    0      0  100M
10:46:53     0     0      0     0    0     0    0     0    0      0  100M
10:46:54     0     0      0     0    0     0    0     0    0      0  100M
10:46:55     0     0      0     0    0     0    0     0    0      0  100M
10:46:56     0     0      0     0    0     0    0     0    0      0  100M


Konfigurasyonda kullanılabilecek tüm parametreler

Kullanılabilecek parametreler aşağıda sıralanmıştır. Ayarlarla ilgili değişiklik yapılmadan önce http://docs.oracle.com/cd/E26502_01/html/E29022/chapterzfs-1.html#scrolltoc dökümanından faydalanılmalıdır.
cd /sys/module/zfs/parameters
[root@bursa parameters]# ls -1
l2arc_feed_again
l2arc_feed_min_ms
l2arc_feed_secs
l2arc_headroom
l2arc_headroom_boost
l2arc_nocompress
l2arc_noprefetch
l2arc_norw
l2arc_write_boost
l2arc_write_max
metaslab_debug_load
metaslab_debug_unload
spa_asize_inflation
spa_config_path
zfetch_array_rd_sz
zfetch_block_cap
zfetch_max_streams
zfetch_min_sec_reap
zfs_arc_grow_retry
zfs_arc_max
zfs_arc_memory_throttle_disable
zfs_arc_meta_limit
zfs_arc_meta_prune
zfs_arc_min
zfs_arc_min_prefetch_lifespan
zfs_arc_p_aggressive_disable
zfs_arc_p_dampener_disable
zfs_arc_shrink_shift
zfs_autoimport_disable
zfs_dbuf_state_index
zfs_deadman_enabled
zfs_deadman_synctime_ms
zfs_dedup_prefetch
zfs_delay_min_dirty_percent
zfs_delay_scale
zfs_dirty_data_max
zfs_dirty_data_max_max
zfs_dirty_data_max_max_percent
zfs_dirty_data_max_percent
zfs_dirty_data_sync
zfs_disable_dup_eviction
zfs_expire_snapshot
zfs_flags
zfs_free_min_time_ms
zfs_immediate_write_sz
zfs_mdcomp_disable
zfs_nocacheflush
zfs_nopwrite_enabled
zfs_no_scrub_io
zfs_no_scrub_prefetch
zfs_pd_blks_max
zfs_prefetch_disable
zfs_read_chunk_size
zfs_read_history
zfs_read_history_hits
zfs_recover
zfs_resilver_delay
zfs_resilver_min_time_ms
zfs_scan_idle
zfs_scan_min_time_ms
zfs_scrub_delay
zfs_send_corrupt_data
zfs_sync_pass_deferred_free
zfs_sync_pass_dont_compress
zfs_sync_pass_rewrite
zfs_top_maxinflight
zfs_txg_history
zfs_txg_timeout
zfs_vdev_aggregation_limit
zfs_vdev_async_read_max_active
zfs_vdev_async_read_min_active
zfs_vdev_async_write_active_max_dirty_percent
zfs_vdev_async_write_active_min_dirty_percent
zfs_vdev_async_write_max_active
zfs_vdev_async_write_min_active
zfs_vdev_cache_bshift
zfs_vdev_cache_max
zfs_vdev_cache_size
zfs_vdev_max_active
zfs_vdev_mirror_switch_us
zfs_vdev_read_gap_limit
zfs_vdev_scheduler
zfs_vdev_scrub_max_active
zfs_vdev_scrub_min_active
zfs_vdev_sync_read_max_active
zfs_vdev_sync_read_min_active
zfs_vdev_sync_write_max_active
zfs_vdev_sync_write_min_active
zfs_vdev_write_gap_limit
zfs_zevent_cols
zfs_zevent_console
zfs_zevent_len_max
zil_replay_disable
zil_slog_limit
zio_bulk_flags
zio_delay_max
zio_injection_enabled
zio_requeue_io_start_cut_in_line
zvol_inhibit_dev
zvol_major
zvol_max_discard_blocks
zvol_threads

delimited data file ve json data file size kıyaslaması


Docs:
http://tools.ietf.org/html/rfc4627
http://www.ecma-international.org/publications/standards/Ecma-404.htm

Aşağıda detaylandırılan örnek; sıkıştırılmış delimited data file ve json data file dosya büyüklüğünü kıyaslamak,  format seçimi konusunda fikir edinmek amacı ile yapılmıştır.

 generator code:
<?php
$x=0;
$code=0;
$key=0;
for($i=0; $i<9000000; $i++) {
        $x++;
        $code++;
        $key++;
//      echo chr($i)."|";
//      echo $i."|";
        echo "{'key$key': '$i'},";
        if($x%10==0) echo "\n";
        if($key%10==0) $key=0;
        if($code=="255") $code=0;
}
?>




[root@okantest ~]# du -sh delimited.file.1
69M     delimited.file.1
[root@okantest ~]# wc -l delimited.file.1
900000 delimited.file.1
[root@okantest ~]# gzip delimited.file.1
[root@okantest ~]# du -sh delimited.file.1.gz
19M     delimited.file.1.gz


[root@okantest ~]# du -sh json.file.1
173M    json.file.1
[root@okantest ~]# wc -l json.file.1
900000 json.file.1
[root@okantest ~]# gzip json.file.1
[root@okantest ~]# du -sh json.file.1.gz
23M     json.file.1.gz