tag:blogger.com,1999:blog-5236867476487043111.post2879502617947739187..comments2024-03-11T07:55:47.104-04:00Comments on Corey Goldberg: Python - rrdpy - Round Robin Databases (RRDTool)Corey Goldberghttp://www.blogger.com/profile/06219872951977664560noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-5236867476487043111.post-83041819784054513742012-11-23T10:49:58.673-05:002012-11-23T10:49:58.673-05:00Hi Sir,
very nice and helpful article,
do you ha...Hi Sir,<br /><br />very nice and helpful article, <br />do you have any document on the same ?, i want to create custom graph, eg. bandwidth usage, so need any document so that i can this rrd module,<br />i tried with some changes as my required and it's work but can't understand how this work and want to customize more, so please help me with document,<br /><br />import commands<br />import re<br />import time<br />import rrd<br /><br />interval = 10<br /><br />rrd_file = 'test.rrd'<br /><br />def tansfer_Bytes():<br /> interface = commands.getstatusoutput("ifconfig eth0| grep bytes")[1]<br /> Rx = re.split(':| ',interface)[12]<br /> Tx = re.split(':| ',interface)[18]<br /> return '%.3f' % (int(Rx)/1024)<br /><br /><br />def main():<br /> my_rrd = rrd.RRD(rrd_file, 'Transfer Speed in Kbps')<br /> while True:<br /> raw_data = tansfer_Bytes()<br /> time.sleep(interval)<br /> my_rrd.update(raw_data)<br /> my_rrd.graph(60)<br /> print raw_data<br /><br />if __name__ == '__main__':<br /> main()Anonymoushttps://www.blogger.com/profile/16117420092195480584noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-30001284565432242942009-10-29T13:26:14.201-04:002009-10-29T13:26:14.201-04:00Thank you for sharing this code. I have made some ...Thank you for sharing this code. I have made some modifications for my own project making it only check my website every two minutes and altered the graph to show the last 24 hours. How can I get it to create four graphs instead of just one? I want a graph for 24 hours, 1 week, 1 month, and 1 year.Skyler Callhttps://www.blogger.com/profile/16412248373762234612noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-64668840371365479152008-05-30T19:41:00.000-04:002008-05-30T19:41:00.000-04:00This is a nice convenience wrapper but why not wra...This is a nice convenience wrapper but why not wrap the much faster http://www.nongnu.org/py-rrdtool/ than popen the rrdtool binary? It would be great to see some updates to py-rrdtool to handle the "Aberrant Behavior Detection" additions or even a ctypes implementation.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-88330355721950109452008-05-30T18:58:00.000-04:002008-05-30T18:58:00.000-04:00RRDTOOL is one of my favorite tools. I use it to l...RRDTOOL is one of my favorite tools. I use it to log process memory usage to help identify potential memory leaks on our applications. Having the history available to see when memory jumps also helps figure out what steps may be triggering memory leaks.Unknownhttps://www.blogger.com/profile/08115939147345698696noreply@blogger.com