Created
July 23, 2014 05:52
-
-
Save koemu/222bce22633c6dd28aff to your computer and use it in GitHub Desktop.
Get ksm metrics for Mackerel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DATE=$(date +%s) | |
echo -e "ksm.pages_volatile\t$(cat /sys/kernel/mm/ksm/pages_volatile)\t${DATE}" | |
echo -e "ksm.pages_shared\t$(cat /sys/kernel/mm/ksm/pages_shared)\t${DATE}" | |
echo -e "ksm.pages_sharing\t$(cat /sys/kernel/mm/ksm/pages_sharing)\t${DATE}" | |
echo -e "ksm.pages_unshared\t$(cat /sys/kernel/mm/ksm/pages_unshared)\t${DATE}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Please append this lines to your config file. | |
[plugin.metrics.ksm] | |
command = "/usr/local/bin/ksm_metrics.sh" | |
type = "metric" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment