PsaltyDS Posted May 8, 2007 Share Posted May 8, 2007 ... you couldn't pay for a better service.Well, now maybe... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 8, 2007 Share Posted May 8, 2007 ohh yes it was an imagebut sometimes for recurrent information retrieval (like cpu) it's really boring to log on by putty, enter user/pass and execute a commandthis open up some ways, that's just what i wanted to sayInstead of pulling that info, I would get a background process on each machine pushing it regularly to SYSLOG or some other networked log file. Your admin process just needs to monitor that log and see if anybody hasn't checked in on time. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
arcker Posted May 8, 2007 Share Posted May 8, 2007 you can pull or retrieve, that's a question of philosophy after imagine that your server that "receives" all of this syslog just come down... i always prefer a server that will take the info, rather than all of my clients have some rights to send their data to it -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
dabus Posted May 9, 2007 Share Posted May 9, 2007 I know that this is not the original topic, but do you know a good & simple to install sshd for windows? Would be extremly cool to control windows from linux. I messed around with tcp-ip some time ago but I'm a little bit too shy to install this thing on our server. It would just be the perfect solution if I could monitor our network with nagios and exec commands if needed. (Currently I get some sms, that's huge, but "selfhealing" would be much nicer ) Link to comment Share on other sites More sharing options...
arcker Posted May 9, 2007 Share Posted May 9, 2007 (edited) It would just be the perfect solution if I could monitor our network with nagios and exec commands if neededgo check winnrpe_ntthat's what i've installed on our monitored servers and i've developed more script in autoit (compatible) to make more requestc u Edited May 9, 2007 by arcker -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
megatron Posted May 9, 2007 Author Share Posted May 9, 2007 I just wanted to say that thanks to the advice given by PsaltyDS I have managed to get my program working: I can now automate various functions to my entire network over SSH (previously I had been using telnet - but for obvious reasons I changed). Here is the basic code, of course you need an ini file containing the host list and Plink installed. expandcollapse popup#include <Constants.au3> $numswitches = IniRead( "C:\myfile1.ini", "Switches", "Count", "0" ) for $x = 0 to $numswitches $hostname = IniRead( "C:\myfile1.ini", "Switches", ( "Switch" & $x ) , "0" ) Dim $szIPADDRESS = TCPNameToIP($hostname) $PID = Run(@comspec & " /c c:\plink.exe " &$hostname& " -pw xxxxx -l * -ssh ","",@SW_SHOW,$STDIN_CHILD + $STDOUT_CHILD + $STDERR_CHILD) DIM $sSTDOUT = "", $sSTDERR = "" Do Sleep(10000) If StdoutRead($PID, 0, True) Then $sSTDOUT &= StdoutRead($PID) If StderrRead($PID, 0, True) Then $sSTDERR &= StderrRead($PID) If StringInStr ($sSTDERR, "The server's host key") Then no_RSA_key() Else normal() EndIf ProcessClose($PID) Until Not ProcessExists($PID) next ;;;;;;;;;;;;;;;;;;;;;;;;;;;; Fuction stuff here Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 9, 2007 Share Posted May 9, 2007 I just wanted to say that thanks to the advice given by PsaltyDS I have managed to get my program working: Your AutoIt-Fu is now very powerful, Grasshopper. Remember the wise words of Master Lee*: With great power comes great responsibility. *That's Stan, not Bruce... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
megatron Posted May 9, 2007 Author Share Posted May 9, 2007 Your AutoIt-Fu is now very powerful, Grasshopper. Remember the wise words of Master Lee*: With great power comes great responsibility. *That's Stan, not Bruce... I was thinking more: Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 9, 2007 Share Posted May 9, 2007 I was thinking more: Do _WaxOn() _WaxOff() Until $MiagiSayStop Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
megatron Posted May 9, 2007 Author Share Posted May 9, 2007 Do _WaxOn() _WaxOff() Until $MiagiSayStop Haha very apt Link to comment Share on other sites More sharing options...
dabus Posted May 9, 2007 Share Posted May 9, 2007 Hell, that's so cool. I could kick my ass that I haven't played around with this thing. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now