Script to collect memory usage to generate graphics
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello
Im try to create a Script to collect Memory information to Graphic For Daily Statistics You can help with This ?
Absolutely. So post what *YOU* have written/done/tried so far, and tell us where you're stuck; we can certainly HELP you after that.
Otherwise, you need to read the "Question Guidelines" link in my posting signature. We will be happy to help you, but we aren't going to write scripts for you. You, personally, need to show your efforts.
Tools like Nagios have already built-out an infrastructure for many types of system monitoring tasks.
If you're wanting to study "memory use," I suggest that the best way to do it is to build some logging capability into your applications-of-interest, then to perform offline statistical analysis of these data. There are two significant sources of error which can occur if you try to do it in real time:
The Presence of the Experimenter ... Your measuring process will either directly measure itself, or it will measure an environment that is being influenced by its own presence there, or both.
Linux is Lazy™ ... If there is right now no pressure for the memory resource, Linux won't clean-up after you. Why should it take the time?
There's also the problem of practical irrelevance. It's like measuring the number of cars on a street at a particular moment, when what you really want to know is how much effect congestion is having on the people who are trying to drive those streets. We've learned that you don't have to do this continuously: we can use random sampling and get a statistically-valid result. And what we would measure is some kind of thing like "number of requests processed" and "time required to complete (say) 1,000 requests." We probably would look more at the standard deviation than the average, or we might set up a "pass/fail" test to determine how often the process did or did not meet some arbitrary but meaningful deadline.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.