Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 23rd, 2011, 02:18 PM
matt2737 matt2737 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2010
Posts: 6 matt2737 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 12 sec
Reputation Power: 0
Tracking Usage Stats Program

Problem Description: I am assigned to make a program to track application usage for Mac computers on campus at a university. This program will record how many times users use licensed applications such as Microsoft Word, Adobe Photoshop, etc and send the data to another program for recording into a database. The purpose is to figure out how many licenses of such programs the university needs. I am not very familiar with Mac and pretty much confused with how I would access system information like that anyway. If anyone has any ideas on what language to use for this or some certain API's or packages or even topics I could research let me know.

What I know so far : I know that I can get a text recording of the processes currently running from the unix terminal. But I am not very familiar with unix programs and if making a program in unix that runs in the background with a timer and everything is a viable option. Possibly if there is a concrete way to call a shell script from another language that might work.

Preferred Solution : PHP or Java ... I am most familiar with them but I am willing to use another language.

Reply With Quote
  #2  
Old June 23rd, 2011, 02:26 PM
kicken's Avatar
kicken kicken is offline
Wiser? Not exactly.
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2001
Location: Bonita Springs, FL
Posts: 5,654 kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)kicken User rank is General 37th Grade (Above 100000 Reputation Level)  Folding Points: 2670569 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2670569 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2670569 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2670569 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2670569 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2670569 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2670569 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2670569 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2670569 Folding Title: Super Ultimate Folder - Level 6Folding Points: 2670569 Folding Title: Super Ultimate Folder - Level 6
Time spent in forums: 2 Months 2 Weeks 2 Days 5 h 1 m 44 sec
Reputation Power: 3435
Never had a mac, so not that familiar with them but my understanding is that modern mac's have an environment and tools similar to modern unix systems. If that's the case you could try a couple things.

The easiest thing to do would probably be to have a script that kicks of via cron every few minutes and examines the output of ps aux for the programs in question.

Another method which may give more accurate results would be to see if you can replace the binary's for the programs in questions with a small shell script that does the count then runs the appropriate binary.
__________________
Recycle your old CD's, don't just trash them


Spidermonkey Tutorial;

If I helped out out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud

Reply With Quote
  #3  
Old July 12th, 2011, 12:56 PM
matt2737 matt2737 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2010
Posts: 6 matt2737 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 12 sec
Reputation Power: 0
Quote:
Originally Posted by kicken
The easiest thing to do would probably be to have a script that kicks of via cron every few minutes and examines the output of ps aux for the programs in question.


This solution is possible, but the design I am going for is recording whenever an application is started or stopped. Periodically examining the process list is kind of going to go against the design I have so far, but it may have to do. I would like to listen for notifications sent out by Mac whenever applications start or stop, and I could examine those notifications to see who owns the process and it's name. I just don't know if this is possible. If anyone knows about how to do this or has anything useful tips on how to interact with Macs activity monitor then let me know.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreSoftware Design > Tracking Usage Stats Program

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap