Category Archives: Unix/Linux

linux tools part 7– Monitor socket activity

systemtap发行版本提供了socktop,用于监控socket套接字之间的通信,具体如下:

[root@db-42 ~]# socktop -h
USAGE: socktop [-d] [-i interval] [-N num] [-P protocol]... [-f family].[......]

Read more

Posted in Unix/Linux | Tagged | Leave a comment

PCIE performance test — LSI vs FusionIO vs VIRI

Testing three PCIE cards’s performance for all of scenes using fio

Reference:fio parameter setting

Posted in Unix/Linux | Tagged | Leave a comment

linux tools part 6– network Monitoring (2)

基于上次的nicstat linux还提供了nethogs,可以监控指定pid的具体流量,在这里可以下到源码.

获取过程:

open("/proc/$pid/fd")
open("/proc/net/tcp")
open("/proc[......]

Read more

Posted in Unix/Linux | Tagged | Leave a comment

linux tools part 5– Trace network information

Nmap ("Network Mapper") is an open source tool for network exploration and security auditing. It was designed to rapidly scan large networks[......]

Read more

Posted in Unix/Linux | Tagged | Leave a comment

MySQL key partition and MongoDB TEST

对于业务的激活码需求做了一次关于mysql,mongodb的比对.mysql分为normal,key partition 数量分别是1亿和10亿数据,mysql采用直接访问PK键,partition key为PK,mysql table size 为90G,mongodb table size为15[......]

Read more

Posted in Unix/Linux | Tagged | Leave a comment

linux tools part 4– Monitor process IO state

iotop是一个类似top的检测process IO 的Python 项目。可以在这里下载到源码,可以在这里找到具体的说明。下面做一个演示:

首先下载源码,要求python version>=2.6

wget http://guichaz.free.fr/iotop/files/io[......]

Read more

Posted in Unix/Linux | Tagged | Leave a comment

linux tools part 3– Monitor process status

pidstat是一款很不错的针对linux pid状态监控的程序

The pidstat command is used for monitoring individual tasks currently being managed by the Linux kernel. 
It writ[......]

Read more

Posted in Unix/Linux | Tagged | Leave a comment

linux tools part 2– network Monitoring

本来想写一篇关于nicstat的文章,霸爷已经写的非常好了参考这里nicstat 网络流量统计利器

这里说明一下使用nicstat 可以完美替代iptraf ,nload 等工具

同样可以替代watch –命令行模式:
eg:

Every 1.0s: /sbin/ifconfi[......]

Read more

Posted in Unix/Linux | Tagged | Leave a comment

linux tools part 1– Linux Kernel Performance

Perf is a profiler tool for Linux 2.6+ based systems that abstracts away CPU 
hardware differences in Linux performance measurements and presents a s[......]

Read more

Posted in Unix/Linux | Tagged | Leave a comment

LOB字段迁移浅谈

最近做了一次文描系统的迁移,涉及到大量的lob表,对于这种文描表的处理,其实不建议放在oracle 的lob字段中.对于LOB相信大家肯定遇到过各种问题LOB的直接读写往往会对存储层面造成很大的压力,瞬间的并发严重的可能导致系统的崩溃.相信维护过秒杀系统的同学深有感触。

鉴于这次的迁移.总结了[......]

Read more

Posted in Unix/Linux | Leave a comment