|
|
A little convenient script to calculate the percentage of vnodes used
The maxvnodes tip is useful but it's all in the fine tuning. Here's a little script that calculates how many vnodes are used as a percentage of the maximum vnodes. I put it in /usr/local/bin/vnodeusage. I found it invaluable when tweaking the maxvnodes value.
Enjoy!
sh version
Here's an sh version (repeat after me: I will not script in tcsh, I will not script in tcsh...) that uses awk instead of sed:
#!/bin/sh
# returns percentage of maxvnodes used
vnodes=$(pstat -T |awk '/vnodes/ {print $1}')
maxvnodes=$(sysctl kern.maxvnodes | awk '{print $3}')
echo "$(expr $vnodes \* 100 / $maxvnodes)% used"
A little convenient script to calculate the percentage of vnodes used
There is a mistake on the second to last line: |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks 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.05 seconds |
|