BookmarkSubscribe
Choose Language Hide Translation Bar
lodey101
Community Trekker

Re: monitoring JMP usage

This is a handy function. Thanks for sharing

0 Kudos
michaelcorleone
Community Trekker

Re: monitoring JMP usage

This is excellent - thanks very much.

Do you know if there is any way to produce a timestamp of when the user closes JMP?

0 Kudos
blackeneth
Community Trekker

Re: monitoring JMP usage

If you install your tracking as an add-in, you can have an exit script. See page 526 of the scripting manual, "Specify Start-up and Exit Scripts (Optional)".

One caution when using a shared table for tracking - namely, user contention when 2 users are trying to open the file. More specifically, user1 has it open - then user2 starts up and tries to open it. A couple of ways to address this:

  • put a try() around the whole script!  You'll loose tracking on user2, but user2 won't error out.
  • Lock files - before opening the JMP table, user1 creates a "lock.txt" file, which can be blank.  When User2 starts up, the script first checks for the presence of lock.txt -- if abscent, create it and open the JMP table.  If lock.txt is present, then either 1) wait a few seconds and try again, or 2) exit the script cleanly without trying log start information.  After user1 is done updating the JMP data table, then user1 deletes the lock.txt file.  The problem you can get with this method is lock.txt files persisting in the shared directory and not getting deleted - this would happen, for example, if user1 crashed before lock.txt was deleted.
  • You could also potentially trap the error on JMP table open instead of using lock files. Lock files are good if the subsequent table operation takes a long time. Your JMP tracking file will steadily grow in size and take longer for users to open each time.If you trap the error & retry after a short delay, be sure to put a counter and a maximum number of retries - otherwise uses can get stuck waiting for a file that never becomes available.
  • An alternative to logging into 1 file is to log into multiple files. When a user starts JMP, he creates a JMP table - with a filename that includes the datetime and username. You then need to write a script that reads all these 1 line JMP tables and appends them to 1 big file.

I've also seen user tracking done by borrowing methods of advertisers on the Internet - namely, web beacons. You could use the web() to open a web page.

Finally, I would recommend you publish a "privacy policy" and let the users know that their usage is being monitored, what data is being collected, and how it is going to be used. If the use of the data changes in the future, publish a revised "privacy policy" stating the new use(s) of the data.

0 Kudos
michaelcorleone
Community Trekker

Re: monitoring JMP usage

Thanks for this - you have given some good advice here. Think i might go with the try() command!

0 Kudos
Byron_JMP
Staff

Re: monitoring JMP usage

I don't know of a way to do that, but Its not something I've tried to get at either.

JMP Systems Engineer, Pharm and BioPharm Sciences
0 Kudos