Solaris check_mem: top not found!

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Solaris check_mem: top not found!

Post by anilgupta »

Hi,

I am trying to monitor memory usages of my Solaris Servers "Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC".

It throws message as below.
/usr/local/nagios/libexec/check_nrpe -H 10.92.34.49 -t 30 -c check_mem
top not found!
The script is using 'top' command which is not there in Solaris.

Alternatively, I tried check_memory.sh. It uses 'free' which is also missing on solaris.

What is workaround to get memory status on Solaris server.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Solaris check_mem: top not found!

Post by cdienger »

Is vmstat available on your system? If so, it looks like you'll be able to use this plugin: https://exchange.nagios.org/directory/P ... ls/details
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Re: Solaris check_mem: top not found!

Post by anilgupta »

Thanks for the response cdienger.
The plugin is throwing error as below. The system has vmstat
bash-3.2# ./check_vital
WARNING - need either --vmstat or --netstat or both
bash-3.2# vmstat
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr m1 m1 m1 m2 in sy cs us sy id
0 0 0 30582968 29681736 2 7 0 0 0 0 0 0 0 0 0 1061 82 403 0 0 100
bash-3.2#
please suggest
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Re: Solaris check_mem: top not found!

Post by anilgupta »

Please disregard the last post.

The command take time to return the output.
bash-3.2# ./check_vital --vmstat
OK - cpu_r=0 cpu_b=0 cpu_w=0 mem_swap=3790128 mem_free=2912160 mem_re=16 mem_mf=89 mem_pi=0 mem_po=0 sr=0 cpu_int=1530 cpu_syc=773 cpu_csw=957 cpu_usr=0 cpu_sys=0 cpu_idl=100
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Solaris check_mem: top not found!

Post by cdienger »

Glad to hear it worked. Are we okay to lock the thread at this point?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Re: Solaris check_mem: top not found!

Post by anilgupta »

I need further support on this.

this script/plugin is taking too long to output the result. For example, below command is taking 1 min and 40 seconds. It's too long and it will have performance impact on the server. Is there any workaround for this?

Code: Select all

 date; /usr/local/nagios/libexec/check_nrpe -H 10.92.34.49 -t 600 -c check_vital; date
Thu May 30 09:05:55 EDT 2019
OK - cpu_r=0 cpu_b=0 cpu_w=0 mem_swap=442039056 mem_free=226611232 mem_re=211 mem_mf=457 mem_pi=0 mem_po=0 sr=0 cpu_int=8078 cpu_syc=9941 cpu_csw=8157 cpu_usr=3 cpu_sys=1 cpu_idl=97
Thu May 30 09:07:35 EDT 2019

Secondly, I created service as shown in attached screenshot. But it is timing out after 60.2 seconds, refer attached screenshot. Please note that I updated the nrpe.cfg to increase connection time out and command time out to "600"
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Solaris check_mem: top not found!

Post by cdienger »

You'll also need to increase the global timeout setting under Configure > Core Config Manager > CCM Admin > Core Configs > General. The setting is service_check_timeout and is set to 60 by default.

Does the data command exist on the Solaris system? If so, what is the output of "date;./check_vital --vmstat;date" ?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Re: Solaris check_mem: top not found!

Post by anilgupta »

Does the data command exist on the Solaris system? If so, what is the output of "date;./check_vital --vmstat;date" ?
I don't know about data command. When I try to run it, I get below:

Code: Select all

bash-3.2# data
bash: data: command not found
date; /usr/local/nagios/libexec/check_nrpe -H 10.92.34.49 -t 600 -c check_vital; date

Code: Select all

Thu May 30 09:05:55 EDT 2019
OK - cpu_r=0 cpu_b=0 cpu_w=0 mem_swap=442039056 mem_free=226611232 mem_re=211 mem_mf=457 mem_pi=0 mem_po=0 sr=0 cpu_int=8078 cpu_syc=9941 cpu_csw=8157 cpu_usr=3 cpu_sys=1 cpu_idl=97
Thu May 30 09:07:35 EDT 2019
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Solaris check_mem: top not found!

Post by cdienger »

"data" should have been "date". Are you able to run "date;./check_vital --vmstat;date" on the Solaris system?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Re: Solaris check_mem: top not found!

Post by anilgupta »

Are you able to run "date;./check_vital --vmstat;date" on the Solaris system?

Code: Select all

bash-3.2# date;./check_vital --vmstat;date
Friday, May 31, 2019  9:41:50 AM EDT
OK - cpu_r=0 cpu_b=0 cpu_w=0 mem_swap=3763024 mem_free=2869016 mem_re=9 mem_mf=54 mem_pi=0 mem_po=0 sr=0 cpu_int=1515 cpu_syc=628 cpu_csw=949 cpu_usr=0 cpu_sys=0 cpu_idl=100
Friday, May 31, 2019  9:43:30 AM EDT
bash-3.2# cat /etc/release
                   Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC
  Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
                            Assembled 23 August 2011
Locked