Article ID: 5992, created on Jan 30, 2009, last review on Apr 27, 2014

  • Applies to:
  • Virtuozzo containers for Linux


In this article we will provide provide best practices to monitor SLM memory usage on a Parallels Virtuozzo Containers server.

The script attached may be used to automate SLM memory usage monitoring operations and store results on filesystem for further analysis.

The script will produce the following output:
- hostname of server it was run on
- date when it was run
- amount of RAM on physical server and various statistics about its usage - allocated memory (absolute amount and in percents), used memory (absolute amount and in percents)
- per container statistics: ID, hostname, used SLM memory (absolute amount and in percents), SLM limit, out-of-memory limit and used memory (absolute amount and in percents)

Copy the attached '' to the Parallels Virtuozzo Containers server to monitor and make it executable:
# cp -a /root
# chmod +x

Start resources monitoring using below command (one line) as root:

# (while [ 1 ]; do ls -1 /proc/slm/{stats,groups/*/{info,stats}} /proc/user_beancounters /proc/vz/latency /proc/vz/mmperf /proc/vz/stats /proc/fairsched | while read a; do hostname;date; echo === $a && cat $a; done; /root/; vmstat 1 5; sleep 30; done) >> /tmp/slmlog-$HOSTNAME.txt

The command above will create log file and put various statistics to it every 30 seconds. If log file exists it will be appended with new logs. Logs will be put into the file /tmp/slmlog-$HOSTNAME.txt on server, where $HOSTNAME is hostname of server.

You may add the command above to cron so that command will be executed periodically and statistics will be saved.

If you have open ticket with Parallels Support Team you may send resulted file to be analyzed by support team to the ticket:
- archive resulting logs
# tar czf /tmp/slmlogs.tgz /tmp/slmlog*.txt

- send the file '/tmp/slmlogs.tgz' as an attachment to the ticket.


d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article
Save as PDF