Re: file monitoring

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 18/10/2007, Leigh Peterson <[email protected]> wrote:
> Even though the file size is beyond the specified "657000", when I do an
> "snmpget" on the value, it returns a "0":
>
> [leigh@syslog ~]$ snmpget -v 2c -c public localhost 1.3.6.1.4.1.2021.15.1.3.1
> UCD-SNMP-MIB::fileSize.1 = INTEGER: 0 kB

That would certainly explain why your system isn't generating traps!

What is the output of a full walk of the 1.3.6.1.4.1.2021.15 tree?
What O/S are you working with?
What version of the Net-SNMP agent are you using?
What is the exact size of the file "/var/lib/mysql/Syslog/SystemEvents.MYD" ?


Unfortunately the fileTable code doesn't include much in the way of
debug code, so it's a bit difficult to track exact what it is actually doing
(as opposed to what it should be doing).

But try compiling and running the following code fragment;

   int main( int argc, char *argv[] )
   {
       struct stat sb;
       int ret;

       ret = stat( "/var/lib/mysql/Syslog/SystemEvents.MYD", &sb );
       printf("stat returned %d,  size = %d\n", ret, sb.st_size >> 10);
   }

What does that display?

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.