Shannon Direct-IO PCIe SSD测试服务器

2016年4月11日 没有评论

Shannon Direct-IO PCIe SSD测试服务器

参考

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Global_File_System/s1-manage-direct-io.html

测试机

root@pts/0 # dmidecode -t system
# dmidecode 2.12
SMBIOS 2.7 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
    Manufacturer: Huawei Technologies Co., Ltd.
    Product Name: Tecal XH321 V2
    Version: V100R002
    Serial Number: 2102300724N0E9001029-1
    UUID: 78D2F813-D21D-B211-88DD-000000821800
    Wake-up Type: Power Switch
    SKU Number: Type1Sku0
    Family: Type1Family

Handle 0x0006, DMI type 32, 20 bytes
System Boot Information
    Status: No errors detected

192.168.2.10 [~] 2016-04-11 13:35:12
root@pts/0 #

查看磁盘

192.168.2.10 [~] 2016-04-11 13:37:39
root@pts/0 # fdisk -l

Disk /dev/sda: 598.0 GB, 597998698496 bytes
255 heads, 63 sectors/track, 72702 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: 0x00083ef1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      204800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              26        1070     8388608   82  Linux swap / Solaris
/dev/sda3            1070       72703   575388672   83  Linux
192.168.2.10 [~] 2016-04-11 13:37:41
root@pts/0 #

查看磁盘类型

192.168.2.10 [~] 2016-04-11 13:38:16
root@pts/0 # smartctl -a  /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Vendor:               LSI
Product:              LSI
Revision:             3.19
User Capacity:        597,998,698,496 bytes [597 GB]
Logical block size:   512 bytes
Logical Unit id:      0x6e097964ffa5e0001dfde8f91f6ff0b2
Serial number:        00b2f06f1ff9e8fd1d00e0a5ff647909
Device type:          disk
Local Time is:        Mon Apr 11 13:38:25 2016 CST
Device does not support SMART

Error Counter logging not supported
Device does not support Self Test logging
192.168.2.10 [~] 2016-04-11 13:38:25
root@pts/0 #

查看磁盘类型

root@pts/0 # smartctl -i  /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Vendor:               LSI
Product:              LSI
Revision:             3.19
User Capacity:        597,998,698,496 bytes [597 GB]
Logical block size:   512 bytes
Logical Unit id:      0x6e097964ffa5e0001dfde8f91f6ff0b2
Serial number:        00b2f06f1ff9e8fd1d00e0a5ff647909
Device type:          disk
Local Time is:        Mon Apr 11 13:39:59 2016 CST
Device does not support SMART
192.168.2.10 [~] 2016-04-11 13:39:59
root@pts/0 #

root@pts/0 # smartctl -H  /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

SMART Health Status: OK
192.168.2.10 [~] 2016-04-11 13:40:37
root@pts/0 #

启动服务

service smartd start ; chkconfig smartd on

查看磁盘类型

root@pts/0 # smartctl -i /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Vendor:               LSI
Product:              LSI
Revision:             3.19
User Capacity:        597,998,698,496 bytes [597 GB]
Logical block size:   512 bytes
Logical Unit id:      0x6e097964ffa5e0001dfde8f91f6ff0b2
Serial number:        00b2f06f1ff9e8fd1d00e0a5ff647909
Device type:          disk
Local Time is:        Mon Apr 11 13:52:09 2016 CST
Device does not support SMART

磁盘类型

使用 Direct-IOTM PCIe SSD 卡必须安装驱动程序 shannon-module 和管理工具 shannon-utils。


192.168.2.10 [~] 2016-04-11 13:53:35
root@pts/0 # ls /dev/df*
ls: 无法访问/dev/df*: 没有那个文件或目录
192.168.2.10 [~] 2016-04-11 13:59:47
root@pts/0 #

安装驱动

root@pts/0 # mkdir -pv /www/shell/db
root@pts/0 # wget http://www.shannon-sys.com/downloads/Shannon_Linux_Driver_Package_2.8.6.1.tar.gz
root@pts/0 # tar -xvf Shannon_Linux_Driver_Package_2.8.6.1.tar.gz
root@pts/0 # uname -r
2.6.32-504.el6.x86_64
192.168.2.10 [/www/shell/db] 2016-04-11 14:05:55
root@pts/0 #
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 14:06:26
root@pts/0 # tree
.
├── 5
│   ├── shannon-module-2.6.18-164.el5-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.18-194.el5-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.18-238.el5-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.18-274.el5-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.18-308.el5-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.18-371.el5-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.18-398.el5-2.8-6.1.x86_64.rpm
│   └── shannon-module-2.6.18-406.el5-2.8-6.1.x86_64.rpm
├── 6
│   ├── shannon-module-2.6.32-131.0.15.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-220.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-279.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-358.23.2.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-358.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-431.11.2.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-431.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-504.12.2.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-504.8.1.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
│   └── shannon-module-2.6.32-71.el6.x86_64-2.8-6.1.x86_64.rpm
└── 7
    ├── shannon-module-3.10.0-123.el7.x86_64-2.8-6.1.x86_64.rpm
    └── shannon-module-3.10.0-229.el7.x86_64-2.8-6.1.x86_64.rpm

