image
image

Go Back   macosx.com > Scripts > Automator Scripts

Reply
 
LinkBack Thread Tools
  #1  
Old April 1st, 2009, 02:40 AM
Registered User
 
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Gleb Lanbin is on a distinguished road
Performance script

Hello,

I wrote a shell script to collect performance statistics for MacOS, it provides in the next format:

name=Hardware Resources|CPU|%Idle,value=1
....
....
name=Hardware Resources|Disks|Reads/sec,value=19
name=Hardware Resources|Disks|Writes/sec,value=23
name=Hardware Resources|Disks|KB read/sec,value=80
name=Hardware Resources|Disks|KB written/sec,value=90

all works perfectly on my Mac OS Tiger(Darwin 8.1.0), but I have information that disks statistics doesn't work with Mac OS Leopard(Darwin 9.6.0)

I use output from top to collect disks statistics, probably they have different format of output for 2 versions of OS, but I can't test it and figure out where an issue, because don't have opportunity to test it on Leopard somewhere.

I'll be very appreciated if someone can help me and will try to execute script on own Leopard and try to figure out the issue with collection of disks performance.

Also, it's possible to provide here a result from command:
$top -l2 -cd -o pid -s 10 | grep Disks:

Script link: https://download.yousendit.com/TTZtcXlqaytlaFR2Wmc9PQ

Thanks,
Gleb
Reply With Quote
  #2  
Old April 3rd, 2009, 01:08 PM
edadams's Avatar
MacTech
 
Join Date: Nov 2005
Location: Auckland
Posts: 163
Thanks: 0
Thanked 18 Times in 18 Posts
edadams is on a distinguished road
Hi Gleb
I have run your script even though hayne would not, it hangs at the disk section and outputs this-
name=Hardware Resources|Disks|Reads/sec,value=0
name=Hardware Resources|Disks|Writes/sec,value=
name=Hardware Resources|Disks|KB read/sec,value=
name=Hardware Resources|Disks|KB written/sec,value=

Is the script supposed to end?

I have had a look around and cannot find the equivalent command in Leopard for testing disk read writes. I did find this though, maybe you can modify it to do the various read/writes you want-
Let's benchmark our hard drives with this test...

Would it be possible for me to use this script?
Ed
__________________
MacBook Pro 2.4Ghz 4GB RAM
iPhone 1st Gen 8GB
Xserve G5 2Ghz
http://blog.analogueltd.com

Last edited by edadams; April 3rd, 2009 at 01:09 PM. Reason: forgot link
Reply With Quote
  #3  
Old April 3rd, 2009, 01:25 PM
Mikuro's Avatar
Crotchety UI Nitpicker
 
Join Date: Mar 2005
Posts: 2,682
Thanks: 6
Thanked 53 Times in 48 Posts
Mikuro will become famous soon enough
Quote:
Originally Posted by Gleb Lanbin View Post
Also, it's possible to provide here a result from command:
$top -l2 -cd -o pid -s 10 | grep Disks:
Here's what I get:
Code:
Disks:             0 reads/     0K            0 writes/0K
Disks:           190 reads/  7772K          150 writes/3821K
__________________
Mac mini — 1.25GHz G4, 1GB RAM — OS 10.5.8

Useful programs: Privoxy, Butler, ffmpegX, VLC, Perian, Tofu, Wcalc
Reply With Quote
Reply

Bookmarks

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 12:18 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.