(转)用哪个DB2命令查看DB2 instance是启动还是停止的?

http://bbs.chinaunix.net/thread-1077564-1-1.html


 

我知道可以用db2_ps命令列出DB2 的进程,但是有没有其他的命令能够直接给出"DB2 is started/alive" or "DB2 is down"这类信息的?

谢谢了!


 

 

easiest: db2pd -inst

when instance is down:
(taoewang@p6db2serv) /wsdb/db2_v91fp5/aix64nocc/s080406 $ db2pd -inst
Unable to attach to database manager.  Please ensure db2start has been run.

when instance is up:
Instance taoewang uses 64 bits and DB2 code release SQL09015
with level identifier 01060107
Informational tokens are DB2 v9.1.0.5, s080406, U815922, Fix Pack 5.

Operating System Information:

OSName:   AIX
NodeName: p6db2serv
Version:  5
Release:  3
Machine:  00088FAA4C00

CPU Information:
TotalCPU    OnlineCPU   ConfigCPU   Speed(MHz)  HMTDegree  Cores/Socket
6           6           6           752         1           n/a

Physical Memory and Swap (Megabytes):
TotalMem    FreeMem     AvailMem    TotalSwap   FreeSwap
12288       4775        n/a         13504       13423

Virtual Memory (Megabytes):
Total       Reserved    Available   Free
.....


 

 

or
ps -ef | grep -i "db2sysc" | grep -i "<instance name>"

when instance is up you'll see db2sysc process


 

 



QUOTE:
原帖由  wangzhonnewnew 于 2008-4-10 22:43 发表 
or
ps -ef | grep -i "db2sysc" | grep -i ""

when instance is up you'll see db2sysc process


我一般都这样看一下是不是已经起来了,简单。
__________________________________
一万年太久,只争朝夕
Ten thousand year is too long!
Seize day! Seize the hour!


 


 

db2gcf命令:以db2inst1用户运行db2gcf -s。如果db2实例启动,则显示available
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值