3 directories, 21 files
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 14:06:29
root@pts/0 #
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 14:06:29
root@pts/0 # uname -r
2.6.32-504.el6.x86_64
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 14:07:02
root@pts/0 #
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:08:01
root@pts/0 # rpm -ivh shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:shannon-module-2.6.32-5########################################### [100%]
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:08:24
root@pts/0 #
root@pts/0 # ls -alrt /lib/modules/2.6.32-504.el6.x86_64/extra/shannon.ko
-rw-r--r--. 1 root root 2507131 3月  13 17:28 /lib/modules/2.6.32-504.el6.x86_64/extra/shannon.ko
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:10:32
root@pts/0 #
root@pts/0 # modprobe -l|grep shannon.ko
extra/shannon.ko
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:12:24
root@pts/0 #
root@pts/0 # ls
CentOS  OEL  shannon-utils-2.8-6.1.x86_64.rpm  SRPM  SUSE
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 14:13:39
root@pts/0 # pwd
/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 14:13:48
root@pts/0 # rpm -ivh shannon-utils-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:shannon-utils          ########################################### [100%]
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 14:13:53
root@pts/0 #

更新安装

root@pts/0 # rpm -Uvh shannon-module-`uname -r`-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
    package shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64 is already installed
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:17:23
root@pts/0 #

命令

root@pts/0 # ls -al /usr/bin/shannon-*
-rwxr-xr-x. 1 root root 16859 3月  13 17:26 /usr/bin/shannon-attach
-rwxr-xr-x. 1 root root 16180 3月  13 17:26 /usr/bin/shannon-beacon
-rwxr-xr-x. 1 root root  6868 3月  13 17:26 /usr/bin/shannon-bugreport
-rwxr-xr-x. 1 root root 16861 3月  13 17:26 /usr/bin/shannon-detach
-rwxr-xr-x. 1 root root   447 3月  13 17:26 /usr/bin/shannon-eject
-rwxr-xr-x. 1 root root 25680 3月  13 17:26 /usr/bin/shannon-firmwareupdate
-rwxr-xr-x. 1 root root 26982 3月  13 17:26 /usr/bin/shannon-format
-rwxr-xr-x. 1 root root 42562 3月  13 17:26 /usr/bin/shannon-status
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:19:49
root@pts/0 #

安装开发包

yum install kernel-devel-`uname -r`

工具使用

192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:22:40
root@pts/0 # shannon-status
usage: shannon-status [options] [device]

Shows information about Direct-IO PCIe Flash card(s) installed on the system.

Options:
   -h, --help                  Print this message and exit.
   -v, --version               Display shannon-utils version.
   -p, --print                 Generate "key=value" report for easier parsing.
   -c, --color                 Print critical device states in colored words.
   -a, --all                   Find all Direct-IO card(s), and provide basic information of them.
   -l, --list                  List all Direct-IO PCIe Flash cards installed on the system.
   -x, --expert                Expert mode, show more detailed technical information.
   -m, --monitor               If given, this tool will open a monitoring window, dynamically
                               shows detailed information of the specified device node.
   -r SECS, --refresh=SECS     Set refresh interval of monitoring (default 2 seconds).

Device:                        Control char device for the Direct-IO PCIe Flash card.
                               (e.g. /dev/scta for the first flash card probed by the OS).

192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:23:00
root@pts/0 # shannon-status -v
2.8.6
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:23:03
root@pts/0 # shannon-status -p
device node -p does not exist.
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:23:05
root@pts/0 # shannon-status -a

Totally found 0 Direct-IO PCIe Flash card on this system.
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:23:10
root@pts/0 #

更新驱动

192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:28:53
root@pts/0 # ls -al *`uname -r`*
-rw-rw-r--. 1 1000 1000 527756 3月  31 08:18 shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:29:06
root@pts/0 # rpm -ivh shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
    package shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64 is already installed
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:29:15
root@pts/0 # rpm -Uvh shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
    package shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64 is already installed
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:29:21
root@pts/0 #

工具

 yum install yum



 192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 14:36:52
