pwinter
6th October 2003, 15:49
Hi all,
I have developed a shell-script to monitor license usage. (didn't use "Closeidle" as I need to control things at server level). Also, due to our old porting set, had limited options!
The script does the following:
1. Take snap-shot of all bshell processes
2. Remove any obsolete bshell.<PID> files
3. use bshcmd6.1 to identify BaaN objects being run by each user in turn
4. append to a file any "idle" logins (which compare to various templates I have created)
5. Kill -15 sleeping bshells from the aforementioned file (should the number of users reach a defined number)
------------------------------------
My problem.....
The output of bshcmd6.1 appends to a RUNNING bshell.<PID> file. Because I am looping the process to a master list, these files grow quite quickly. The Job Daemon bshell file gets VERY big.
I don't really want to stop/start the job-schedule if I can avoid it.
Is there a way of reducing the size of a running bshell file? (I have tried "> /{BSE}/tmp/bshell.<PID>" to a test login file, only to find that it is re-created by the logic server at the next poll.
Sorry if this is a bit boring but the script is really useful to me.
Hope someone can help.
I have developed a shell-script to monitor license usage. (didn't use "Closeidle" as I need to control things at server level). Also, due to our old porting set, had limited options!
The script does the following:
1. Take snap-shot of all bshell processes
2. Remove any obsolete bshell.<PID> files
3. use bshcmd6.1 to identify BaaN objects being run by each user in turn
4. append to a file any "idle" logins (which compare to various templates I have created)
5. Kill -15 sleeping bshells from the aforementioned file (should the number of users reach a defined number)
------------------------------------
My problem.....
The output of bshcmd6.1 appends to a RUNNING bshell.<PID> file. Because I am looping the process to a master list, these files grow quite quickly. The Job Daemon bshell file gets VERY big.
I don't really want to stop/start the job-schedule if I can avoid it.
Is there a way of reducing the size of a running bshell file? (I have tried "> /{BSE}/tmp/bshell.<PID>" to a test login file, only to find that it is re-created by the logic server at the next poll.
Sorry if this is a bit boring but the script is really useful to me.
Hope someone can help.