vivek.nandavanam

Configuration for exposing xmdMem metrics through SNMP on AIX Machine

Blog Post created by vivek.nandavanam Expert on Oct 17, 2017

Posted here are the list of instructions to configure a AIX machine to start publishing the xmdMem metrics so that the computational memory metrics are exposed through SNMP. Computational pages are pages used for the text, data, stack, and shared memory of a process. Non-computational pages are pages containing file data for files that are being read and written. Computational pages are a important metric for measuring the performance of an AIX machine. More information of Computational memory in AIX can be found here - Overview of AIX page replacement 

 

Please refer to the AIX documentation for the Xmtopas configuration - IBM Knowledge Center 

 

We are making an assumption that the SNMP installation a default installation with V3 are the version.

 

  • Refer the snmpdv3.conf attached in this blog to use as a reference to make changes to the SNMPV3 configurations. The location of this config file is the /etc directory. There are certain xmtopas configurations in this file.
  • Add or edit the xmtopas entry is present in the /etc/snmpd.peers file
"xmtopas" 1.3.6.1.4.1.2.3.1.2.1.3 "xmtopas_pw"
  • Uncomment the "dosmux" string in the /etc/perf/xmtopas.res. A sample xmtopas.res file is attached in this blog
  • Uncommented the following line in the /etc/inetd.conf file if is not uncommented already. The xmquery command is used to collect performance data from xmtopas
xmquery dgram udp6 wait root /usr/bin/xmtopas xmtopas -p3
  • Add the following lines to the end of the /etc/rc.tcpip file
/usr/bin/sleep 10
/usr/bin/xmpeek
  • Uncomment the following lines in /etc/rc.tcpip. A sample rc.tcpip is attached here in the blog
aixmibd
hostmibd
snmpmibd
snmpd
  • Reboot the AIX machine
shutdown -Fr
  • Verify that the xmservd daemon is running using xmpeek command
    • xmpeek -a

      Statistics for xmservd daemon on *** aix71_1 ***

      Statsets currently defined: 0
      Statsets currently active: 0
      Hotsets currently defined: 0
      Hotsets currently active: 0
      Remote monitors currently known: 1

      --No of sets---- Values Packets
      Type Defined Active Active Sent Internet Address Port Hostname
      ---- ------- ------- ------- ---------- ---------------- ----- ---------
      Stat 0 0 0 0 192.168.111.194 33014 aix71_1

    • xmpeek -l

      /aix71_1/CPU/ Central processor statistics
      /aix71_1/CPU/gluser System-wide time executing in user mode (percent)
      /aix71_1/CPU/glkern System-wide time executing in kernel mode (percent)
      /aix71_1/CPU/glwait System-wide time waiting for IO (percent)
      /aix71_1/CPU/glidle System-wide idle time (percent)
      /aix71_1/CPU/gluticks System-wide CPU ticks executing in user mode
      /aix71_1/CPU/glkticks System-wide CPU ticks executing in ker

    • ps -ef | grep topas

