Translations of this page:

Osmius

Osmius agent for HP-UX
Agent name: osm_ag_HPUX0001 Agent code: HPUX0001
Subject: HP-UX Osmius Agent User Manual
Author: Jose Angel Chico Date: 15/02/2010
Reviewed by: Revision date:

General Information

This agent can monitor several parameters of HP-UX systems. It has been tested on HP-UX B.11.11 U 9000/785. However, we recommend checking its functionality before implanting it in a production environment.

HP-UX agent has been developed using functionalities and enhancements of Osmius framework and ACE libraries, so it is necessary to install the ACE libraries for the proper deployment and operation of HP-UX Osmius agent. See chapter: installation.

HPUX0001 agent provides up to eight basic events with configuration parameters to allow scaling of a very simple way. These events are considered the more interesting in this first development by the Research & Development Osmius Team.

All events are local, they can only monitor the instance events of the machine the agent is executing itself. These events can easily be categorized: events based on system calls or events based on commands execution. .

HP-UX Instance

As a general rule each Osmius agent can monitor one instance type. If you are not familiar with these concepts check out the glossary. Each instance is individually defined in the configuration file (if you want further information go to agents and instances); depending on agent type is the instance type and depending on instance is the connection info.

CONNECTION_INFO

The connection information or connection_info is data that the agent needs to know to connect to the instance. (See more about the connection_info)

In the case of HP-UX agent, the connection_info will be an empty string because we haven't to connect to anything, it's a local monitoring.

CONNECTION_INFO= 

TYPE

The type defines the instance type to be monitored. Every declared instance must be associated with a type as you can see here

For HP-UX:

TYPE= HPUX0001

Event summary table for HP-UX

Here is briefly the capabilities of this agent, further down on this page each event is described in more detail.

EVENT DESCRIPTION c w a tseconds Extra parameters / Remarks
HPUPTIME HP-UX execution time in seconds1 600 300 600 Silent mode ( -s) recommmended
HPCPUSYS System CPU Percentage 0 60 75 600 Silent mode ( -s) recommmended
HPCPUUSR User CPU Percentage 0 25 35 600 Silent mode ( -s) recommmended
HPCPUTOT Total CPU Usage Percentage 0 85 95 600 Silent mode ( -s) recommmended
HPIP4INT Number of active IP4 interfaces 1 Administrator Administrator 600 Silent mode ( -s) recommmended
HPIP6INT Number of active IP6 interface 1 Administrator Administrator 600 Silent mode ( -s) recommmended
HPNUMPRC Total number of processes 0 Administrator Administrator 600 Silent mode ( -s) recommmended
HPPRCDWN Check if a process is running 0 1 1 600 Silent mode ( -s) recommmended
HPFREMEM Free memory MB 1 Administrator Administrator 600 Silent mode ( -s) recommmended
HPNUMCPU Number of system processors 1 Administrator Administrator 604800 Silent mode ( -s) recommmended
HPPRCMEM Memory usage percentage 0 75 90 600 Silent mode ( -s) recommmended
HPPRCHFS Check available space percentage of a filesystem list 0 80 90 600 Silent mode ( -s) recommmended
HPPRCSWP Swap memory usage percentage 0 10 30 600 Silent mode ( -s) recommmended
HPLOG001 Search text in a log file 0 1 1 600 Silent mode ( -s) recommmended
You can define from HPLOG000 to HPLOG099 (100 events)

HP-UX Agent Events

HPUPTIME

System uptime (time since last reboot/restart) in seconds.

Return values:

VALUE MEANING
-1 Error
X Number of seconds

Recommended parameters:

Comparison type Inverse. The higher value the lower severity (-c 1)
Monitoring interval 300 seconds – 1 hour –> depends on instance importance
Warning threshold Consult on administrator de HP-UX
Alert threshold Consult on administrator de HP-UX

Parameter setting example:

HPUPTIME = -t 300 -c 1 -w 240 -a 60 -T "HP-UX uptime"

Remarks: An easy read format will be returned in the associated text: Days[X] Hours[Y] Mins[Z].
This event uses the system libraries.

HPCPUSYS

Returns the percentage of CPU usage by the system processes.

Return values:

VALUE MEANING
-1 Error
0 - 100 CPU Percentage of the system processes

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 60 seconds – 1 hour –> depends on instance importance
Warning threshold Depends on system load
Alert threshold Depends on system load

Parameter setting example:

HPCPUSYS = -t 300 -c 0 -w 60 -a 75 -T "CPU Percentage of System Processes"

Remarks: This event executes the following command: ksh -c “vmstat 2 2 | tail -1 | awk '{ print $17 }'”. You can modify it. Be careful with changes and feed back us. Anyway this is free software so you can make the appropriate changes to suit your needs.

HPCPUUSR

This event returns the CPU percentage of the user processes.

Return values:

VALUE MEANING
-1 Error
0 - 100 CPU percentage of the user processes

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 60 seconds – 1 hour –> depends on instance importance
Warning threshold Depends on system load
Alert threshold Depends on system load