root@pts/0 # ls -l /lib/modules/$(uname -r)/build
lrwxrwxrwx. 1 root root 46 3月  24 06:12 /lib/modules/2.6.32-504.el6.x86_64/build -> ../../../usr/src/kernels/2.6.32-504.el6.x86_64
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 14:37:40
root@pts/0 #
root@pts/0 # rpmbuild --rebuild shannon-module-2.8-6.1.src.rpm
root@pts/0 # ll
总用量 4
drwxr-xr-x 2 root root 4096 4月  11 14:38 x86_64
192.168.2.10 [~/rpmbuild/RPMS] 2016-04-11 14:39:14
root@pts/0 # cd x86_64/
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:39:16
root@pts/0 # ls
shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:39:16
root@pts/0 # rpm -ivh shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
    package shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64 is already installed
    file /lib/modules/2.6.32-504.el6.x86_64/extra/shannon.ko from install of shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64 conflicts with file from package shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:39:21
root@pts/0 #
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:39:56
root@pts/0 # rpm -e `rpm -qa |grep shannon`
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:40:09
root@pts/0 #
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:40:23
root@pts/0 # rpm -ivh shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:shannon-module-2.6.32-5########################################### [100%]
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:40:28
root@pts/0 #


192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 15:01:34
root@pts/0 # cat /etc/*-release
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 15:01:50
root@pts/0 #

源码安装

root@pts/0 # ls -arlt /dev/dfa


root@pts/0 # shannon-status  /dev/scta

shannon-status -m /dev/scta

https://gitlab.shannon-sys.com/groups/doc

安装

rpm -ivh shannon-module-`uname -r`-2.8-6.1.x86_64.rpm




192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 15:18:15
root@pts/0 # rpm -ivh shannon-module-`uname -r`-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:shannon-module-2.6.32-5########################################### [100%]
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 15:18:41
root@pts/0 # ls
shannon-module-2.6.32-131.0.15.el6.x86_64-2.8-6.1.x86_64.rpm  shannon-module-2.6.32-358.el6.x86_64-2.8-6.1.x86_64.rpm       shannon-module-2.6.32-504.8.1.el6.x86_64-2.8-6.1.x86_64.rpm
shannon-module-2.6.32-220.el6.x86_64-2.8-6.1.x86_64.rpm       shannon-module-2.6.32-431.11.2.el6.x86_64-2.8-6.1.x86_64.rpm  shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
shannon-module-2.6.32-279.el6.x86_64-2.8-6.1.x86_64.rpm       shannon-module-2.6.32-431.el6.x86_64-2.8-6.1.x86_64.rpm       shannon-module-2.6.32-71.el6.x86_64-2.8-6.1.x86_64.rpm
shannon-module-2.6.32-358.23.2.el6.x86_64-2.8-6.1.x86_64.rpm  shannon-module-2.6.32-504.12.2.el6.x86_64-2.8-6.1.x86_64.rpm
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 15:18:43
root@pts/0 # cd ..
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 15:18:44
root@pts/0 # ls
5  6  7
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 15:18:45
root@pts/0 # cd ..
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 15:18:46
root@pts/0 # ls
CentOS  OEL  shannon-utils-2.8-6.1.x86_64.rpm  SRPM  SUSE
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 15:18:47
root@pts/0 # rpm -ivh shannon-utils-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:shannon-utils          ########################################### [100%]
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 15:18:51
root@pts/0 #
分类: Google Analytics 标签:

Shannon Direct-IO PCIe SSD测试服务器

2016年4月11日 没有评论

Shannon Direct-IO PCIe SSD测试服务器

参考

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Global_File_System/s1-manage-direct-io.html

测试机
root@pts/0 # dmidecode -t system
# dmidecode 2.12
SMBIOS 2.7 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
    Manufacturer: Huawei Technologies Co., Ltd.
    Product Name: Tecal XH321 V2
    Version: V100R002
    Serial Number: 2102300724N0E9001029-1
    UUID: 78D2F813-D21D-B211-88DD-000000821800
    Wake-up Type: Power Switch
    SKU Number: Type1Sku0
    Family: Type1Family

Handle 0x0006, DMI type 32, 20 bytes
System Boot Information
    Status: No errors detected

192.168.2.10 [~] 2016-04-11 13:35:12
root@pts/0 #

查看磁盘

192.168.2.10 [~] 2016-04-11 13:37:39
root@pts/0 # fdisk -l

Disk /dev/sda: 598.0 GB, 597998698496 bytes
255 heads, 63 sectors/track, 72702 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: 0x00083ef1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      204800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              26        1070     8388608   82  Linux swap / Solaris
/dev/sda3            1070       72703   575388672   83  Linux
192.168.2.10 [~] 2016-04-11 13:37:41
root@pts/0 #

