Monitoring Script for Linux Machine Triggered in Solaris Box

September 9, 2012 at 20:00:52
Specs: Solaris
Hi Experts,

I am planning to create a monitoring script, triggered from a Solaris machine, that will count files on a particular directory in a Linux box. Can you please share me your experiences if you have created a similar script before. I am not quite sure which particular command I will use so Solaris and Linux would communicate i.e. inputting of login credentials, exiting from Linux.

Any input is highly appreciated.

Best Regards,

See More: Monitoring Script for Linux Machine Triggered in Solaris Box

Report •

September 12, 2012 at 05:14:51
I've done this before between an AIX system and SCO Unix, the scenario was similar in that a load of Invoice files were created on AIX and the SCO System had to grab them, process them and send back details to the AIX system.

The script itself is pretty big, about 500 lines, but basically you need to setup equivalences between the 2 machines, make sure the logins are NOT super user accounts !!

Steps are :
1. Ping AIX machine to make sure it can see it, if not send email out ...
2. We had a temporary file which simply had the date&time in it which was the trigger to say that the AIX machine had finished if you like.
3. Looked for the file (in step 2) using the rcmd command (in a loop).
4. Used rcmd again to list all the relevant files, they ended in .out
5. Held the details from step 4 and then use rcp to copy each file back, we had to do some processing with awk & sed on the files which is why I decided to do each file seperately.
6. Processed the details on the SCO machine.
7. Used rcp to copy the details back to the AIX machine.

Hope this helps


Report •

September 12, 2012 at 14:35:28

If you are going to implement Mark's algorithm, a word of warning: rcp,rsh, and rcmd are now considered obsolete as they have possible security issues. If your network is not open to the internet or isn't public, these commands are probably fine.

Although the "r" tools are used on old legacy systems, the secure shell, ssh, and rsync have replaced them.

Report •

September 12, 2012 at 16:10:33
yeah good point about the security issues, hence my comment not to make them super user accounts :D plus I didn't know how old a version of Solaris they were talking about, and Linux is obviously a generic term, i've only used Suse and Red Hat and even these seemed to differ slightly ... plus some of the subtle differences in some of the commands between Unix and Linux, oh boy your in for fun writing that script :D

Report •
Related Solutions

Ask Question