# S800NPRF.def: Samples Performance Information (root not required) # $Id: S800NPRF.def,v 2.5 2012/01/03 13:34:47 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S800NPRF.def,v 2.5 2012/01/03 13:34:47 mschenke Exp $ # # Change History # 20120103 MSC Change the copyright notice. use Lock =head1 NAME S800NPRF - Samples Performance Data (root not required) =head1 DESCRIPTION This module performs the operating system performance data sampling for the RDA process. In most platforms, you can run this module without root privileges. =cut # Only execute the module in sampling mode if !getSetting('SMPL_CURRENT') return # Initialization var $NPRF_NET_FACTOR = getSetting('NPRF_NET_FACTOR',1) var $NPRF_OS_FACTOR = getSetting('NPRF_OS_FACTOR',1) var $TRACEROUTE var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' =head2 System Performance Gets a performance overview (platform-specific code). =cut run &{check(getOsName(),\ 'aix', 'BCaix',\ 'darwin', 'BCdarwin',\ 'dec_osf', 'BCosf',\ 'dynixptx', 'BCptx',\ 'hpux', 'BChpux',\ 'linux', 'BClinux',\ 'solaris', 'BCsunos',\ cond(isCygwin(), 'BCunix',\ isUnix(), 'BCunix',\ isWindows(), 'BCwin32'))}('NPRF',$NPRF_OS_FACTOR,\$TRACEROUTE) =head2 Trace Route Information Optionally, you can collect trace route information to specified hosts. Those tests are not necessarily executed for each sample. =cut if getSetting('NPRF_TRACEROUTE',0) {if !expr('%',getSetting('SMPL_COUNT',0),getSetting('NPRF_RATE',5)) {job {if lock('trc',true) {import $NPRF_NET_FACTOR,$TRACEROUTE output >> S,trace write '---+ ', getSetting('SMPL_CURRENT') loop $val (split('\|',getSetting('NPRF_HOSTS'))) call writeCommand(sprintf($TRACEROUTE,$val),true,$NPRF_NET_FACTOR) close call unlock('trc') } } } } =head1 SEE ALSO L, L, L, L, L, L, L, L, L =begin credits =over 14 =item OSwatcher: Carl Davis. =item shtriage: Greg Marsden. =item sys_watcher: John Sobecki. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut