unix

小型机迁移x86平台之老生常谈

July 17, 2014 migration, oracle, system, unix No comments

You can view this presentation click here: x86_architect
注意使用chrome打开文件 不然可能乱码

IBM will support Flash In DIMM using MCS

January 17, 2014 Architect, hardware, system, unix No comments

The next generation of IBM’s X-series servers will be able to accommodate solid-state Flash drives clipped into their DIMM memory slots, potentially improving the response times of fast-paced enterprise applications.

On Thursday, IBM unveiled the Series 6 generation of its System X x86-based servers. In addition to the novel reuse of DIMM slots, the X6 architecture will also let customers upgrade them to a new generation of processors or memory without swapping in a new motherboard.

DIMM PicULLtraDIMM

Diablo Technologies, a memory technology company, developed Memory Channel Storage (MCS) that 
enables flash on a DIMM module to be accessed by the CPU, instead of using the SATA bus as other 
DIMM form-factor SSD products have. Using a host-level driver and an ASIC on the DIMM, it creates 
a special memory storage layer in flash through which the CPU actually moves data from the RAM 
memory space. It also requires a minor modification in the server BIOS to be supported by the CPU, something 
that three OEMs have currently completed. 

Each DIMM flash module has 16 separate data channels, which are independently addressable. 
This enables parallel data writes by the driver, improving performance over the DMA process 
used by PCIe-based solutions. Specs for ULLtraDIMM are showing 5 microsecond latencies for these 
devices, an order of magnitude better than typical PCIe flash products. This architecture also 
enables up to 63 ULLtraDIMM modules to be aggregated creating 25TB of flash capacity and >9M IOPS in a single server.

MCS

Ref: IBM X series servers now pack Flash into speedy DIMM slots
IBM Beefs Up Enterprise X-Architecture With Flash, Modular Design
Heating Up Storage Performance
How to Make Flash Accessible on the Memory Bus
Memory Channel Storage™
ULLtraDIMM: combining SSD and DRAM for the enterprise

AIX pTools — 进程监控的一组工具

November 3, 2011 system, unix 1 comment

