I am trying to get your script (xymon-rclient.sh) running on my xymon and have hit some issue that must have something to do with my environment.
Wednesday, September 26, 2012 03:25:55 PM CDT: starting //usr/local/xymon/server/ext/xymon-rclient.sh //usr/local/xymon/server/ext/xymon-rclient.sh: trap: bad trap Wednesday, September 26, 2012 03:25:55 PM CDT: finished //usr/local/xymon/server/ext/xymon-rclient.sh (completed 0 out of 0)
I have ssh keys all setup and I can ssh to the client no problem. So I set the debug option them get this:
//usr/local/xymon/server/ext/xymon-rclient.sh: test: argument expected
the xymon server is solaris 10. and I am running xymon 4.3.10
-Kevin
Sounds like there's an empty variable in a test expression. Something like:
if [ $x = $y ]; then
......
fi
where either $x or $y is not set. If those variables were put in double-quotes, at least you'd get an empty string.
Ralph Mitchell On Sep 27, 2012 10:59 AM, "Kevin King" <kc6ovd at gmail.com> wrote:
I am trying to get your script (xymon-rclient.sh) running on my xymon and have hit some issue that must have something to do with my environment.
Wednesday, September 26, 2012 03:25:55 PM CDT: starting //usr/local/xymon/server/ext/xymon-rclient.sh //usr/local/xymon/server/ext/xymon-rclient.sh: trap: bad trap Wednesday, September 26, 2012 03:25:55 PM CDT: finished //usr/local/xymon/server/ext/xymon-rclient.sh (completed 0 out of 0)
I have ssh keys all setup and I can ssh to the client no problem. So I set the debug option them get this:
//usr/local/xymon/server/ext/xymon-rclient.sh: test: argument expected
the xymon server is solaris 10. and I am running xymon 4.3.10
-Kevin
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
Thanks Ralph,
I found the issue. the writer tested using bash as his /bin/sh so when I ran in on my server /bin/sh is not bash. fixed that then it ran...
Now I am getting a garbled sed command....
sed: command garbled: 1,/---START---/d;$a[endmarker]\ndummy entry
More digging.
-Kevin
On Thu, Sep 27, 2012 at 11:12 AM, Ralph Mitchell <ralphmitchell at gmail.com>wrote:
Sounds like there's an empty variable in a test expression. Something like:
if [ $x = $y ]; then ...... fiwhere either $x or $y is not set. If those variables were put in double-quotes, at least you'd get an empty string.
Ralph Mitchell On Sep 27, 2012 10:59 AM, "Kevin King" <kc6ovd at gmail.com> wrote:
I am trying to get your script (xymon-rclient.sh) running on my xymon and have hit some issue that must have something to do with my environment.
Wednesday, September 26, 2012 03:25:55 PM CDT: starting //usr/local/xymon/server/ext/xymon-rclient.sh //usr/local/xymon/server/ext/xymon-rclient.sh: trap: bad trap Wednesday, September 26, 2012 03:25:55 PM CDT: finished //usr/local/xymon/server/ext/xymon-rclient.sh (completed 0 out of 0)
I have ssh keys all setup and I can ssh to the client no problem. So I set the debug option them get this:
//usr/local/xymon/server/ext/xymon-rclient.sh: test: argument expected
the xymon server is solaris 10. and I am running xymon 4.3.10
-Kevin
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
This is probably due to a difference in the type of sed you're using (GNU vs. SysV or whatever else there is). I'm going to go ahead and guess you're on Solaris and the guy wrote for Linux/didn't care. Often times on Solaris, I get around this by using the sed command in /usr/xpg4/bin. You could probably also use GNU sed if you felt like installing the GNU textutils.
On 09/27/2012 11:30 AM, Kevin King wrote:
Thanks Ralph,
I found the issue. the writer tested using bash as his /bin/sh so when I ran in on my server /bin/sh is not bash. fixed that then it ran...
Now I am getting a garbled sed command....
sed: command garbled: 1,/---START---/d;$a[endmarker]\ndummy entry
More digging.
-Kevin
On Thu, Sep 27, 2012 at 11:12 AM, Ralph Mitchell <ralphmitchell at gmail.com <mailto:ralphmitchell at gmail.com>> wrote:
Sounds like there's an empty variable in a test expression. Something like:
if [ $x = $y ]; then ...... fi
where either $x or $y is not set. If those variables were put in double-quotes, at least you'd get an empty string.
Ralph Mitchell
On Sep 27, 2012 10:59 AM, "Kevin King" <kc6ovd at gmail.com <mailto:kc6ovd at gmail.com>> wrote:
I am trying to get your script (xymon-rclient.sh) running on my xymon and have hit some issue that must have something to do with my environment.
Wednesday, September 26, 2012 03:25:55 PM CDT: starting //usr/local/xymon/server/ext/xymon-rclient.sh //usr/local/xymon/server/ext/xymon-rclient.sh: trap: bad trap Wednesday, September 26, 2012 03:25:55 PM CDT: finished //usr/local/xymon/server/ext/xymon-rclient.sh (completed 0 out of 0)
I have ssh keys all setup and I can ssh to the client no problem. So I set the debug option them get this:
//usr/local/xymon/server/ext/xymon-rclient.sh: test: argument expected
the xymon server is solaris 10. and I am running xymon 4.3.10
-Kevin
_______________________________________________ Xymon mailing list Xymon at xymon.com <mailto:Xymon at xymon.com> http://lists.xymon.com/mailman/listinfo/xymon
_______________________________________________ Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
- ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iEYEARECAAYFAlBkdXUACgkQmb+gadEcsb4T7ACgxifuEyrVXKK8P1LNCtkCs5oa 3f8AoLMt5XcVTEkBELbmxWqKtEC1B8Jl =7DVd -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Do set -x or change the top line to read #!/bin/whatever -x -- adding in the -x. That will tell you like by line what is happening and show you which test is failing. Likely a variable isn't defined somewhere.
On 09/27/2012 09:42 AM, Kevin King wrote:
I am trying to get your script (xymon-rclient.sh) running on my xymon and have hit some issue that must have something to do with my environment.
Wednesday, September 26, 2012 03:25:55 PM CDT: starting //usr/local/xymon/server/ext/xymon-rclient.sh //usr/local/xymon/server/ext/xymon-rclient.sh: trap: bad trap Wednesday, September 26, 2012 03:25:55 PM CDT: finished //usr/local/xymon/server/ext/xymon-rclient.sh (completed 0 out of 0)
I have ssh keys all setup and I can ssh to the client no problem. So I set the debug option them get this:
//usr/local/xymon/server/ext/xymon-rclient.sh: test: argument expected
the xymon server is solaris 10. and I am running xymon 4.3.10
-Kevin
_______________________________________________ Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
- ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iEYEARECAAYFAlBkbsgACgkQmb+gadEcsb722wCdHWEJgkPHlUH4CBPH261+PKwq 9oIAoKR7Qa9cD9fnmXLLYoWtoyMc/Aj/ =lfmu -----END PGP SIGNATURE-----
Ryan, I am going to do that next. I did that the first time and it helped me figure out the shell needed to be bash rather than sh. The script writer has some good debugging in the code and I was setting his debug options.
When I look on the remote client it did start the vmstat and create the tempfile output. I think the sed might be barfing on some output from the remote host at login.
-Kevin
On Thu, Sep 27, 2012 at 11:20 AM, Ryan Novosielski <novosirj at umdnj.edu>wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Do set -x or change the top line to read #!/bin/whatever -x -- adding in the -x. That will tell you like by line what is happening and show you which test is failing. Likely a variable isn't defined somewhere.
On 09/27/2012 09:42 AM, Kevin King wrote:
I am trying to get your script (xymon-rclient.sh) running on my xymon and have hit some issue that must have something to do with my environment.
Wednesday, September 26, 2012 03:25:55 PM CDT: starting //usr/local/xymon/server/ext/xymon-rclient.sh //usr/local/xymon/server/ext/xymon-rclient.sh: trap: bad trap Wednesday, September 26, 2012 03:25:55 PM CDT: finished //usr/local/xymon/server/ext/xymon-rclient.sh (completed 0 out of 0)
I have ssh keys all setup and I can ssh to the client no problem. So I set the debug option them get this:
//usr/local/xymon/server/ext/xymon-rclient.sh: test: argument expected
the xymon server is solaris 10. and I am running xymon 4.3.10
-Kevin
_______________________________________________ Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
- ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iEYEARECAAYFAlBkbsgACgkQmb+gadEcsb722wCdHWEJgkPHlUH4CBPH261+PKwq 9oIAoKR7Qa9cD9fnmXLLYoWtoyMc/Aj/ =lfmu -----END PGP SIGNATURE-----
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
It could be a matter of a Linux sed (gnu) verses the Solaris (SysV) sed command. You might a gnu sed package.
Paul Root - Senior Engineer Managed Services Systems - CenturyLink
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Kevin King Sent: Thursday, September 27, 2012 10:47 AM To: Ryan Novosielski Cc: xymon at xymon.com Subject: Re: [Xymon] xymon-rclient.sh
Ryan, I am going to do that next. I did that the first time and it helped me figure out the shell needed to be bash rather than sh. The script writer has some good debugging in the code and I was setting his debug options.
When I look on the remote client it did start the vmstat and create the tempfile output. I think the sed might be barfing on some output from the remote host at login.
-Kevin On Thu, Sep 27, 2012 at 11:20 AM, Ryan Novosielski <novosirj at umdnj.edu<mailto:novosirj at umdnj.edu>> wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Do set -x or change the top line to read #!/bin/whatever -x -- adding in the -x. That will tell you like by line what is happening and show you which test is failing. Likely a variable isn't defined somewhere.
On 09/27/2012 09:42 AM, Kevin King wrote:
I am trying to get your script (xymon-rclient.sh) running on my xymon and have hit some issue that must have something to do with my environment.
Wednesday, September 26, 2012 03:25:55 PM CDT: starting //usr/local/xymon/server/ext/xymon-rclient.sh //usr/local/xymon/server/ext/xymon-rclient.sh: trap: bad trap Wednesday, September 26, 2012 03:25:55 PM CDT: finished //usr/local/xymon/server/ext/xymon-rclient.sh (completed 0 out of 0)
I have ssh keys all setup and I can ssh to the client no problem. So I set the debug option them get this:
//usr/local/xymon/server/ext/xymon-rclient.sh: test: argument expected
the xymon server is solaris 10. and I am running xymon 4.3.10
-Kevin
_______________________________________________ Xymon mailing list Xymon at xymon.com<mailto:Xymon at xymon.com> http://lists.xymon.com/mailman/listinfo/xymon
- ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |novosirj at umdnj.edu<mailto:novosirj at umdnj.edu> - 973/972.0922<tel:973%2F972.0922> (2-0922) \__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iEYEARECAAYFAlBkbsgACgkQmb+gadEcsb722wCdHWEJgkPHlUH4CBPH261+PKwq 9oIAoKR7Qa9cD9fnmXLLYoWtoyMc/Aj/ =lfmu -----END PGP SIGNATURE-----
Xymon mailing list Xymon at xymon.com<mailto:Xymon at xymon.com> http://lists.xymon.com/mailman/listinfo/xymon
Paul,
That did the trick!
I need to watch that closer, I learned when the world ran on Solaris. :)
-Kevin
On Thu, Sep 27, 2012 at 11:49 AM, Root, Paul <Paul.Root at centurylink.com>wrote:
It could be a matter of a Linux sed (gnu) verses the Solaris (SysV) sed command. You might a gnu sed package.****
Paul Root - Senior Engineer****
Managed Services Systems - CenturyLink****
*From:* xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] *On Behalf Of *Kevin King *Sent:* Thursday, September 27, 2012 10:47 AM *To:* Ryan Novosielski *Cc:* xymon at xymon.com *Subject:* Re: [Xymon] xymon-rclient.sh****
Ryan, I am going to do that next. I did that the first time and it helped me figure out the shell needed to be bash rather than sh. The script writer has some good debugging in the code and I was setting his debug options.** **
When I look on the remote client it did start the vmstat and create the tempfile output.****
I think the sed might be barfing on some output from the remote host at login.****
-Kevin****
On Thu, Sep 27, 2012 at 11:20 AM, Ryan Novosielski <novosirj at umdnj.edu> wrote:****
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Do set -x or change the top line to read #!/bin/whatever -x -- adding in the -x. That will tell you like by line what is happening and show you which test is failing. Likely a variable isn't defined somewhere.****
On 09/27/2012 09:42 AM, Kevin King wrote:
I am trying to get your script (xymon-rclient.sh) running on my xymon and have hit some issue that must have something to do with my environment.
Wednesday, September 26, 2012 03:25:55 PM CDT: starting //usr/local/xymon/server/ext/xymon-rclient.sh //usr/local/xymon/server/ext/xymon-rclient.sh: trap: bad trap Wednesday, September 26, 2012 03:25:55 PM CDT: finished //usr/local/xymon/server/ext/xymon-rclient.sh (completed 0 out of 0)
I have ssh keys all setup and I can ssh to the client no problem. So I set the debug option them get this:
//usr/local/xymon/server/ext/xymon-rclient.sh: test: argument expected
the xymon server is solaris 10. and I am running xymon 4.3.10
-Kevin
_______________________________________________ Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
- ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iEYEARECAAYFAlBkbsgACgkQmb+gadEcsb722wCdHWEJgkPHlUH4CBPH261+PKwq 9oIAoKR7Qa9cD9fnmXLLYoWtoyMc/Aj/ =lfmu -----END PGP SIGNATURE-----****
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon****
participants (4)
-
kc6ovd@gmail.com
-
novosirj@umdnj.edu
-
Paul.Root@CenturyLink.com
-
ralphmitchell@gmail.com