Process stats
– cputrack - per-processor hw counters
– pargs – process arguments
– pflags – process flags
– pcred – process credentials
– pldd – process's library dependencies eg.pldd `pgrep syslog`
– psig – process signal disposition
– pstack – process stack dump eg. pstack `pgrep syslog`
– pmap – process memory map
– pfiles – open files and names
– prstat – process statistics
– ptree – process tree
– ptime – process microstate times
– pwdx – process working directory
Process control
– pgrep – grep for processes
– pkill – kill processes list
– pstop – stop processes
– prun – start processes
– prctl – view/set process resources
– pwait – wait for process
– preap – reap a zombie process
- pfiles - Find Files Opened by a Process eg. pfiles `pgrep syslog` | pg
Process tracing/debugging
– abitrace – trace ABI interfaces
– dtrace – trace the world
– mdb – debug/control processes
– truss – trace functions and
system calls
Kernel tracing/debugging
– dtrace – trace and monitor kernel
– lockstat – monitor locking statistics
– lockstat -k – profile kernel
– mdb – debug live and kernel cores
System stats
– acctcom – process accounting
– busstat – Bus hardware counters
– cpustat – CPU hardware counters
– iostat – IO & NFS statistics
– kstat – display kernel statistics
– mpstat – processor statistics
– netstat – network statistics
– nfsstat – nfs server stats
– sar – kitchen sink utility
– vmstat – virtual memory stats
Thursday, July 23, 2009
Wednesday, July 22, 2009
Application Status through WLST
Here is a way.
try:
cd('/ServerRuntimes/'+server_name+'/ApplicationRuntimes')
print '---------------------- Application status ---------------------'
apps = ls()
for appname in apps.split():
if appname != 'drw-':
cd('/ServerRuntimes/'+server_name+'/ApplicationRuntimes/'+appname)
if getMBean('ComponentRuntimes'):
# we may not have a component runtime, so check first
cd('/ServerRuntimes/'+server_name+'/ApplicationRuntimes/'+appname+'/ComponentRuntimes')
components=ls()
for component in components.split():
if not component.endswith('.jar'):
if component != 'drw-':
cd('/ServerRuntimes/'+server_name+'/ApplicationRuntimes/'+appname+'/ComponentRuntimes/'+component)
status=str(get('Name'))+': '
istate=cmo.getDeploymentState()
if istate == 0:
istate='UNPREPARED'
if istate == 1:
istate='PREPARED'
if istate == 2:
istate='ACTIVE'
if istate == 3:
istate='NEW'
print component + ' has status : ' + istate
except WLSTException,e:
# this typically means the server is not active, just ignore
print "This Server has no Application"
try:
cd('/ServerRuntimes/'+server_name+'/ApplicationRuntimes')
print '---------------------- Application status ---------------------'
apps = ls()
for appname in apps.split():
if appname != 'drw-':
cd('/ServerRuntimes/'+server_name+'/ApplicationRuntimes/'+appname)
if getMBean('ComponentRuntimes'):
# we may not have a component runtime, so check first
cd('/ServerRuntimes/'+server_name+'/ApplicationRuntimes/'+appname+'/ComponentRuntimes')
components=ls()
for component in components.split():
if not component.endswith('.jar'):
if component != 'drw-':
cd('/ServerRuntimes/'+server_name+'/ApplicationRuntimes/'+appname+'/ComponentRuntimes/'+component)
status=str(get('Name'))+': '
istate=cmo.getDeploymentState()
if istate == 0:
istate='UNPREPARED'
if istate == 1:
istate='PREPARED'
if istate == 2:
istate='ACTIVE'
if istate == 3:
istate='NEW'
print component + ' has status : ' + istate
except WLSTException,e:
# this typically means the server is not active, just ignore
print "This Server has no Application"
Tuesday, July 21, 2009
Monitoring Messaging Bridges
try:
mBeans=home.getMBeansByType("MessagingBridgeRuntime")
print '---------------------- Messaging Bridge ---------------------'
print
for bean in mBeans:
if server_name != bean.getObjectName().getLocation():
continue
print bean.getName() + " is " + str(bean.getDescription()) + " and " + str(bean.getState())
except:
print "This server has no Messaging Bridge"
mBeans=home.getMBeansByType("MessagingBridgeRuntime")
print '---------------------- Messaging Bridge ---------------------'
for bean in mBeans:
if server_name != bean.getObjectName().getLocation():
continue
print bean.getName() + " is " + str(bean.getDescription()) + " and " + str(bean.getState())
except:
print "This server has no Messaging Bridge"
Subscribe to:
Posts (Atom)