Purging the USAGE File
The USAGE files ($APPXPATH/0SA/USAGE.*) track numbers of endusers, designers, and users of locked applications currently logged into APPX. Prior to APPX Release 3.5, APPX periodically performed a "cleanup" and removed entries from the USAGE file for sessions that no longer existed. This "cleanup" operation was disabled in APPX 3.5 and higher to improve License Server reliability.
APPX still removes a session's entry from the USAGE file if that user exits from APPX normally. If the user does not exit normally, then the entry for that session remains in the USAGE file indefinitely. A large or corrupt USAGE file can slow the login process. The following procedure can be used to trim the USAGE file 'on the fly':
- Open a command shell, and export APPX_LS_GHOSTS=true.
- From the same command shell, kill the license server.
- From the same command shell, start the license server.
Since the APPX_LS_GHOSTS variable is set, it will remove all the dead entries in the USAGE file as part of it's start up. It's possible that in between steps 2 and 3, someone else tries to log on to APPX, which will cause the license server to start, but the LS_GHOSTS won't be set in that users environment, so it won't clean the file. If this happens, just repeat 2) and 3) until you start the license server.
- Unset the APPX_LS_GHOSTS variable. (Or just close the shell & open a new one).
- Kill & restart the license server.
Now it will be running without LS_GHOSTS set, and you won't be running the risk of having the USAGE file corrupted.
How can you check to see if this worked? Before you start, use the System Admin file management to verify the USAGE file before you start, and then check it again after you are done.
We did this on a running system, and the USAGE file went from 8000+ records to 35 in the blink of an eye, with performance increasing accordingly, all while a couple dozen users were on the system.
If you suspect your USAGE file is corrupt, then your only solution is to get everyone to log off, kill any remaining appx processes and erase $APPXPATH/0SA/Data/USAGE.*. The next user to log in will cause a new USAGE file to be created.
Comments:
Read what other users have said about this page or add your own comments.