查看磁盘类型

192.168.2.10 [~] 2016-04-11 13:38:16
root@pts/0 # smartctl -a  /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Vendor:               LSI
Product:              LSI
Revision:             3.19
User Capacity:        597,998,698,496 bytes [597 GB]
Logical block size:   512 bytes
Logical Unit id:      0x6e097964ffa5e0001dfde8f91f6ff0b2
Serial number:        00b2f06f1ff9e8fd1d00e0a5ff647909
Device type:          disk
Local Time is:        Mon Apr 11 13:38:25 2016 CST
Device does not support SMART

Error Counter logging not supported
Device does not support Self Test logging
192.168.2.10 [~] 2016-04-11 13:38:25
root@pts/0 #

查看磁盘类型

root@pts/0 # smartctl -i  /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Vendor:               LSI
Product:              LSI
Revision:             3.19
User Capacity:        597,998,698,496 bytes [597 GB]
Logical block size:   512 bytes
Logical Unit id:      0x6e097964ffa5e0001dfde8f91f6ff0b2
Serial number:        00b2f06f1ff9e8fd1d00e0a5ff647909
Device type:          disk
Local Time is:        Mon Apr 11 13:39:59 2016 CST
Device does not support SMART
192.168.2.10 [~] 2016-04-11 13:39:59
root@pts/0 #

root@pts/0 # smartctl -H  /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

SMART Health Status: OK
192.168.2.10 [~] 2016-04-11 13:40:37
root@pts/0 #

启动服务

service smartd start ; chkconfig smartd on

查看磁盘类型

root@pts/0 # smartctl -i /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Vendor:               LSI
Product:              LSI
Revision:             3.19
User Capacity:        597,998,698,496 bytes [597 GB]
Logical block size:   512 bytes
Logical Unit id:      0x6e097964ffa5e0001dfde8f91f6ff0b2
Serial number:        00b2f06f1ff9e8fd1d00e0a5ff647909
Device type:          disk
Local Time is:        Mon Apr 11 13:52:09 2016 CST
Device does not support SMART

磁盘类型

使用 Direct-IOTM PCIe SSD 卡必须安装驱动程序 shannon-module 和管理工具 shannon-utils。


192.168.2.10 [~] 2016-04-11 13:53:35
root@pts/0 # ls /dev/df*
ls: 无法访问/dev/df*: 没有那个文件或目录
192.168.2.10 [~] 2016-04-11 13:59:47
root@pts/0 #

安装驱动

root@pts/0 # mkdir -pv /www/shell/db
root@pts/0 # wget http://www.shannon-sys.com/downloads/Shannon_Linux_Driver_Package_2.8.6.1.tar.gz
root@pts/0 # tar -xvf Shannon_Linux_Driver_Package_2.8.6.1.tar.gz
root@pts/0 # uname -r
2.6.32-504.el6.x86_64
192.168.2.10 [/www/shell/db] 2016-04-11 14:05:55
root@pts/0 #
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 14:06:26
root@pts/0 # tree
.
├── 5
│   ├── shannon-module-2.6.18-164.el5-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.18-194.el5-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.18-238.el5-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.18-274.el5-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.18-308.el5-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.18-371.el5-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.18-398.el5-2.8-6.1.x86_64.rpm
│   └── shannon-module-2.6.18-406.el5-2.8-6.1.x86_64.rpm
├── 6
│   ├── shannon-module-2.6.32-131.0.15.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-220.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-279.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-358.23.2.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-358.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-431.11.2.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-431.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-504.12.2.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-504.8.1.el6.x86_64-2.8-6.1.x86_64.rpm
│   ├── shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
│   └── shannon-module-2.6.32-71.el6.x86_64-2.8-6.1.x86_64.rpm
└── 7
    ├── shannon-module-3.10.0-123.el7.x86_64-2.8-6.1.x86_64.rpm
    └── shannon-module-3.10.0-229.el7.x86_64-2.8-6.1.x86_64.rpm

3 directories, 21 files
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 14:06:29
root@pts/0 #
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 14:06:29
root@pts/0 # uname -r
2.6.32-504.el6.x86_64
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 14:07:02
root@pts/0 #
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:08:01
root@pts/0 # rpm -ivh shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:shannon-module-2.6.32-5########################################### [100%]
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:08:24
root@pts/0 #
root@pts/0 # ls -alrt /lib/modules/2.6.32-504.el6.x86_64/extra/shannon.ko
-rw-r--r--. 1 root root 2507131 3月  13 17:28 /lib/modules/2.6.32-504.el6.x86_64/extra/shannon.ko
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:10:32
root@pts/0 #
root@pts/0 # modprobe -l|grep shannon.ko
extra/shannon.ko
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:12:24
root@pts/0 #
root@pts/0 # ls
CentOS  OEL  shannon-utils-2.8-6.1.x86_64.rpm  SRPM  SUSE
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 14:13:39
root@pts/0 # pwd
/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 14:13:48
root@pts/0 # rpm -ivh shannon-utils-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:shannon-utils          ########################################### [100%]
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 14:13:53
root@pts/0 #

