Common Considerations

PerfMon Server Agent did support only few metrics in versions up to 0.4.2. The old agent still supported in PerfMon Metrics Collector version 0.5.0+. However, version 0.5.0 ships new ServerAgent which provide over 75 separate metrics, support per-process CPU and Memory metrics and even custom metrics for measuring whatever you want: file sizes, database row counts, Java heap sizes and garbage collections.

Specifying Metric Params

PerfMon Metrics Collector has special "Metric Parameter" column, where user can specify metric subtype to collect, specify which process should be monitored (which filesystem, network interface). Metric parameter string may have several parameters inside it, separated with colon :. To include colon as a char inside parameter, use backslash escaping \:. Make note you cannot use tab characters inside metric parameter string, all tabs will be converted to spaces silently.

Most of the metrics accepts single parameter called 'type'. This parameter specifies which particular number you want to collect. There is default metric type for each metric category that will be collected if no 'type' parameter specified (see lists below, bold first item in each category).

Some metric types are commonly used and considered primary, leaving some rarely used types as additional. Make note that not all metrics available on all platforms, we depend on SIGAR API capabilities here.

Some metrics allow specifying particular object to monitor, you may specify selector parameter to monitor values only for this object:

  • name, pid and ptql selectors for processes
  • core selector for monitoring specific CPU of multicore systems
  • fs selector for filesystems
  • iface selector for network interfaces

Make note that metric types are different for per-process and total metrics for CPU and Memory.

Some example metric parameter strings:

### CPU ###
combined - measure total CPU usage, equals to 100-idle value
core=2:user - measure user process CPU usage for third core in system (core numbering starts at 0)
name=java#2:user - will monitor second java process instance for user time spent
pid=14523:percent - will monitor process with PID 14523 for total CPU usage percentage 
name=httpd - omitting metric type will use default 'percent'
### Disk IO ###
fs=/home:writes - will monitor /home filesystem for number of write operations
### Network IO ###
iface=eth0:tx - will monitor interface eth0 for transmitted packet rate

Viewing Available System Objects

Server Agent has special command-line option --sysinfo for printing available processes, filesystems and network interfaces together with their selectors.

CPU Metrics



  • combined
  • idle
  • system
  • user
  • iowait


  • irq
  • nice
  • softirq
  • stolen

Per Process

  • percent
  • total
  • system
  • user

Memory Metrics



  • usedperc - relative memory usage in percents
  • freeperc
  • used
  • free


  • actualfree
  • actualused
  • ram
  • total

Per Process


  • resident
  • virtual
  • shared


  • pagefaults
  • majorfaults
  • minorfaults

Disk I/O Metrics


  • queue
  • reads
  • writes
  • readbytes
  • writebytes


  • available
  • service
  • files
  • free
  • freefiles
  • total
  • useperc
  • used

Network I/O Metrics


  • bytesrecv
  • bytessent
  • rx
  • tx


  • used
  • speed
  • rxdrops
  • rxerr
  • rxframe
  • rxoverruns
  • txcarrier
  • txcollisions
  • txdrops
  • txerr
  • txoverruns

JMX Metrics

Since version 0.5.2 Server Agent has ability to monitor some JMX values inside Java Virtual Machine. To enable JMX monitoring you must start Java with some special properties enabled, like described here. Here's simpliest (and not so secure) options to start Java with JMX enabled:

java \ 

By default the Server Agent will try to connect to JMX server at localhost with port 4711. If you started JMX server at different host/port or using authentication with username/password, please, use following additional parameters:

  • url=<hostname>\:<port>
  • user=<username>
  • password=<password>

Available JMX metric types:

  • gc-time - time spent in garbage collection, milliseconds (used method)
  • memory-usage - heap memory used by VM, bytes (method used)
  • memory-committed - heap memory committed by VM, bytes (method used)
  • memorypool-usage - heap memory pool usage, bytes (method used)
  • memorypool-committed - heap memory pool committed size, bytes (method used)
  • class-count - loaded class count in VM (used method)
  • compile-time - time spent in compilation, milliseconds (used method)


gc-time - monitor GC time at localhost:4711\:4715 - use alternative hostname/password\:4715:user=apc:password=SecurityPlease123 - some secure setup access

TCP Metrics

TCP metrics represents TCP socket state statistics (like open ports). Primary

  • estab - established connections
  • time_wait
  • close_wait


  • bound
  • close
  • closing
  • fin_wait1
  • fin_wait2
  • idle
  • inbound
  • last_ack
  • listen
  • outbound
  • syn_recv

Swap Metrics

  • used
  • pagein
  • pageout
  • free
  • total

Custom Metrics

If you haven't found appropriate metric in above lists, you can set up collecting any value with custom metrics.


This metric type interprets parameter string as path to process to start and arguments to pass to the process. Parameters separated with colon (not space), see examples below. The process must print out to standard output single line containing single numeric metric value.

In most cases you'll need to start system interpreter (cmd.exe, /bin/sh) to run complex sequences of parameterized calls.

Example1: Monitoring Linux cached memory size (unavailable via SIGAR lib in default metrics), used free utility output:

/bin/sh:-c:free | grep Mem | awk '{print $7}'

Example2: Monitoring MySQL select query count:

/bin/sh:-c:echo "show global status like 'Com_select'" | mysql -u root | awk ' $1 =="Com_select" {print $2}'


Another way to collect cutom metrics is to read lines off the end of the file. Metric parameter for tail type is path to file to read. Lines added to file must contain single numeric metric. Example: