/[vz-tools]/trunk/vz-memory-usage.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/vz-memory-usage.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 56 - (hide annotations)
Tue Oct 21 18:38:19 2008 UTC (15 years, 6 months ago) by dpavlin
File MIME type: application/x-sh
File size: 833 byte(s)
added link to vzprocfs at http://download.openvz.org/debian-systs/pool/openvz/v/vzprocps/
1 dpavlin 55 # this script requires tools available at:
2     #
3     # http://svn.rot13.org/index.cgi/perl/checkout/trunk/groupby.pl
4     # http://svn.rot13.org/index.cgi/perl/checkout/trunk/sum.pl
5    
6     # and module not available in lenny:
7     #
8     # cpanp i IPC::System::Simple
9    
10 dpavlin 56 # and vzprocps from
11     #
12     # http://download.openvz.org/debian-systs/pool/openvz/v/vzprocps/
13    
14 dpavlin 55 # insert following in /etc/sudoers if you are in staff group on remote machine for this to work:
15     #
16     # %staff ALL=(root) NOPASSWD: /usr/sbin/vzlist
17    
18     if [ ! -z $1 ] ; then
19     echo "# $1"
20     ssh $1 vzps -E axv --no-headers | groupby.pl 'sum:($7+$8+$9*1024),1,count:1' --join "ssh $1 sudo vzlist -H -o veid,hostname" --on 2 | sort -rn | align | sum.pl -h
21     else
22     vzps -E axv --no-headers | groupby.pl 'sum:($7+$8+$9*1024),1,count:1' --join 'sudo vzlist -H -o veid,hostname' --on 2 | sort -rn | align | sum.pl -h
23     fi

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26