pTools — 进程监控的一组工具
{
pTools是AIX 5.2中引进的System V UNIX 提供的一组极有用的工具,用于查看进程相关的信息。包括命令:
{
procwdx,
procfiles,
procflags,
proccred,
procmap,
procldd,
procsig,
procstack,
procstop,
procrun,
procwait,
proctree
}
procwdx, — 显示进程的当前工作目录。如:{
ccdd@root[/>]procwdx 725010
725010: /uniface/uniface8401/project/
}
procfiles — 显示该进程打开的所有文件描述字的信息。如:{
ccdd@root[/>]procfiles -n 725010
725010 : /uniface/uniface8401/bin/userver -drv=ANY -ust=ccddtest -dnp=TCP:+16000||| -asn=
Current rlimit: 2147483647 file descriptors
0: S_IFCHR mode:00 dev:10,4 ino:12349 uid:502 gid:501 rdev:2,2
O_RDONLY name:/dev/null
1: S_IFREG mode:0200 dev:169,1 ino:71335 uid:502 gid:501 rdev:0,0
O_WRONLY | O_APPEND size:0 name:/uniface/uniface8401/bin/nohup.out
2: S_IFREG mode:0200 dev:169,1 ino:71335 uid:502 gid:501 rdev:0,0
O_WRONLY | O_APPEND size:0 name:/uniface/uniface8401/bin/nohup.out
3: S_IFREG mode:0311 dev:169,1 ino:71267 uid:502 gid:501 rdev:0,0
O_WRONLY size:12060 name:/uniface/uniface8401/log/urouter.log
6: S_IFREG mode:0444 dev:10,13 ino:557059 uid:502 gid:501 rdev:8,33291
O_RDONLY size:17408 name:/oracle/app/oracle/product/9.2.0.6/rdbms/mesg/ocius.msb
8: S_IFREG mode:0444 dev:10,13 ino:557062 uid:502 gid:501 rdev:8,35315
O_RDONLY size:669696 name:/oracle/app/oracle/product/9.2.0.6/rdbms/mesg/oraus.msb
}
procflags — 显示/proc跟踪标记,包括等待和处理的信号量。如:{
ccdd@root[/>]procflags 725010
725010 : /uniface/uniface8401/bin/userver -drv=ANY -ust=ccddtest -dnp=TCP:+16000||| -asn=
data model = _LP64 flags = PR_FORK
/6779119: flags = PR_ASLEEP | PR_NOREGS
/6791413: flags = PR_ASLEEP | PR_NOREGS
/6787315: flags = PR_ASLEEP | PR_NOREGS
}
proccred — 显示拥有该进程的有效及实际用户 ID,及保留的用户和组ID(setuid及setgid)。如:{
ccdd@root[/>]proccred 725010
725010: e/r/suid=502 e/r/sgid=501
}
procmap — 显示进程地址空间。如:{
# procmap 725010
ccdd@root[/>]procmap 725010
725010 : /uniface/uniface8401/bin/userver -drv=ANY -ust=ccddtest -dnp=TCP:+16000||| -asn=
100000000 14K read/exec userver
1100009b7 1K read/write userver
9fffffff0000000 32K read/exec /usr/ccs/bin/usla64
9fffffff0008027 0K read/write /usr/ccs/bin/usla64
90000000140f238 3K read/exec /usr/lib/libc.a[aio_64.o]
8001000a012fc18 0K read/write /usr/lib/libc.a[aio_64.o]
9000000004b16c0 82K read/exec /usr/lib/libodm.a[shr_64.o]
8001000a0125a60 35K read/write /usr/lib/libodm.a[shr_64.o]
9000000009e0100 10424K read/exec /oracle/app/oracle/product/9.2.0.6/lib/libclntsh.a[shr.o]
8001000a007c270 672K read/write /oracle/app/oracle/product/9.2.0.6/lib/libclntsh.a[shr.o]
9000000009a0000 254K read/exec /uniface/uniface8401/lib/libuora44.a
8001000a0070538 44K read/write /uniface/uniface8401/lib/libuora44.a
900000000997000 35K read/exec /uniface/uniface8401/lib/libuserv.a
8001000a006eec0 1K read/write /uniface/uniface8401/lib/libuserv.a
900000000991000 21K read/exec /uniface/uniface8401/lib/libutcp10.a
8001000a006ce20 3K read/write /uniface/uniface8401/lib/libutcp10.a
900000000278000 12K read/exec /uniface/uniface8401/lib/libumwpsv10.a
8001000a006b8a8 0K read/write /uniface/uniface8401/lib/libumwpsv10.a
900000000276000 6K read/exec /uniface/uniface8401/lib/libusim.a
8001000a006a330 0K read/write /uniface/uniface8401/lib/libusim.a
900000000275480 2K read/exec /usr/lib/libC.a[shr3_64.o]
8001000a0069480 0K read/write /usr/lib/libC.a[shr3_64.o]
900000000274288 2K read/exec /usr/lib/libC_r.a[shr2_64.o]
8001000a0068288 0K read/write /usr/lib/libC_r.a[shr2_64.o]
90000000083fe00 1216K read/exec /usr/lib/libC_r.a[ansi_64.o]
8001000a003be00 173K read/write /usr/lib/libC_r.a[ansi_64.o]
9000000006d7000 1436K read/exec /uniface/uniface8401/lib/liburtl.a
8001000a0000100 232K read/write /uniface/uniface8401/lib/liburtl.a
9000000006b95e0 116K read/exec /usr/lib/libC.a[shrcore_64.o]
9001000a043a1e0 12K read/write /usr/lib/libC.a[shrcore_64.o]
90000000069f100 102K read/exec /usr/lib/libC.a[ansicore_64.o]
9001000a0430900 37K read/write /usr/lib/libC.a[ansicore_64.o]
90000000067caa0 135K read/exec /usr/lib/libC.a[shr_64.o]
9001000a042a8a0 19K read/write /usr/lib/libC.a[shr_64.o]
9000000004d3000 1513K read/exec /uniface/uniface8401/lib/libulib.a
9001000a03aef50 491K read/write /uniface/uniface8401/lib/libulib.a
900000000273000 0K read/exec /usr/lib/libdl.a[shr_64.o]
9001000a03ad000 0K read/write /usr/lib/libdl.a[shr_64.o]
90000000064e000 183K read/exec /usr/lib/libpthreads.a[shr_xpg5_64.o]
9001000a0321000 556K read/write /usr/lib/libpthreads.a[shr_xpg5_64.o]
900000000255268 2K read/exec /usr/lib/libcrypt.a[shr_64.o]
9001000a00c0748 0K read/write /usr/lib/libcrypt.a[shr_64.o]
900000000024260 2226K read/exec /usr/lib/libc.a[shr_64.o]
9001000a025e1e8 760K read/write /usr/lib/libc.a[shr_64.o]
9000000004c7000 44K read/exec /uniface/uniface8401/lib/libucall.a
9001000a031e610 6K read/write /uniface/uniface8401/lib/libucall.a
Total 20921K
}

procldd — 显示加载的动态进程列表。如:{
ccdd@root[/>]procldd 725010
725010 : /uniface/uniface8401/bin/userver -drv=ANY -ust=ccddtest -dnp=TCP:+16000||| -asn=
userver
/usr/ccs/bin/usla64
/usr/lib/libc.a[aio_64.o]
/usr/lib/libodm.a[shr_64.o]
/oracle/app/oracle/product/9.2.0.6/lib/libclntsh.a[shr.o]
/uniface/uniface8401/lib/libuora44.a
/uniface/uniface8401/lib/libuserv.a
/uniface/uniface8401/lib/libutcp10.a
/uniface/uniface8401/lib/libumwpsv10.a
/uniface/uniface8401/lib/libusim.a
/usr/lib/libC.a[shr3_64.o]
/usr/lib/libC_r.a[shr2_64.o]
/usr/lib/libC_r.a[ansi_64.o]
/uniface/uniface8401/lib/liburtl.a
/usr/lib/libC.a[shrcore_64.o]
/usr/lib/libC.a[ansicore_64.o]
/usr/lib/libC.a[shr_64.o]
/uniface/uniface8401/lib/libulib.a
/usr/lib/libdl.a[shr_64.o]
/usr/lib/libpthreads.a[shr_xpg5_64.o]
/usr/lib/libcrypt.a[shr_64.o]
/usr/lib/libc.a[shr_64.o]
/uniface/uniface8401/lib/libucall.a
}
procsig — 显示进程对各种信号量的处理。如:{
#ccdd@root[/>]procsig 725010
725010 : /uniface/uniface8401/bin/userver -drv=ANY -ust=ccddtest -dnp=TCP:+16000||| -asn=
HUP ignored RESETHAND
INT caught RESTART | SIGINFO
QUIT ignored RESTART
ILL default RESTART
TRAP default RESTART
ABRT default RESTART
EMT default RESTART
FPE default RESTART
KILL default RESTART
BUS default RESTART
SEGV default RESTART
SYS default RESTART
PIPE ignored RESTART | SIGINFO
ALRM ignored RESTART
TERM default
URG default
STOP default
TSTP ignored RESTART | SIGINFO
CONT default
CHLD ignored RESETHAND
TTIN default
TTOU default
IO default
XCPU default
XFSZ default
MSG default
WINCH default
PWR default
USR1 default
USR2 default
PROF default
DANGER default
VTALRM default
MIGRATE default
PRE default RESTART
VIRT default
ALRM1 default
WAITING caught RESTART
RECONFIG default
CPUFAIL default
KAP default
RETRACT default
SOUND default
SAK default
}
procstack — 显示进程中当前线程的堆栈中的符号名和十六进制地址。如:{
ccdd@root[/>]procstack 725010
725010 : /uniface/uniface8401/bin/userver -drv=ANY -ust=ccddtest -dnp=TCP:+16000||| -asn=
———- tid# 6779119 ———-
0x09000000009933f4 TCPreceive(0x4, 0x4, 0xfffffff, 0xffffc7c8) + ??
0x09000000009913ac UNWTCP(0x1) + 0x17c
0x09000000006e3cc0 unetgo(0x1, 0x1004eeb0) + 0x90
0x090000000027a004 dorcv(0x1, 0x1004eeb0, 0x200, 0x200) + 0xb8
0x0900000000279c78 recmsg(0x1, 0x1004eeb0, 0x0, 0x0, 0x200) + 0x190
0x0900000000278330 UMWPSV10(0xfffffff) + 0x100
0x090000000071f02c umwgo(0xfffffff, 0xfffff090) + 0x194
0x090000000071f3f8 urecmsg(0x1, 0x1004eeb0, 0x0, 0x0, 0x200) + 0x94
0x090000000099752c srvloop(0x1) + 0x198
0x0900000000997358 USERVERSTART(0x1, 0x1000dc90) + 0x128
0x0000000100002398 USRVMAIN(0x1) + 0x374
0x09000000004c8ed0 UMAIN(0x5, 0x5, 0xfffffff, 0xfffff500, 0xfffffff, 0xfffff468) + 0x6c
0x0000000100001f78 main(0x5, 0x5) + 0x34
0x0000000100000288 __start() + 0x90
———- tid# 6791413 ———-
0x09000000006589d0 _ptrgl() + ??
0x090000000065245c _pthread_body(?) + 0xbc
———- tid# 6787315 ———-
0x090000000002eec0 _ptrgl() + ??
0x090000000003ea1c nsleep(?, ?) + 0xac
0x090000000004a1fc sleep(?) + 0x58
0x0900000000526114 brokerThread(0x0) + 0x38
0x090000000065245c _pthread_body(?) + 0xbc
}
procstop — 将进程暂停。如:
procstop 725010

procrun — 启动用procstop停止的进程。如:
procrun 725010

procwait — 等待所指定的进程结束。如:
procwait 725010

proctree — 显示进程调用的树型结构。如:{
ccdd@root[/>]proctree 725010
671760 /uniface/uniface8401/bin/urouter start
725010 /uniface/uniface8401/bin/userver -drv=ANY -ust=ccddtest -dnp=TCP:+16000||| -asn=
}
}

