Skip to main content

SystemMonitor scripts

· 2 min read
Alejandro Revilla

We recently added a new small but useful feature to the SystemMonitor, the ability to run external scripts.

Here is an example:


output looks like this:

OS: Mac OS X host: alejandro-revillas-macbook-pro.local/ version: 1.9.1-SNAPSHOT (8a4a517) instance: bac8e399-ccf2-4778-97df-d37d704bb011 uptime: 00:00:08.877 processors: 8 drift : 0 memory(t/u/f): 989/177/812 threads: 56 Thread[Reference Handler,10,system] Thread[Finalizer,8,system] Thread[Signal Dispatcher,9,system] Thread[RMI TCP Accept-0,5,system] Thread[Keep-Alive-Timer,8,system] Thread[Q2-bac8e399-ccf2-4778-97df-d37d704bb011,5,main] Thread[DestroyJavaVM,5,main] Thread[Timer-0,5,main] Thread[pool-1-thread-1,5,main] Thread[DefaultQuartzScheduler_Worker-1,5,main] Thread[DefaultQuartzScheduler_Worker-2,5,main] Thread[DefaultQuartzScheduler_Worker-3,5,main] ... ... ... Thread[PooledThread-0,5,ThreadPool-0-1] Thread[PooledThread-1,5,ThreadPool-2-3] name-registrar: txnmgr: org.jpos.transaction.TransactionManager logger.: org.jpos.util.Logger tspace:default: $TAILLOCK.1878750663 0 0,0

logger.Q2.buffered: org.jpos.util.BufferedLogListener server.jcard-server: org.jpos.iso.ISOServer connected=0, rx=0, tx=0, last=0 ssm: jcard-xml-server: org.jpos.q2.iso.QServer tspace:org.jpos.transaction.TransactionManager@6ffb75c7: $HEAD $TAIL 1 0,0

capture-date: server.jcard-xml-server: org.jpos.iso.ISOServer connected=0, rx=0, tx=0, last=0 ks: logger.Q2: org.jpos.util.Logger jcard-server: org.jpos.q2.iso.QServer uname -a: Darwin alejandro-revillas-macbook-pro.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 id: uid=502(apr) gid=20(staff) groups=20(staff),401(,12(everyone),33(_appstore),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),100(_lpoperator),204(_developer) pwd: /Users/apr/git/jcardinternal/build/install/jcardinternal uptime: 10:04 up 8 days, 14:45, 5 users, load averages: 1.26 1.17 1.35 vm_stat: Mach Virtual Memory Statistics: (page size of 4096 bytes) Pages free: 4494. Pages active: 552609. Pages inactive: 271878. Pages speculative: 245. Pages wired down: 216855. "Translation faults": 116355062. Pages copy-on-write: 5347593. Pages zero filled: 52951322. Pages reactivated: 2098799. Pageins: 3732245. Pageouts: 467375. Object cache: 73 hits of 543605 lookups (0% hit rate) jps -l: 14371 12512 org.gradle.launcher.daemon.bootstrap.GradleDaemon 14365 jcardinternal-2.0.0-SNAPSHOT.jar

You can have handy vmstat 1 30 as a default so that you can get an idea of the overall system performance when you get a high 'drift' (drift is the new name for the old 'elapsed' info).