Accessing OpenCL GPU from windows 7 through ssh - windows

I have computers where I want to run OpenCL apps remotely using a command line tool, something like the problem described here: http://devgurus.amd.com/thread/160690, but I am with nVIDIA hardware.
I have several computers with W7 and XP where I did install cygwin and OpenSSH. The XP ones, work OK with OpenCL, but not the W7 ones.
Is there any flag, trick, setting that can help be to overcome this problem of Windows? Or in SSHD server?

Found the solution myself:
The easyer way to overcome this problem is to use PSEXEC tool from sysinternals.
However, there are some problems with this tool too.
In order to work properly it is needed:
An account in the remote computer with proper rights (Admin preferable)
Launch PSEXEC in interactive mode (-i), otherwise the access to the GPU is not available.
Have a local user connected, or a local user was the last one to connect. If a RDP session is running or the last user connecting has been trough RDP it will likely not work too. Since the GPU will already be disabled.
I am open to accept anyone else's better answer.
Thank you!

Related

Possible ways to run windows batch command from Unix

I am trying to run a windows batch command from CentOS 6. I would like to know the best way to achieve this. I explored PsExec and WinExe utilities in unix to connect to windows machine and run the required commands.
I am trying this on a windows VM which is within company network, hence kindly highlight any specific network issues that I may have to check for the setup to run.
Any pointers would help.
Have you seen the examples from the PowerShell for Linux GitHub pages, as the working examples seem to cover this off nicely?
https://github.com/PowerShell/PowerShell/tree/master/demos/SSHRemoting
It will require SSH installed onto your Windows server, but otherwise seems to tick all of your boxes.

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.

Send command from batch shell to shell

My structure looks like this:
I have one Windows PC which is running 24/7 in my cellar and I have one Windows PC in my office (at home). Both are in the same network and I have admin privileges on both.
How can I set up a batch-file on my office PC which can send a command to the other PC through the command line? I should be able to turn off and reconnect my office PC without running every time in my cellar.
The SHUTDOWN command can remotely turn off other computers on your network but I am not sure what you mean by reconnect.
Have you taken a look at the tools described here ? If you are not on the latest version (or rather server version) of Windows, then you might have to download the tools mentioned here.
http://network-shutdown.com/remotely-shutdown-computers-on-network

executing command on a Windows Machine from a UNIX/LINUX Machine

is it possible to execute a command (ex: launching a .bat file located on the remote machine) on a Windows Remote Machine, using a UNIX or Linux Machine ?
Is there something like a scp/ssh mechanism or at least a way to connect to a Windows Machine passing through the network ?
Thanks for your help.
By default, recent Windows versions only support the Remote Desktop protocol. As far as I know, client versions only allow a single user, while server versions with installed Terminal Services allow for multiple simultaneous users.
Windows Server versions also support the Telnet protocol, but the server is disabled by default - it may not even be installed. Therefore you will have to enable it manually. Do you really want to use Telnet of all things, though? Just the security concerns are enough to make it mostly useless.
There is also a version of OpenSSH for Windows, that uses the Cygwin DLL. I have not tried it, but using an SSH implementation from the Unix world does have its appeal (and probably a few disadvantages). See also this.
EDIT:
Recent Windows versions also support the Windows Remote Management system, which allows you to launch an interactive session throuh a bit of trickery.
You may want to try Vandyke VShell.

Linux shell equivalent on IIS

As a LAMP developer considering moving to a .Net IIS platform, one of my concerns is the loss of productivity due to lack of shell... Has anyone else had this experience? Is there possibly a Linux shell equivalent for Windows?
Depending on what version of IIS you're considering, I would second lbrandy's recommendation to check out PowerShell. Microsoft is working on a PowerShell provider for IIS (specifically version 7). There is a decent post about this at http://blogs.iis.net/thomad/archive/2008/04/14/iis-7-0-powershell-provider-tech-preview-1.aspx. The upcoming version of PowerShell will also add remoting capabilities so that you can remotely manage machines. PowerShell is quite different from *NIX shells, though, so that is something to consider.
Hope this helps.
Are you asking about Linux shell as in an environment to work in? For that CygWin I think has been around the longest and is pretty robust: http://www.cygwin.com/
A while ago I found a windows port of all the popular linux commands I use (ls, grep, diff) and I simply unzip those to a file, add it to my PATH environment and then can run from there: http://unxutils.sourceforge.net/
Or are you talking about executing shell commands from within your code? If you're in the .NET sphere, there is the Process.Start() method that will give you a lot of options.
Hope this helps!
I assume you don't mean cygwin, right?
How about powershell, then?
If you're referring to simply accessing your IIS server from a remote location, remote desktop generally solves that problem. Assuming your server has a static IP address or a host name you can access from the internet, remote desktop is a simple and relatively secure solution.
Is there a problem with this answer? Now I have negative reputation...
The best way I can think of would be to use Cygwin over an OpenSSH connection.
Here's a document that explains how to do just that:
http://www.ucl.ac.uk/cert/openssh_rdp_vnc.pdf
Remote shell doesn't solve the productivity issue. (It merely makes things possible.)
From what I've heard, everything that the future Microsoft GUI:s do will be possible to do with powershell since the GUI:s use the same API:s as those that are available from powershell.
Personally, I love cygwin but cygwin can not help you manage Microsoft applications.
You might be surprised, however, how powerfull the Windows Scripting Host is when coupled with Window Management Instrumentation. I think IIS is fully manageable with WMI or some COM objects that can be easilly used from a JScript WSH script.
You should make your choice of server platform based on the environment as a whole, and that includes the admin/management interfaces supplied.
I'm afraid that if you don't like the way Windows implements management of IIS, then that's too bad. Having said that, a bit of delving around in the WMI interfaces will generally yield a solution that you should find usable. I used to do quite a bit of WMI scripting (mostly via PowerShell) in order to have a reliable environment rebuild capability.
If you want a Linux shell on Windows, install the Windows Subsystem for Linux on Windows 10 :
The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.

Resources