Check windows processes by name - ruby

I'm looking for something that can be run on 1 machine to monitor the processes of another machine in Windows, and notify (email?)
Basically, Server A is running "Application.exe" and Server A reboots - I need Server B to be able to spot that the application "Application.exe" is no longer running on Server A and alert me, possibly by email.
I tried to do something in ruby, but the only ruby I can use on these servers is JRuby and I didn't get very far.
Any suggestions?

By the sounds of it, everything you need you will find on this page:
http://technet.microsoft.com/en-us/library/ee692846.aspx
Hope this helps.

Related

UIAutomation won't work in Windows Server (VPS) if I am not connected via RDP

I have script which uses mircrosoft's UIAutomation to automate an application. The script is inside a VPS running Windows Server 2012. The script works perfectly while I am connected to the VPS via Remote Desktop (RDP).
When I am not connected, the script seems to be stuck on SetFocus for a object... which leads me to believe that the script needs a Display/Screen/Session in order to work... but I am not sure if it is possible to do it while I am not connected to the VPS.
I can see 2 possible solutions here, either modify the script in someway to work in this environment or make the VPS have a virtual desktop while I am not connected (this solution might be more related to Server Fault rather than StackOverflow).
I am very confused, thanks for the help in advance :)
I managed to workaround the issue by actually connecting to the server to itself (to 127.0.0.1) via RDP so that it will always have an active RDP session for the automation script to run.
I am not happy with the results but it works... I cannot give clear instructions on how you would need to modify the settings in Windows to allow RDP connections from self, it was a one big trial and error process, I have to modify some policies in the Group Policy Editor and then some stuff that I don't remember.
There is another downside to this, a Windows server will allow 2 simultaneous connections to it but by using this method we are reserving a slot so only 1 connection at a given time is possible, something to be aware of.

Upon executing a selenium test, spin new Windows VM, execute commands, then exit?

I am running a Mac but need to test Web applications in IE. Ideally, I would love to be able to execute a selenium command on my box, and it would spin up a VM (VirtualBox, VMWare, something like that), run the commands in IE, and then exit the VM once I'm done. Is that possible? If not, does anyone else have a better idea of how to run selenium commands in a Windows environment from a box that is not Windows? My commands are in Python 2.7, if that matters. Thanks
Your requirements shall be possible to fulfill.
Selenium can be using "Selenium Server" and your python code using selenium package shall be able talking to it - it uses http protocol for such a remote control.
Selenium server is using Java, and as it is started, it shows url on which it awaits commands.
These urls can be then used in your python code when constructing driver for your browser, there you specify url of remote Selenim server and shall be able continuing as if you would work locally.
Description how to connect is here.
Feel free to comment or reply to me how it went, it sounds very interesting but I do not have any real experience with that so far.

How to create a telnet server locally?

I'm running windows XP on my dev machine. I need to create a telnet server to test an application locally. Is there any program or application that I could use to do that? The only thing I need is for my program to be able to connect on port 23 to my dev machine, send some data, and for the receive data to be printed/echoed out/logged somehow by the receiving program.
Any ideas?
It sounds like what you may really need is something that emulates the echo daemon in Unix. Not sure if Cygwin has something like that, but I'd look there first.
If it's really a telnet server that you need, you can use PC Telnetd (http://www.tamasoft.co.jp/en/telnetd/) or you can set up telnetd using Cygwin. There are surely other options as well.
It sounds like you can use netcat (as far as I remember, there are several different versions of netcat. The link is the one that is used for Fedora). There might be a cygwin version available readily, that would have been my first choice if working on windows.

Is it possible to run programs locally from a terminal services remote app?

First, I guess I'd have to figure out if I'm running remotely and second I'd have to figure out whether my remote connection is a standalone remote app or an app running on a terminal server (that may be tricky).
But, once I've figured out all those awful things, is there a way to run a windows function like ShellExecute locally instead of remotely?
The reason I'd want to do this is because I launch a web browser to view rather high bandwidth things that require javascript and flash and certain sysadmins who administer our product aren't too keen on having to make unnecessary and insecure modifications to their terminal server farm.
Yes, if the clients are running Windows and you can install software on them.
See Remote Desktop Services Virtual Channels in MSDN.
There is a free tool that does exactly what you want. I got reference from TechNet forums, it's named Remote Executer from http://www.mqtechnologies.com
Good luck

Why easyphp stop all apache processes on severals PC?

on some Windows PC, when I have both easyPHP and a standalone apache service configured on another network port and with a specific service name, I have a problem : when I stop easyphp, the other apache is stopped too.
The problem do not occur on all PC I have, but seems very strange to me.
Any idea?
more information after answer from Radar : my process have a special name (ecapache), but easyphp does not seems to use process but rather lauch directly the servers.
Thanks
Cédric
Maybe how it's killing it is that it's finding all processes called "apache" or similar and just killing them, regardless of if it 'owns' it or not.
i think Both are integrated together, i was not occur in all PC because of port number.

Resources