Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-17-2010, 10:01 AM
|
#1
|
|
LQ Newbie
Registered: Nov 2007
Distribution: SuSE Debian
Posts: 19
Rep:
|
php and snmp
Hi guys i was trying mrtg, but when the light go off the graphics get distorted. Trying to adjust the conf files i get nothing than trying rrdtool but i keep having the same problems.
So i was thinking to use php, i got working php snmp walk function but i am looking the way to get the bandwidth or usage of the device from snmp or any snmp function but still now i keep searching.
Once done this stages i would be able to save the data into an array and the plot it into a graph and personalize the max and min values for avoiding distorted graphs.
Any Idea?
|
|
|
|
06-18-2010, 10:30 AM
|
#2
|
|
Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 11,799
|
Quote:
Originally Posted by rojoblandino
Hi guys i was trying mrtg, but when the light go off the graphics get distorted. Trying to adjust the conf files i get nothing than trying rrdtool but i keep having the same problems.
So i was thinking to use php, i got working php snmp walk function but i am looking the way to get the bandwidth or usage of the device from snmp or any snmp function but still now i keep searching.
Once done this stages i would be able to save the data into an array and the plot it into a graph and personalize the max and min values for avoiding distorted graphs.
Any Idea?
|
No...can't follow what you're saying: "trying mrtg, but when the light go off the graphics get distorted"????? What?????
Then you mention PHP and snmpwalk...are you writing your own code? Using what to store the data and graph it?? No idea what your problem is, or what you're trying to do. Best I can figure out, you're trying to graph network utilization. MRTG is the best way to go...if your rrd files got corrupted, then remove and regenerate them, and continue.
Otherwise, you can easily set up Nagios, Zenoss, Big Brother, or any other PHP/web based monitoring tools for bandwith monitoring.
|
|
|
|
06-24-2010, 10:24 AM
|
#3
|
|
LQ Newbie
Registered: Nov 2007
Distribution: SuSE Debian
Posts: 19
Original Poster
Rep:
|
Quote:
Originally Posted by TB0ne
No...can't follow what you're saying: "trying mrtg, but when the light go off the graphics get distorted"????? What?????
Then you mention PHP and snmpwalk...are you writing your own code? Using what to store the data and graph it?? No idea what your problem is, or what you're trying to do. Best I can figure out, you're trying to graph network utilization. MRTG is the best way to go...if your rrd files got corrupted, then remove and regenerate them, and continue.
Otherwise, you can easily set up Nagios, Zenoss, Big Brother, or any other PHP/web based monitoring tools for bandwith monitoring.
|
I have test Nagios, MRTG, Zenoss but none of them solve my problem, my problem is that i can not see the values because the mrtg show a line of 10 MB being the connection of 128kbps so you do not see anything, and erasing the graph does not solve my problem, it get worst because i lost the information, so i just need to get the values of badnwidth.
Of course i am going to save the data somewhere, but i still have doubts and the help in the php home site is a little poor that i can not find the function that would allow me to get the bandwidth value of the device.
Getting that the programation is not problem, my question is what funcions i need to use to get the bandwidth i can not find it on AltaVista or Google.
P.D.: I have tryied to set the MaxValue1 and MaxValue2 and still show the high Lines and distroted the graphic to little lines that you see nothing, just the line, so i am decide to do my script that will respect my MaxValue and if the value is hight than that will not grhaphic or will make a mod(value,MAxvalue) or something like that in gcc it would be something like v2graph=(val%MaxValue); That will allow me to always show the value but will not distorted it and if is mor thant the MaxValue will start from the bottom of the graph.
Last edited by rojoblandino; 06-24-2010 at 10:30 AM.
|
|
|
|
06-25-2010, 05:55 AM
|
#4
|
|
Senior Member
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137
Rep: 
|
Quote:
Originally Posted by rojoblandino
I have test Nagios, MRTG, Zenoss but none of them solve my problem, my problem is that i can not see the values because the mrtg show a line of 10 MB being the connection of 128kbps so you do not see anything, and erasing the graph does not solve my problem, it get worst because i lost the information, so i just need to get the values of badnwidth.
Of course i am going to save the data somewhere, but i still have doubts and the help in the php home site is a little poor that i can not find the function that would allow me to get the bandwidth value of the device.
Getting that the programation is not problem, my question is what funcions i need to use to get the bandwidth i can not find it on AltaVista or Google.
P.D.: I have tryied to set the MaxValue1 and MaxValue2 and still show the high Lines and distroted the graphic to little lines that you see nothing, just the line, so i am decide to do my script that will respect my MaxValue and if the value is hight than that will not grhaphic or will make a mod(value,MAxvalue) or something like that in gcc it would be something like v2graph=(val%MaxValue); That will allow me to always show the value but will not distorted it and if is mor thant the MaxValue will start from the bottom of the graph.
|
i *think* i get what you are saying.
add the MaxBytes directive.
In case i am wrong, please show your mrtg.cfg file.
|
|
|
|
06-30-2010, 12:41 PM
|
#5
|
|
LQ Newbie
Registered: Nov 2007
Distribution: SuSE Debian
Posts: 19
Original Poster
Rep:
|
Quote:
Originally Posted by centosboy
i *think* i get what you are saying.
add the MaxBytes directive.
In case i am wrong, please show your mrtg.cfg file.
|
Here it is
Code:
EnableIPv6: no
WorkDir: /srv/virtual/mrtg-dir
RunAsDaemon: Yes
Language: spanish
WithPeak[_]: dwmy
options[_]: growright, bits, transparent, avgpeak, unknaszero, noborder, pngdate
XSize[_]: 600
YSize[_]: 200
XScale[_]:1.8
YScale[_]:1.5
YTics[_]:12
Unscaled[_]: dwmy
MaxBytes[_]: 128000
But as i have said before the MaxBytes are not working, here i am setting to 1M but when the light go off the mrtg show a line of 10M or more, so the graphics get distorted, i do not want to get distorted graphs and erasing the data do not solve my problem.
Also you can see that Unscaled is set to all, it works when is less than 1M, for example the Y values show the 1M and if 128kbps are being send i can see the 128kbps and the blank space to reach 1M but if more than 1M is sent, for example if light go off a pulse is produced and more than 1M is recieve in the network cards, then it scale the graph, even with the option unscaled, it seems that unscaled work well for values under MaxBytes not over it.
So i am trying to do it by my self to get the values through php save the datas into a file or database and then graph the content, if value is higher than limit do not graph or do something like ($val % limit) it will take the mod of the value and will start from bottom, any way, to do it i have not found how to get the MIB values through php functions, anybody can help me, i am still reading and nothing found.
Thanks.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:09 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|