mu*******@yahoo.com <mu*******@yahoo.com> wrote:
I want to run a python script in all the machines that are connected
through local network and collect the information about that machine
such as HDD size, RAM capacity(with number of slots) ,processer speed
etc.
But i want to run a script from just the server, so that it should
start scripts in all other machines, and get their local machines
information and dump the same information in some FTP.
Could you please let me know how can i do this??
If these are unix machines then I would use ssh/scp.
Use scp to copy the script to /tmp then run it and collect the output
with ssh (and os.popen/subprocess)
You can set ssh/scp up with keys too.
Number of RAM slots is reasonably hard to obtain. You might want to
investigate dmidecode for unix which queries the bios. It gives you
stuff like this showing my machine has 4 slots, with 2x512 MB in.
Handle 0x0007, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: A0
Bank Connections: 1 2
Current Speed: Unknown
Type: ECC DIMM SDRAM
Installed Size: 512 MB (Double-bank Connection)
Enabled Size: 512 MB (Double-bank Connection)
Error Status: OK
Handle 0x0008, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: A1
Bank Connections: 3 4
Current Speed: Unknown
Type: Unknown
Installed Size: Not Installed
Enabled Size: Not Installed
Error Status: OK
Handle 0x0009, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: A2
Bank Connections: 5 6
Current Speed: Unknown
Type: ECC DIMM SDRAM
Installed Size: 512 MB (Double-bank Connection)
Enabled Size: 512 MB (Double-bank Connection)
Error Status: OK
Handle 0x000A, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: A3
Bank Connections: 7 8
Current Speed: Unknown
Type: Unknown
Installed Size: Not Installed
Enabled Size: Not Installed
Error Status: OK
--
Nick Craig-Wood <ni**@craig-wood.com> --
http://www.craig-wood.com/nick