更新安装

root@pts/0 # rpm -Uvh shannon-module-`uname -r`-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
    package shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64 is already installed
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:17:23
root@pts/0 #

命令

root@pts/0 # ls -al /usr/bin/shannon-*
-rwxr-xr-x. 1 root root 16859 3月  13 17:26 /usr/bin/shannon-attach
-rwxr-xr-x. 1 root root 16180 3月  13 17:26 /usr/bin/shannon-beacon
-rwxr-xr-x. 1 root root  6868 3月  13 17:26 /usr/bin/shannon-bugreport
-rwxr-xr-x. 1 root root 16861 3月  13 17:26 /usr/bin/shannon-detach
-rwxr-xr-x. 1 root root   447 3月  13 17:26 /usr/bin/shannon-eject
-rwxr-xr-x. 1 root root 25680 3月  13 17:26 /usr/bin/shannon-firmwareupdate
-rwxr-xr-x. 1 root root 26982 3月  13 17:26 /usr/bin/shannon-format
-rwxr-xr-x. 1 root root 42562 3月  13 17:26 /usr/bin/shannon-status
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:19:49
root@pts/0 #

安装开发包

yum install kernel-devel-`uname -r`

工具使用

192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:22:40
root@pts/0 # shannon-status
usage: shannon-status [options] [device]

Shows information about Direct-IO PCIe Flash card(s) installed on the system.

Options:
   -h, --help                  Print this message and exit.
   -v, --version               Display shannon-utils version.
   -p, --print                 Generate "key=value" report for easier parsing.
   -c, --color                 Print critical device states in colored words.
   -a, --all                   Find all Direct-IO card(s), and provide basic information of them.
   -l, --list                  List all Direct-IO PCIe Flash cards installed on the system.
   -x, --expert                Expert mode, show more detailed technical information.
   -m, --monitor               If given, this tool will open a monitoring window, dynamically
                               shows detailed information of the specified device node.
   -r SECS, --refresh=SECS     Set refresh interval of monitoring (default 2 seconds).

Device:                        Control char device for the Direct-IO PCIe Flash card.
                               (e.g. /dev/scta for the first flash card probed by the OS).

192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:23:00
root@pts/0 # shannon-status -v
2.8.6
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:23:03
root@pts/0 # shannon-status -p
device node -p does not exist.
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:23:05
root@pts/0 # shannon-status -a

Totally found 0 Direct-IO PCIe Flash card on this system.
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:23:10
root@pts/0 #

更新驱动

192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:28:53
root@pts/0 # ls -al *`uname -r`*
-rw-rw-r--. 1 1000 1000 527756 3月  31 08:18 shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:29:06
root@pts/0 # rpm -ivh shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
    package shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64 is already installed
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:29:15
root@pts/0 # rpm -Uvh shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
    package shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64 is already installed
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 14:29:21
root@pts/0 #

工具

 yum install yum



 192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 14:36:52
root@pts/0 # ls -l /lib/modules/$(uname -r)/build
lrwxrwxrwx. 1 root root 46 3月  24 06:12 /lib/modules/2.6.32-504.el6.x86_64/build -> ../../../usr/src/kernels/2.6.32-504.el6.x86_64
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 14:37:40
root@pts/0 #
root@pts/0 # rpmbuild --rebuild shannon-module-2.8-6.1.src.rpm
root@pts/0 # ll
总用量 4
drwxr-xr-x 2 root root 4096 4月  11 14:38 x86_64
192.168.2.10 [~/rpmbuild/RPMS] 2016-04-11 14:39:14
root@pts/0 # cd x86_64/
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:39:16
root@pts/0 # ls
shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:39:16
root@pts/0 # rpm -ivh shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
    package shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64 is already installed
    file /lib/modules/2.6.32-504.el6.x86_64/extra/shannon.ko from install of shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64 conflicts with file from package shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:39:21
root@pts/0 #
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:39:56
root@pts/0 # rpm -e `rpm -qa |grep shannon`
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:40:09
root@pts/0 #
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:40:23
root@pts/0 # rpm -ivh shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:shannon-module-2.6.32-5########################################### [100%]
192.168.2.10 [~/rpmbuild/RPMS/x86_64] 2016-04-11 14:40:28
root@pts/0 #


