Example of amfregister.xml for registration of process-based resource with AMF for online monitoring

Assuming the process in the ps output is displayed as follows, you can use the subsequent steps to register a process-based resource for online monitoring:

"/usr/sbin/rpc.statd -d 0 -t 50"
  1. If you are sure about the path and arguments, you must specify your process in the following format in the amfregister.xml file:

    <xml>
         <Register>
            <RegType>PRON</RegType>
            <ProcPattern>/usr/sbin/rpc.statd -d 0 -t 50</ProcPattern>
         </Register>
    </xml>
  2. If you are not sure about the arguments but are sure about the path, you must specify your process in the following format in the amfregister.xml file:

    <xml>
         <Register>
            <RegType>PRON</RegType>
            <PronOptions>IGNORE_ARGS</PronOptions>
            <ProcPattern>/usr/sbin/rpc.statd</ProcPattern>
         </Register>
    </xml>

    Note:

    If there are more than one processes or instances with different arguments, all get registered.

    For example:

    "/usr/sbin/rpc.statd -d 0 -t 50"
    "/usr/sbin/rpc.statd -xyz"

    Both the above processes get registered with AMF.

  3. If you are not sure about the path but are sure about the arguments, you must use the following format of the amfregister.xml:

    <xml>
         <Register>
            <RegType>PRON</RegType>
            <PronOptions>IGNORE_PATH</PronOptions>
            <ProcPattern>rpc.statd -d 0 -t 50</ProcPattern>
         </Register>
    </xml>

    Note:

    If there are more than one processes/instances with different paths, all get registered.

    For example:

    "/usr/sbin/rpc.statd -d 0 -t 50"
    "/home/<testuser>/rpc.statd -d 0 -t 50"
  4. If you are not sure about the path or the arguments, you must use the following format of the amfregister.xml:

    <xml>
         <Register>
            <RegType>PRON</RegType>
            <PronOptions>IGNORE_ARGS IGNORE_PATH</PronOptions>
            <ProcPattern>rpc.statd</ProcPattern>
         </Register>
    </xml>

    Note:

    If there are more than one processes with the same base name, all get registered irrespective of the path and arguments.

    For example:

    "/usr/sbin/rpc.statd -d 0"
    "/home/<testuser>/rpc.statd -d 0 -t 50"