We have Progress appservers (OE 10.0B05) running on AIX UNIX and I want write some code to check if they are up and running. The code to check the appserver would be run from a WIN2008 server. I can pull up Progress Explorer on the WIN2008 server to check the status of the appservers, but I need to write some code that can check their status programatically.
Is there any way to programatically check whether my AIX UNIX Progress appserver is up and running from a remote WIN2008 server?
To get app server status information you can use "asbman".
To get it remotely you would need some means to invoke a remote process and return a value. I'm a unix guy so I usually use "ssh" for that sort of thing.
There are Windows versions of SSH (look at the PuTTY suite for a really good free option). If you set it up to use pre-shared keys or an "agent" there are no messy login prompts to get in the way. Something like (untested):
plink -i sshkey.ppk user#server.name "asbman -name appServer -query"
"asbman" also supports -host and -port parameters if you happen to have it running on the windows box that you want to make the inquiry from.
If you have a small program that can open a socket connection, that would do it. If the program can open a socket, you can be reasonably confident the appserver is running.
You -might- be able to use the ABL SOCKET functionality to do this. Failing that, any other program which can open a socket on a remote machine and then close it will work.b
Related
I frequently connect to the virtual console provided by iDrac on many Dell servers which I manage. I'm looking for a way to connect to the virtual console programmatically, or whatever method that's faster than logging into the web interface manually and going through all the prompts.
Dell's racadm tool does not support this, apparently. iDrac is not set up with domain auth, just using a local account configured on iDrac. I would be connecting from a Windows machine, any browser.
Is there any way to automate this? Even partially?
I use a shell script for this, you can make a .bat file on Windows. See some simple instructions to start iDrac console from command line here
I run several game servers on a single windows-server-2012-r2. Many of the game servers run as console-application. I have created scheduled-tasks to run each on windows startup even if I'm not logged on. I would like to be able to attach to the consoles of those apps when logged on to the server, similar to what can be done in linux. Perhaps I'm going about this in the wrong way. Is there a way to attach to console apps running as tasks? Is there a software tool that accommodates this sort of thing?
Update:
Been searching high and low for a solution but haven't found anything yet. Have decided to write a wrapper for console app that will redirect Stdin, Stdout and Stderr of a process to a Telnet connection. Will use nssm to run the wrapper as a service.
I produced a solution: https://github.com/ccourson/Banjo
Banjo will launch a specified console application and route its streams to and from a telnet connection.
Pull requests welcome.
I have a command line program that listen to a tcp port until user type Q to exist. It works fine in local powershell window. But when I try to run it on another machine using powershell remote session, it just starts and quit. Is there a way to keep it running?
The remote script runs in a PowerShell that never becomes visible so AFAICT it doesn't even got a console handle by which to handle reading keyboard input.
You can take a look at the SysInternals utility - psexec. From my testing, that utility works for what you are trying to do.
Ensure you have Powershell 3 or higher since it adds support for detached sessions/background jobs.
Use a Remote Disconnected Session, described on Technet
I'm writing a perl script for a website, and I need to be able to control VirtualBox via the website. I'm not sure where to start, or if I'm even trying to debug in the right area, but here goes.
My server is running IIS7 on Windows Server 2008 R2. I'm also running 2 virtual machines through the vboxmanage command line interface. These VMs are running under SERVER\administrator.
When I open my website, it requests a login. I login to the website as SERVER\administrator and click a link that calls my script using an xmlhttprequest. Now, normally, it doesn't matter what user I run these as, but with vboxmanage, if I run the command as a different user, the list of VMs is different. I tried whoami, which returned SERVER\administrator, but %DOMAINNAME%\%USERNAME% returns the domain that the server is connected to as dommainname and SERVER$ as the username. The vboxmanage command then fails.
On the website, impersonation is turned on. When I turn impersonation off, the whoami request changes to be iis apppool\website. Any ideas on how to get around this?
As a final note, I've thought about using runas, but since it prompts for a password, there's no way to call it through scripting (and that would be a poor security decision, I'd imagine).
This is an oft recurring, well-known and well-solved problem. Instead of having one big program dealing with requests from the Web and managing the VM (strong coupling), separate the concern and write two programs, each doing exactly one task.
The user facing program running in the Web server context can continue with limited privileges. The VM manager is a stand-alone program running with the necessary admin privileges, either repeatedly from the scheduler or as daemon/service.
Have the first communicate with the second over a message-queue.
Is there a way to check in ant if an internet connection is available.
You could use http://ant.apache.org/manual/Tasks/exec.html to get this information using an external command.
Check internet connection in bash (you could write a small app for this) or try to ping some site and write the result somewhere.
Handle Exec task output in Ant