|
|
View valid 'top' output on the desktop via GeekTool
Here is an alternate python script that does what you want:
This is slightly complicated because 45 lines of output is just *a byte or two* over 4k which is the popen buffer size, so the reads were getting output split across each emission from top. If you use 44 lines then the program can simplified a bit, but hey, here's something that works with any line count. :-) Next change your geek tool command from File to Shell and make it simply: cat /var/tmp/top.log Note that there is nothing which prevents cat from getting a completely empty file if it reads at the wrong time, but that doesn't seem to happy too often for me. j. |
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.09 seconds |
|