Operating System - HP-UX
1837981 Members
1860 Online
110124 Solutions
New Discussion

Re: How to write a script to monitor following..?

 
rveri
Super Advisor

How to write a script to monitor following..?

Hi All,

(i)How to write a script to monitor following kernel parameters:
(ii) And to send alert to syslog if reached threshold.

nproc
nfile
shmmni
msgmni
semmni
nflocks
npty
nbuf
ninode
maxfiles
maxfile_lim
maxuprc
max_thread_proc
----------------------

Thanks,
3 REPLIES 3
Carsten Krege
Honored Contributor

Re: How to write a script to monitor following..?

It does not make a lot of sense to monitor static kernel parameters like maxuprc or max_thread_proc (and others from above). These parameters would only change if the kernel is rebuild. You can get the values of these parameters using kmtune.

You can monitor kernel resources that change dynamically by using Event Monitoring Services, namely the EMS Kernel Resource Monitor krmond resources. The list of parameters available can be obtained with emscli.

# emscli -r -c /system/kernel_resource

The Resource Instances available for monitoring are :

/system/kernel_resource/file_system/nfile
/system/kernel_resource/file_system/nflocks
/system/kernel_resource/misc/ncallout
/system/kernel_resource/process_management/nproc
/system/kernel_resource/system_v_ipc/message/msgmni
/system/kernel_resource/system_v_ipc/message/msgseg
/system/kernel_resource/system_v_ipc/message/msgtql
/system/kernel_resource/system_v_ipc/semaphore/semmni
/system/kernel_resource/system_v_ipc/semaphore/semmns
/system/kernel_resource/system_v_ipc/shared_memory/shmmni


See the manual page for krmond. krmond comes with the product.fileset: EMS-KRMonitor.KRMON-RUN and is usually installed with the online diagnostic.

You can use SAM or emscli to register monitoring requests.

EMS manuals are at http://docs.hp.com/en/ha.html.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
Peter Godron
Honored Contributor

Re: How to write a script to monitor following..?

Hi,
see:
http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=991275

Similar question, monitoring some of these parameters will not add much.
Nate Schuchard
Occasional Advisor

Re: How to write a script to monitor following..?

Hi Rveri

I used EMS. I started by monitoring the systables using Glance.

We were having probelms with the Proc tabels and the files tables (nproc and nfile). I then brought up SAM in GUI mode and went in to Resource Management > Event Monitoring Service. (I found it easier in GUI vs text for this application)

There, under Actions you can add a monitoring request. I set the system to notify me by email if it exceeded a parameter. I then set my Blackberry to sound an alarm if one of those emails arrived.

Good Luck
Nate