Search found 16 matches

by runzelpunzel
Thu Mar 12, 2020 1:27 am
Forum: Open Source Nagios Projects
Topic: jstat is failing to show a proper result
Replies: 31
Views: 11843

Re: jstat is failing to show a proper result

This is the original script that I tried to use. However, the script is not running as you would expect and the output is a mess not what we really needed, thus I rewrote to script to fit our needs. May be I'll give the original script another go and if that's working rather "correct" the ...
by runzelpunzel
Wed Mar 11, 2020 9:55 am
Forum: Open Source Nagios Projects
Topic: jstat is failing to show a proper result
Replies: 31
Views: 11843

Re: jstat is failing to show a proper result

"0", as you would expect. nagios@<MYMACHINE>[~]> /usr/bin/sudo /usr/bin/jstat -gc 16652 2> /dev/null S0C S1C S0U S1U EC EU OC OU MC MU CCSC CCSU YGC YGCT FGC FGCT GCT 17408,0 9216,0 0,0 9188,3 446976,0 325530,5 1664000,0 1205941,3 585968,0 515763,0 80200,0 66246,9 5507 437,466 25 20,204 45...
by runzelpunzel
Tue Mar 10, 2020 3:44 am
Forum: Open Source Nagios Projects
Topic: jstat is failing to show a proper result
Replies: 31
Views: 11843

Re: jstat is failing to show a proper result

No, it really runs just one time: nagios@<MYMACHINE>[~]> /usr/bin/sudo /usr/bin/jstat -gc 16652 S0C S1C S0U S1U EC EU OC OU MC MU CCSC CCSU YGC YGCT FGC FGCT GCT 24064,0 38400,0 23785,2 0,0 1090560,0 323405,2 1622016,0 1587494,2 578800,0 509547,1 79432,0 65639,8 3436 288,142 18 13,699 301,841 nagios...
by runzelpunzel
Mon Mar 09, 2020 8:09 am
Forum: Open Source Nagios Projects
Topic: jstat is failing to show a proper result
Replies: 31
Views: 11843

Re: jstat is failing to show a proper result

the regular output from jstat, eg. S0C S1C S0U S1U EC EU OC OU MC MU CCSC CCSU YGC YGCT FGC FGCT GCT 45056.0 45568.0 0.0 24537.4 1306112.0 914401.5 1668096.0 1393081.2 574832.0 506528.5 79048.0 65307.1 2629 226.672 17 12.857 239.529 Looking into that, "unable to read output" might well be ...
by runzelpunzel
Mon Mar 09, 2020 3:11 am
Forum: Open Source Nagios Projects
Topic: jstat is failing to show a proper result
Replies: 31
Views: 11843

Re: jstat is failing to show a proper result

It's the default /usr/bin/jstat . Even when I run a /usr/bin/sudo /usr/bin/jstat -gc 16652 , whereas 16652 is the PID of my java process, I get a proper result. However, when I run configure command[check_sudo_test4]=/usr/bin/sudo /usr/bin/jstat -gc 16652 in /etc/nagios/nrpe.cfg and call check_sudo_...
by runzelpunzel
Fri Feb 28, 2020 1:46 am
Forum: Open Source Nagios Projects
Topic: jstat is failing to show a proper result
Replies: 31
Views: 11843

Re: jstat is failing to show a proper result

This is so bizarre It is indeed! That's why I'm kinda lost and seeking for your help :D ls -l /usr/lib/nagios/plugins/check_test.sh -rwxr-xr-x 1 root root 199 Feb 21 08:19 /usr/lib/nagios/plugins/check_test.sh Looks okay to me!? PS: I will be AFK in the following week, so any further test / comment...
by runzelpunzel
Wed Feb 26, 2020 12:48 am
Forum: Open Source Nagios Projects
Topic: jstat is failing to show a proper result
Replies: 31
Views: 11843

Re: jstat is failing to show a proper result

Quite from the beginning I enabled "ALL" for nagios for testing purposes:

Code: Select all

grep nagios /etc/sudoers

Defaults:nagios !requiretty
nagios ALL=(ALL) NOPASSWD: ALL
by runzelpunzel
Fri Feb 21, 2020 2:25 am
Forum: Open Source Nagios Projects
Topic: jstat is failing to show a proper result
Replies: 31
Views: 11843

Re: jstat is failing to show a proper result

Hi mbellerue , thanks for jumping in. Any thoughts are greatly appreciated! check_test.sh does now look as follows: #!/bin/bash echo "test.sh start" sudo jstat -gc 1314 | tail -1 | sed -e 's/[ ][ ]*/ /g' > /tmp/check_test.log 2>&1 echo "test.sh stop" exit 5 The appropriate co...
by runzelpunzel
Wed Feb 19, 2020 5:36 am
Forum: Open Source Nagios Projects
Topic: jstat is failing to show a proper result
Replies: 31
Views: 11843

Re: jstat is failing to show a proper result

Except for TERM , which shouldn't make any difference to the best of my knowledge, there is none. nagios@MYMACHINE[~]> sudo env LANG=de_DE.UTF-8 TERM=screen PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAIL=/var/mail/root LOGNAME=root USER=root HOME=/root SHELL=/bin/bash SUDO_CO...
by runzelpunzel
Tue Feb 18, 2020 2:20 am
Forum: Open Source Nagios Projects
Topic: jstat is failing to show a proper result
Replies: 31
Views: 11843

Re: jstat is failing to show a proper result

Thanks for your reply and looking into this again! I have done what you're asking for right from the beginning, as this was my first thought, see my 2nd post: command[check_sudo_test2]=sudo env /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_sudo_test2 PATH=/usr/local/sbin:/usr/local/bin:/u...