192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 15:01:34
root@pts/0 # cat /etc/*-release
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
192.168.2.10 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 15:01:50
root@pts/0 #

源码安装

root@pts/0 # ls -arlt /dev/dfa


root@pts/0 # shannon-status  /dev/scta

shannon-status -m /dev/scta

https://gitlab.shannon-sys.com/groups/doc

安装

rpm -ivh shannon-module-`uname -r`-2.8-6.1.x86_64.rpm




192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 15:18:15
root@pts/0 # rpm -ivh shannon-module-`uname -r`-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:shannon-module-2.6.32-5########################################### [100%]
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 15:18:41
root@pts/0 # ls
shannon-module-2.6.32-131.0.15.el6.x86_64-2.8-6.1.x86_64.rpm  shannon-module-2.6.32-358.el6.x86_64-2.8-6.1.x86_64.rpm       shannon-module-2.6.32-504.8.1.el6.x86_64-2.8-6.1.x86_64.rpm
shannon-module-2.6.32-220.el6.x86_64-2.8-6.1.x86_64.rpm       shannon-module-2.6.32-431.11.2.el6.x86_64-2.8-6.1.x86_64.rpm  shannon-module-2.6.32-504.el6.x86_64-2.8-6.1.x86_64.rpm
shannon-module-2.6.32-279.el6.x86_64-2.8-6.1.x86_64.rpm       shannon-module-2.6.32-431.el6.x86_64-2.8-6.1.x86_64.rpm       shannon-module-2.6.32-71.el6.x86_64-2.8-6.1.x86_64.rpm
shannon-module-2.6.32-358.23.2.el6.x86_64-2.8-6.1.x86_64.rpm  shannon-module-2.6.32-504.12.2.el6.x86_64-2.8-6.1.x86_64.rpm
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS/6] 2016-04-11 15:18:43
root@pts/0 # cd ..
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 15:18:44
root@pts/0 # ls
5  6  7
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm/CentOS] 2016-04-11 15:18:45
root@pts/0 # cd ..
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 15:18:46
root@pts/0 # ls
CentOS  OEL  shannon-utils-2.8-6.1.x86_64.rpm  SRPM  SUSE
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 15:18:47
root@pts/0 # rpm -ivh shannon-utils-2.8-6.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:shannon-utils          ########################################### [100%]
192.168.2.11 [/www/shell/db/Shannon_Linux_Driver_Package_2.8.6.1/rpm] 2016-04-11 15:18:51
root@pts/0 #
分类: Google Analytics 标签:

事故总结

2016年4月8日 没有评论

事故总结

客户断

192.168.8.11 [~] 2016-04-08 14:24:45
root@pts/0 # netstat -nt | awk '/^tcp/ {++state[$NF]} END {for(key in state) print key,"\t",state[key]}'
TIME_WAIT    5321
CLOSE_WAIT   50
ESTABLISHED      746
192.168.8.11 [~] 2016-04-08 14:24:47
root@pts/0 #

服务器:

192.168.1.31 [~] 2016-04-08 14:26:54
root@pts/1 # ps -ef |grep nginx
root     39628     1  0 14:20 ?        00:00:00 nginx: master process /usr/local/nginx/sbin/nginx
www      39629 39628 33 14:20 ?        00:02:15 nginx: worker process
www      39631 39628 44 14:20 ?        00:03:01 nginx: worker process
www      39632 39628 33 14:20 ?        00:02:13 nginx: worker process
www      39634 39628 32 14:20 ?        00:02:09 nginx: worker process
www      39635 39628 32 14:20 ?        00:02:12 nginx: worker process
www      39636 39628 38 14:20 ?        00:02:34 nginx: worker process
www      39637 39628 33 14:20 ?        00:02:13 nginx: worker process
www      39638 39628 37 14:20 ?        00:02:32 nginx: worker process
root     42677 42155  0 14:27 pts/1    00:00:00 grep nginx
192.168.1.31 [~] 2016-04-08 14:27:06
root@pts/1 #    

查看连接数
192.168.1.31 [~] 2016–04–08 14:26:08
root@pts/1 # netstat -nt | awk ‘/^tcp/ {++state[$NF]} END {for(key in state) print key,“\t”,state[key]}’
TIME_WAIT 11737
CLOSE_WAIT 15
FIN_WAIT1 7
SYN_SENT 4290
FIN_WAIT2 1
ESTABLISHED 5925
SYN_RECV 1
LAST_ACK 3
192.168.1.31 [~] 2016–04–08 14:26:08
root@pts/1 #

前台nginx

