|
|
Does not work correctly
Thanks for the replies:
1) I can?t use another menubar item, my menubar is overcrowded: Meteorologist, ABMenu, Konfabulator, Timbuktu, Menu Calendar, Bluetooth PrefMenu, AppleScript Menu, Airport PrefMenu, Date and Time I need a second Menubar! Konfabulator has a widget, which makes the Job that Geektool should do in future, as I dont like Konfabulator and have only a demo Version runnig 2) top -l 1 | fgrep "CPU usage" | awk '{print "cpu usage: ", $8}'
Does only show the current User CPU Usage, not the sum of User and System Usage 3) top -l 1 | grep 'CPU usage' | cut -c 33-80
Shows 3 Values: The Idle Value is always 0,0, as the sum of User and CPU usage is always 100% I think this is because top itself produces a high cpu usage, which is measured at the time, when invoked. Sounds a bit confusing: A command, that shall display the CPU usage produces so much cpu load, that the result is falsified GalainHH
Does not work correctly
just needs a slight modification :)
Oh, but that wasn't good enough nope nope. :)
Well, I liked that fine, it could be a little more fun
So:
note, geektool does not appreciate line brakes; strip them prior to pasting. I posted like this for the sake of legibility -- it's down right painful to read all clumped on a single line. -- one thing that bummed me out was geektool did not like my echo -e \033[##m coloration, inversion, etc. I had the thing looking pretty spiffy in terminal.app running bash. Bah. all yellow and red, it's pretty :D Otherwise i'm having too much fun with this thing!
Exactly what I wanted
Thanks a lot,
Does not work correctly
To get around the "top always being the process hog" problem, I have my script run top with two samples. By the second sample, top has generally calmed down a little and isn't being the processor hog that it always is on launch. My script spits out the Uptime, Current Load Average, Total CPU Use (user + system), and the current CPU Hog Process. Take it and modify to taste:
There are a few other variables in there if you'd like to pull those out and display them as well. I just didn't really want to see them myself.
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.07 seconds |
|