Skip to content

Utility aliases

This page lists the aliases and utility functions that KX Sensors provides on the servers where it's installed.

To list them on a host, run k-help:

$ k-help
A list of utilities and aliases for KX Sensors

Directory navigation aliases
  k-logs   - log directory
  k-pkgs   - packages directory
  k-db     - db directory
  k-ems    - ems directory

Log utilities
  k-errs                    - grep for all ERROR and FATAL in logs
  k-startts                 - list process start-time logs
  k-llog <process> [pos]    - name of the [pos] most recent logfile for a process (default: 1)
  k-vlog <process> [pos]    - view the [pos] most recent logfile for a process (default: 1)
  k-tflog <process>         - tail -f the most recent application log for a KXS process
  k-apic <process>          - total number of complete SAPI calls from a log file (e.g. k-apic `k-llog kxsRDB_A1`)
  k-apis <process>          - SAPI call statistics from a log file (e.g. k-apis `k-llog kxsRDB_A1`)
  k-apipn <ms> <process>    - list SAPI calls exceeding <ms> elapsed time from a log file (e.g. k-apipn 100 `k-llog kxsRDB_A1`)
  k-apip <process>          - wrapper over k-apipn: list SAPI calls exceeding 10ms from a log file
  k-incph <pattern> <file>  - instances-per-hour of a grep pattern in a file
  k-apisph <pattern> <file> - SAPI calls per hour for a log file (e.g. k-apisph <pattern> `k-llog kxsRDB_A1`)
  k-lerr                    - list log files containing "ERROR" plus number of occurrences
  k-gtail <process> <pat>   - follow logs for a process where <pat> is found (e.g. k-gtail kxsHDB_1 ERROR)

Other aliases
  k-env  - show contents of kxsenv
  k-mc   - alias for: kxsctl mc