root@pts/5 # netstat -nt | awk '/^tcp/ {++state[$NF]} END {for(key in state) print key,"\t",state[key]}'
TIME_WAIT    4448
CLOSE_WAIT   1
SYN_SENT     6
FIN_WAIT1    13451
FIN_WAIT2    185
ESTABLISHED      21352
SYN_RECV     146
CLOSING      126
LAST_ACK     429
192.168.0.48 [~] 2016-04-08 14:29:26
root@pts/5 #

前台

192.168.1.32 [~] 2016-04-08 14:37:45
root@pts/1 # ss -ant | awk '{++s[$1]} END {for(k in s) print k,s[k]}'
SYN-SENT 78
LAST-ACK 2
ESTAB 770
State 1
FIN-WAIT-1 12
CLOSING 1
TIME-WAIT 6000
CLOSE-WAIT 1
LISTEN 15
192.168.1.32 [~] 2016-04-08 14:37:46
root@pts/1 # ss -ant | awk '{++s[$1]} END {for(k in s) print k,s[k]}'
SYN-SENT 375
LAST-ACK 1
SYN-RECV 1
ESTAB 1066
State 1
FIN-WAIT-1 12
TIME-WAIT 6000
LISTEN 15
192.168.1.32 [~] 2016-04-08 14:37:47
root@pts/1 # ss -ant | awk '{++s[$1]} END {for(k in s) print k,s[k]}'
SYN-SENT 607
LAST-ACK 1
ESTAB 1301
State 1
FIN-WAIT-1 25
TIME-WAIT 6000
CLOSE-WAIT 2
LISTEN 15
192.168.1.32 [~] 2016-04-08 14:37:47
root@pts/1 #

查看

192.168.0.63 [~] 2016-04-08 14:40:40
root@pts/2 #  ss -ant | awk '{++s[$1]} END {for(k in s) print k,s[k]}'
SYN-RECV 1
ESTAB 2016
State 1
FIN-WAIT-1 2
TIME-WAIT 6000
CLOSE-WAIT 54
LISTEN 21
192.168.0.63 [~] 2016-04-08 14:40:41
root@pts/2 #

查看

192.168.0.63 [~] 2016-04-08 14:40:41
root@pts/2 #  netstat -nat|awk '{print$5}'|awk -F : '{print$1}'|sort|uniq -c|sort -rn
   2646 192.168.1.32
   2541 192.168.1.31
    132 192.168.1.8
    123 192.168.1.114
    119 192.168.1.113
     98 192.168.1.5

正常

192.168.1.31 [~] 2016-04-08 15:12:26
root@pts/1 # ss -ant | awk '{++s[$1]} END {for(k in s) print k,s[k]}'
SYN-SENT 9
LAST-ACK 4
SYN-RECV 1
ESTAB 341
State 1
FIN-WAIT-1 1
TIME-WAIT 20000
CLOSE-WAIT 2
LISTEN 15
192.168.1.31 [~] 2016-04-08 15:12:27
root@pts/1 #

正常的nginx

192.168.0.48 [~] 2016-04-08 15:16:20
root@pts/1 # ss -ant | awk '{++s[$1]} END {for(k in s) print k,s[k]}'
SYN-SENT 1
LAST-ACK 721
SYN-RECV 176
ESTAB 38677
State 1
FIN-WAIT-1 36224
CLOSING 153
FIN-WAIT-2 29
TIME-WAIT 5976
CLOSE-WAIT 1
LISTEN 21
192.168.0.48 [~] 2016-04-08 15:16:33
root@pts/1 #
分类: Google Analytics 标签:

事故总结

2016年4月8日 没有评论

事故总结

客户断
192.168.8.11 [~] 2016–04–08 14:24:45
root@pts/0 # netstat -nt | awk ‘/^tcp/ {++state[$NF]} END {for(key in state) print key,“\t”,state[key]}’
TIME_WAIT 5321
CLOSE_WAIT 50
ESTABLISHED 746
192.168.8.11 [~] 2016–04–08 14:24:47
root@pts/0 #

服务器:

192.168.1.31 [~] 2016-04-08 14:26:54
root@pts/1 # ps -ef |grep nginx
root     39628     1  0 14:20 ?        00:00:00 nginx: master process /usr/local/nginx/sbin/nginx
www      39629 39628 33 14:20 ?        00:02:15 nginx: worker process
www      39631 39628 44 14:20 ?        00:03:01 nginx: worker process
www      39632 39628 33 14:20 ?        00:02:13 nginx: worker process
www      39634 39628 32 14:20 ?        00:02:09 nginx: worker process
www      39635 39628 32 14:20 ?        00:02:12 nginx: worker process
www      39636 39628 38 14:20 ?        00:02:34 nginx: worker process
www      39637 39628 33 14:20 ?        00:02:13 nginx: worker process
www      39638 39628 37 14:20 ?        00:02:32 nginx: worker process
root     42677 42155  0 14:27 pts/1    00:00:00 grep nginx
192.168.1.31 [~] 2016-04-08 14:27:06
root@pts/1 #    

