Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 20 FEB 2012 10:32:01AM Paxton Scott wrote:

Greetings!

I appreciate the new board with spell check…

I have discovered a problem for me when using OengineServer, maybe someone knows a workaround.

I have a WinXP machine running Apache2 and OengineServer with 3 engines. OI 9.1.1 OECGI2

I can open OpenInsight on this machine and at System Monitor run the function ShowDiskSize (as offered in the OI help) and it returns the available space on a mapped drive.

However, if I call ShowDiskSize by way of OengineServer, Inet_, it returns all zeros.

On a machine not using OengineServer, it works fine calling from INET_

Is there a way to get the available disk space on a mapped or network drive using OECGI2?

Thanks,

Paxton


At 20 FEB 2012 11:52AM bshumsky wrote:

Greetings!

I appreciate the new board with spell check…

I have discovered a problem for me when using OengineServer, maybe someone knows a workaround.

I have a WinXP machine running Apache2 and OengineServer with 3 engines. OI 9.1.1 OECGI2

I can open OpenInsight on this machine and at System Monitor run the function ShowDiskSize (as offered in the OI help) and it returns the available space on a mapped drive.

However, if I call ShowDiskSize by way of OengineServer, Inet_, it returns all zeros.

On a machine not using OengineServer, it works fine calling from INET_

Is there a way to get the available disk space on a mapped or network drive using OECGI2?

Thanks,

Paxton

Hi, Paxton. When you run the Engine Server (unless you're running it on the desktop manually via the DOS command "java -jar oesocketserver.jar"), it's running as a service, and unfortunately the service process doesn't know anything about mapped drives. The mapping of drives happens in the user's own context, so the mappings you have set up for your own desktop logon don't appear to the service user.

You may be able to use a UNC name (\\computer\share) which _is_ recognized by the service process. The other consideration is whether the ShowDiskSize call requires a process to be in a GUI context. Again, the engine server, when running as a service, doesn't have a Windows desktop to interact with, and if the ShowDiskSize call requires the Windows GUI, then it won't succeed. If you call the ShowDiskSize on the local drive (rather than a network drive) via the INET call, does it still return 0? If so, that might be an indication that it won't work in the service's non-GUI environment.

The reason why it works when you're _not_ using the Engine Server is because the older OECGI used to communicate with OEngine's that lived on your actual desktop. Thus, they ran in your "user context" (and could see your mapped drives) and in your Windows GUI context (if that's required for the call).

An alternative, if the ShowDiskSize won't work in the Engine Server context, is to use a .NET equivalent call through RevDotNet; this is the way we've resolved this issue with a number of calls that required the Windows GUI.

Hope that helps,

- Bryan Shumsky

Revelation Software, Inc.


At 20 FEB 2012 07:28PM Paxton Scott wrote:

Brian,

Thanks for the explanation. I have a conundrum, then. The OI subroutine Dspace() which the ShowDiskSize uses will only work with a mapped drive, a UNC name throws an error as I remember. Or, returns nothing.

I am running in an Apache2 environment, and have never used RevDotNet and do not know if it is appropriate there. Any additional guidance is appreciated.

Have fun,

Paxton


At 21 FEB 2012 12:19AM bshumsky wrote:

Brian,

Thanks for the explanation. I have a conundrum, then. The OI subroutine Dspace() which the ShowDiskSize uses will only work with a mapped drive, a UNC name throws an error as I remember. Or, returns nothing.

I am running in an Apache2 environment, and have never used RevDotNet and do not know if it is appropriate there. Any additional guidance is appreciated.

Have fun,

Paxton

Hi, Paxton.

A little googling shows that GetDiskFreeSpaceEx (in kernel32.dll) might be a call that you could use to get the disk space information via UNC.

Hope that helps,

- Bryan Shumsky

Revelation Software, Inc.


At 21 FEB 2012 07:50AM Paxton Scott wrote:

Thanks Brian,

It also occured to me that I can use PHP to get the it also.

Paxton


At 21 FEB 2012 09:41AM Jared Bratu wrote:

Try using WScript to access the free space on the share, instead of a mapped drive letter. Please see this post for code example.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/233e5dfd000460c787bc7c300.txt
  • Last modified: 2023/12/28 07:39
  • by 127.0.0.1