Re: [opensuse] How to quickly get Remote Data from another box? bash? http?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David C. Rankin wrote:
Listmates,

I have run into another challenge and I am trying to determine the proper and
most efficient way to get remote data to display on a local machine. Part of
what I want to do is to gather sensor data from remote machines for web display
on a server. I can think of 2 ways to do it, but neither seems like the "right"
way. For example what's best to retrieve the ls_sensor output from a box across
the lan or internet?

First attempt was to force remote execution of 'sensors' via ssh and redirect
the output to a file on the remote machine and rsync it back. On the remote
site you would have a script called 'rem_sensors':

#!/bin/bash
sensors > ~/tmp/savedsensors
exit 0

On the local machine, you would have 'get_sensors':

#!/bin/bash
rsync -av lanremotehost:~/tmp/savedsensors ~/tmp/host_snsr_data
rsync -ave ssh netremotehost:~/tmp/savedsensors ~/tmp/host_snsr_data
# and so on

The connection time is a bother, but with sshkeys, no interaction is required.

Next, I though I would just write a 3 line php script to execute sensors and
then suck it back to the local box over http with lynx -dump or with rsync. The
script on the remote is nothing but:

<?php
$SENS = sensors;
echo $SENS."\n";
?>

This option seemed like trying to kill a mosquito with shotgun. What are some
of the other ways you employ to get this type of script output back from a
remote host? I'm looking for something lightweight and fast -- aren't we all.
Any ideas would be greatly appreciated. Thanks.


err... IIRC nagios can do some of this monitoring stuff (though to call
it light is distorting the English dictionary somewhat)...

a possible alternative could be a simple script daemon on the target
machines to broadcast a data packet at regular intervals and receiver
daemon to monitor the relevant port and process the received data when
received.... have a look at the Perl IPC stuff for ideas .... doing this
with files is a bit clumsy (and probably a bit error prone)...

- --
==============================================================================
I have always wished that my computer would be as easy to use as my
telephone.
My wish has come true. I no longer know how to use my telephone.

Bjarne Stroustrup
==============================================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkjbiccACgkQasN0sSnLmgJxbACgoBzvqGzm6PhNzKrzQVdQc/sA
3J4An3/L3WSvNCLm3Om05ySq+k1lXa+e
=Jcwp
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: Remote office logon script - Long Delay
    ... Windows IP Configuration ... If I point the User's profile to a script that doesn't contain the ... I do not have WINS configured for the remote site, ... This remote server was built using connect computer script, ...
    (microsoft.public.windows.server.sbs)
  • Re: Remote office logon script - Long Delay
    ... Windows IP Configuration ... If I point the User's profile to a script that doesn't contain the ... I do not have WINS configured for the remote site, ... This remote server was built using connect computer script, ...
    (microsoft.public.windows.server.sbs)
  • RE: WMI ExecQuery from Win32_NTEventLogFile in a Workgroup environ
    ... computer from which the script is being run? ... "urkec" wrote: ... as it correctly creates the .evt files for the local ... I have a script that runs on one node and copies files from all the remote ...
    (microsoft.public.scripting.vbscript)
  • Re: Remote office logon script - Long Delay
    ... Windows IP Configuration ... If I point the User's profile to a script that doesn't contain the ... I do not have WINS configured for the remote site, ... is a GC/AD server with DNS and DHCP for it's area. ...
    (microsoft.public.windows.server.sbs)
  • Re: wshremote not running script on remote computer
    ... "The script you deploy to the remote computer must not attempt to interact ... I do want to open a command window on a remote machine, ...
    (microsoft.public.scripting.vbscript)