diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
commit | 47e6e7c84f008a53061e661f31ae96629bc694ef (patch) | |
tree | 648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /src/pmlogconf | |
download | pcp-47e6e7c84f008a53061e661f31ae96629bc694ef.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'src/pmlogconf')
111 files changed, 2239 insertions, 0 deletions
diff --git a/src/pmlogconf/GNUmakefile b/src/pmlogconf/GNUmakefile new file mode 100644 index 0000000..6f8aafd --- /dev/null +++ b/src/pmlogconf/GNUmakefile @@ -0,0 +1,50 @@ +# +# Copyright (c) 2000,2004 Silicon Graphics, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + +TOPDIR = ../.. +include $(TOPDIR)/src/include/builddefs + +SUBDIRS = v1.0 platform disk sgi memory cpu kernel filesystem networking \ + sqlserver tools + +LSRCFILES = pmlogconf.sh pmlogconf-setup.sh GNUmakefile.groups + +default: makefiles pmlogconf.sh pmlogconf-setup.sh + +include $(BUILDRULES) + +install: default $(SUBDIRS) + $(SUBDIRS_MAKERULE) + $(INSTALL) -m 755 pmlogconf.sh $(PCP_BINADM_DIR)/pmlogconf + $(INSTALL) -m 755 pmlogconf-setup.sh $(PCP_BINADM_DIR)/pmlogconf-setup + +default_pcp : default + +install_pcp : install + +# for src-link-pcp target from buildrules +$(SUBDIRS): makefiles + +makefiles: + @for d in $(SUBDIRS); do \ + rm -f $$d/GNUmakefile; \ + cp GNUmakefile.groups $$d/GNUmakefile; \ + done + +groups: $(SUBDIRS) + $(SUBDIRS_MAKERULE) diff --git a/src/pmlogconf/GNUmakefile.groups b/src/pmlogconf/GNUmakefile.groups new file mode 100644 index 0000000..5930fae --- /dev/null +++ b/src/pmlogconf/GNUmakefile.groups @@ -0,0 +1,38 @@ +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# + +TOPDIR = ../../.. +include $(TOPDIR)/src/include/builddefs +include localdefs + +WORKDIR := $(shell pwd) +GROUP := $(shell basename $(WORKDIR)) +GROUPDIR = $(PCP_VAR_DIR)/config/pmlogconf + +LDIRT = GNUmakefile + +DEFAULT = $(FILES) + +LSRCFILES = localdefs $(DEFAULT) + +CONFIGS = $(subst "./","",$(DEFAULT)) + +default_pcp: $(DEFAULT) + +install_pcp: install + +install: default_pcp + $(INSTALL) -d $(GROUPDIR)/$(GROUP) + @for f in $(CONFIGS); do \ + $(INSTALL) -m 644 $$f $(GROUPDIR)/$(GROUP)/$$f; \ + done + +include $(BUILDRULES) diff --git a/src/pmlogconf/cpu/localdefs b/src/pmlogconf/cpu/localdefs new file mode 100644 index 0000000..1245766 --- /dev/null +++ b/src/pmlogconf/cpu/localdefs @@ -0,0 +1 @@ +FILES = summary percpu diff --git a/src/pmlogconf/cpu/percpu b/src/pmlogconf/cpu/percpu new file mode 100644 index 0000000..c5ef876 --- /dev/null +++ b/src/pmlogconf/cpu/percpu @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident utilization per CPU +force available + kernel.percpu.cpu diff --git a/src/pmlogconf/cpu/summary b/src/pmlogconf/cpu/summary new file mode 100644 index 0000000..84ff418 --- /dev/null +++ b/src/pmlogconf/cpu/summary @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident utilization (usr, sys, idle, ...) over all CPUs +force include + kernel.all.cpu diff --git a/src/pmlogconf/disk/localdefs b/src/pmlogconf/disk/localdefs new file mode 100644 index 0000000..bfa6c36 --- /dev/null +++ b/src/pmlogconf/disk/localdefs @@ -0,0 +1 @@ +FILES = summary percontroller perdisk perpartition diff --git a/src/pmlogconf/disk/percontroller b/src/pmlogconf/disk/percontroller new file mode 100644 index 0000000..774d825 --- /dev/null +++ b/src/pmlogconf/disk/percontroller @@ -0,0 +1,9 @@ +#pmlogconf-setup 2.0 +ident per controller disk activity +probe disk.ctl.total + disk.ctl.read + disk.ctl.write + disk.ctl.total + disk.ctl.read_bytes + disk.ctl.write_bytes + disk.ctl.bytes diff --git a/src/pmlogconf/disk/perdisk b/src/pmlogconf/disk/perdisk new file mode 100644 index 0000000..b3a73ca --- /dev/null +++ b/src/pmlogconf/disk/perdisk @@ -0,0 +1,10 @@ +#pmlogconf-setup 2.0 +ident per spindle disk activity +force available + disk.dev.read + disk.dev.write + disk.dev.total + disk.dev.read_bytes + disk.dev.write_bytes + disk.dev.total_bytes + disk.dev.avactive diff --git a/src/pmlogconf/disk/perpartition b/src/pmlogconf/disk/perpartition new file mode 100644 index 0000000..f65c736 --- /dev/null +++ b/src/pmlogconf/disk/perpartition @@ -0,0 +1,7 @@ +#pmlogconf-setup 2.0 +ident per logical block device activity +force available + disk.partitions.read + disk.partitions.write + disk.partitions.read_bytes + disk.partitions.write_bytes diff --git a/src/pmlogconf/disk/summary b/src/pmlogconf/disk/summary new file mode 100644 index 0000000..32f08fd --- /dev/null +++ b/src/pmlogconf/disk/summary @@ -0,0 +1,10 @@ +#pmlogconf-setup 2.0 +ident summary disk activity (IOPs and bytes for both reads and writes over all disks). +force include + disk.all.read + disk.all.write + disk.all.total + disk.all.read_bytes + disk.all.write_bytes + disk.all.total_bytes + disk.all.avactive diff --git a/src/pmlogconf/filesystem/all b/src/pmlogconf/filesystem/all new file mode 100644 index 0000000..84424e1 --- /dev/null +++ b/src/pmlogconf/filesystem/all @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident generic filesystem size, fullness and mount information +force available + filesys diff --git a/src/pmlogconf/filesystem/localdefs b/src/pmlogconf/filesystem/localdefs new file mode 100644 index 0000000..47766a8 --- /dev/null +++ b/src/pmlogconf/filesystem/localdefs @@ -0,0 +1 @@ +FILES = all xfs-io-irix xfs-io-linux xfs-all summary diff --git a/src/pmlogconf/filesystem/summary b/src/pmlogconf/filesystem/summary new file mode 100644 index 0000000..d08b2d1 --- /dev/null +++ b/src/pmlogconf/filesystem/summary @@ -0,0 +1,8 @@ +#pmlogconf-setup 2.0 +ident filesystem size and fullness +force available + filesys.full + filesys.used + filesys.free + filesys.avail # for Linux + diff --git a/src/pmlogconf/filesystem/xfs-all b/src/pmlogconf/filesystem/xfs-all new file mode 100644 index 0000000..22e2136 --- /dev/null +++ b/src/pmlogconf/filesystem/xfs-all @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident all available XFS information +probe xfs.read_bytes + xfs diff --git a/src/pmlogconf/filesystem/xfs-io-irix b/src/pmlogconf/filesystem/xfs-io-irix new file mode 100644 index 0000000..ded61ed --- /dev/null +++ b/src/pmlogconf/filesystem/xfs-io-irix @@ -0,0 +1,8 @@ +#pmlogconf-setup 2.0 +ident XFS data and log I/O traffic [Irix] +probe xfs.log_writes exists ? include : exclude + xfs.log_writes + xfs.log_blocks + xfs.log_noiclogs + xfs.read_bytes + xfs.write_bytes diff --git a/src/pmlogconf/filesystem/xfs-io-linux b/src/pmlogconf/filesystem/xfs-io-linux new file mode 100644 index 0000000..d7c0fe9 --- /dev/null +++ b/src/pmlogconf/filesystem/xfs-io-linux @@ -0,0 +1,11 @@ +#pmlogconf-setup 2.0 +ident XFS data and log I/O traffic [Linux] +probe xfs.log.writes + xfs.log.writes + xfs.log.blocks + xfs.log.noiclogs + xfs.read + xfs.write + xfs.read_bytes + xfs.write_bytes + xfs.buffer diff --git a/src/pmlogconf/kernel/bufcache-activity b/src/pmlogconf/kernel/bufcache-activity new file mode 100644 index 0000000..89e194e --- /dev/null +++ b/src/pmlogconf/kernel/bufcache-activity @@ -0,0 +1,10 @@ +#pmlogconf-setup 2.0 +ident kernel buffer cache reads, writes, hits and misses +probe kernel.all.io.bread + kernel.all.io.bread + kernel.all.io.bwrite + kernel.all.io.lread + kernel.all.io.lwrite + kernel.all.io.phread + kernel.all.io.phwrite + kernel.all.io.wcancel diff --git a/src/pmlogconf/kernel/bufcache-all b/src/pmlogconf/kernel/bufcache-all new file mode 100644 index 0000000..07d2c55 --- /dev/null +++ b/src/pmlogconf/kernel/bufcache-all @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident all available kernel buffer cache data +probe buffer_cache.flush + buffer_cache diff --git a/src/pmlogconf/kernel/inode-cache b/src/pmlogconf/kernel/inode-cache new file mode 100644 index 0000000..70f0118 --- /dev/null +++ b/src/pmlogconf/kernel/inode-cache @@ -0,0 +1,7 @@ +#pmlogconf-setup 2.0 +ident kernel name cache (namei, iget, etc) activity +probe kernel.all.io.namei + kernel.all.io.iget + kernel.all.io.namei + kernel.all.io.dirblk + name_cache diff --git a/src/pmlogconf/kernel/interrupts-irix b/src/pmlogconf/kernel/interrupts-irix new file mode 100644 index 0000000..bc10187 --- /dev/null +++ b/src/pmlogconf/kernel/interrupts-irix @@ -0,0 +1,8 @@ +#pmlogconf-setup 2.0 +ident interrupts [Irix] +probe kernel.all.intr.vme + kernel.all.intr.vme + kernel.all.intr.non_vme + kernel.all.tty.recvintr + kernel.all.tty.xmitintr + kernel.all.tty.mdmintr diff --git a/src/pmlogconf/kernel/load b/src/pmlogconf/kernel/load new file mode 100644 index 0000000..c75b97b --- /dev/null +++ b/src/pmlogconf/kernel/load @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident load average +probe kernel.all.load + kernel.all.load diff --git a/src/pmlogconf/kernel/localdefs b/src/pmlogconf/kernel/localdefs new file mode 100644 index 0000000..31f666d --- /dev/null +++ b/src/pmlogconf/kernel/localdefs @@ -0,0 +1 @@ +FILES = load syscalls-irix syscalls-linux bufcache-activity bufcache-all vnodes memory-irix memory-linux inode-cache syscalls-percpu-irix queues-irix read-write-data interrupts-irix summary-windows summary-linux diff --git a/src/pmlogconf/kernel/memory-irix b/src/pmlogconf/kernel/memory-irix new file mode 100644 index 0000000..3694c83 --- /dev/null +++ b/src/pmlogconf/kernel/memory-irix @@ -0,0 +1,31 @@ +#pmlogconf-setup 2.0 +ident kernel memory allocation [Irix] +probe mem.chunkpages + mem.system + mem.util + mem.freemem + mem.availsmem + mem.availrmem + mem.bufmem + mem.physmem + mem.dchunkpages + mem.pmapmem + mem.strmem + mem.chunkpages + mem.dpages + mem.emptymem + mem.freeswap + mem.halloc + mem.heapmem + mem.hfree + mem.hovhd + mem.hunused + mem.zfree + mem.zonemem + mem.zreq + mem.iclean + mem.bsdnet + mem.palloc + mem.unmodfl + mem.unmodsw + mem.paging.reclaim diff --git a/src/pmlogconf/kernel/memory-linux b/src/pmlogconf/kernel/memory-linux new file mode 100644 index 0000000..c8ec0ac --- /dev/null +++ b/src/pmlogconf/kernel/memory-linux @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident kernel memory allocation [Linux] +probe mem.util.used + mem.util diff --git a/src/pmlogconf/kernel/queues-irix b/src/pmlogconf/kernel/queues-irix new file mode 100644 index 0000000..10dd4c3 --- /dev/null +++ b/src/pmlogconf/kernel/queues-irix @@ -0,0 +1,7 @@ +#pmlogconf-setup 2.0 +ident run and swap queues [Irix] +probe kernel.all.runque + kernel.all.runque + kernel.all.runocc + kernel.all.swap.swpque + kernel.all.swap.swpocc diff --git a/src/pmlogconf/kernel/read-write-data b/src/pmlogconf/kernel/read-write-data new file mode 100644 index 0000000..f333787 --- /dev/null +++ b/src/pmlogconf/kernel/read-write-data @@ -0,0 +1,5 @@ +#pmlogconf-setup 2.0 +ident bytes across the read() and write() syscall interfaces +probe kernel.all.readch + kernel.all.readch + kernel.all.writech diff --git a/src/pmlogconf/kernel/summary-linux b/src/pmlogconf/kernel/summary-linux new file mode 100644 index 0000000..215e6fa --- /dev/null +++ b/src/pmlogconf/kernel/summary-linux @@ -0,0 +1,17 @@ +#pmlogconf-setup 2.0 +ident summary kernel performance data [Linux] +probe kernel.uname.sysname ~ Linux ? include : exclude + mem.util + swap.pagesin + swap.pagesout + swap.free + swap.used + kernel.all.pswitch + kernel.all.intr + kernel.all.load + kernel.all.runnable + network.interface.collisions + network.interface.in.drops + network.interface.out.drops + disk.dev.avactive + filesys.full diff --git a/src/pmlogconf/kernel/summary-windows b/src/pmlogconf/kernel/summary-windows new file mode 100644 index 0000000..6553192 --- /dev/null +++ b/src/pmlogconf/kernel/summary-windows @@ -0,0 +1,15 @@ +#pmlogconf-setup 2.0 +ident summary kernel performance data [Windows] +probe mem.pool.paged_bytes exists ? include : exclude + mem.available + mem.committed_bytes + mem.pool.paged_bytes + mem.pool.non_paged_bytes + mem.page_faults + mem.page_reads + mem.page_writes + mem.pages_total + disk.dev.idle + disk.dev.queue_len + filesys.full + diff --git a/src/pmlogconf/kernel/syscalls-irix b/src/pmlogconf/kernel/syscalls-irix new file mode 100644 index 0000000..9a04cdf --- /dev/null +++ b/src/pmlogconf/kernel/syscalls-irix @@ -0,0 +1,12 @@ +#pmlogconf-setup 2.0 +ident context switches, total syscalls and counts for selected calls (e.g. read, write, fork, exec, select) over all CPUs [Irix] +probe kernel.all.syscall values ? available : exclude + kernel.all.pswitch + kernel.all.syscall + kernel.all.sysexec + kernel.all.sysfork + kernel.all.sysread + kernel.all.syswrite + kernel.all.kswitch + kernel.all.kpreempt + kernel.all.sysioctl diff --git a/src/pmlogconf/kernel/syscalls-linux b/src/pmlogconf/kernel/syscalls-linux new file mode 100644 index 0000000..8e50db5 --- /dev/null +++ b/src/pmlogconf/kernel/syscalls-linux @@ -0,0 +1,5 @@ +#pmlogconf-setup 2.0 +ident context switches and fork system calls over all CPUs [Linux] +probe kernel.all.sysfork values ? available : exclude + kernel.all.pswitch + kernel.all.sysfork diff --git a/src/pmlogconf/kernel/syscalls-percpu-irix b/src/pmlogconf/kernel/syscalls-percpu-irix new file mode 100644 index 0000000..30a106f --- /dev/null +++ b/src/pmlogconf/kernel/syscalls-percpu-irix @@ -0,0 +1,12 @@ +#pmlogconf-setup 2.0 +ident per CPU context switches, total syscalls and counts for selected calls [Irix] +probe kernel.percpu.pswitch + kernel.percpu.pswitch + kernel.percpu.syscall + kernel.percpu.sysexec + kernel.percpu.sysfork + kernel.percpu.sysread + kernel.percpu.syswrite + kernel.percpu.kswitch + kernel.percpu.kpreempt + kernel.percpu.sysioctl diff --git a/src/pmlogconf/kernel/vnodes b/src/pmlogconf/kernel/vnodes new file mode 100644 index 0000000..ab1a077 --- /dev/null +++ b/src/pmlogconf/kernel/vnodes @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident vnode activity +probe vnodes.alloc + vnodes diff --git a/src/pmlogconf/memory/localdefs b/src/pmlogconf/memory/localdefs new file mode 100644 index 0000000..f2e82f1 --- /dev/null +++ b/src/pmlogconf/memory/localdefs @@ -0,0 +1 @@ +FILES = tlb-irix swap-all swap-config swap-activity proc-linux diff --git a/src/pmlogconf/memory/proc-linux b/src/pmlogconf/memory/proc-linux new file mode 100644 index 0000000..399ab40 --- /dev/null +++ b/src/pmlogconf/memory/proc-linux @@ -0,0 +1,8 @@ +#pmlogconf-setup 2.0 +ident System process memory-usage information +delta 5 minutes +#probe proc.memory.size exists ? include : exclude +force available + proc.memory.size + proc.memory.rss + proc.psinfo.maj_flt diff --git a/src/pmlogconf/memory/swap-activity b/src/pmlogconf/memory/swap-activity new file mode 100644 index 0000000..8affe94 --- /dev/null +++ b/src/pmlogconf/memory/swap-activity @@ -0,0 +1,5 @@ +#pmlogconf-setup 2.0 +ident pages in and out (severe VM demand) +force available + swap.pagesin + swap.pagesout diff --git a/src/pmlogconf/memory/swap-all b/src/pmlogconf/memory/swap-all new file mode 100644 index 0000000..68cda81 --- /dev/null +++ b/src/pmlogconf/memory/swap-all @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident current swap allocation and all swap activity +force available + swap diff --git a/src/pmlogconf/memory/swap-config b/src/pmlogconf/memory/swap-config new file mode 100644 index 0000000..ad7e0da --- /dev/null +++ b/src/pmlogconf/memory/swap-config @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident swap configuration +force available + swapdev diff --git a/src/pmlogconf/memory/tlb-irix b/src/pmlogconf/memory/tlb-irix new file mode 100644 index 0000000..1688d7d --- /dev/null +++ b/src/pmlogconf/memory/tlb-irix @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident address translation (faults and TLB activity) [Irix version] +probe mem.tlb.flush + mem.tlb diff --git a/src/pmlogconf/networking/interface-all b/src/pmlogconf/networking/interface-all new file mode 100644 index 0000000..82a6c91 --- /dev/null +++ b/src/pmlogconf/networking/interface-all @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident all available data per network interface +force available + network.interface diff --git a/src/pmlogconf/networking/interface-summary b/src/pmlogconf/networking/interface-summary new file mode 100644 index 0000000..41be875 --- /dev/null +++ b/src/pmlogconf/networking/interface-summary @@ -0,0 +1,10 @@ +#pmlogconf-setup 2.0 +ident bytes, packets and errors (in and out) per network interface +force include + network.interface.in.bytes + network.interface.in.packets + network.interface.in.errors + network.interface.out.bytes + network.interface.out.packets + network.interface.out.errors + network.interface.collisions diff --git a/src/pmlogconf/networking/localdefs b/src/pmlogconf/networking/localdefs new file mode 100644 index 0000000..5b34550 --- /dev/null +++ b/src/pmlogconf/networking/localdefs @@ -0,0 +1 @@ +FILES = nfs2-client nfs2-server nfs3-client nfs3-server nfs4-client nfs4-server rpc interface-summary interface-all socket-irix socket-linux mbufs multicast streams tcp-all udp-all tcp-activity-irix tcp-activity-linux udp-packets-irix udp-packets-linux other-protocols diff --git a/src/pmlogconf/networking/mbufs b/src/pmlogconf/networking/mbufs new file mode 100644 index 0000000..3fc1743 --- /dev/null +++ b/src/pmlogconf/networking/mbufs @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident mbuf stats (alloc, failed, waited, etc) +probe network.mbuf.alloc + network.mbuf diff --git a/src/pmlogconf/networking/multicast b/src/pmlogconf/networking/multicast new file mode 100644 index 0000000..805bd85 --- /dev/null +++ b/src/pmlogconf/networking/multicast @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident multicast routing stats +probe network.mcr.mfc_lookups + network.mcr diff --git a/src/pmlogconf/networking/nfs2-client b/src/pmlogconf/networking/nfs2-client new file mode 100644 index 0000000..39d2a66 --- /dev/null +++ b/src/pmlogconf/networking/nfs2-client @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident NFS v2 client stats +probe nfs.client.reqs values ? include : available + nfs.client diff --git a/src/pmlogconf/networking/nfs2-server b/src/pmlogconf/networking/nfs2-server new file mode 100644 index 0000000..727622b --- /dev/null +++ b/src/pmlogconf/networking/nfs2-server @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident NFS v2 server stats +probe nfs.server.reqs values ? include : available + nfs.server diff --git a/src/pmlogconf/networking/nfs3-client b/src/pmlogconf/networking/nfs3-client new file mode 100644 index 0000000..c077be7 --- /dev/null +++ b/src/pmlogconf/networking/nfs3-client @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident NFS v3 client stats +probe nfs3.client.reqs values ? include : available + nfs3.client diff --git a/src/pmlogconf/networking/nfs3-server b/src/pmlogconf/networking/nfs3-server new file mode 100644 index 0000000..87693de --- /dev/null +++ b/src/pmlogconf/networking/nfs3-server @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident NFS v3 server stats +probe nfs3.server.reqs values ? include : available + nfs3.server diff --git a/src/pmlogconf/networking/nfs4-client b/src/pmlogconf/networking/nfs4-client new file mode 100644 index 0000000..6b9601b --- /dev/null +++ b/src/pmlogconf/networking/nfs4-client @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident NFS v4 client stats +probe nfs4.client.reqs values ? include : available + nfs4.client diff --git a/src/pmlogconf/networking/nfs4-server b/src/pmlogconf/networking/nfs4-server new file mode 100644 index 0000000..8e402ed --- /dev/null +++ b/src/pmlogconf/networking/nfs4-server @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident NFS v4 server stats +probe nfs4.server.reqs values ? include : available + nfs4.server diff --git a/src/pmlogconf/networking/other-protocols b/src/pmlogconf/networking/other-protocols new file mode 100644 index 0000000..301bed4 --- /dev/null +++ b/src/pmlogconf/networking/other-protocols @@ -0,0 +1,7 @@ +#pmlogconf-setup 2.0 +ident all available data for other protocols (ip, icmp, igmp, udplite) +force available + network.ip + network.icmp + network.igmp # for Irix + network.udplite # for Linux diff --git a/src/pmlogconf/networking/rpc b/src/pmlogconf/networking/rpc new file mode 100644 index 0000000..d8c0d49 --- /dev/null +++ b/src/pmlogconf/networking/rpc @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident RPC stats +force available + rpc diff --git a/src/pmlogconf/networking/socket-irix b/src/pmlogconf/networking/socket-irix new file mode 100644 index 0000000..87a71a6 --- /dev/null +++ b/src/pmlogconf/networking/socket-irix @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident socket stats (counts by type and state) [Irix] +probe network.socket.type + network.socket diff --git a/src/pmlogconf/networking/socket-linux b/src/pmlogconf/networking/socket-linux new file mode 100644 index 0000000..25202c6 --- /dev/null +++ b/src/pmlogconf/networking/socket-linux @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident socket stats (in use, high-water mark, etc.) [Linux] +probe network.sockstat.raw.inuse + network.sockstat diff --git a/src/pmlogconf/networking/streams b/src/pmlogconf/networking/streams new file mode 100644 index 0000000..5f204cf --- /dev/null +++ b/src/pmlogconf/networking/streams @@ -0,0 +1,5 @@ +#pmlogconf-setup 2.0 +ident SVR5 streams activity +probe resource.nstream_queue + resource.nstream_queue + resource.nstream_head diff --git a/src/pmlogconf/networking/tcp-activity-irix b/src/pmlogconf/networking/tcp-activity-irix new file mode 100644 index 0000000..4027675 --- /dev/null +++ b/src/pmlogconf/networking/tcp-activity-irix @@ -0,0 +1,18 @@ +#pmlogconf-setup 2.0 +ident TCP bytes and packets (in and out), connects, accepts, drops and closes [Irix] +probe network.tcp.accepts + network.tcp.accepts + network.tcp.connattempt + network.tcp.connects + network.tcp.drops + network.tcp.conndrops + network.tcp.timeoutdrop + network.tcp.closed + network.tcp.sndtotal + network.tcp.sndpack + network.tcp.sndbyte + network.tcp.rcvtotal + network.tcp.rcvpack + network.tcp.rcvbyte + network.tcp.rexmttimeo + network.tcp.sndrexmitpack diff --git a/src/pmlogconf/networking/tcp-activity-linux b/src/pmlogconf/networking/tcp-activity-linux new file mode 100644 index 0000000..fd7e854 --- /dev/null +++ b/src/pmlogconf/networking/tcp-activity-linux @@ -0,0 +1,7 @@ +#pmlogconf-setup 2.0 +ident TCP packets (in and out), errors and retransmits [Linux] +probe network.tcp.insegs + network.tcp.insegs + network.tcp.outsegs + network.tcp.retranssegs + network.tcp.inerrs diff --git a/src/pmlogconf/networking/tcp-all b/src/pmlogconf/networking/tcp-all new file mode 100644 index 0000000..15cfbfe --- /dev/null +++ b/src/pmlogconf/networking/tcp-all @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident all available TCP data +force available + network.tcp diff --git a/src/pmlogconf/networking/udp-all b/src/pmlogconf/networking/udp-all new file mode 100644 index 0000000..5265aab --- /dev/null +++ b/src/pmlogconf/networking/udp-all @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident all available UDP data +force available + network.udp diff --git a/src/pmlogconf/networking/udp-packets-irix b/src/pmlogconf/networking/udp-packets-irix new file mode 100644 index 0000000..8b904a5 --- /dev/null +++ b/src/pmlogconf/networking/udp-packets-irix @@ -0,0 +1,5 @@ +#pmlogconf-setup 2.0 +ident UDP packets in and out [Irix] +probe network.udp.ipackets + network.udp.ipackets + network.udp.opackets diff --git a/src/pmlogconf/networking/udp-packets-linux b/src/pmlogconf/networking/udp-packets-linux new file mode 100644 index 0000000..656719b --- /dev/null +++ b/src/pmlogconf/networking/udp-packets-linux @@ -0,0 +1,5 @@ +#pmlogconf-setup 2.0 +ident UDP packets in and out [Linux] +probe network.udp.indatagrams + network.udp.indatagrams + network.udp.outdatagrams diff --git a/src/pmlogconf/platform/hinv b/src/pmlogconf/platform/hinv new file mode 100644 index 0000000..baee2c5 --- /dev/null +++ b/src/pmlogconf/platform/hinv @@ -0,0 +1,9 @@ +#pmlogconf-setup 2.0 +ident platform, filesystem and hardware configuration +force include +delta once + hinv + kernel.uname + filesys.mountdir + filesys.blocksize + filesys.capacity diff --git a/src/pmlogconf/platform/linux b/src/pmlogconf/platform/linux new file mode 100644 index 0000000..a2f0308 --- /dev/null +++ b/src/pmlogconf/platform/linux @@ -0,0 +1,11 @@ +#pmlogconf-setup 2.0 +ident Linux swap, cache and networking configuration +probe kernel.uname.sysname ~ Linux ? include : exclude +delta once + swap.length + mem.slabinfo.objects.size + network.interface.mtu + network.interface.speed + network.interface.duplex + network.interface.inet_addr + diff --git a/src/pmlogconf/platform/localdefs b/src/pmlogconf/platform/localdefs new file mode 100644 index 0000000..87e49c1 --- /dev/null +++ b/src/pmlogconf/platform/localdefs @@ -0,0 +1 @@ +FILES = hinv linux diff --git a/src/pmlogconf/pmlogconf-setup.sh b/src/pmlogconf/pmlogconf-setup.sh new file mode 100755 index 0000000..fe9eb68 --- /dev/null +++ b/src/pmlogconf/pmlogconf-setup.sh @@ -0,0 +1,404 @@ +#!/bin/sh +# +# pmlogconf-setup - parse and process a group file to produce an +# initial configuration file control line +# +# Copyright (c) 2014 Red Hat. +# Copyright (c) 2010 Ken McDonell. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# + +# Get standard environment +. $PCP_DIR/etc/pcp.env + +status=1 +tmp=`mktemp -d /tmp/pcp.XXXXXXXXX` || exit 1 +trap "rm -rf $tmp; exit \$status" 0 1 2 3 15 +#debug# tmp=`pwd`/tmp-setup +prog=`basename $0` + +cat > $tmp/usage << EOF +# Usage: [options] file + +Options: + --host + -v,--verbose increase diagnostic verbosity + --help +EOF + +_usage() +{ + pmgetopt --progname=$prog --config=$tmp/usage --usage + exit 1 +} + +HOST=local: +verbose=false + +ARGS=`pmgetopt --progname=$prog --config=$tmp/usage -- "$@"` +[ $? != 0 ] && exit 1 + +eval set -- "$ARGS" +while [ $# -gt 0 ] +do + case "$1" + in + -h) # host to contact for "probe" tests + HOST="$2" + shift + ;; + + -v) # verbose + verbose=true + ;; + + --) shift + break + ;; + + -\?) # eh? + _usage + # NOTREACHED + ;; + esac + shift +done + +[ $# -eq 1 ] || _usage + +# find "probe metric [condition] [state_rule]" line to determine action +# or +# find "force state" line +# +metric='' +options='' +force='' +eval `sed -n <"$1" \ + -e '/^#/d' \ + -e 's/?/"\\\\?"/g' \ + -e 's/\*/"\\\\*"/g' \ + -e 's/\[/"\\\\["/g' \ + -e '/^probe[ ]/{ +s/^probe[ ]*/metric="/ +s/$/ / +s/[ ]/" options="/ +s/ *$/"/ +p +q +}' \ + -e '/^force[ ]/{ +s/^force[ ]*/force='"'"'/ +s/ *$/'"'"'/ +p +}'` +$verbose && $PCP_ECHO_PROG "$1: " >&2 +if [ -n "$force" -a -n "$metric" ] +then + $PCP_ECHO_PROG "$1: Warning: \"probe\" and \"force\" control lines ... ignoring \"force\"" >&2 + force='' +fi +if [ -z "$force" -a -z "$metric" ] +then + $PCP_ECHO_PROG "$1: Warning: neither \"probe\" nor \"force\" control lines ... use \"force available\"" >&2 + force=available +fi + +$verbose && [ -n "$metric" ] && $PCP_ECHO_PROG $PCP_ECHO_N "probe $metric $options""$PCP_ECHO_C" >&2 +$verbose && [ -n "$force" ] && $PCP_ECHO_PROG $PCP_ECHO_N "force $force""$PCP_ECHO_C" >&2 +rm -f $tmp/err +if [ -n "$metric" ] +then + # probe + echo "$options" + echo "data `pmprobe -h $HOST -v $metric`" + # need to handle these variants of pmprobe output + # sample.string.hullo 1 "hullo world!" + # sample.colour 3 101 202 303 + # +else + # force + $PCP_ECHO_PROG "force $force" +fi \ +| sed \ + -e '/^data /!{ +s/ //g +}' \ + -e '/^data [^"]*$/{ +s/^data // +s/ //g +}' \ + -e '/^data .*"/{ +s/^data // +s/ "// +s/" "//g +s/"$// +s/ // +}' \ +| $PCP_AWK_PROG -F ' +BEGIN { # conditions + i = 0 + exists = ++i; condition[exists] = "exists" + values = ++i; condition[values] = "values" + force = ++i; conditon[force] = "-" + regexp = ++i; condition[regexp] = "~" + notregexp = ++i; condition[notregexp] = "!~" + gt = ++i; condition[gt] = ">"; + ge = ++i; condition[ge] = ">="; + eq = ++i; condition[eq] = "=="; + neq = ++i; condition[neq] = "!="; + le = ++i; condition[le] = "<="; + lt = ++i; condition[lt] = "<"; + # states + include = 100; state[include] = "include" + exclude = 101; state[exclude] = "exclude" + available = 102; state[available] = "available" + } +NR == 1 && $1 == "force" && NF == 2 { + # force variant + action = -1 + for (i in state) { + if ($2 == state[i]) { + action = i + break + } + } + if (action == -1) { + print "force state \"" $2 "\" not recognized" >"'$tmp/err'" + exit + } + printf "probe=1 action=%d\n",action >>"'$tmp/out'" + exit + } +NR == 1 { + op = exists # default predicate + yes = available # default success action + no = exclude # default failure action + if (NF > 0) { + have_condition = 0 + for (i in condition) { + if ($1 == condition[i]) { + have_condition = 1 + op = i + yes = available # default success action + no = exclude # default failure action + break + } + } + if (have_condition == 0 && $1 != "?") { + print "condition operator \"" $1 "\" not recognized" >"'$tmp/err'" + exit + } + if (op == exists || op == values) { + if (have_condition) + actarg = 2 + else + actarg = 1 + } + else { + if (NF < 2) { + print "missing condition operand after " condition[op] " operator" >"'$tmp/err'" + exit + } + oprnd = $2 + actarg = 3 + } + if (NF < actarg) next + str = $actarg + for (i = actarg+1; i <= NF; i++) { + str = str " " $i + } + if (NF >= actarg && $actarg != "?") { + print "expected \"?\" after condition, found \"" str "\"" >"'$tmp/err'" + exit + } + if (NF >= actarg && NF < actarg+3) { + print "missing state rule components: \"" str "\"" >"'$tmp/err'" + exit + } + if (NF >= actarg && NF > actarg+3) { + print "extra state rule components: \"" str "\"" >"'$tmp/err'" + exit + } + actarg++ + yes = -1 + for (i in state) { + if ($actarg == state[i]) { + yes = i + break + } + } + if (yes == -1) { + print "sucess state \"" $actarg "\" not recognized" >"'$tmp/err'" + exit + } + actarg++ + if ($actarg != ":") { + print "expected \":\" in state rule, found \"" $actarg "\"" >"'$tmp/err'" + exit + } + actarg++ + no = -1 + for (i in state) { + if ($actarg == state[i]) { + no = i + break + } + } + if (no == -1) { + print "failure state \"" $actarg "\" not recognized" >"'$tmp/err'" + exit + } + } + } +NR == 2 { + #debug# printf "op: %d %s pmprobe: %s",op, condition[op],$0 + probe = 0 + if ($2 < 0) { + # error from pmprobe + ; + } + else { + if (op == exists) { + probe = 1 + } + else if (op == values) { + if ($2 > 0) probe = 1 + } + else if (op == regexp) { + for (i = 3; i <= NF; i++) { + if ($i ~ oprnd) { + probe = 1 + break + } + } + } + else if (op == notregexp) { + for (i = 3; i <= NF; i++) { + if ($i !~ oprnd) { + probe = 1 + break + } + } + } + else if (op == gt) { + for (i = 3; i <= NF; i++) { + if ($i > oprnd) { + probe = 1 + break + } + } + } + else if (op == ge) { + for (i = 3; i <= NF; i++) { + if ($i >= oprnd) { + probe = 1 + break + } + } + } + else if (op == eq) { + for (i = 3; i <= NF; i++) { + if ($i == oprnd) { + probe = 1 + break + } + } + } + else if (op == neq) { + for (i = 3; i <= NF; i++) { + if ($i != oprnd) { + probe = 1 + break + } + } + } + else if (op == le) { + for (i = 3; i <= NF; i++) { + if ($i <= oprnd) { + probe = 1 + break + } + } + } + else if (op == lt) { + for (i = 3; i <= NF; i++) { + if ($i < oprnd) { + probe = 1 + break + } + } + } + } + if (probe == 1) + action = yes + else + action = no + printf "probe=%d action=%d\n",probe,action >>"'$tmp/out'" + }' + +if [ -f $tmp/err ] +then + $verbose && $PCP_ECHO_PROG >&2 + $PCP_ECHO_PROG "$1: Error: `cat $tmp/err`" >&2 +elif [ -f $tmp/out ] +then + probe='' + action='' + eval `cat $tmp/out` + if $verbose + then + case $probe + in + 0) + probe_s="failure" + ;; + 1) + probe_s="success" + ;; + *) + probe_s="unknown ($probe)" + ;; + esac + case $action + in + 100) + action_s="include" + ;; + 101) + action_s="exclude" + ;; + 102) + action_s="available" + ;; + *) + action_s="unknown ($action)" + ;; + esac + $PCP_ECHO_PROG " -> probe=$probe_s action=$action_s" >&2 + fi + if [ $action = 100 -o $action = 102 ] + then + mode='n' + [ $action = 100 ] && mode='y' + delta=`sed -n <"$1" -e /'^delta[ ]/s/delta[ ]*//p'` + [ -z "$delta" ] && delta='default' + echo "#+ $1:$mode:$delta:" + else + echo "#+ $1:x::" + fi + status=0 +else + $verbose && $PCP_ECHO_PROG >&2 + $PCP_ECHO_PROG "$1: Botch: no errors and no probe results ... try verbose mode" >&2 +fi + +exit diff --git a/src/pmlogconf/pmlogconf.sh b/src/pmlogconf/pmlogconf.sh new file mode 100755 index 0000000..bdb07f9 --- /dev/null +++ b/src/pmlogconf/pmlogconf.sh @@ -0,0 +1,667 @@ +#!/bin/sh +# +# pmlogconf - generate/edit a pmlogger configuration file +# +# control lines have this format +# #+ tag:on-off:delta +# where +# tag is arbitrary (no embedded :'s) and unique +# on-off y or n to enable or disable this group, else +# x for groups excluded by probing from pmlogconf-setup +# when the group was added to the configuration file +# delta delta argument for pmlogger "logging ... on delta" clause +# +# Copyright (c) 2014 Red Hat. +# Copyright (c) 1998,2003 Silicon Graphics, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# + +# Get standard environment +. $PCP_DIR/etc/pcp.env + +status=1 +tmp=`mktemp -d /tmp/pcp.XXXXXXXXX` || exit 1 +trap "rm -rf $tmp; exit \$status" 0 1 2 3 15 +#debug# tmp=`pwd`/tmp +prog=`basename $0` + +cat > $tmp/usage << EOF +# Usage: [options] configfile + +Options: + -c add message and timestamp (not for interactive use) + -d=DIR,--groups=DIR specify path to the pmlogconf groups directory + --host + -q,--quiet quiet, suppress logging interval dialog + -r,--reprobe every group reconsidered for inclusion in configfile + -v,--verbose increase diagnostic verbosity + --help +EOF + +_usage() +{ + pmgetopt --progname=$prog --config=$tmp/usage --usage + exit +} + +quick=false +pat='' +prompt=true +reprobe=false +autocreate=false +BASE='' +HOST='' +verbose=false +setupflags='' + +ARGS=`pmgetopt --progname=$prog --config=$tmp/usage -- "$@"` +[ $? != 0 ] && exit 1 + +eval set -- "$ARGS" +while [ $# -gt 0 ] +do + case "$1" + in + -c) # automated, non-interactive file creation + autocreate=true + prompt=false + ;; + + -d) # base directory for the group files + BASE="$2" + shift + ;; + + -h) # host to contact for "probe" tests + HOST="$2" + shift + ;; + + -q) # "quick" mode, don't change logging intervals + quick=true + ;; + + -r) # reprobe + reprobe=true + ;; + + -v) # verbose + verbose=true + setupflags="$setupflags -v" + ;; + + --) # end options + shift + break + ;; + + -\?) _usage + ;; + esac + shift +done + +[ $# -eq 1 ] || _usage + +if [ -n "$BASE" -a ! -d "$BASE" ] +then + echo "$prog: Error: base directory ($BASE) for group files does not exist" + exit +fi + +config="$1" + +# split $tmp/ctl at the line containing the unprocessed tag to +# produce +# $tmp/head +# $tmp/tag - one line +# $tmp/tail +# +_split() +{ + rm -f $tmp/head $tmp/tag $tmp/tail + $PCP_AWK_PROG <$tmp/ctl ' +BEGIN { out = "'"$tmp/head"'" } +/DO NOT UPDATE THE FILE ABOVE/ { seen = 1 } +seen == 0 && /^\#\? [^:]*:[ynx]:/ { print >"'"$tmp/tag"'" + out = "'"$tmp/tail"'" + seen = 1 + next + } + { print >out }' +} + +# do all of the real iterative work +# +_update() +{ + # strip the existing pmlogger config and leave the comments + # and the control lines + # + + $PCP_AWK_PROG <$tmp/in >$tmp/ctl ' +/DO NOT UPDATE THE FILE ABOVE/ { tail = 1 } +tail == 1 { print; next } +/^\#\+ [^:]*:[ynx]:/ { sub(/\+/, "?", $1); print; skip = 1; next } +skip == 1 && /^\#----/ { skip = 0; next } +skip == 1 { next } + { print }' + + # now need to be a little smarter ... tags may have appeared or + # disappeared from the shipped defaults, so need to munge the contents + # of $tmp/ctl to reflect this + # + find $BASE -type f \ + | sed \ + -e "s;$BASE/;;" \ + -e '/^v1.0\//d' \ + | LC_COLLATE=POSIX sort \ + | while read tag + do + if sed 1q <$BASE/"$tag" | grep '^#pmlogconf-setup 2.0' >/dev/null + then + : + else + # not one of our group files, skip it ... + continue + fi + if grep "^#? $tag:" $tmp/ctl >/dev/null + then + : + else + $verbose && echo "need to add new group tag=$tag" + rm -f $tmp/pre $tmp/post + $PCP_AWK_PROG <$tmp/ctl ' +BEGIN { out = "'"$tmp/pre"'" } +/DO NOT UPDATE THE FILE ABOVE/ { out = "'"$tmp/post"'" } + { print >out }' + mv $tmp/pre $tmp/ctl + [ -z "$HOST" ] && HOST=local: + if $PCP_BINADM_DIR/pmlogconf-setup -h $HOST $setupflags $BASE/"$tag" 2>$tmp/err >$tmp/out + then + : + else + echo "$prog: Warning: $BASE/$tag: pmlogconf-setup failed" + sts=1 + fi + sed -e "s;$BASE/;;" <$tmp/out >$tmp/tmp + [ -s $tmp/err ] && cat $tmp/err + sed -e '/^#+/s/+/?/' <$tmp/tmp >>$tmp/ctl + cat $tmp/post >>$tmp/ctl + fi + done + + while true + do + _split + [ ! -s $tmp/tag ] && break + eval `sed <$tmp/tag -e 's/^#? /tag="/' -e 's/:/" onoff="/' -e 's/:/" delta="/' -e 's/:.*/"/'` + [ -z "$delta" ] && delta=default + + if $reprobe + then + [ -z "$HOST" ] && HOST=local: + if $PCP_BINADM_DIR/pmlogconf-setup -h $HOST $setupflags $BASE/"$tag" 2>$tmp/err >$tmp/out + then + : + else + echo "$prog: Warning: $BASE/$tag: pmlogconf-setup failed" + sts=1 + fi + sed -e "s;$BASE/;;" <$tmp/out >$tmp/tmp + [ -s $tmp/err ] && cat $tmp/err + if [ -s $tmp/tmp ] + then + eval `sed <$tmp/tmp -e 's/^#+ /tag_r="/' -e 's/:/" onoff_r="/' -e 's/:/" delta_r="/' -e 's/:.*/"/'` + [ -z "$delta_r" ] && delta_r=default + if [ "$tag" != "$tag_r" ] + then + echo "Botch: reprobe for $tag found new tag ${tag_r}, no change" + cat $tmp/tmp + else + if [ "$onoff" = y ] + then + # existing y takes precedence + if [ "$onoff_r" = x ] + then + echo "Warning: reprobe for $tag suggests exclude, keeping current include status" + fi + else + onoff=$onoff_r + [ "$delta" != "default" ] && delta=$delta_r + fi + fi + fi + fi + + case $onoff + in + y|n) ;; + x) # excluded group from setup + cat $tmp/head >$tmp/ctl + echo "#+ $tag:x::" >>$tmp/ctl + echo "#----" >>$tmp/ctl + cat $tmp/tail >>$tmp/ctl + continue + ;; + *) echo "Warning: tag=$tag onoff is illegal ($onoff) ... setting to \"n\"" + onoff=n + ;; + esac + + if [ -f $BASE/$tag ] + then + eval `$PCP_AWK_PROG <$BASE/$tag ' +BEGIN { desc = ""; metrics = "" } +$1 == "ident" { if (desc != "") desc = desc "\n" + for (i = 2; i <= NF; i++) { + if (i == 2) desc = desc $2 + else desc = desc " " $i + } + next + } +END { printf "desc='"'"'%s'"'"'\n",desc }'` + + sed -n <$BASE/$tag >$tmp/metrics \ + -e '/^[ ]/s/[ ]*//p' + #debug# echo $tag: + #debug# echo "desc: $desc" + else + case "$tag" + in + v1.0/*) + # from migration, silently do nothing + ;; + *) + echo "Warning: cannot find group file ($tag) ... no change is possible" + ;; + esac + $PCP_AWK_PROG <"$config" >>$tmp/head ' +BEGIN { tag="'"$tag"'" } +$1 == "#+" && $2 ~ tag { want = 1 } +want == 1 { print } +want == 1 && /^#----/ { exit }' + cat $tmp/head $tmp/tail >$tmp/ctl + continue + fi + + if [ ! -z "$pat" ] + then + if echo "$desc" | grep "$pat" >/dev/null + then + pat='' + prompt=true + fi + if grep "$pat" $tmp/metrics >/dev/null + then + pat='' + prompt=true + fi + fi + if $prompt + then + # prompt for answers + # + echo + was_onoff=$onoff + echo "Group: $desc" | fmt -74 | sed -e '1!s/^/ /' + while true + do + $PCP_ECHO_PROG $PCP_ECHO_N "Log this group? [$onoff] ""$PCP_ECHO_C" + read ans + if [ "$ans" = "?" ] + then + echo 'Valid responses are: +m report the names of the metrics in this group +n do not log this group +q quit; no change for this or any of the following groups +y log this group +/pattern no change for this group and search for a group containing pattern + in the description or the metrics associated with the group' + continue + fi + if [ "$ans" = m ] + then + echo "Metrics in this group ($tag):" + sed -e 's/^/ /' $tmp/metrics + continue + fi + if [ "$ans" = q ] + then + # quit ... + ans="$onoff" + prompt=false + fi + pat=`echo "$ans" | sed -n 's/^\///p'` + if [ ! -z "$pat" ] + then + echo "Searching for \"$pat\"" + ans="$onoff" + prompt=false + fi + [ -z "$ans" ] && ans="$onoff" + [ "$ans" = y -o "$ans" = n ] && break + echo "Error: you must answer \"m\" or \"n\" or \"q\" or \"y\" or \"/pattern\" ... try again" + done + onoff="$ans" + if [ $prompt = true -a "$onoff" = y ] + then + if $quick + then + if [ $was_onoff = y ] + then + # no change, be quiet + : + else + echo "Logging interval: $delta" + fi + else + while true + do + $PCP_ECHO_PROG $PCP_ECHO_N "Logging interval? [$delta] ""$PCP_ECHO_C" + read ans + if [ -z "$ans" ] + then + # use suggested value, assume this is good + # + ans="$delta" + break + else + # do some sanity checking ... + # + ok=`echo "$ans" \ + | sed -e 's/^every //' \ + | $PCP_AWK_PROG ' +/^once$/ { print "true"; exit } +/^default$/ { print "true"; exit } +/^[0-9][0-9]* *msec$/ { print "true"; exit } +/^[0-9][0-9]* *msecs$/ { print "true"; exit } +/^[0-9][0-9]* *millisecond$/ { print "true"; exit } +/^[0-9][0-9]* *milliseconds$/ { print "true"; exit } +/^[0-9][0-9]* *sec$/ { print "true"; exit } +/^[0-9][0-9]* *secs$/ { print "true"; exit } +/^[0-9][0-9]* *second$/ { print "true"; exit } +/^[0-9][0-9]* *seconds$/ { print "true"; exit } +/^[0-9][0-9]* *min$/ { print "true"; exit } +/^[0-9][0-9]* *mins$/ { print "true"; exit } +/^[0-9][0-9]* *minute$/ { print "true"; exit } +/^[0-9][0-9]* *minutes$/ { print "true"; exit } +/^[0-9][0-9]* *hour$/ { print "true"; exit } +/^[0-9][0-9]* *hours$/ { print "true"; exit } + { print "false"; exit }'` + if $ok + then + delta="$ans" + break + else + + echo "Error: logging interval must be of the form \"once\" or \"default\" or" + echo "\"<integer> <scale>\", where <scale> is one of \"sec\", \"secs\", \"min\"," + echo "\"mins\", etc ... try again" + fi + fi + done + fi + fi + else + $PCP_ECHO_PROG $PCP_ECHO_N ".""$PCP_ECHO_C" + fi + + echo "#+ $tag:$onoff:$delta:" >>$tmp/head + echo "$desc" | fmt | sed -e 's/^/## /' >>$tmp/head + if [ "$onoff" = y ] + then + if [ -s $tmp/metrics ] + then + echo "log advisory on $delta {" >>$tmp/head + sed -e 's/^/ /' <$tmp/metrics >>$tmp/head + echo "}" >>$tmp/head + fi + fi + echo "#----" >>$tmp/head + cat $tmp/head $tmp/tail >$tmp/ctl + + done +} + +if [ ! -f "$config" ] +then + # create a new config file + # + touch "$config" + if [ ! -f "$config" ] + then + echo "$prog: Error: config file \"$config\" does not exist and cannot be created" + exit + fi + + $PCP_ECHO_PROG "Creating config file \"$config\" using default settings ..." + prompt=false + new=true + [ -z "$HOST" ] && HOST=local: + [ -z "$BASE" ] && BASE=$PCP_VAR_DIR/config/pmlogconf + + cat <<End-of-File >$tmp/in +#pmlogconf 2.0 +# +# pmlogger(1) config file created and updated by pmlogconf +End-of-File + $autocreate && echo "# Auto-generated by pmlogconf on: "`date` >>$tmp/in + cat <<End-of-File >>$tmp/in +# +# DO NOT UPDATE THE INITIAL SECTION OF THIS FILE. +# Any changes may be lost the next time pmlogconf is used +# on this file. +# +#+ groupdir $BASE +# +End-of-File + + find $BASE -type f \ + | sed \ + -e '/\/v1.0\//d' \ + | LC_COLLATE=POSIX sort \ + | while read tag + do + if sed 1q <"$tag" | grep '^#pmlogconf-setup 2.0' >/dev/null + then + : + else + # not one of our group files, skip it ... + continue + fi + if $PCP_BINADM_DIR/pmlogconf-setup -h $HOST $setupflags "$tag" 2>$tmp/err >$tmp/out + then + : + else + echo "$prog: Warning: $BASE/$tag: pmlogconf-setup failed" + [ -s $tmp/err ] && cat $tmp/err + sts=1 + fi + sed -e "s;$BASE/;;" <$tmp/out >>$tmp/in + [ -s $tmp/err ] && cat $tmp/err + done + + cat <<End-of-File >>$tmp/in + +# DO NOT UPDATE THE FILE ABOVE THIS LINE +# Otherwise any changes may be lost the next time pmlogconf is +# used on this file. +# +# It is safe to make additions from here on ... +# + +[access] +disallow .* : all; +disallow :* : all; +allow local:* : enquire; +End-of-File + +else + # updating an existing config file + # + new=false + magic=`sed 1q "$config"` + if echo "$magic" | grep "^#pmlogconf" >/dev/null + then + version=`echo $magic | sed -e "s/^#pmlogconf//" -e 's/^ *//'` + if [ "$version" = "1.0" ] + then + echo "$prog: migrating \"$config\" from version 1.0 to 2.0 ..." + [ -z "$BASE" ] && BASE=$PCP_VAR_DIR/config/pmlogconf + sed <"$config" >$tmp/in \ + -e '1s/1\.0/2.0/' \ + -e "/# on this file./a\\ +#\\ +#+ groupdir $BASE" \ + -e '/^#\+/{ +s; C0:; cpu/summary:; +s; C1:; cpu/percpu:; +s; C2:; v1.0/C2:; +s; C3:; v1.0/C3:; +s; D0:; disk/summary:; +s; D1:; disk/percontroller:; +s; D2:; disk/perdisk:; +s; D3:; v1.0/D3:; +s; F0:; filesystem/all:; +s; F1:; filesystem/xfs-io-irix:; +s; F2:; filesystem/xfs-all:; +s; F3:; sgi/xlv-activity:; +s; F4:; sgi/xlv-stripe-io:; +s; F5:; sgi/efs:; +s; F6:; sgi/xvm-ops:; +s; F7:; sgi/xvm-stats:; +s; F8:; sgi/xvm-all:; +s; H0:; sgi/craylink:; +s; H1:; sgi/hub:; +s; H2:; sgi/cpu-evctr:; +s; H3:; sgi/xbow:; +s; I0:; platform/hinv:; +s; K0:; v1.0/K0:; +s; K1:; kernel/syscalls-irix:; +s; K2:; kernel/syscalls-percpu-irix:; +s; K3:; kernel/read-write-data:; +s; K4:; kernel/interrupts-irix:; +s; K5:; kernel/bufcache-activity:; +s; K6:; kernel/bufcache-all:; +s; K7:; kernel/vnodes:; +s; K8:; kernel/inode-cache:; +s; K9:; sgi/kaio:; +s; Ka:; kernel/queues-irix:; +s; M0:; memory/swap-activity:; +s; M1:; memory/tlb-irix:; +s; M2:; kernel/memory-irix:; +s; M3:; memory/swap-all:; +s; M4:; memory/swap-config:; +s; M5:; sgi/node-memory:; +s; M6:; sgi/numa:; +s; M7:; sgi/numa-summary:; +s; N0:; networking/interface-summary:; +s; N1:; networking/interface-all:; +s; N2:; networking/tcp-activity-irix:; +s; N3:; networking/tcp-all:; +s; N4:; networking/udp-packets-irix:; +s; N5:; networking/udp-all:; +s; N6:; networking/socket-irix:; +s; N7:; networking/other-protocols:; +s; N8:; networking/mbufs:; +s; N9:; networking/multicast:; +s; Na:; networking/streams:; +s; S0:; v1.0/S0:; +s; S1:; v1.0/S1:; +s; S2:; networking/rpc:; +}' + reprobe=true + elif [ "$version" = "2.0" ] + then + # start with existing config file + # + cp "$config" $tmp/in + else + echo "$prog: Error: existing config file \"$config\" is wrong version ($version)" + exit + fi + else + echo "$prog: Error: existing \"$config\" is not a $prog control file" + exit + fi + if [ ! -w "$config" ] + then + echo "$prog: Error: existing config file \"$config\" is not writeable" + exit + fi + + [ -n "$HOST" ] && echo "$prog: Warning: existing config file, -h $HOST will be ignored" + + CBASE=`sed -n -e '/^#+ groupdir /s///p' <$tmp/in` + if [ -z "$BASE" ] + then + BASE="$CBASE" + else + if [ "$BASE" != "$CBASE" ] + then + echo "$prog: Warning: using base directory for group files from command line ($BASE) which is different from that in $config ($CBASE)" + fi + fi +fi + +while true +do + _update + + [ -z "$pat" ] && break + + echo " not found." + while true + do + $PCP_ECHO_PROG $PCP_ECHO_N "Continue searching from start of the file? [y] ""$PCP_ECHO_C" + read ans + [ -z "$ans" ] && ans=y + [ "$ans" = y -o "$ans" = n ] && break + echo "Error: you must answer \"y\" or \"n\" ... try again" + done + mv $tmp/ctl $tmp/in + if [ "$ans" = n ] + then + pat='' + prompt=true + else + echo "Searching for \"$pat\"" + fi +done + +if $new +then + echo + cp $tmp/ctl "$config" +else + echo + if diff "$config" $tmp/ctl >/dev/null + then + echo "No changes" + else + echo "Differences ..." + ${DIFF-diff} -c "$config" $tmp/ctl + while true + do + $PCP_ECHO_PROG $PCP_ECHO_N "Keep changes? [y] ""$PCP_ECHO_C" + read ans + [ -z "$ans" ] && ans=y + [ "$ans" = y -o "$ans" = n ] && break + echo "Error: you must answer \"y\" or \"n\" ... try again" + done + [ "$ans" = y ] && cp $tmp/ctl "$config" + fi +fi + +status=0 +exit diff --git a/src/pmlogconf/sgi/cpu-evctr b/src/pmlogconf/sgi/cpu-evctr new file mode 100644 index 0000000..88e3978 --- /dev/null +++ b/src/pmlogconf/sgi/cpu-evctr @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident global CPU hardware event counters (enable first with ecadmin(1)) +probe hw.r10kevctr.state + hw.r10kevctr diff --git a/src/pmlogconf/sgi/craylink b/src/pmlogconf/sgi/craylink new file mode 100644 index 0000000..99ca3e5 --- /dev/null +++ b/src/pmlogconf/sgi/craylink @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident CrayLink routers +probe hw.router.rev_id + hw.router diff --git a/src/pmlogconf/sgi/efs b/src/pmlogconf/sgi/efs new file mode 100644 index 0000000..858fd03 --- /dev/null +++ b/src/pmlogconf/sgi/efs @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident EFS activity +probe efs.attempts + efs diff --git a/src/pmlogconf/sgi/hub b/src/pmlogconf/sgi/hub new file mode 100644 index 0000000..62ddb71 --- /dev/null +++ b/src/pmlogconf/sgi/hub @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident Origin hubs +probe hw.hub.nasid + hw.hub diff --git a/src/pmlogconf/sgi/kaio b/src/pmlogconf/sgi/kaio new file mode 100644 index 0000000..f5ea49b --- /dev/null +++ b/src/pmlogconf/sgi/kaio @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident asynchronous I/O activity +probe kaio.reads + kaio diff --git a/src/pmlogconf/sgi/localdefs b/src/pmlogconf/sgi/localdefs new file mode 100644 index 0000000..27d97fe --- /dev/null +++ b/src/pmlogconf/sgi/localdefs @@ -0,0 +1 @@ +FILES = cpu-evctr xbow hub craylink node-memory numa numa-summary xvm-ops xvm-stats xvm-all kaio efs xlv-activity xlv-stripe-io diff --git a/src/pmlogconf/sgi/node-memory b/src/pmlogconf/sgi/node-memory new file mode 100644 index 0000000..fdbd0f0 --- /dev/null +++ b/src/pmlogconf/sgi/node-memory @@ -0,0 +1,5 @@ +#pmlogconf-setup 2.0 +ident "large" page and Origin node-based allocations and activity +probe mem.lpage.enabled + mem.lpage + origin.node diff --git a/src/pmlogconf/sgi/numa b/src/pmlogconf/sgi/numa new file mode 100644 index 0000000..d4d2163 --- /dev/null +++ b/src/pmlogconf/sgi/numa @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident all NUMA stats +probe origin.numa.routerload + origin.numa diff --git a/src/pmlogconf/sgi/numa-summary b/src/pmlogconf/sgi/numa-summary new file mode 100644 index 0000000..0d8d711 --- /dev/null +++ b/src/pmlogconf/sgi/numa-summary @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident NUMA migration stats +probe origin.numa.migr.intr.total + origin.numa.migr.intr.total diff --git a/src/pmlogconf/sgi/xbow b/src/pmlogconf/sgi/xbow new file mode 100644 index 0000000..ff1ee3f --- /dev/null +++ b/src/pmlogconf/sgi/xbow @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident XBOW activity +probe xbow.nports + xbow diff --git a/src/pmlogconf/sgi/xlv-activity b/src/pmlogconf/sgi/xlv-activity new file mode 100644 index 0000000..dda08ec --- /dev/null +++ b/src/pmlogconf/sgi/xlv-activity @@ -0,0 +1,7 @@ +#pmlogconf-setup 2.0 +ident XLV operations and bytes per volume +probe xlv.read + xlv.read + xlv.write + xlv.read_bytes + xlv.write_bytes diff --git a/src/pmlogconf/sgi/xlv-stripe-io b/src/pmlogconf/sgi/xlv-stripe-io new file mode 100644 index 0000000..255c369 --- /dev/null +++ b/src/pmlogconf/sgi/xlv-stripe-io @@ -0,0 +1,8 @@ +#pmlogconf-setup 2.0 +ident XLV striped volume stats +probe xlv.stripe_ops + xlv.stripe_ops + xlv.stripe_units + xlv.aligned + xlv.unaligned + xlv.largest_io diff --git a/src/pmlogconf/sgi/xvm-all b/src/pmlogconf/sgi/xvm-all new file mode 100644 index 0000000..e207066 --- /dev/null +++ b/src/pmlogconf/sgi/xvm-all @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident all available XVM data +probe hinv.xvm.nvolumes + xvm diff --git a/src/pmlogconf/sgi/xvm-ops b/src/pmlogconf/sgi/xvm-ops new file mode 100644 index 0000000..9d001e1 --- /dev/null +++ b/src/pmlogconf/sgi/xvm-ops @@ -0,0 +1,7 @@ +#pmlogconf-setup 2.0 +ident XVM operations and bytes per volume +probe hinv.xvm.nvolumes + xvm.ve.read + xvm.ve.write + xvm.ve.read_bytes + xvm.ve.write_bytes diff --git a/src/pmlogconf/sgi/xvm-stats b/src/pmlogconf/sgi/xvm-stats new file mode 100644 index 0000000..47468da --- /dev/null +++ b/src/pmlogconf/sgi/xvm-stats @@ -0,0 +1,6 @@ +#pmlogconf-setup 2.0 +ident XVM stripe, mirror and concat volume stats +probe hinv.xvm.nvolumes + xvm.ve.concat + xvm.ve.mirror + xvm.ve.stripe diff --git a/src/pmlogconf/sqlserver/localdefs b/src/pmlogconf/sqlserver/localdefs new file mode 100644 index 0000000..f1f1c80 --- /dev/null +++ b/src/pmlogconf/sqlserver/localdefs @@ -0,0 +1 @@ +FILES = summary diff --git a/src/pmlogconf/sqlserver/summary b/src/pmlogconf/sqlserver/summary new file mode 100644 index 0000000..1e28cd6 --- /dev/null +++ b/src/pmlogconf/sqlserver/summary @@ -0,0 +1,24 @@ +#pmlogconf-setup 2.0 +ident SQLServer summary +probe sqlserver.locks + sqlserver.access + sqlserver.buf_mgr + sqlserver.mem_mgr + sqlserver.locks + sqlserver.connections + sqlserver.sql.batch_requests + sqlserver.sql.compilations + sqlserver.sql.re_compilations + sqlserver.databases.all.transactions + sqlserver.databases.all.active_transactions + sqlserver.databases.all.data_file_size + sqlserver.databases.all.log_file_size + sqlserver.databases.all.log_file_used + sqlserver.databases.db.transactions + sqlserver.databases.db.active_transactions + sqlserver.databases.db.data_file_size + sqlserver.databases.db.log_file_size + sqlserver.databases.db.log_file_used + sqlserver.latches.waits + sqlserver.latches.wait_time + sqlserver.latches.avg_wait_time diff --git a/src/pmlogconf/tools/atop b/src/pmlogconf/tools/atop new file mode 100644 index 0000000..5d7ed8d --- /dev/null +++ b/src/pmlogconf/tools/atop @@ -0,0 +1,67 @@ +#pmlogconf-setup 2.0 +ident metrics used by the atop command +probe kernel.uname.sysname ~ Linux ? include : exclude + + disk.dev.avactive + disk.dev.read + disk.dev.read_bytes + disk.dev.total + disk.dev.write + disk.partitions.blkread + disk.partitions.blkwrite + disk.partitions.read + disk.partitions.write + kernel.all.cpu.idle + kernel.all.cpu.irq.hard + kernel.all.cpu.irq.soft + kernel.all.cpu.sys + kernel.all.cpu.user + kernel.all.cpu.wait.total + kernel.all.intr + kernel.all.load + kernel.all.nprocs + kernel.all.pswitch + kernel.all.uptime + kernel.percpu.cpu.idle + kernel.percpu.cpu.irq.hard + kernel.percpu.cpu.irq.soft + kernel.percpu.cpu.sys + kernel.percpu.cpu.user + kernel.percpu.cpu.wait.total + kernel.percpu.interrupts + mem.freemem + mem.util.bufmem + mem.util.cached + mem.util.commitLimit + mem.util.committed_AS + mem.util.shmem + mem.util.slab + mem.util.swapFree + mem.util.swapTotal + mem.vmstat.allocstall + mem.vmstat.pginodesteal + mem.vmstat.pswpin + mem.vmstat.pswpout + mem.vmstat.slabs_scanned + network.icmp.inmsgs + network.icmp.outmsgs + network.interface.in.bytes + network.interface.in.errors + network.interface.in.packets + network.interface.out.bytes + network.interface.out.errors + network.interface.out.packets + network.ip.forwdatagrams + network.ip.indelivers + network.ip.inreceives + network.ip.outrequests + network.tcp.activeopens + network.tcp.insegs + network.tcp.outsegs + network.tcp.passiveopens + network.udp.indatagrams + network.udp.outdatagrams + proc.nprocs + proc.runq.blocked + proc.runq.defunct + proc.runq.sleeping diff --git a/src/pmlogconf/tools/atop-proc b/src/pmlogconf/tools/atop-proc new file mode 100644 index 0000000..c886cde --- /dev/null +++ b/src/pmlogconf/tools/atop-proc @@ -0,0 +1,21 @@ +#pmlogconf-setup 2.0 +ident per-process metrics used by the atop command +force available +delta 120 seconds + + proc.id.uid_nm + proc.memory.datrss + proc.memory.librss + proc.memory.textrss + proc.memory.vmstack + proc.psinfo.cmd + proc.psinfo.maj_flt + proc.psinfo.minflt + proc.psinfo.pid + proc.psinfo.rss + proc.psinfo.sname + proc.psinfo.stime + proc.psinfo.utime + proc.psinfo.vsize + proc.psinfo.nswap + proc.psinfo.threads diff --git a/src/pmlogconf/tools/atop-summary b/src/pmlogconf/tools/atop-summary new file mode 100644 index 0000000..25e5501 --- /dev/null +++ b/src/pmlogconf/tools/atop-summary @@ -0,0 +1,7 @@ +#pmlogconf-setup 2.0 +ident metrics sampled once by the atop command +probe kernel.uname.sysname ~ Linux ? include : exclude +delta once + hinv.cpu.clock + hinv.ncpu + mem.physmem diff --git a/src/pmlogconf/tools/collectl b/src/pmlogconf/tools/collectl new file mode 100644 index 0000000..a8a9b3e --- /dev/null +++ b/src/pmlogconf/tools/collectl @@ -0,0 +1,75 @@ +#pmlogconf-setup 2.0 +ident metrics used by the collectl command +probe kernel.uname.sysname ~ Linux ? include : exclude + + disk.all.read + disk.all.read_bytes + disk.all.read_merge + disk.all.write + disk.all.write_bytes + disk.all.write_merge + disk.dev.blkread + disk.dev.blkwrite + disk.dev.read + disk.dev.read_bytes + disk.dev.read_merge + disk.dev.write + disk.dev.write_bytes + disk.dev.write_merge + hinv.ncpu + kernel.all.cpu.idle + kernel.all.cpu.intr + kernel.all.cpu.irq.hard + kernel.all.cpu.irq.soft + kernel.all.cpu.nice + kernel.all.cpu.steal + kernel.all.cpu.sys + kernel.all.cpu.user + kernel.all.cpu.wait.total + kernel.all.intr + kernel.all.load + kernel.all.nprocs + kernel.all.pswitch + kernel.all.runnable + kernel.percpu.cpu.idle + kernel.percpu.cpu.intr + kernel.percpu.cpu.irq.hard + kernel.percpu.cpu.irq.soft + kernel.percpu.cpu.nice + kernel.percpu.cpu.steal + kernel.percpu.cpu.sys + kernel.percpu.cpu.user + kernel.percpu.cpu.wait.total + kernel.percpu.interrupts + mem.freemem + mem.physmem + mem.util.anonpages + mem.util.bufmem + mem.util.cached + mem.util.committed_AS + mem.util.inactive + mem.util.mapped + mem.util.mlocked + mem.util.slab + mem.util.swapTotal + mem.util.used + mem.vmstat.pgfault + mem.vmstat.pgmajfault + mem.vmstat.pgpgin + mem.vmstat.pgpgout + network.interface.in.bytes + network.interface.in.compressed + network.interface.in.errors + network.interface.in.mcasts + network.interface.in.packets + network.interface.out.bytes + network.interface.out.errors + network.interface.out.packets + network.interface.total.mcasts + proc.runq.blocked + proc.runq.runnable + swap.free + swap.pagesin + swap.pagesout + swap.used + diff --git a/src/pmlogconf/tools/collectl-summary b/src/pmlogconf/tools/collectl-summary new file mode 100644 index 0000000..e03b9ac --- /dev/null +++ b/src/pmlogconf/tools/collectl-summary @@ -0,0 +1,6 @@ +#pmlogconf-setup 2.0 +ident metrics sampled once by the collectl command +probe kernel.uname.sysname ~ Linux ? include : exclude +delta once + hinv.ncpu + mem.physmem diff --git a/src/pmlogconf/tools/dmcache b/src/pmlogconf/tools/dmcache new file mode 100644 index 0000000..e463bd5 --- /dev/null +++ b/src/pmlogconf/tools/dmcache @@ -0,0 +1,13 @@ +#pmlogconf-setup 2.0 +ident metrics used by the pcp-dmcache(1) command +probe dmcache.cache.used + disk.dm.read + disk.dm.write + dmcache.cache.used + dmcache.cache.total + dmcache.metadata.used + dmcache.metadata.total + dmcache.read_hits + dmcache.read_misses + dmcache.write_hits + dmcache.write_misses diff --git a/src/pmlogconf/tools/free b/src/pmlogconf/tools/free new file mode 100644 index 0000000..7cd62e2 --- /dev/null +++ b/src/pmlogconf/tools/free @@ -0,0 +1,13 @@ +#pmlogconf-setup 2.0 +ident metrics used by the pcp-free(1) command +probe kernel.uname.sysname ~ Linux ? include : exclude + mem.util.free + mem.util.shared + mem.util.bufmem + mem.util.cached + mem.util.highFree + mem.util.highTotal + mem.util.lowFree + mem.util.lowTotal + mem.util.swapFree + mem.util.swapTotal diff --git a/src/pmlogconf/tools/free-summary b/src/pmlogconf/tools/free-summary new file mode 100644 index 0000000..e54af98 --- /dev/null +++ b/src/pmlogconf/tools/free-summary @@ -0,0 +1,5 @@ +#pmlogconf-setup 2.0 +ident metrics sampled once by the pcp-free(1) command +probe kernel.uname.sysname ~ Linux ? include : exclude +delta once + mem.physmem diff --git a/src/pmlogconf/tools/iostat b/src/pmlogconf/tools/iostat new file mode 100644 index 0000000..ae7f6e1 --- /dev/null +++ b/src/pmlogconf/tools/iostat @@ -0,0 +1,68 @@ +#pmlogconf-setup 2.0 +ident metrics used by the iostat(1) command +probe kernel.uname.sysname ~ Linux ? include : exclude + +# -d -------------------------------------------------- + +# Device: +# tps +# kB_read/s +# kB_wrtn/s + disk.dev.read_bytes # kB_read + disk.dm.read_bytes + disk.dev.write_bytes # kB_wrtn + disk.dm.write_bytes + +# -h -------------------------------------------------- + + kernel.all.cpu.user # %user + kernel.all.cpu.nice # %nice + kernel.all.cpu.sys # %system + kernel.all.cpu.wait.total # %iowait + kernel.all.cpu.steal # %steal + kernel.all.cpu.idle # %idle + +# -x -------------------------------------------------- + + disk.all.read # total: Total reads completed successfully + disk.all.read_merge # merged: grouped reads (resulting in one I/O) + disk.all.blkread # sectors: Sectors read successfully + disk.all.read_rawactive # ms: milliseconds spent reading + disk.all.write # total: Total writes completed successfully + disk.all.write_merge # merged: grouped writes (resulting in one I/O) + disk.all.blkwrite # sectors: Sectors written successfully + disk.all.write_rawactive # ms: milliseconds spent writing + disk.all.avactive # s: seconds spent for I/O + + disk.dev.read # total: Total reads completed successfully + disk.dm.read + disk.dev.read_merge # merged: grouped reads (resulting in one I/O) + disk.dm.read_merge + disk.dev.blkread # sectors: Sectors read successfully + disk.dm.blkread + disk.dev.read_rawactive # ms: milliseconds spent reading + disk.dm.read_rawactive + disk.dev.write # total: Total writes completed successfully + disk.dm.write + disk.dev.write_merge # merged: grouped writes (resulting in one I/O) + disk.dm.write_merge + disk.dev.blkwrite # sectors: Sectors written successfully + disk.dm.blkwrite + disk.dev.write_rawactive # ms: milliseconds spent writing + disk.dm.write_rawactive + + disk.all.read_merge # rrqm/s + disk.all.write_merge # wrqm/s + disk.all.read # r/s + disk.all.write # w/s + disk.all.read_bytes # rkB/s + disk.all.write_bytes # wkB/s + # avgqu-sz + # - avgrq-sz + disk.dev.avactive # await + disk.dm.avactive + disk.all.read_rawactive # r_await + disk.all.write_rawactive # w_await + # - svctm + # - %util (r/s + w/s) * (svctm / 1000) + diff --git a/src/pmlogconf/tools/ip b/src/pmlogconf/tools/ip new file mode 100644 index 0000000..4075db8 --- /dev/null +++ b/src/pmlogconf/tools/ip @@ -0,0 +1,21 @@ +#pmlogconf-setup 2.0 +ident metrics used by the ip(1) command +probe kernel.uname.sysname ~ Linux ? include : exclude + +# -s link ------------------------------------------------- + + network.interface.mtu + network.interface.out.bytes + network.interface.out.packets + network.interface.out.errors + network.interface.out.drops + network.interface.out.fifo + network.interface.out.carrier + network.interface.collisions + network.interface.in.bytes + network.interface.in.packets + network.interface.in.errors + network.interface.in.drops + network.interface.in.fifo + network.interface.total.mcasts + diff --git a/src/pmlogconf/tools/localdefs b/src/pmlogconf/tools/localdefs new file mode 100644 index 0000000..9d693e0 --- /dev/null +++ b/src/pmlogconf/tools/localdefs @@ -0,0 +1,23 @@ +FILES = \ + atop \ + atop-proc \ + atop-summary \ + collectl \ + collectl-summary \ + dmcache \ + free \ + free-summary \ + iostat \ + ip \ + mpstat \ + numastat \ + pcp-summary \ + pmclient \ + pmclient-summary \ + pmstat \ + sar \ + sar-summary \ + uptime \ + vmstat \ + vmstat-summary \ +# END diff --git a/src/pmlogconf/tools/mpstat b/src/pmlogconf/tools/mpstat new file mode 100644 index 0000000..0578021 --- /dev/null +++ b/src/pmlogconf/tools/mpstat @@ -0,0 +1,29 @@ +#pmlogconf-setup 2.0 +ident metrics used by the mpstat(1) command +probe kernel.uname.sysname ~ Linux ? include : exclude + +# -I ------------------------------------------------- + + kernel.percpu.interrupts + +# -u -------------------------------------------------- + + kernel.all.cpu.user # %usr + kernel.percpu.cpu.user + kernel.all.cpu.nice # %nice + kernel.percpu.cpu.nice + kernel.all.cpu.sys # %sys + kernel.percpu.cpu.sys + kernel.all.cpu.wait.total # %iowait + kernel.percpu.cpu.wait.total + kernel.all.cpu.intr # %irq + kernel.percpu.cpu.intr + kernel.all.cpu.irq.soft # %soft + kernel.percpu.cpu.irq.soft + kernel.all.cpu.steal # %steal + kernel.percpu.cpu.steal + kernel.all.cpu.guest # %guest + kernel.percpu.cpu.guest + kernel.all.cpu.idle # %idle + kernel.percpu.cpu.idle + diff --git a/src/pmlogconf/tools/numastat b/src/pmlogconf/tools/numastat new file mode 100644 index 0000000..b8ddde3 --- /dev/null +++ b/src/pmlogconf/tools/numastat @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident metrics used by the pcp-numastat(1) command +probe kernel.uname.sysname ~ Linux ? include : exclude + mem.numa.alloc diff --git a/src/pmlogconf/tools/pcp-summary b/src/pmlogconf/tools/pcp-summary new file mode 100644 index 0000000..240d92b --- /dev/null +++ b/src/pmlogconf/tools/pcp-summary @@ -0,0 +1,17 @@ +#pmlogconf-setup 2.0 +ident metrics used by the pcp(1) command +force include +delta once + hinv.ncpu + hinv.ndisk + hinv.nnode + hinv.physmem + pmda.uname + pmcd.numagents + pmcd.numclients + pmcd.services + pmcd.version + pmcd.build + pmcd.agent.status + pmcd.pmlogger + pmcd.pmie diff --git a/src/pmlogconf/tools/pmclient b/src/pmlogconf/tools/pmclient new file mode 100644 index 0000000..742a50b --- /dev/null +++ b/src/pmlogconf/tools/pmclient @@ -0,0 +1,9 @@ +#pmlogconf-setup 2.0 +ident metrics sampled frequently by the pmclient(1) command +force available +delta 5 second + kernel.all.load [ 1 15 ] + kernel.percpu.cpu.user + kernel.percpu.cpu.sys + mem.freemem + disk.all.total diff --git a/src/pmlogconf/tools/pmclient-summary b/src/pmlogconf/tools/pmclient-summary new file mode 100644 index 0000000..04fd7f4 --- /dev/null +++ b/src/pmlogconf/tools/pmclient-summary @@ -0,0 +1,5 @@ +#pmlogconf-setup 2.0 +ident metrics sampled once by the pmclient(1) command +force available +delta once + hinv.ncpu diff --git a/src/pmlogconf/tools/pmstat b/src/pmlogconf/tools/pmstat new file mode 100644 index 0000000..49ff445 --- /dev/null +++ b/src/pmlogconf/tools/pmstat @@ -0,0 +1,17 @@ +#pmlogconf-setup 2.0 +ident metrics used by the pmstat(1) command +force include + kernel.all.load + swap.used + mem.util.free + mem.util.bufmem + mem.util.cached + swap.in + swap.pagesin + swap.out + swap.pagesout + disk.all.blkread + disk.all.blkwrite + kernel.all.intr + kernel.all.pswitch + kernel.all.cpu diff --git a/src/pmlogconf/tools/sar b/src/pmlogconf/tools/sar new file mode 100644 index 0000000..3518139 --- /dev/null +++ b/src/pmlogconf/tools/sar @@ -0,0 +1,64 @@ +#pmlogconf-setup 2.0 +ident metrics used by the sar(1) command +probe kernel.uname.sysname ~ Linux ? include : exclude + + disk.all.read + disk.all.read_bytes + disk.all.total + disk.all.total_bytes + disk.all.write + disk.all.write_bytes + disk.dev.avactive + #disk.dev.avqsz + #disk.dev.avrqsz + #disk.dev.await + disk.dev.read_bytes + #disk.dev.svctm + disk.dev.total + disk.dev.total_bytes + disk.dev.write_bytes + kernel.all.cpu.guest + kernel.all.cpu.idle + kernel.all.cpu.intr + kernel.all.cpu.nice + kernel.all.cpu.steal + kernel.all.cpu.sys + kernel.all.cpu.user + kernel.all.cpu.wait.total + kernel.all.intr + kernel.all.load + kernel.all.pswitch + kernel.percpu.cpu.guest + kernel.percpu.cpu.idle + kernel.percpu.cpu.intr + kernel.percpu.cpu.nice + kernel.percpu.cpu.steal + kernel.percpu.cpu.sys + kernel.percpu.cpu.user + kernel.percpu.cpu.wait.total + mem.vmstat.pgfault + mem.vmstat.pgfree + mem.vmstat.pgmajfault + mem.vmstat.pgpgin + mem.vmstat.pgpgout + mem.util + network.interface.collisions + network.interface.in.bytes + network.interface.in.drops + network.interface.in.errors + network.interface.in.fifo + network.interface.in.frame + network.interface.in.packets + network.interface.out.bytes + network.interface.out.carrier + network.interface.out.drops + network.interface.out.errors + network.interface.out.fifo + network.interface.out.packets + proc.nprocs + proc.runq.runnable + swap.pagesin + swap.pagesout + vfs.dentry.count + vfs.files.count + vfs.inodes.count diff --git a/src/pmlogconf/tools/sar-summary b/src/pmlogconf/tools/sar-summary new file mode 100644 index 0000000..3a4af57 --- /dev/null +++ b/src/pmlogconf/tools/sar-summary @@ -0,0 +1,5 @@ +#pmlogconf-setup 2.0 +ident metrics sampled once by the sar(1) command +probe kernel.uname.sysname ~ Linux ? include : exclude +delta once + hinv.ncpu diff --git a/src/pmlogconf/tools/uptime b/src/pmlogconf/tools/uptime new file mode 100644 index 0000000..4448a17 --- /dev/null +++ b/src/pmlogconf/tools/uptime @@ -0,0 +1,6 @@ +#pmlogconf-setup 2.0 +ident metrics used by the pcp-uptime(1) command +force include + kernel.all.load + kernel.all.nusers + kernel.all.uptime diff --git a/src/pmlogconf/tools/vmstat b/src/pmlogconf/tools/vmstat new file mode 100644 index 0000000..eed11fc --- /dev/null +++ b/src/pmlogconf/tools/vmstat @@ -0,0 +1,90 @@ +#pmlogconf-setup 2.0 +ident metrics used by the vmstat(1) command +probe kernel.uname.sysname ~ Linux ? include : exclude + +# -s -------------------------------------------------- + + mem.util.active # K active memory + mem.util.inactive # K inactive memory + mem.freemem # K free memory + mem.util.bufmem # K buffer memory + mem.util.cached # K swap cache + mem.util.swapTotal # K total swap + #- K used swap + mem.util.swapFree # K free swap + kernel.all.cpu.user # non-nice user cpu ticks + kernel.all.cpu.nice # nice user cpu ticks + kernel.all.cpu.sys # system cpu ticks + kernel.all.cpu.idle # idle cpu ticks + kernel.all.cpu.wait.total # IO-wait cpu ticks + kernel.all.cpu.irq.hard # IRQ cpu ticks + kernel.all.cpu.irq.soft # softirq cpu ticks + kernel.all.cpu.steal # stolen cpu ticks + mem.vmstat.pgpgin # pages paged in + mem.vmstat.pgpgout # pages paged out + mem.vmstat.pswpin # pages swapped in + mem.vmstat.pswpout # pages swapped out + kernel.all.intr # interrupts + kernel.all.pswitch # CPU context switches + # - boot time + kernel.all.sysfork # forks + +# -a -------------------------------------------------- + proc.runq.runnable # r: The number of processes waiting for run time. + proc.runq.blocked # b: The number of processes in uninterruptible sleep. + mem.vmstat.nr_mapped # swpd: the amount of virtual memory used. + mem.util.free # free: the amount of idle memory. + mem.util.bufmem # buff: the amount of memory used as buffers. + mem.util.cached # cache: the amount of memory used as cache. + mem.util.inactive # inact: the amount of inactive memory. (-a option) + mem.util.active # active: the amount of active memory. (-a option) + + swap.in # si: Amount of memory swapped in from disk (/s). + swap.pagesout # so: Amount of memory swapped to disk (/s). + # - bi: Blocks received from a block device (blocks/s). + # - bo: Blocks sent to a block device (blocks/s). + kernel.all.intr # in: The number of interrupts per second, including the clock. + kernel.all.pswitch # cs: The number of context switches per second. + kernel.all.cpu.user # us: Time spent running non-kernel code. (user time, including nice time) + kernel.all.cpu.sys # sy: Time spent running kernel code. (system time) + kernel.all.idletime # id: Time spent idle. + kernel.all.cpu.wait.total # wa: Time spent waiting for IO. + kernel.all.cpu.steal # st: Time stolen from a virtual machine. + +# -d -------------------------------------------------- + + disk.partitions.read # total: Total reads completed successfully + # - merged: grouped reads (resulting in one I/O) + disk.partitions.blkread # sectors: Sectors read successfully + # - ms: milliseconds spent reading + disk.partitions.write # total: Total writes completed successfully + # - merged: grouped writes (resulting in one I/O) + disk.partitions.blkwrite # sectors: Sectors written successfully + # - ms: milliseconds spent writing + # cur: I/O in progress + # - s: seconds spent for I/O + +# -D -------------------------------------------------- + + disk.all.read # total: Total reads completed successfully + disk.all.read_merge # merged: grouped reads (resulting in one I/O) + disk.all.blkread # sectors: Sectors read successfully + disk.all.read_rawactive # ms: milliseconds spent reading + disk.all.write # total: Total writes completed successfully + disk.all.write_merge # merged: grouped writes (resulting in one I/O) + disk.all.blkwrite # sectors: Sectors written successfully + disk.all.read_rawactive # ms: milliseconds spent writing + # cur: I/O in progress + disk.all.avactive # s: seconds spent for I/O + + disk.dev.read # total: Total reads completed successfully + disk.dev.read_merge # merged: grouped reads (resulting in one I/O) + disk.dev.blkread # sectors: Sectors read successfully + disk.dev.read_rawactive # ms: milliseconds spent reading + disk.dev.write # total: Total writes completed successfully + disk.dev.write_merge # merged: grouped writes (resulting in one I/O) + disk.dev.blkwrite # sectors: Sectors written successfully + disk.dev.read_rawactive # ms: milliseconds spent writing + # cur: I/O in progress + disk.dev.avactive # s: seconds spent for I/O + diff --git a/src/pmlogconf/tools/vmstat-summary b/src/pmlogconf/tools/vmstat-summary new file mode 100644 index 0000000..d23c5bd --- /dev/null +++ b/src/pmlogconf/tools/vmstat-summary @@ -0,0 +1,5 @@ +#pmlogconf-setup 2.0 +ident metrics sampled once by the vmstat(1) command +probe kernel.uname.sysname ~ Linux ? include : exclude +delta once + mem.physmem # K total memory diff --git a/src/pmlogconf/v1.0/C2 b/src/pmlogconf/v1.0/C2 new file mode 100644 index 0000000..14916be --- /dev/null +++ b/src/pmlogconf/v1.0/C2 @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident contributions to CPU wait time +force available + kernel.all.wait diff --git a/src/pmlogconf/v1.0/C3 b/src/pmlogconf/v1.0/C3 new file mode 100644 index 0000000..ea791de --- /dev/null +++ b/src/pmlogconf/v1.0/C3 @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident per CPU contributions to wait time +force available + kernel.percpu.wait diff --git a/src/pmlogconf/v1.0/D3 b/src/pmlogconf/v1.0/D3 new file mode 100644 index 0000000..7a36c55 --- /dev/null +++ b/src/pmlogconf/v1.0/D3 @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident all available data per disk spindle +force available + disk.dev diff --git a/src/pmlogconf/v1.0/K0 b/src/pmlogconf/v1.0/K0 new file mode 100644 index 0000000..ad9bcd6 --- /dev/null +++ b/src/pmlogconf/v1.0/K0 @@ -0,0 +1,5 @@ +#pmlogconf-setup 2.0 +ident load average and number of logins +force include + kernel.all.load + kernel.all.users diff --git a/src/pmlogconf/v1.0/S0 b/src/pmlogconf/v1.0/S0 new file mode 100644 index 0000000..a125cdd --- /dev/null +++ b/src/pmlogconf/v1.0/S0 @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident NFS2 stats +force available + nfs diff --git a/src/pmlogconf/v1.0/S1 b/src/pmlogconf/v1.0/S1 new file mode 100644 index 0000000..f8b93a2 --- /dev/null +++ b/src/pmlogconf/v1.0/S1 @@ -0,0 +1,4 @@ +#pmlogconf-setup 2.0 +ident NFS3 stats +force available + nfs3 diff --git a/src/pmlogconf/v1.0/localdefs b/src/pmlogconf/v1.0/localdefs new file mode 100644 index 0000000..7af03ff --- /dev/null +++ b/src/pmlogconf/v1.0/localdefs @@ -0,0 +1 @@ +FILES = C2 C3 D3 K0 S0 S1 |