root 3866874 2490570 0 14:44:45 - 0:00 xmtopas -p3
root 5570786 1 0 14:44:49 - 0:00 /usr/bin/topasrec -L -s 300 -R 1 -r 6 -o /var/perf/daily/ -ypersistent=1 -O type=bin -ystart_time=14:44:49,Oct11,2017

  • Dump xmtopas mib definitions from memory (xmtopas -p3 proccess) to the /etc/perf/xmtopas.mib file. If the kill -2 does not work try restarting the xmtopas process.
    kill -2 <xmtopas -p3 process id>
    • Merge the default mib definitions with the mib definitions dumped from memory
      • Check to see if the default mib definitions exist
    ls -la /etc/mib.defs 
    -rw-r----- 1 root system 112252 Oct 11 10:54 /etc/mib.defs
    • Backup the default mib definitions
    cp /etc/mib.defs /etc/mib.defs.orig
    • Check to see if the dumped xmtopas.mib file exists
    ls -la /etc/perf/xmtopas.mib
    -rw-r--r-- 1 root system 100146 Oct 11 14:59 /etc/perf/xmtopas.mib
    • Create the xmtopas mib definitions from dumped data
    mosy -o /tmp/mib.defs /etc/perf/xmtopas.mib

    mosy 6.8 of Sun Jun 27 16:04:23 CDT 2010
    line 9: Warning: IMPORTS but no ModuleIdentifier
    last token read was ";"
    XMSERVD-PERF-MIB identifiers: directory mgmt experimental private enterprises
    ibm ibmAgents aix aixRT aixRISC6000 risc6000agents
    risc6000snmpd risc6000gated risc6000xmservd risc6000ibm7318
    risc6000clsmuxpd risc6000private risc6000samples
    risc6000sampleAgents risc6000perf xmd risc6000public aix370
    aixPS2 mvs mvs370 vm vm370 os2 ps2PS2 os400 os400as400

    • Merge the default and the dumped xmtopas mibs
    cat /tmp/mib.defs >> /etc/mib.defs
    • Reboot the AIX machine again
    shutdown -Fr
    • Execute the following commands to verify the output below
      • lssrc -s aixmibd

    Subsystem Group PID Status
    aixmibd tcpip 2097336 active

    • lssrc -s hostmibd

    Subsystem Group PID Status
    hostmibd tcpip 3604612 active

    • lssrc -s snmpmibd

    Subsystem Group PID Status
    snmpmibd tcpip 3342462 active

    • lssrc -s snmpd

    Subsystem Group PID Status
    snmpd tcpip 3539092 active

    • xmpeek -a

    Statistics for xmservd daemon on *** aix71_1 ***

    Statsets currently defined: 0
    Statsets currently active: 0
    Hotsets currently defined: 0
    Hotsets currently active: 0
    Remote monitors currently known: 1

    --No of sets---- Values Packets
    Type Defined Active Active Sent Internet Address Port Hostname
    ---- ------- ------- ------- ---------- ---------------- ----- ---------
    Stat 0 0 0 0 192.168.111.194 33111 aix71_1

    • To check the final configuration. Please run the following queries that will verify that the xmd queries and hence the computational memory is getting exposed
      • snmpinfo -v -m dump -c public 1.3.6.1.4.1.2.3.1.2.2.2.1.2.1

    xmdMemRealSize.0 = 524288
    xmdMemRealNumfrb.0 = 183667
    xmdMemRealNoncomp.0 = 55157
    xmdMemRealComp.0 = 285464
    xmdMemRealNumlocal.0 = 285464
    xmdMemRealNumclient.0 = 55157
    xmdMemRealMaxclient.0 = 387129
    xmdMemRealPdecay.0 = 0
    xmdMemRealSysrepag.0 = 0
    xmdMemRealEfree.0 = 35
    xmdMemRealEpinned.0 = 41
    xmdMemRealEcomp.0 = 54
    xmdMemRealEnoncomp.0 = 11
    xmdMemRealElocal.0 = 89
    xmdMemRealEclnt.0 = 11
    xmdMemRealWseguse.0 = 280292
    xmdMemRealPseguse.0 = 0
    xmdMemRealClseguse.0 = 60329
    xmdMemRealWsegpin.0 = 212123
    xmdMemRealPsegpin.0 = 0
    xmdMemRealClsegpin.0 = 2108

    • snmpinfo -v -m dump -c public xmdMemRealEcomp

    xmdMemRealEcomp.0 = 54

    • snmpinfo -v -m dump -c public xmdMemRealEnoncomp

    xmdMemRealEnoncomp.0 = 11

     

    References

    https://www.ibm.com/support/knowledgecenter/en/ssw_aix_71/com.ibm.aix.prfusrgd/doc/prfusrgd/ch13body.htm 

    https://www.ibm.com/developerworks/aix/library/au-vmm/index.html 

    Attachments

    Outcomes