Status Update : Deployment of DOSEMU Application Server
A while back I sent a request to the list for advice on running such a setup. I received several kind suggestions from the list members. I am now in 1st week of deployment and decide to submit a status update.
My thanks to all the people who pass me info and solutions.
Basic:
1. Multi-user DOS clipper-based software. 2. User access from LAN and WAN. 3. DOS-based dot matrix printing for LAN and WAN clients.
There are currently 2 major ways to do this.
A. Microsoft Terminal Server/Citrix Products.
B. Open Source Software.
Option A is known to work. It does incur higher cost, hardware and software and license management overhead. I was asked to explore Option B as priority choice. In case it doesn't work then fall back to Option A.
Observation
1. Server hardware Quad-Core 2. Server software CentOS 5.x (32-bit) 3. DOSEMU with FreeDOS (32-bit) standard RPM download from website 4. To address the 100% CPU utilization issue, I have used a combination of specialized dos program, Linux NICE value tuning and CPU affinity control to achieve acceptable response to enduser 5. Initially I use PUTTY and REMOTE ANSi Printing with lpansi for printing 6. I ran into problem where small size print jobs are ok, but big size print job always hang. 7. After fruitless workaround attempts and decided against running custom kernels, I made the decision not to use REMOTE ANSI Printing, thus creating a new problem on how to pass print job from server to remote WAN client over the Internet. 8. Implement OPENVPN for remote WAN clients with DSL connection. 9. With VPN tunnel open, setup std CUPS printer with SMB config for remote client printer.
10. Tune the setup to minimize packet fragment, timeout and firewall rules issues.
Maybe you are over complicating...
I use Dosemu on a remote machine through ssh, very easyly.
1) each clinet use an instance of Dosemu at the server
2) all use the same linux directory as C:
3) I only needed to instal some fonts in the client machine.
4) I use a (free) pcl emulation software, whica generates .ps and is printed via Linux with cups. there is also an epson emulator, but it was older and the pcl worked first...
What I don't know:
1) if clipper locking is working with dosemu+freedos, you can test that easyly on a single machine
2) doemu does not implement any kind of flush printer buffer at LPT1 close. This existe in ALL other dos multi user dos system, since Novell2. So spool timing can be an issue.
I can send you some info, but it would be nice then, if you make a public how to for that :)
Alain
Shaw Tong Tan escreveu:
Quoted 32 lines
A while back I sent a request to the list for advice on running such a setup. I received several kind suggestions from the list members. I am now in 1st week of deployment and decide to submit a status update.
My thanks to all the people who pass me info and solutions.
Basic:
1. Multi-user DOS clipper-based software. 2. User access from LAN and WAN. 3. DOS-based dot matrix printing for LAN and WAN clients.There are currently 2 major ways to do this.
A. Microsoft Terminal Server/Citrix Products.
B. Open Source Software.Option A is known to work. It does incur higher cost, hardware and software and license management overhead. I was asked to explore Option B as priority choice. In case it doesn't work then fall back to Option A.
Observation
1. Server hardware Quad-Core 2. Server software CentOS 5.x (32-bit) 3. DOSEMU with FreeDOS (32-bit) standard RPM download from website 4. To address the 100% CPU utilization issue, I have used a combination of specialized dos program, Linux NICE value tuning and CPU affinity control to achieve acceptable response to enduser 5. Initially I use PUTTY and REMOTE ANSi Printing with lpansi for printing 6. I ran into problem where small size print jobs are ok, but big size print job always hang. 7. After fruitless workaround attempts and decided against running custom kernels, I made the decision not to use REMOTE ANSI Printing, thus creating a new problem on how to pass print job from server to remote WAN client over the Internet. 8. Implement OPENVPN for remote WAN clients with DSL connection. 9. With VPN tunnel open, setup std CUPS printer with SMB config for remote client printer.10. Tune the setup to minimize packet fragment, timeout and firewall rules issues. --
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
I am doing the *EXACT* thing as Shaw, note that there is also an "Option C" which is just share the files over the VPN... which is slow, that is what we were doing hence the need to find a "better" solution. The author of the software says to use "Option B" ... why use a graphics remote access (RDC) to a text program? Its more of the same issue as the original, what about for users on dialup or using wireless (GSM and CDMA) access... SSH will work better Also "option d" use cygwin (for SSH-server) or the MS telnet server, neither work right and telnet is insecure.
Quoted 4 lines · Alain M.
What I don't know:
1) if clipper locking is working with dosemu+freedos, you can test that easyly on a single machine
Is there a generic answer to this? Because I can not get the locking working right. What is odd that under openSUSE 10.3 where I did my initial testing it did but under openSUSE 11.0 it did not. And I don't use seLINUX or AppArmour. So the people in the office still use the same way they were using before (Net use x: \\server\\share) to run it locally. For the time being it is "ok" not to have the locking working right.
Andrew Joakimsen escreveu:
Quoted 7 lines
Quoted 2 lines
1) if clipper locking is working with dosemu+freedos, you can test that easyly on a single machine
Is there a generic answer to this? Because I can not get the locking working right. What is odd that under openSUSE 10.3 where I did my initial testing it did but under openSUSE 11.0 it did not. And I don't use seLINUX or AppArmour.
FWIK, it is a FreeDOS related problem. The first time I have seen this was on real hardware with Windows server..
Quoted 4 lines
So the people in the office still use the
same way they were using before (Net use x: \\server\\share) to run it locally. For the time being it is "ok" not to have the locking working right.
This is annoying, I hope that someone has it working... The reason is that most users-to-be for dosemu need Clipper
Alain
Quoted 6 lines · Alain M.
Andrew Joakimsen escreveu:
Quoted 4 lines
Quoted 3 lines
1) if clipper locking is working with dosemu+freedos, you can test that easyly on a single machine
Quoted 7 lines
Quoted 4 lines
Is there a generic answer to this? Because I can not get the locking working right. What is odd that under openSUSE 10.3 where I did my initial testing it did but under openSUSE 11.0 it did not. And I don't use seLINUX or AppArmour.
FWIK, it is a FreeDOS related problem. The first time I have seen this was on real hardware with Windows server..
What does FreeDOS have to do with Windows Server? Anyways I tried on MS-DOS under openSUSE 10.3 for another issue but now that I think of it I did not try it on 11.0. If you don't hear back from me, please pester me to try MS-DOS + dosemu + openSUSE 11.0.
Per the posted questions, the additional info below.
1. DOSEMU+FreeDOS and CLIPPER Locking issue
Reply: My specific scenario is as follow:
1a. I do not have source code to the software. 1b. From the original DOS batch file supplied by vendor, I can see that it setups the clipper path, so I assume it should be clipper-based. 1c. The clipper-based software is also likely re-compiled with 3rd party tools. I am not 100% sure on this. I attempted this path initially because I wanted to solve the 100% CPU problem and there are several DOS tools out there that can help if you have a standard Clipper-based setup. During the course of doing this I remember 1 or 2 tools that can check the compiled code (low-level) to see whether it has the loop present and change it, but the software I have gave negative result. (according to info, that loop is pretty common on old dos program, the negative result likely means that the local software has some non-standard changes compared to straight clipper compile.) 1d. Eventually I received an advice from list member to use a specialize tool and I did that. However, I need to do additional nice level tuning and CPU affinity control to get to acceptable setup.
the above is to explain the clipper-based software background. Now on to locking.
2. For now, I have many users doing READ and upto 3 doing WRITE.
3. Maybe that is why locking problem is minimal. I am still observing since this is 1st week of deployment. Prior to the deployment I have a test where I open 4 instances of the same data entry screen (key in PO)(so likely accessing the same tables and potentials locking issue) However, they seemed to progress without any problems at the time of testing.
ST
Quoted 2 lines · Shaw Tong Tan
1b. From the original DOS batch file supplied by vendor, I can see that it setups the clipper path, so I assume it should be clipper-based. 1c. The clipper-based software is also likely re-compiled with 3rd party tools. I am not 100% sure on this.
Try to run the .exe through the 'strings" command. In my case this helped me to determine it was a CA-Clipper 5.3 application with Blinker.... can not be decompiled with any off-the-shelf tool that I know of.
Quoted 2 lines
2. For now, I have many users doing READ and upto 3 doing WRITE.
3. Maybe that is why locking problem is minimal. I am still observing since this is 1st week of deployment. Prior to the deployment I have a test where I open 4 instances of the same data entry screen (key in PO)(so likely accessing the same tables and potentials locking issue) However, they seemed to progress without any problems at the time of testing.
Hopefully that is the case.
Quoted 7 lines · Shaw Tong Tan
Sorry I was in a hurry in previous post so I now continue with the remaining.
A. Printing.
1. PUTTY + REMOTE ANSI Printer + LPANSI was originally preferred since it makes the access and printing very easy for WAN clients.
2. The plan failed when a client try to print LARGE Print job 32-300Kbytes. The DOS Application still response but client print queue hung waiting. Example a 32Kbytes job, it receive approx 4K+ then hung. I tried various combination sometimes it send close to 8K then hung.
I had no issues even with large print jobs over ANSI printing. The issue comes when the DOS program runs in the same session as the Clipper application, since there is no way to block one input or the other, e.g. if your program prints on the screen some status between pages this could be causing what you describe. Try this,
"Print" to a file in homedir/printjobs:
#!/bin/bash
#/usr/local/bin/file2print
TMPFILE=mktemp ~/printjobs/dfprint.XXXXXXXXXX || exit 1 cat "$@" >> $TMPFILE
ANSI Print from the printjobs directory:
#!/bin/bash
# file2print # send ~/printjobs/* to tty printer echo Processing Print Jobs for LPT1... sleep 2 directory=~/printjobs/ for file in $( ls $directory ) do printf "\033[5i" cat $directory$file printf "\033[4i" rm $directory$file done
Continuation of previous post.
A. 100% CPU remedy.
Original background
1. test environment Pentium E2180/CentOS 5.2 (32-bit)/DOSEMU+FreeDOS 1.4.0 from website. 2. I found maximum 4 instances on single host, after that random delay and hangs 3. Std OS environment without any modification.
To arrive at a solution
1. tried several DOS utilities, example dosidles, even citrix utility
2. I spent weeks trying many combination. Finally I adopted a combined recommendations from list member Joe to run BX200FIX and setting nice value. I added a CPU control as well. Example below
EXAMPLE: taskset -c 1 nice -n 19 dosemu
run DOSEMU with nice value of 19 on CPU Core number 1. Dualcore CPU core is 0,1 Quad Core is 0,1,2,3
After implementation, I tested up to 6 clipper-based app instances on 1 cpu core and found response reasonable and stable, no random hangs. Based on my assessment of the overall situation, I feel 6 session/cpu-core is the maximum I am willing to commit. Since I have quad-core host now, I am willing to spread the load across to gain a bit of buffer zone. Note that try not to use Core-0 for dosemu because that's the default for OS and system services. The high cache size on Quad Core also help I think in reducing the memory contention issue.