查看连接数
192.168.1.31 [~] 2016–04–08 14:26:08
root@pts/1 # netstat -nt | awk ‘/^tcp/ {++state[$NF]} END {for(key in state) print key,“\t”,state[key]}’
TIME_WAIT 11737
CLOSE_WAIT 15
FIN_WAIT1 7
SYN_SENT 4290
FIN_WAIT2 1
ESTABLISHED 5925
SYN_RECV 1
LAST_ACK 3
192.168.1.31 [~] 2016–04–08 14:26:08
root@pts/1 #

前台nginx

root@pts/5 # netstat -nt | awk '/^tcp/ {++state[$NF]} END {for(key in state) print key,"\t",state[key]}'
TIME_WAIT    4448
CLOSE_WAIT   1
SYN_SENT     6
FIN_WAIT1    13451
FIN_WAIT2    185
ESTABLISHED      21352
SYN_RECV     146
CLOSING      126
LAST_ACK     429
192.168.0.48 [~] 2016-04-08 14:29:26
root@pts/5 #

前台

192.168.1.32 [~] 2016-04-08 14:37:45
root@pts/1 # ss -ant | awk '{++s[$1]} END {for(k in s) print k,s[k]}'
SYN-SENT 78
LAST-ACK 2
ESTAB 770
State 1
FIN-WAIT-1 12
CLOSING 1
TIME-WAIT 6000
CLOSE-WAIT 1
LISTEN 15
192.168.1.32 [~] 2016-04-08 14:37:46
root@pts/1 # ss -ant | awk '{++s[$1]} END {for(k in s) print k,s[k]}'
SYN-SENT 375
LAST-ACK 1
SYN-RECV 1
ESTAB 1066
State 1
FIN-WAIT-1 12
TIME-WAIT 6000
LISTEN 15
192.168.1.32 [~] 2016-04-08 14:37:47
root@pts/1 # ss -ant | awk '{++s[$1]} END {for(k in s) print k,s[k]}'
SYN-SENT 607
LAST-ACK 1
ESTAB 1301
State 1
FIN-WAIT-1 25
TIME-WAIT 6000
CLOSE-WAIT 2
LISTEN 15
192.168.1.32 [~] 2016-04-08 14:37:47
root@pts/1 #

查看

192.168.0.63 [~] 2016-04-08 14:40:40
root@pts/2 #  ss -ant | awk '{++s[$1]} END {for(k in s) print k,s[k]}'
SYN-RECV 1
ESTAB 2016
State 1
FIN-WAIT-1 2
TIME-WAIT 6000
CLOSE-WAIT 54
LISTEN 21
192.168.0.63 [~] 2016-04-08 14:40:41
root@pts/2 #

查看

192.168.0.63 [~] 2016-04-08 14:40:41
root@pts/2 #  netstat -nat|awk '{print$5}'|awk -F : '{print$1}'|sort|uniq -c|sort -rn
   2646 192.168.1.32
   2541 192.168.1.31
    132 192.168.1.8
    123 192.168.1.114
    119 192.168.1.113
     98 192.168.1.5

正常

192.168.1.31 [~] 2016-04-08 15:12:26
root@pts/1 # ss -ant | awk '{++s[$1]} END {for(k in s) print k,s[k]}'
SYN-SENT 9
LAST-ACK 4
SYN-RECV 1
ESTAB 341
State 1
FIN-WAIT-1 1
TIME-WAIT 20000
CLOSE-WAIT 2
LISTEN 15
192.168.1.31 [~] 2016-04-08 15:12:27
root@pts/1 #

正常的nginx

192.168.0.48 [~] 2016-04-08 15:16:20
root@pts/1 # ss -ant | awk '{++s[$1]} END {for(k in s) print k,s[k]}'
SYN-SENT 1
LAST-ACK 721
SYN-RECV 176
ESTAB 38677
State 1
FIN-WAIT-1 36224
CLOSING 153
FIN-WAIT-2 29
TIME-WAIT 5976
CLOSE-WAIT 1
LISTEN 21
192.168.0.48 [~] 2016-04-08 15:16:33
root@pts/1 #
分类: Google Analytics 标签:

Byword 2

2016年4月7日 没有评论

Byword 2

分类: Google Analytics 标签:
Pages: 1 2 3 4 5 6 7 8 9 10 ... 340 341 342 Next

无觅相关文章插件,快速提升流量