如何查看某用户共启动了多少进程
#ps -ef|grep username|wc -l
备注:
这是利用wc -l统计行数的功能来对用户进程数的一个估计,并不是非常准确的值。
但完全可用于参考。

AIX环境如何找到活动最频繁的进程
{
1。下面命令输出中的’C’字段是一个进程的cpu-penalty值(0到120之间),值越大表明进程越活跃。
# ps alxw | sort +5 –n
2.显示前10个累计占用CPU时间的进程
#ps -e|head -n 1;ps -e|grep -v”TIME|0:”|sort +2b -3 -n -r|head -n 10
3。显示前10个当前占用CPU时间的进程
#ps -ef|head -n 1;ps -ef|grep -v”C|0:00″|sort +3b -4 -n -r|head -n 10
4。显示前10个占用CPU应用的进程
#ps gu|head -n 1;ps gu|grep -v”CPU|kproc”|sort +2b -3 -n -r|head -n 10
}

AIX查看是哪个进程占用某端口
{
1)netstat -Aan | grep 3306
最前面有一个地址,类似:f10000f301188b58 tcp4
2)用rmsock f10000f301188b58 tcpcb
如果占用了,会返回进程号。
3)kill那个进程
}

查看系统中某个端口正在被什么进程使用{
1. netstat -Aan|grep
找到该端口连接对应的PCB/ADDR和连接的协议类型。
2. 如果是tcp连接,则rmsock tcpcb
如果是udp连接,则rmsock inpcb
下面我们以telnet服务所使用的23号端口为例,说明该方法:
#netstat -Aan|grep 23
f1000200019ce398 tcp 0 0 *.23 *.* LISTEN
可以看到PCB/ADDR为f1000200019ce398,且协议类型为tcp。
#rmsock f1000200019ce398 tcpcb
The socket 0x19ce008 is being held by proccess 185006 (inetd).
命令报告该端口正在被inetd进程使用,PID为185006。
注意:rmsock命令需要root权限执行。如果我们以普通用户执行该命令,则会报告如下错误信息:
#rmsock f1000200019ce398 tcpcb
rmsock : Unable to read kernel address f1000200019ce398, errno = 13
rmsock : Unable to read kernel address 0000000000000000, errno = 13
error in opening /var/adm/ras/rmsock.logIt is not a socket
}

