31 Aralık 2015 Perşembe

Linux storage komutlari

Linux disk durumunu goruntuleme
               
                disk free komutu
                # df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda1        77G  5.4G   68G   8% /
    tmpfs           3.9G     0  3.9G   0% /dev/shm
    /dev/sda3       374G  6.6G  349G   2% /opt/inseptra
               
                disk usage
                komutu dosyanin yada dizinin diskteki kapladigi boyutu sorgular
                # du -sh test.sh
4.0K    test.sh
               
                ulasilabilir aygitlari gorutuleme
                # fdisk -l

Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e7669

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        7833    62401536   8e  Linux LVM

Disk /dev/mapper/vg_imc-lv_root: 52.3 GB, 52344913920 bytes
255 heads, 63 sectors/track, 6363 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

               
                    acilista sisteme baglanmis dosyalar hakkinda bilgi verir
                    /etc/fstab
# Created by anaconda on Wed Feb 25 17:18:17 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_imc-lv_root /                       ext4    defaults        1 1
UUID=d7d31050-7663-4ced-9409-27d7e0a68e66 /boot                   ext4    defaults        1 2
/dev/mapper/vg_imc-lv_home /home                   ext4    defaults        1 2
/dev/mapper/vg_imc-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0



                    # mount
/dev/mapper/vg_imc-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/vg_imc-lv_home on /home type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

17 Kasım 2015 Salı

Ram tuketimi


sistemin bellek kullanımı cpu/ram tarafından ayrıntılı ve anlık olarak
    top
    htop  (yum install htop)
  
anlık ram kullanımı sorgulama

    free -m

sistemlerdeki bellek kullanımı ile istatistikler  
  
    cat /proc/meminfo

Ram modeli, Ram kullanımı detaylı sorgulama

     dmidecode –type memory
  
Swap kullanımı, Swap IN/OUT
Ram çok fazla kullanıldığında boşta ram kalmaz işletim sistemi verileri Ram den çekip diske atar yeniden kullanması gerektiğinde geri Ram e alır
 
     ipcs -m
memory den reserve isteyen programlar

1 Eylül 2015 Salı

sifresiz ssh baglantisi icin yapilmasi gerekenler


[ayse@A ~]$ ls .ssh

id_rsa  id_rsa.pub  known_hosts



[ayse@A ~]$ ssh-copy-id -i .ssh/id_rsa.pub ayse@192.168.0.44


ayse@192.168.0.44's password:
Now try logging into the machine, with "ssh 'ayse@192.168.0.44'", and check in:

  .ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.




[ayse@A ~]$ ssh ayse@192.168.0.44

Last login: Tue Sep  1 09:34:39 2015 from ....



ayse$ logout
Connection to 192.168.0.44 closed.



[ayse@A ~]$ vi .ssh/config



buraya:


host 44

hostaname 192.168.0.44

user ayse




yazarak kaydediyoruz


[

ayse@A ~]$ ssh 44

Bad owner or permissions on /home/ayse/.ssh/config


[ayse@A ~]$ chmod 600 .ssh/config


[ayse@A ~]$ ssh 44

6 Ağustos 2015 Perşembe

git commit


$git status





On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#    modified:   category-application.log
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)


$git add <filename>

$git commit -a -m "aciklama bilgisi"

master 0f8b9fe] application log updated
 1 files changed, 1 insertions(+), 1 deletions(-)


$git push origin master

Counting objects: 5, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 338 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)

29 Temmuz 2015 Çarşamba

wireshark kurulumu ve symbol lookup error

CentOS 6.5 icin kurulum ;

root olunur

# yum install wireshark-gnome

# wireshark

hata ile karsilasilirsa ;

centos 6.5: wireshark: symbol lookup error: wireshark: undefined symbol: gtk_combo_box_text_new_with_entry

gibi

cozum:

#yum update gtk2

# rpm -qa | grep wireshark
wireshark-devel-1.8.10-8.el6_6.x86_64
wireshark-gnome-1.8.10-8.el6_6.x86_64
wireshark-1.8.10-8.el6_6.x86_64

23 Temmuz 2015 Perşembe

netcat command

To install netcat on a CentOS system (64bit), simply issue the following command: yum install nc.x86_64


#yum install nc.x86_64


Basic syntax of netcat :

usage: nc [-46bCDdhjklnrStUuvZz] [-I length] [-i interval] [-O length] [-P proxy_username] [-p source_port] [-q seconds] [-s source] [-T toskeyword] [-V rtable] [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] [destination] [port]

7 Temmuz 2015 Salı

eth1 interface'inde trafik kontrol islemi



 ~ vnstat -l -i eth1

Monitoring eth1...    (press CTRL-C to stop)

   rx:     8.32 Mbit/s  1430 p/s          tx:        0 kbit/s     0 p/s