ERROR: Registering runner... failed runner=sohsMZnj status=couldn't execute POST against https://holyxlat.com:443/api/v4/runners: Post https://holyxlat.com:443/api/v4/runners: x509: certificate signed by unknown authority
PANIC: Failed to register this runner. Perhaps you are having network problems
[solution]
$ mkdir /etc/gitlab-runner/certs
$ cp /etc/gitlab/ssl/holyxlat.com.crt /etc/gitlab-runner/certs/.
2019년 3월 6일 수요일
2019년 3월 5일 화요일
install gitlab-runner on linux (ubuntu x86_64)
$ uname -a
Linux shlee-VirtualBox 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
// Simply download one of the binaries for your system
$ sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
...
/usr/local/bin/gitl 100%[++++++++++++++++++=>] 29.28M 331KB/s in 10s
2019-02-21 06:50:17 (210 KB/s) - ‘/usr/local/bin/gitlab-runner’ saved [30703328/30703328]
// Give it permissions to execute
$ sudo chmod +x /usr/local/bin/gitlab-runner
// Create a GitLab CI user:
$ sudo useradd --comment 'Gitlab Runner' --create-home gitlab-runner --shell /bin/bash
//Install and run as service
$ sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
Runtime platform arch=amd64 os=linux pid=24039 revision=4745a6f3 version=11.8.0
$ sudo gitlab-runner start
Runtime platform arch=amd64 os=linux pid=24420 revision=4745a6f3 version=11.8.0
// Stop the service
$ sudo gitlab-runner stop
Linux shlee-VirtualBox 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
// Simply download one of the binaries for your system
$ sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
...
/usr/local/bin/gitl 100%[++++++++++++++++++=>] 29.28M 331KB/s in 10s
2019-02-21 06:50:17 (210 KB/s) - ‘/usr/local/bin/gitlab-runner’ saved [30703328/30703328]
// Give it permissions to execute
$ sudo chmod +x /usr/local/bin/gitlab-runner
// Create a GitLab CI user:
$ sudo useradd --comment 'Gitlab Runner' --create-home gitlab-runner --shell /bin/bash
//Install and run as service
$ sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
Runtime platform arch=amd64 os=linux pid=24039 revision=4745a6f3 version=11.8.0
$ sudo gitlab-runner start
Runtime platform arch=amd64 os=linux pid=24420 revision=4745a6f3 version=11.8.0
// Stop the service
$ sudo gitlab-runner stop
2019년 2월 24일 일요일
Install docker on ubuntu (virtualbox)
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo apt install apt-transport-https ca-certificates curl software-properties-common
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
$ sudo apt update
$ apt-cache policy docker-ce
$ sudo apt install docker-ce
$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-02-21 01:49:25 KST; 4min 3s ago
Docs: https://docs.docker.com
Main PID: 17674 (dockerd)
Tasks: 9
CGroup: /system.slice/docker.service
└─17674 /usr/bin/dockerd -H fd://
2월 21 01:49:24 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:24.282330531+09:00" level=w
2월 21 01:49:24 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:24.282750349+09:00" level=w
2월 21 01:49:24 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:24.283530253+09:00" level=w
2월 21 01:49:24 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:24.289217028+09:00" level=i
2월 21 01:49:24 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:24.561081241+09:00" level=i
2월 21 01:49:25 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:25.162682683+09:00" level=i
2월 21 01:49:25 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:25.657244633+09:00" level=i
2월 21 01:49:25 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:25.665705060+09:00" level=i
2월 21 01:49:25 shlee-VirtualBox systemd[1]: Started Docker Application Container Engine.
2월 21 01:49:25 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:25.924950417+09:00" level=i
$ sudo apt install apt-transport-https ca-certificates curl software-properties-common
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
$ sudo apt update
$ apt-cache policy docker-ce
$ sudo apt install docker-ce
$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-02-21 01:49:25 KST; 4min 3s ago
Docs: https://docs.docker.com
Main PID: 17674 (dockerd)
Tasks: 9
CGroup: /system.slice/docker.service
└─17674 /usr/bin/dockerd -H fd://
2월 21 01:49:24 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:24.282330531+09:00" level=w
2월 21 01:49:24 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:24.282750349+09:00" level=w
2월 21 01:49:24 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:24.283530253+09:00" level=w
2월 21 01:49:24 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:24.289217028+09:00" level=i
2월 21 01:49:24 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:24.561081241+09:00" level=i
2월 21 01:49:25 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:25.162682683+09:00" level=i
2월 21 01:49:25 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:25.657244633+09:00" level=i
2월 21 01:49:25 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:25.665705060+09:00" level=i
2월 21 01:49:25 shlee-VirtualBox systemd[1]: Started Docker Application Container Engine.
2월 21 01:49:25 shlee-VirtualBox dockerd[17674]: time="2019-02-21T01:49:25.924950417+09:00" level=i
2019년 2월 21일 목요일
Install gitlab ce on Ubuntu / virtualbox
$ cd /tmp
$ sudo apt-get update
$ sudo apt-get install -y curl openssh-server ca-certificates
$ sudo apt-get install -y postfix
$ sudo curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
$ sudo bash /tmp/script.deb.sh
$ less /tmp/script.deb.sh
$ sudo apt install gitlab-ce
$ sudo ufw status
$ sudo ufw enable
$ sudo ufw status
$ sudo ufw allow http
$ sudo ufw allow https
$ sudo ufw allow OpenSSH
$ sudo ufw status
$ sudo ufw status
Status: active
To Action From
-- ------ ----
80/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
OpenSSH ALLOW Anywhere
80/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
$ // change external_url and letsencrypt in /etc/gitlab/gitlab.rb file
$ sudo gitlab-ctl reconfigure
(*) ref : https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-gitlab-on-ubuntu-18-04
$ sudo apt-get update
$ sudo apt-get install -y curl openssh-server ca-certificates
$ sudo apt-get install -y postfix
$ sudo curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
$ sudo bash /tmp/script.deb.sh
$ less /tmp/script.deb.sh
$ sudo apt install gitlab-ce
$ sudo ufw status
$ sudo ufw enable
$ sudo ufw status
$ sudo ufw allow http
$ sudo ufw allow https
$ sudo ufw allow OpenSSH
$ sudo ufw status
$ sudo ufw status
Status: active
To Action From
-- ------ ----
80/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
OpenSSH ALLOW Anywhere
80/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
$ // change external_url and letsencrypt in /etc/gitlab/gitlab.rb file
$ sudo gitlab-ctl reconfigure
(*) ref : https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-gitlab-on-ubuntu-18-04
2017년 1월 24일 화요일
2014년 6월 17일 화요일
JVM Parameter Samples (linux, sun hotspot, somf, saf, jms, )
app/jdk1.6.0_37/bin/java -server -DsmfSvr12 -server -Xms24g -Xmx24g -XX:NewSize=8g -XX:MaxNewSize=8g -XX:PermSize=2g -XX:MaxPermSize=2g -XX:ParallelGCThreads=16 -XX:ParallelCMSThreads=10 -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseCMSInitiatingOccupancyOnly -XX:TargetSurvivorRatio=90 -XX:SurvivorRatio=4 -verbose:gc -Xloggc:/applog/smfDomain/GC/smfSvr12.gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+DisableExplicitGC -Dweblogic.wsee.useRequestHost=true -XX:+UseCompressedOops -XX:+ParallelRefProcEnabled -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:CodeCacheMinimumFreeSpace=16m -XX:ReservedCodeCacheSize=1g -XX:-ClassUnloading -XX:-HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/app/javaio_tmp -Dfile.encoding=UTF-8 -Dosm.security.log.filename=/smfnas01/osmsecurity/smflog -Dpharos.home=/tools/pharos/pharos402 -Dpharos.agent=psmfap01_Svr12 -javaagent:/tools/pharos/pharos402/lib/pharos-loader.jar -Dweblogic.SAFTXTimeout=10 -Dweblogic.jms.saf.RefreshInterval=300000 -Dweblogic.debug.DebugJMSBackEnd=false -Dweblogic.debug.DebugJMSFrontEnd=false -Dweblogic.debug.JMSMessagePath=false -Dweblogic.MaxMessageSize=30000000 -Djava.net.preferIPv4Stack=true -Dweblogic.debug.DebugJDBCSQL=false -Dcom.mslv.oms.security.HandlerFactoryRegistry.HandlerFactory=com.mslv.oms.handler.cluster.ClusteredHandlerFactory -Doracle.communications.ordermanagement.orchestration.generation.model.ConcurrencyLevel=8 -Doracle.communications.ordermanagement.rule.XQueryConfigurationExpressionHolder.ConcurrencyLevel=5 -Dweblogic.ProductionModeEnabled=true -Dosm.disable.update.lock=true -Dosm.coherence.cluster.config.override=/smfnas01/smfpstore/osm-coherence-cluster-config.xml -Dtangosol.coherence.localhost=10.220.242.131 -Dtangosol.coherence.localport=12003 -Dtangosol.coherence.localport.adjust=false -Dtangosol.coherence.proxy.threads=10 -Dtangosol.coherence.invocation.threads=40 -Dtangosol.coherence.distributed.threads=10 -Dcom.mslv.oms.handler.cluster.ClusteredHandlerFactory.HighActivityOrder.CollectionCycle.Enabled=false -XX:+PrintPromotionFailure -XX:PrintFLSStatistics=1 -Dweblogic.Name=smfSvr12 -Djava.security.policy=/app/weblogic/wlserver_10.3/server/lib/weblogic.policy -Dmslv.oms.config=/app/domains/smfDomain/oms-config.xml -Dweblogic.ProductionModeEnabled=true -Dweblogic.security.SSL.trustedCAKeyStore=/app/weblogic/wlserver_10.3/server/lib/cacerts -da -Dplatform.home=/app/weblogic/wlserver_10.3 -Dwls.home=/app/weblogic/wlserver_10.3/server -Dweblogic.home=/app/weblogic/wlserver_10.3/server -Dcommon.components.home=/app/weblogic/oracle_common -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=/app/domains/smfDomain -Djrockit.optfile=/app/weblogic/oracle_common/modules/oracle.jrf_11.1.1/jrocket_optfile.txt -Doracle.server.config.dir=/app/domains/smfDomain/config/fmwconfig/servers/smfSvr12 -Doracle.domain.config.dir=/app/domains/smfDomain/config/fmwconfig -Digf.arisidbeans.carmlloc=/app/domains/smfDomain/config/fmwconfig/carml -Digf.arisidstack.home=/app/domains/smfDomain/config/fmwconfig/arisidprovider -Doracle.security.jps.config=/app/domains/smfDomain/config/fmwconfig/jps-config.xml -Doracle.deployed.app.dir=/app/domains/smfDomain/servers/smfSvr12/tmp/_WL_user -Doracle.deployed.app.ext=/- -Dweblogic.alternateTypesDirectory=/app/weblogic/oracle_common/modules/oracle.ossoiap_11.1.1,/app/weblogic/oracle_common/modules/oracle.oamprovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.jdbc.remoteEnabled=false -Dweblogic.management.discover=false -Dweblogic.management.server=psmfap00:7011 -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/app/weblogic/patch_wls1036/profiles/default/sysext_manifest_classpath:/app/weblogic/patch_ocp371/profiles/default/sysext_manifest_classpath weblogic.Server
2014년 4월 21일 월요일
weblogic wlst workmanager monitoring
import thread
from java.util import Date
from java.text import SimpleDateFormat
# Configured user credentials with storeUserConfig
def monitorThrds():
connect("weblogic", "pwd", "t3://IP:Port");
serverNames = getRunningServerNames()
domainRuntime()
for i in range(10000):
print '[' + SimpleDateFormat('d MMM yyyy HH:mm:ss').format(java.util.Date()) + ']'
for sname in serverNames:
try:
cd("domainRuntime:/ServerRuntimes/" + sname.getName() + "/MaxThreadsConstraintRuntimes/MaxThreadConstraint-oms")
automaxexecnt=get('ExecutingRequests')
automaxdefcnt = get('DeferredRequests')
cd("domainRuntime:/ServerRuntimes/" + sname.getName() + "/MaxThreadsConstraintRuntimes/MaxThreadsConstraint-oms.ws.jms")
jmsmaxexecnt=get('ExecutingRequests')
jmsmaxdefcnt = get('DeferredRequests')
cd("domainRuntime:/ServerRuntimes/" + sname.getName() + "/MinThreadsConstraintRuntimes/MinThreadsConstraint-oms.automation")
autominexecnt=get('ExecutingRequests')
autominpendcnt = get('PendingRequests')
cd("domainRuntime:/ServerRuntimes/" + sname.getName() + "/MinThreadsConstraintRuntimes/MinThreadsConstraint-oms.ws.jms")
jmsminexecnt=get('ExecutingRequests')
jmsminpendcnt = get('PendingRequests')
print '%8s %10s Min = ( E:%4d P:%4d ) Max = ( E:%4d D:%4d )' % ("(auto)", sname.getName(), autominexecnt, autominpendcnt, automaxexecnt, automaxdefcnt)
print '%8s %10s Min = ( E:%4d P:%4d ) Max = ( E:%4d D:%4d )' % ("(jms)", sname.getName(), jmsminexecnt, jmsminpendcnt, jmsmaxexecnt, jmsmaxdefcnt)
except WLSTException,e:
# this typically means the server is not active, just ignore
pass
print '======================================================================'
print ''
import time
time.sleep(3)
def getRunningServerNames():
domainConfig()
return cmo.getServers()
if __name__== "main":
monitorThrds()
disconnect()
from java.util import Date
from java.text import SimpleDateFormat
# Configured user credentials with storeUserConfig
def monitorThrds():
connect("weblogic", "pwd", "t3://IP:Port");
serverNames = getRunningServerNames()
domainRuntime()
for i in range(10000):
print '[' + SimpleDateFormat('d MMM yyyy HH:mm:ss').format(java.util.Date()) + ']'
for sname in serverNames:
try:
cd("domainRuntime:/ServerRuntimes/" + sname.getName() + "/MaxThreadsConstraintRuntimes/MaxThreadConstraint-oms")
automaxexecnt=get('ExecutingRequests')
automaxdefcnt = get('DeferredRequests')
cd("domainRuntime:/ServerRuntimes/" + sname.getName() + "/MaxThreadsConstraintRuntimes/MaxThreadsConstraint-oms.ws.jms")
jmsmaxexecnt=get('ExecutingRequests')
jmsmaxdefcnt = get('DeferredRequests')
cd("domainRuntime:/ServerRuntimes/" + sname.getName() + "/MinThreadsConstraintRuntimes/MinThreadsConstraint-oms.automation")
autominexecnt=get('ExecutingRequests')
autominpendcnt = get('PendingRequests')
cd("domainRuntime:/ServerRuntimes/" + sname.getName() + "/MinThreadsConstraintRuntimes/MinThreadsConstraint-oms.ws.jms")
jmsminexecnt=get('ExecutingRequests')
jmsminpendcnt = get('PendingRequests')
print '%8s %10s Min = ( E:%4d P:%4d ) Max = ( E:%4d D:%4d )' % ("(auto)", sname.getName(), autominexecnt, autominpendcnt, automaxexecnt, automaxdefcnt)
print '%8s %10s Min = ( E:%4d P:%4d ) Max = ( E:%4d D:%4d )' % ("(jms)", sname.getName(), jmsminexecnt, jmsminpendcnt, jmsmaxexecnt, jmsmaxdefcnt)
except WLSTException,e:
# this typically means the server is not active, just ignore
pass
print '======================================================================'
print ''
import time
time.sleep(3)
def getRunningServerNames():
domainConfig()
return cmo.getServers()
if __name__== "main":
monitorThrds()
disconnect()
weblogic wlst jms monitoring
import thread
from java.util import Date
from java.text import SimpleDateFormat
# Configured user credentials with storeUserConfig
def monitorJMS():
connect("weblogic", "pwd", "t3://IP:Port");
servers = domainRuntimeService.getServerRuntimes();
for i in range(10000):
print '[' + SimpleDateFormat('d MMM yyyy HH:mm:ss').format(java.util.Date()) + ']'
if (len(servers) > 0):
for server in servers:
print ' Server Name ' , server
jmsRuntime = server.getJMSRuntime();
jmsServers = jmsRuntime.getJMSServers();
for jmsServer in jmsServers:
destinations = jmsServer.getDestinations();
for destination in destinations:
print destination.getName()
print ' MessagesCurrentCount ' , destination.getMessagesCurrentCount()
print ' MessagesHighCount ' , destination.getMessagesHighCount()
print ' MessagesMovedCurrentCount ' , destination.getMessagesMovedCurrentCount()
print ' MessagesPendingCount ' , destination.getMessagesPendingCount()
print ' MessagesReceivedCount ' , destination.getMessagesReceivedCount()
print ''
import time
time.sleep(10)
if __name__== "main":
monitorJMS()
disconnect()
from java.util import Date
from java.text import SimpleDateFormat
# Configured user credentials with storeUserConfig
def monitorJMS():
connect("weblogic", "pwd", "t3://IP:Port");
servers = domainRuntimeService.getServerRuntimes();
for i in range(10000):
print '[' + SimpleDateFormat('d MMM yyyy HH:mm:ss').format(java.util.Date()) + ']'
if (len(servers) > 0):
for server in servers:
print ' Server Name ' , server
jmsRuntime = server.getJMSRuntime();
jmsServers = jmsRuntime.getJMSServers();
for jmsServer in jmsServers:
destinations = jmsServer.getDestinations();
for destination in destinations:
print destination.getName()
print ' MessagesCurrentCount ' , destination.getMessagesCurrentCount()
print ' MessagesHighCount ' , destination.getMessagesHighCount()
print ' MessagesMovedCurrentCount ' , destination.getMessagesMovedCurrentCount()
print ' MessagesPendingCount ' , destination.getMessagesPendingCount()
print ' MessagesReceivedCount ' , destination.getMessagesReceivedCount()
print ''
import time
time.sleep(10)
if __name__== "main":
monitorJMS()
disconnect()
weblogic wlst thread monitoring
from java.util import Date
from java.text import SimpleDateFormat
# Configured user credentials with storeUserConfig
def monitorThrds():
connect("weblogic", "pwd", "t3://IP:Port");
serverNames = getRunningServerNames()
domainRuntime()
for i in range(10000):
print '[' + SimpleDateFormat('d MMM yyyy HH:mm:ss').format(java.util.Date()) + ']'
print '======================================================================'
print '| Execute Total Idle Pending Hogging Queue StdBy'
print '| QueueName Count Count Count Count Length Count'
print '======================================================================'
for sname in serverNames:
try:
cd("domainRuntime:/ServerRuntimes/" + sname.getName() + "/ThreadPoolRuntime/ThreadPoolRuntime")
totcnt=get('ExecuteThreadTotalCount')
idlecnt = get('ExecuteThreadIdleCount')
pndcnt =get('PendingUserRequestCount')
sevcnt = get('HoggingThreadCount')
queuelength = get('QueueLength')
stdbycnt = get('StandbyThreadCount')
print '| %10s %4d %4d %4d %4d %4d %4d' % (sname.getName(), totcnt, idlecnt, pndcnt, sevcnt, queuelength, stdbycnt)
except WLSTException,e:
# this typically means the server is not active, just ignore
pass
print '======================================================================'
print ''
import time
time.sleep(3)
def getRunningServerNames():
domainConfig()
return cmo.getServers()
if __name__== "main":
monitorThrds()
disconnect()
from java.text import SimpleDateFormat
# Configured user credentials with storeUserConfig
def monitorThrds():
connect("weblogic", "pwd", "t3://IP:Port");
serverNames = getRunningServerNames()
domainRuntime()
for i in range(10000):
print '[' + SimpleDateFormat('d MMM yyyy HH:mm:ss').format(java.util.Date()) + ']'
print '======================================================================'
print '| Execute Total Idle Pending Hogging Queue StdBy'
print '| QueueName Count Count Count Count Length Count'
print '======================================================================'
for sname in serverNames:
try:
cd("domainRuntime:/ServerRuntimes/" + sname.getName() + "/ThreadPoolRuntime/ThreadPoolRuntime")
totcnt=get('ExecuteThreadTotalCount')
idlecnt = get('ExecuteThreadIdleCount')
pndcnt =get('PendingUserRequestCount')
sevcnt = get('HoggingThreadCount')
queuelength = get('QueueLength')
stdbycnt = get('StandbyThreadCount')
print '| %10s %4d %4d %4d %4d %4d %4d' % (sname.getName(), totcnt, idlecnt, pndcnt, sevcnt, queuelength, stdbycnt)
except WLSTException,e:
# this typically means the server is not active, just ignore
pass
print '======================================================================'
print ''
import time
time.sleep(3)
def getRunningServerNames():
domainConfig()
return cmo.getServers()
if __name__== "main":
monitorThrds()
disconnect()
weblogic wlst SAF monitoring
from java.util import Date
from java.text import SimpleDateFormat
# Configured user credentials with storeUserConfig
def monitorThrds():
connect("weblogic", "pwd", "t3://IP:Port");
serverNames = getRunningServerNames()
serverRuntime()
for i in range(10000):
print '[' + SimpleDateFormat('d MMM yyyy HH:mm:ss').format(java.util.Date()) + ']'
print '======================================================================'
for sname in serverNames:
try:
cd("domainRuntime:/ServerRuntimes/" + sname.getName() + "/SAFRuntime/" +sname.getName() + ".saf/Agents")
try:
agents=cmo.getAgents()
for agName in agents:
#print agName.getName()
cd(agName.getName())
msgpend=cmo.getMessagesPendingCount()
msgcur=cmo.getMessagesCurrentCount()
msgtot=cmo.getMessagesReceivedCount()
#print '%s messages received %s = %d %d %d' % (agName.getName(), sname.getName(), msgcur, msgpend, msgtot)
#print '%-30s %s CUR:%5d PEND:%5d RECV:%5d' % (agName.getName(), sname.getName(), msgcur,msgpend,msgtot )
print '%-30s CUR:%5d PEND:%5d RECV:%8d' % (agName.getName(), msgcur,msgpend,msgtot )
cd("..")
except WLSTException,e:
pass
except WLSTException,e:
# this typically means the server is not active, just ignore
pass
print '======================================================================'
print ''
import time
time.sleep(10)
def getRunningServerNames():
domainConfig()
return cmo.getServers()
if __name__== "main":
monitorThrds()
disconnect()
from java.text import SimpleDateFormat
# Configured user credentials with storeUserConfig
def monitorThrds():
connect("weblogic", "pwd", "t3://IP:Port");
serverNames = getRunningServerNames()
serverRuntime()
for i in range(10000):
print '[' + SimpleDateFormat('d MMM yyyy HH:mm:ss').format(java.util.Date()) + ']'
print '======================================================================'
for sname in serverNames:
try:
cd("domainRuntime:/ServerRuntimes/" + sname.getName() + "/SAFRuntime/" +sname.getName() + ".saf/Agents")
try:
agents=cmo.getAgents()
for agName in agents:
#print agName.getName()
cd(agName.getName())
msgpend=cmo.getMessagesPendingCount()
msgcur=cmo.getMessagesCurrentCount()
msgtot=cmo.getMessagesReceivedCount()
#print '%s messages received %s = %d %d %d' % (agName.getName(), sname.getName(), msgcur, msgpend, msgtot)
#print '%-30s %s CUR:%5d PEND:%5d RECV:%5d' % (agName.getName(), sname.getName(), msgcur,msgpend,msgtot )
print '%-30s CUR:%5d PEND:%5d RECV:%8d' % (agName.getName(), msgcur,msgpend,msgtot )
cd("..")
except WLSTException,e:
pass
except WLSTException,e:
# this typically means the server is not active, just ignore
pass
print '======================================================================'
print ''
import time
time.sleep(10)
def getRunningServerNames():
domainConfig()
return cmo.getServers()
if __name__== "main":
monitorThrds()
disconnect()
피드 구독하기:
글 (Atom)