svmon -S中inuse的求和脚本及其结果比svmon -G小的原因

November 2, 2011 system, unix No comments

很多客户可能认为svmon -S中inuse的求和结果和svmon -G中的inuse一样,但是实际是不一样的。下面的脚本可以用来统计svmon -S中的inuse的相加结果:

#!/usr/bin/ksh
svmon -S | cut -c54-62 | awk ‘/^[-sLm]/ {if ($1 ~ /L/)
{COUNT1 =($2*4096+COUNT1)}
else if ($1 ~ /m/)
{COUNT2 =($2*16+COUNT2)}
else {COUNT3 =$2+COUNT3}}
END {printf “The result is as following with 4k as unit size\n16M page count=%d\n64k page count=%d\n4k page count=%d\nTatal page count=%d\n”, COUNT1,COUNT2,COUNT3,’COUNT1+COUNT2+COUNT3′}’

那么,产生这种差别的原因是什么呢?解释如下:
svmon -S用来显示系统中所有内存段(segment)的内存使用信息。AIX上仅存在三种内存段,它们是work,client和persistent。因此,统计svmon -S中inuse的和就是将被使用的上述三种内存段进行求和。但是,这种统计并没有将系统上所有的被使用的内存页面统计进来。系统里存在着一些尚未被VMM管理的内存页面,这些页面已经被使用,但是不属于上述三种内存段,因此在svmon -S中体现不出来。而svmon -G则包含了这些未被管理的页面。

这些未被VMM管理的内存主要是被硬件使用,用来对物理内存做一些设置。在AIX 5L中,可以通过在kdb执行vmstat来查看未被管理的内存,输出如下:

VMM Memory Limits:
Total available memory (4K frames) : 00100000 4.0GB
Total unmanaged mem (wlm_hw_pages): 0000D639 214.3MB
4K number of frames : 000F29C7 3.8GB
4K frames pinned : 00009FEE 160.0MB
4K system pinnable frames remaining: 000B817E 2.9GB
4K user pinnable frames remaining : 000BC0BC 3.0GB
Free paging space (in 4K blocks) : 0001FD00 509.0MB
Paging space SIGDANGER level : 00001000 16.0MB
Paging space SIGKILL level : 00000400 4.0MB

其中“unmanaged mem”就代表这类未被VMM管理的内存页面。

reference:http://www-900.ibm.com/cn/support/viewdoc/detail?DocId=2811998D15000