• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
multiple processes...cpu load....madness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multiple processes...cpu load....madness


  • Subject: multiple processes...cpu load....madness
  • From: Jeremy Matthews <email@hidden>
  • Date: Thu, 18 Jan 2007 09:26:27 -0800

I've got multiple sessions of Tomcat installed; what's the best way to check if each is running (and CPU load, if possible).

Right now I'm using a derivation of something another kind AS user gave me, in addition to some other fun stuff:

do shell script "ps -ax | grep java| grep -v grep"

which returns:
"  196  ??  S      0:10.89 /Library/Java/Home/bin/java -Djava.util.logging.manag
15865  p1  S      0:07.17 /Library/Java/Home/bin/java -Djava.util.logging.manag"

This is great, as it shows two separate (running) instances, although I'd like the full text, not the abbreviated one that cuts off after so many characters, like so:

/Library/Java/Home/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/Library/Tomcat/apache-tomcat-5.5.20/conf/logging.properties -Djava.endorsed.dirs=/Library/Tomcat/apache-tomcat-5.5.20/ (something goes here which I can't see...)


and then I can use this to get CPU load on the first process:

do shell script "ps -axwwo %cpu,command | awk '/org\\.apache\\.catalina/{ print $1; exit } /org\\.apache\\.tomcat/{ print $1; exit }'"


Any ideas on the best way to 1) return a value to check if multiple instances are running, and 2) return a CPU load value for each?


Thanks,
j
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

  • Prev by Date: iTunes' state when ripping a CD
  • Next by Date: How to extract properties of a selected iCal object (event, todo, etc.)?
  • Previous by thread: Re: iTunes' state when ripping a CD
  • Next by thread: How to extract properties of a selected iCal object (event, todo, etc.)?
  • Index(es):
    • Date
    • Thread