Parameter setting example:

HPCPUUSR = -t 300 -c 0 -w 25 -a 35 -T "CPU percentage of user processes"

Remarks: This events executes the following command: ksh -c “vmstat 2 2 | tail -1 | awk '{ print $16 }'”. You can modify it. Be careful with changes and feed back us. Anyway this is free software so you can make the appropriate changes to suit your needs.

HPCPUTOT

This event returns the CPU percentage of all processes.

Return values:

VALUE MEANING
-1 Error
0 - 100 CPU Percentage

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 60 seconds – 1 hour –> depends on instance importance
Warning threshold Depends on system load
Alert threshold Depends on system load

Parameter setting example:

HPCPUTOT = -t 300 -c 0 -w 85 -a 95 -T "CPU percentage"

Remarks: This events executes the following command: ksh -c “vmstat 2 2 | tail -1 | awk '{ print $18 }'”. You can modify it. Be careful with changes and feed back us. Anyway this is free software so you can make the appropriate changes to suit your needs.

HPIP4INT

This event returns the number of active IPv4 interfaces.

Return values:

VALUE MEANING
-1 Error
X Number of active IP4

Recommended parameters:

Comparison type Inverse. The lower value the higher severity (-c 1)
Monitoring interval 600 seconds – 1 hour –> depends on instance importance
Warning threshold Number of necessary IP4 interfaces
Alert threshold Number of necessary IP4 interfaces

Parameter setting example:

HPIP4INT = -t 300 -c 1 -w 4 -a 4 -T "IP4 Interfaces"

Remarks: This events returns the total number of active IP4 interfaces and is a portable event because it only uses ACE wrappers functions as you can see in the code.

HPIP6INT

This event returns the number of active IPv6 interfaces.

Return values:

VALUE MEANING
-1 Error
X IPv6 Interfaces

Recommended parameters:

Comparison type Inverse. The lower value the higher severity (-c 1)
Monitoring interval 600 seconds – 1 hour –> depends on instance importance
Warning threshold Number of necessary IPv6 interfaces
Alert threshold Number of necessary IPv6 interfaces

Parameter setting example:

HPIP6INT = -t 300 -c 1 -w 4 -a 4 -T "Interfaces Ipv6"

Remarks: This events returns the total number of active IPv6 interfaces and is a portable event because it only uses ACE wrappers functions as you can see in the code.

HPNUMPRC

This event returns the number of system processes.

Return values:

VALUE MEANING
-1 Error
X Total number of system processes

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 60 seconds – 1 hour –> depends on instance importance
Warning threshold Consult your HP-UX system administrator
Alert threshold Consult your HP-UX system administrator

Parameter setting example:

HPNUMPRC = -t 300 -c 0 -w 3000 -a 5000 -T "Total number of processes"

Remarks: This event executes the following command: ksh -c “ps -e | wc -l”. You can modify it. Be careful with changes and feed back us. Anyway this is free software so you can make the appropriate changes to suit your needs.

HPPRCDWN

This event checks if all the processes of a list are been executed.

Extra parameters:
This event need an extra parameter to work:

PARAMETER MEANING Mandatory
-L “proc1[,proc2,procN]” - List of procceses to be monitored. (Don't you spaces or commas). Yes

Return values:

VALUE MEANING
-1 Error
0 OK. All the processes of the list are been executed
1 At least one of the proccesses is not been executed

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 60 seconds – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 1

Parameter setting example:

HPPRCDWN = -t 300 -c 0 -w 1 -a 1 -L "osmius,osm_ag_HPUX001" - T "Osmius processes check"

Remarks: If at least one of the processes is not been executed the event will return a text with the following format: Process [procN] not found This event uses “ps” command. You can modify it. Be careful with changes and feed back us. Anyway this is free software so you can make the appropriate changes to suit your needs.

HPFREMEM

This events returns the free available memory of the system in MB.

Return values:

VALUE MEANING
-1 Error
X Free memory MB

Recommended parameters:

Comparison type Inverse. The higher value the lower severity (-c 1)
Monitoring interval 60 seconds - 1 hour. Depends on instance importance
Warning threshold Consult your HP-UX system administrator
Alert threshold Consult your HP-UX system administrator

Parameter setting example:

HPFREMEM = -t 300 -c 1 -w 300 -a 100 -T "Free mem MB"

Remarks: This event executes the following command: ksh -c “vmstat | tail -1 | awk '{print ($5*4)/1024}'”. You can modify it. Be careful with changes and feed back us. Anyway this is free software so you can make the appropriate changes to suit your needs.

HPNUMCPU

This event returns the number of detected CPUs.

Return values:

VALUE MEANING
-1 Error
X Number CPUs

Recommended parameters:

Comparison type Inverse. The lower value the higher severity (-c 1)
Monitoring interval 1 semana - 3 meses
Warning threshold Consult your HP-UX system administrator
Alert threshold Consult your HP-UX system administrator

Parameter setting example:

HPNUMCPU = -t 2592000 -c 1 -w 1 -a 1 -T "# CPUs"

Remarks: This events uses kernel functions-

HPPRCMEM

This event returns the usage memory percentage.

Return values:

VALUE MEANING
-1 Error
0 - 100 Usage memory percentage

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 60 seconds - 1 hour. Depends on instance importance
Warning threshold Consult your HP-UX system administrator
Alert threshold Consult your HP-UX system administrator

Parameter setting example:

HPPRCMEM = -t 300 -c 0 -w 75 -a 90 - T "Usage memory percentage"

Remarks: This event uses kernel functions.

HPPRCHFS

This events checks if one of the listed filesystem exceed a user predefined percentage.

Extra parameters:
This event need an extra parameter to work:

PARAMETER MEANING Mandatory
-L -L “fs1[,fs2,fsN]” - Filesystem list between commas (,). (Don't use spaces between commas). Yes

Return values:

VALUE MEANING
-1 Error
0 - 100 Occupation percentage of the bigger filesystem

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 60 seconds – 1 hour –> depends on instance importance
Warning threshold 70
Alert threshold 90

Parameter setting example:

HPPRCHFS = -t 600 -c 0 -w 80 -a 90 -L "/,/mnt/osmius"

Remarks: The associated text returns the filesystem name.
This events executes the command “df”. You can modify it. Be careful with changes and feed back us. Anyway this is free software so you can make the appropriate changes to suit your needs.

HPPRCSWP

This events returns the percentage of swap memory usage.

Return values:

VALUE MEANING
-1 Error
0 - 100 percentage of swap memory usage

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 60 seconds - 1 hour. Depends on instance importance
Warning threshold Consult your HP-UX system administrator
Alert threshold Consult your HP-UX system administrator

Parameter setting example:

HPPRCSWP = -t 600 -c 0 -w 10 -a 30 -T "Swap memory usage"

Remarks: This events uses kernel functions.

HPLOG001

This event search for matches of a text in a text file.

Extra parameters:
This event need two parameters:

PARAMETER MEANING Mandatory
-S -S “text_to_match” - Text to seek in the text file. Yes
-L -L “full_path_to_file ” - Text file. Yes

Return values:

VALUE MEANING
-1 Error
0 No matches found
1 At least 1 match in the text file

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 60 seconds – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 1

Parameter setting example:

HPLOG001 = -t 4 -c 0 -w 1 -a 1 -S "error" -L "/home/osmius/osmius/test.txt"

Remarks: This event remembers the last position read. The next execution it only reads and analyze from this position to eof.
You can declare from HPLOG000 to HPLOG099, ergo, 100 events.

HP-UX Prerequisites

In order to compile, this agent requires a set of prerequisites, which are generic to compile any Osmius agent, you can see these prerequisites.

Makefiles and HP-UX Osmius agent compilation

  • Make Project Creator (MPC) is used by Osmius, so creating Makefiles is a trivial task. If you want to learn more about MPC and Osmius check out the section of Makefiles on Osmius.
  • In the particular case of HP-UX Osmius agent, you can generate Makefile in this way:

From the agent directory using console or terminal.

$ACE_ROOT/bin/mpc.pl -type gnuace osm_ag_hpux.mpc
  • Now that you have created the Makefile, agent compiling is extremely simple.
gmake -f Makefile.Osm_Ag_Hpux_Osmius

Binaries are automatically installed in the bin directory of OSM_ROOT base directory.

Run HP-UX Osmius agent

HP-UX Osmius agent have the same running features of the other Osmius agents. You can check it out in the section Start and Stop Agents.

To run HP-UX Osmius agent without Osmius web console:

osm_ag_HPUX001 -c osm_ag_HPUX0001.ini -m MASTERAG -p 1950 -d [>> osm_ag_hpux.log]1)

Running in standalone mode

HP-UX Osmius agent, like the others Osmius agents, allows the execution in standalone mode. This option may be particularly useful when developing a new agent or to perform specific agent tests.

Basically you have to add a new value, called SNDCMD, to Osmius agent configuration file (osm_ag_HPUX0001.ini) as shown here.

Then you must run the HP-UX Osmius Agent setting Master Agent communications port to zero, for example:

osm_ag_HPUX0001 -c osm_ag_HPUX0001.ini -m 00000000 -p 0 -d

Tests list

Test performed to HP-UX Osmius Agent.

Date: 13/12/2007
Test Result Remarks
Creating an instance with all its events in silent mode OK N/A
Creating an instance with all its events with custom text OK N/A
Creating an instance with all its events but no custom text OK N/A

running for 48 hours |OK |N/A |

Declare 2 instances, cause a disconnect and then reconnectCan't do that in this agent N/A
Declare 1 instance and test each event OK N/A
Elimination of general parameter and check unbootable OK RECONN erased
Elimination of instance CONN_INFO and check unbootable OK N/A
1) Optional, to store agent messages in a file
 
en/agentes/hpux0001.txt · Last modified: 2012/12/05 18:56 by osmius
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki