Neutro Posted June 25, 2013 Share Posted June 25, 2013 Hey folks, I have a textfile list of around 4000 computers that I would like to ping simultaneously to see if they are online or not. If I use the Ping() command in a loop, it will only ping 1 computer at the same time. Any ideas? Thanks Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 25, 2013 Moderators Share Posted June 25, 2013 AutoIt is single-threaded, so barring 4000 scripts I cannot see how you would accomplish this. Why (short of a DDoS) would you want to tax your host system by running that many pings simultaneously anyway? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
DW1 Posted June 25, 2013 Share Posted June 25, 2013 (edited) AutoIt is single-threaded, so barring 4000 scripts I cannot see how you would accomplish this. Why (short of a DDoS) would you want to tax your host system by running that many pings simultaneously anyway? Since you can call ping from cmd, you should be able to pull this off (don't know about 4000) from one script if you treat each cmd instance asynchronously and just have a system to read the many stdout... right? EDIT: It's ugly, but may work. I am also curious as to the intent here though. Any sort of intrusion detection system is going to start temp blacklisting this box if it's not completely useless. Edited June 25, 2013 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Neutro Posted June 25, 2013 Author Share Posted June 25, 2013 (edited) I need to find out which computers of my company do not have OCS inventory software installed. So I gathered a text list of all computers registered on our domain controller, then i get a text list of all computers registered on our OCS inventory server. I created a small script to compare both text files so I know which computers of the domain are not registered on our OCS server. The output file has around 3000 hostnames. Most of them are old computers that are not used anymore but that were used on the domain years ago. So I need to ping everything and output only computers that respond to ping, so I know that I need to install OCS on them. But if I only ping 1 computer at the same time for 5 secs, it would take around 4 hours to do! Edit: my goal is to be able to ping more than 1 computer at the same time, maybe not all of them simultaneously. If I could ping like 10 or 20 computers at the same time, it would be much faster already Edited June 25, 2013 by Neutro Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water! Link to comment Share on other sites More sharing options...
UEZ Posted June 25, 2013 Share Posted June 25, 2013 (edited) Try this: Something I wrote but not multi threaded: Br,UEZ Edited June 25, 2013 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
DW1 Posted June 25, 2013 Share Posted June 25, 2013 So why not just push a script to the client machines to check for the software, and then install it from a share if it isn't there? I don't think ping is the right way to go about this to be honest. Do you guys not use MS SMS, Tivoli or some other type of management software for this sort of thing already? AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 25, 2013 Moderators Share Posted June 25, 2013 (edited) OCS is an open source alternative to products like Altiris or SCCM. However, it does not have a "heartbeat" function, to enum machines without the client installed, like the others. I believe that is why the OP is having to go through a manual list to find them. Edited June 25, 2013 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Neutro Posted June 25, 2013 Author Share Posted June 25, 2013 (edited) @danwilli > i'm doing this in a domain migration context, from an old samba managed domain to a new windows managed domain. All computers that already have migrated to the new windows domain have OCS installed. Badfully we cannot push an OCS installation script on the computers of the old domain because there are no tools that would allow us to do it with the samba managed domain (that's at least what the admins of this domain told me. Maybe it is in fact possible but even if it was, I do not have access to these servers). @JLogan3o13 > yes you are right. In our company we try to use as much free and open source softwares as possible. OCS inventory is working pretty well for us, even if indeed it does not have all functions of things like SCCM and such. @UEZ > I already looked at these posts before asking for help here On your first link I do not understand what is the main function/tool used to do a mass ping. The second one is nice but what I need to do is ping multiple computers at the same time, not 1 by 1 Edited June 25, 2013 by Neutro Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water! Link to comment Share on other sites More sharing options...
water Posted June 25, 2013 Share Posted June 25, 2013 Another idea: Computers in an AD domain have a password like users. The password expires and will automatically be renewed when the computer logs on again. You could use my AD UDF to retrieve the password expiration date of all computers and then get those which haven't been logged in for e.g. > 2 months. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Neutro Posted June 25, 2013 Author Share Posted June 25, 2013 hey water Thats a cool idea I already tried using your AD UDF on the samba managed domain but ad_open is failing. @error is "Creation of the RootDSE object failed". If my memory is correct, @extended did not contain anything usefull, but I can try it again tomorrow if you want. Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water! Link to comment Share on other sites More sharing options...
water Posted June 25, 2013 Share Posted June 25, 2013 I have a Resara (Samba) server here to test and it works just fine. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted June 25, 2013 Share Posted June 25, 2013 BTW: Details on how the computer account password works can be found here. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Neutro Posted June 25, 2013 Author Share Posted June 25, 2013 (edited) Well that's good to know that your AD functions works on Samba server domain Badfully for me, I do not have access to our samba server in my company, so I cannot tweak it to see what's wrong I only have admin rights on the new windows domain. So I don't think I will be able to solve my problem using your AD UDF right now. Thanks anyway for your help and for the computer password information, I was not aware of it Edited June 25, 2013 by Neutro Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water! Link to comment Share on other sites More sharing options...
water Posted June 25, 2013 Share Posted June 25, 2013 You do not have to have admin rights in the domain to use my AD UDF. I have only normal user rights in my company but can extract all needed data. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Neutro Posted June 25, 2013 Author Share Posted June 25, 2013 Well I think I was not very clear in my previous post, sorry. What I meant is: i do have a domain administrator account for both old samba domain and also for the new windows domain. I can also remote control the windows domain controller, so i can tweak whatever I want on it. But I do not have physical or remote control on the samba server. I used a script using AD_UDF on a computer running on the old samba domain on the domain administrator account but still had a failure with ad_open() as stated above. I guess the problem is that the samba server is badly setup, but I cannot do anything about it since I cannot tweak it. Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water! Link to comment Share on other sites More sharing options...
water Posted June 25, 2013 Share Posted June 25, 2013 I see. Did you try the latest version of the UDF? Depending on how old the UDF you tried was, some things might have changed. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Neutro Posted June 25, 2013 Author Share Posted June 25, 2013 Yes I used AD UDF 1.3.0.0 Well i guess there is no easy way to ping multiple computers so i'll just do it 1 by 1 and let the script run for a long time Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water! Link to comment Share on other sites More sharing options...
Gianni Posted June 25, 2013 Share Posted June 25, 2013 Yes I used AD UDF 1.3.0.0 Well i guess there is no easy way to ping multiple computers so i'll just do it 1 by 1 and let the script run for a long time just a moment, take a look here it pings ranges of computers and it is very fast Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Neutro Posted June 25, 2013 Author Share Posted June 25, 2013 Thank you Pincopanco I already wrote a single ping script, i will look at nping tomorrow when i have some time Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water! Link to comment Share on other sites More sharing options...
JohnQSmith Posted June 26, 2013 Share Posted June 26, 2013 What cracks me up is that the original post was at 13:24 (my time) and the last post was at 15:56 (my time). You spent two and a half hours talking about it and ended up deciding to "look at nping tomorrow when i have some time". Had you started a script that pinged each computer individually one after the another, like you mentioned in post #4, you'd have been done in another hour and a half (using your "around 4 hours" estimate). Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". 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