Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Snmp Disk Problem = Negative Values Post 302538247 by SkySmart on Tuesday 12th of July 2011 09:56:30 AM
Old 07-12-2011
Snmp Disk Problem = Negative Values

Ok, so i monitor disk space on remote machines using snmp. Works great for me. But whenever a particular partition happens to have Terabytes of data, snmp starts reporting negative values.

Can someone please tell me how to get around this problem?

The AllocationUnit is 512 bytes. Weird because the AllocationUnit value for the other disk drives that aren't giving a negative value is 1024.

Code:
[nagios-888] snmpwalk -v2c -c AFH%#$ blah.blah.net hrStorageUsed
HOST-RESOURCES-MIB::hrStorageUsed.1 = INTEGER: 5464616
HOST-RESOURCES-MIB::hrStorageUsed.10 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.11 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.12 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.31 = INTEGER: 442805
HOST-RESOURCES-MIB::hrStorageUsed.32 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.33 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.34 = INTEGER: 153
HOST-RESOURCES-MIB::hrStorageUsed.35 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.36 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.37 = INTEGER: 2394500
HOST-RESOURCES-MIB::hrStorageUsed.38 = INTEGER: 442805
HOST-RESOURCES-MIB::hrStorageUsed.39 = INTEGER: 442805
HOST-RESOURCES-MIB::hrStorageUsed.40 = INTEGER: 821118
HOST-RESOURCES-MIB::hrStorageUsed.41 = INTEGER: 5158
HOST-RESOURCES-MIB::hrStorageUsed.42 = INTEGER: 26268522
HOST-RESOURCES-MIB::hrStorageUsed.43 = INTEGER: 668741814
HOST-RESOURCES-MIB::hrStorageUsed.44 = INTEGER: 14754046
HOST-RESOURCES-MIB::hrStorageUsed.45 = INTEGER: 14754080
HOST-RESOURCES-MIB::hrStorageUsed.46 = INTEGER: -2020489998
HOST-RESOURCES-MIB::hrStorageUsed.47 = INTEGER: -1815899368
HOST-RESOURCES-MIB::hrStorageUsed.48 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.49 = INTEGER: 1132850142

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help in adding positive & negative values in a column

Hi Gurus, In my file I have an amount field from position 74 to 87, which contains values starting with '+' as well as '-'. I want to add all positive values in a varible called "CREDIT" and all negative values in a variable "DEBIT". I know, we can use grep to identify values with positive and... (4 Replies)
Discussion started by: berlin_germany
4 Replies

2. Shell Programming and Scripting

Sorting positive and negative values

Hello, I have a list like this : 1 2 -4 0 -3 -7 5 6 etc. Is there a way to remove all the positive values and print only the negative values, without using grep, sed or awk? Thanks, Prasanna (4 Replies)
Discussion started by: prasanna1157
4 Replies

3. Shell Programming and Scripting

Find Where Values Change From Positive To Negative and viceversa

Hi all, I have a file that looks like shown below. I want to find places where the value in column 2 change from negative to positive and vice versa and return the value on column 1 at that point. I wonder if this is possible in shell script or awk .. please help! Here is the original data ... (6 Replies)
Discussion started by: malandisa
6 Replies

4. Shell Programming and Scripting

error- multiplying negative decimal values

a=10.02 pattern=-11.01 b=$(echo | awk '{ print $a*$pattern}') echo $b its not working even ALso tried `expr $a \* $pattern` No LUCK (3 Replies)
Discussion started by: saluja.deepak
3 Replies

5. Programming

Problem with implementing the times() function in C (struct tms times return zero/negative values)

Hello, i'm trying to implement the times() function and i'm programming in C. I'm using the "struct tms" structure which consists of the fields: The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process. The tms_stime structure... (1 Reply)
Discussion started by: g_p
1 Replies

6. Shell Programming and Scripting

replacing negative values in a column with zero

Hi, i need help on replacing negative values in a column with 0. any quick fix on this? thanks much. for instance, input: 1 2.3 -0.4 -25 12 13 45 -12 desired output 1 2.3 0 0 12 13 45 (4 Replies)
Discussion started by: ida1215
4 Replies

7. Shell Programming and Scripting

Awk+colpos+negative if for 20 values

Hi All, i have 20 Obligors when ever i dont find all of them on particular row/line from each in put i need to print it in different file. using below command but it is not working please help at earliest. Steps: set -A FILENAME $( cat... (10 Replies)
Discussion started by: rajubollas
10 Replies

8. Shell Programming and Scripting

Conavert negative values to Zeros

Can anyone please assist me? Please find the attached input and output file for ur reference. a)Incase if i get negative value (ex:-000100) in the 11th column then i have to convert the value to 0000000(7 zeros-length is 7) and then print the entire record. b)Incase if there is no... (2 Replies)
Discussion started by: vinus
2 Replies

9. Shell Programming and Scripting

How to sum the value with negative values?

Hi Gurus, I have requirement need to sum the value, the logic is if the value is negative then time -1, I tried below two ways. one is failed, another one doesn't work. awk -F"," '{if($8< 0 $8*-1 else $8) sum+=$8}{print sum, $8} END{printf("%.2f\n",sum)}' awk -F","... (4 Replies)
Discussion started by: ken6503
4 Replies
snmp.conf(5)							    Apple Inc.							      snmp.conf(5)

NAME
snmp.conf - snmp configuration file for cups DESCRIPTION
The snmp.conf file configures how the standard CUPS network backends (http, https, ipp, ipps, lpd, snmp, and socket) access printer infor- mation using SNMPv1 and is normally located in the /etc/cups directory. Each line in the file can be a configuration directive, a blank line, or a comment. Comment lines start with the # character. The Community and DebugLevel directives are used by all backends. The remainder apply only to the SNMP backend (cups-snmp(8)). DIRECTIVES
The following directives are understood by the CUPS network backends. Consult the on-line help for detailed descriptions: Address @IF(name) Address @LOCAL Address address Sends SNMP broadcast queries to the specified address(es). There is no default for the broadcast address. Community name Specifies the community name to use. Only a single community name may be specified. The default community name is "public". DebugLevel number Specifies the logging level from 0 (none) to 3 (everything). Typically only used for debugging (thus the name). The default debug level is 0. DeviceURI "regular expression" device-uri [... device-uri] Specifies one or more device URIs that should be used for a given make and model string. The regular expression is used to match the detected make and model, and the device URI strings must be of the form "scheme://%s[:port]/[path]", where "%s" represents the detected address or hostname. There are no default device URI matching rules. HostNameLookups on HostNameLookups off Specifies whether the addresses of printers should be converted to hostnames or left as numeric IP addresses. The default is "off". MaxRunTime seconds Specifies the maximum number of seconds that the SNMP backend will scan the network for printers. The default is 120 seconds (2 min- utes). SEE ALSO
cups-snmp(8), http://localhost:631/help COPYRIGHT
Copyright 2007-2013 by Apple Inc. 23 April 2012 CUPS snmp.conf(5)
All times are GMT -4. The time now is 07:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy