Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to limit the no. of opened instances of application to 5?

Status
Not open for further replies.

Saurabh.hom

Programmer
Jun 6, 2017
3
0
0
IN
Users go on opening as many instances of application as suit to them. Many time the number of instances per user exceed 10 and sometimes it even touches 20.
My question is that "How can I limit the no. of individual instance of application to maximum 7, over which if they try to open more instances the least used instance (or any such logic) will be closed automatically opening the new instance and hence the total no. remains equal to 7?
 
Take a look at one of the many FAQs only allowing a single instance and extend it to count instances to stop at 7 rather than at just 2.

faq184-2442
faq184-1767
faq184-1998
faq184-839
faq184-6206

Notice in a terminal server (I guess you are still concerned with your terminal server application) every session may see processes of himself and other users, too, especially via WMI, so you have to take the user into account before judging too many instances open, but most likely WMI will tell you that as property of a process and thus WMI would best fit your needs.

Also notice: If your 15 users (persons/employees) each start applications multiple times, the 1GB memory reservation I suggested should be split into perhaps "only" 125MB for each process. You always should not think in number of users, but the number of processes. You may add in some of the GB I decided to give the OS. Anyway, your real memory usage might be lower than 100MB, perhaps even lower than 50MB, VFP already worked in times, 1MB was the RAM of a PC, or even less. Logging the memory consumption of SYS(1016) can give you a good estimate of what a process really needs if you give it 1GB via SYS(3054) and then you can reduce to perhaps double of that.

Bye, Olaf.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top