Hello,

    This is my first post to this list.  I was unable to find any 
previous mention of an issue like this, nor was I able to find a better 
place to submit this (bug report?) to.  I'm not a Solaris expert (I am 
pretty good with Linux and BSD though - including writing low-level 
system code).  It is entirely possible that I'm off my rocker and that I 
somehow and at fault.. but I doubt it :)

    The server in question is a Sun x4600 ("thumper").  It is a 64 bit 
AMD server running Solaris 10 (SunOS 5.10) [1].  The system has a few 
small volumes and one HUGE 16TiB volume (in a zpool).  This ZFS volume 
is exported as several volumes over NFS.

    Nagios was installed following the instructions on terdmonk's web 
site [2].  Nagios itself runs on a remote Gentoo Linux box.  I use nrpe 
on the Solaris box to execute the plugins.  I have ruled out nrpe as the 
source of the problem.  I think that the problem is in the plugin's 
(check_disk) call to "statvfs".

    First, the interesting output of "df" (full output at [3]):

(thumper: 14:35:10 </>) 0 # df -h | egrep "^(\/dev\/.*|swap|zpool1) "
/dev/md/dsk/d10         11G   5.6G   4.8G    54%    /
swap                   2.2G   752K   2.2G     1%    /etc/svc/volatile
/dev/md/dsk/d30        5.8G   1.1G   4.7G    19%    /var
swap                   2.2G    32K   2.2G     1%    /var/run
zpool1                  17T    57G    16T     1%    /zpool1

   Now the output of "/opt/csw/libexec/nagios-plugins/check_disk):

(thumper: 14:06:26 </>) 0 # /opt/csw/libexec/nagios-plugins/check_disk 
-w 20% -c 10% -p /
DISK OK - free space: / 4958 MB (46% inode=80%);| /=5771MB;8670;9754;0;10838

(thumper: 14:37:10 </>) 0 # /opt/csw/libexec/nagios-plugins/check_disk 
-w 20% -c 10% -p /zpool1/
DISK UNKNOWN - free space:|

   And the tail-end of the system traces of "check_disk":

(thumper: 14:38:23 </>) 258 # truss 
/opt/csw/libexec/nagios-plugins/check_disk -w 20% -c 10% -p / 2>&1 | tail
close(3)                                        = 0
xstat(2, "/", 0x080811A8)                       = 0
xstat(2, "/", 0x080811A8)                       = 0
statvfs("/", 0x08047A30)                        = 0
ioctl(1, TCGETA, 0x08046E44)                    Err#22 EINVAL
fstat64(1, 0x08046E70)                          = 0
fstat64(1, 0x08046DB0)                          = 0
DISK OK - free space: / 4958 MB (46% inode=80%);| /=5771MB;8670;9754;0;10838
write(1, " D I S K   O K   -   f r".., 77)      = 77
_exit(0)

(thumper: 14:38:32 </>) 0 # truss 
/opt/csw/libexec/nagios-plugins/check_disk -w 20% -c 10% -p /zpool1/ 
2>&1 | tail
close(3)                                        = 0
xstat(2, "/zpool1/", 0x080811A8)                = 0
xstat(2, "/zpool1/", 0x080811A8)                = 0
statvfs("/zpool1", 0x08047A20)                  Err#79 EOVERFLOW
ioctl(1, TCGETA, 0x08046E34)                    Err#22 EINVAL
fstat64(1, 0x08046E60)                          = 0
fstat64(1, 0x08046DA0)                          = 0
DISK UNKNOWN - free space:|
write(1, " D I S K   U N K N O W N".., 28)      = 28
_exit(3)


 From the man page on "statvfs" on Solaris 10:

ERRORS
     The statvfs() and fstatvfs() functions will fail if:

     EOVERFLOW               One of the  values  to  be  returned
                             cannot  be  represented correctly in
                             the structure pointed to by buf.


yuck.  But, at the bottom of the man page:

USAGE
     The statvfs() and  fstatvfs()  functions  have  transitional
     interfaces for 64-bit file offsets.  See lf64(5).


Inside the man page of "lf64":
  <sys/statvfs.h>
     struct statvfs                struct statvfs64
        fsblkcnt_t f_blocks;          fsblkcnt64_t f_blocks;
        fsblkcnt_t f_bfree;           fsblkcnt64_t f_bfree;
        fsblkcnt_t f_bavial;          fsblkcnt64_t f_bavial;
        fsfilcnt_t  f_files;          fsfilcnt64_t  f_files;
        fsfilcnt_t  f_ffree;          fsfilcnt64_t  f_ffree;
        fsfilcnt_t  f_favail;         fsfilcnt64_t  f_favail;


So, it looks like there is a solution.  The actual code is in 
"nagios-plugins-VERSION/gl/fsusage.c".

But what I don't know how to do is suggest the solution to the 
appropriate party(ies).  Hence this post.

If I did make a code change, who would I send it to?





[1]
(thumper: 14:31:26 </>) 0 # uname -a
SunOS unknownthumper 5.10 Generic_118855-33 i86pc i386 i86pc

[2]
http://www.terdmonk.com/node/11

[3]
(thumper: 14:35:36 </>) 0 # df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d10         11G   5.6G   4.8G    54%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   2.2G   752K   2.2G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
/usr/lib/libc/libc_hwcap2.so.1
                        11G   5.6G   4.8G    54%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
/dev/md/dsk/d30        5.8G   1.1G   4.7G    19%    /var
swap                   2.2G    32K   2.2G     1%    /var/run
zpool1                  17T    57G    16T     1%    /zpool1
zpool1/OTHER            17T    99M    16T     1%    /zpool1/OTHER
zpool1/doc              17T   210M    16T     1%    /zpool1/doc
zpool1/fedfiles         17T    45K    16T     1%    /zpool1/fedfiles
zpool1/fedfiles/archive
                        17T   175G    16T     2%    /zpool1/fedfiles/archive
zpool1/fedfiles/current
                        17T   2.7G    16T     1%    /zpool1/fedfiles/current
zpool1/fedfiles/rejects
                        17T   2.7M    16T     1%    /zpool1/fedfiles/rejects
zpool1/img              17T   626G    16T     4%    /zpool1/img
zpool1/pool             17T    40K    16T     1%    /zpool1/pool
zpool1/stmt             17T   230M    16T     1%    /zpool1/stmt
zpool1/uploads          17T    40K    16T     1%    /zpool1/uploads




-- 
CONFIDENTIALITY NOTICE
This electronic mail and the information contained herein are intended for the 
named recipient only.  It may contain confidential, proprietary and/or 
privileged information.  If you have received this electronic mail in error, 
please do not read any text other than the text of this notice and do not open 
any attachments. Also, please immediately notify the sender by replying to this 
electronic mail or by collect call to (262) 796-0925. After notifying the 
sender as described above, please delete this electronic mail message 
immediately and purge the item from the deleted items folder (or the 
equivalent) of your electronic mail system. Thank you.

Disclaimer -- Do not remove this disclaimer under penalty of law.

For optimum performance and safety, please read these instructions carefully.

Void where prohibited. No representation or warranty, express or implied, with 
respect to the completeness, accuracy, fitness for a particular purpose, or 
utility of these materials or any information or opinion contained herein. 
Actual mileage may vary. Prices slightly higher west of the Mississippi. All 
models over 18 years of age. No animals were harmed during the production of 
this product. Any resemblance to actual people, living or dead, or events, 
past, present or future, is purely coincidental. This product not to be 
construed as an endorsement of any product or company, nor as the adoption or 
promulgation of any guidelines, standards or recommendations. Some names have 
been changed to protect the innocent. This product is meant for educational 
purposes only. Some assembly required. Batteries not included. Package sold by 
weight, not volume. Contents may settle during shipment. No user-serviceable 
parts inside. Use only as directed.

Do not eat. Not a toy.

Postage will be paid by addressee. If condition persists, consult your 
physician. Subject to change without notice. Times approximate. One size fits 
all. Colors may, in time, fade. For office use only. Edited for television. 
List was current at time of printing. At participating locations only. Keep 
away from fire or flame. Avoid contact with skin. Sanitised for your 
protection. Employees and their families are not eligible. Beware of the dog. 
Limited time offer. No purchase necessary. Not recommended for children under 
12. Prerecorded for this time zone. Some of the trademarks mentioned in this 
product appear for identification purposes only. Freshest if eaten before date 
on carton. Subject to change without notice. Please allow 4 to 6 weeks for 
delivery. Not responsible for direct, indirect, incidental or consequential 
damages resulting from any defect, error or failure to perform. Slippery when 
wet. Substantial penalty for early withdrawal. For recreational use only. No Ca
 nadian coins. List each check separately by bank number. This is not an offer 
to sell securities.

Read at your own risk. Ask your doctor or pharmacist. Parental guidance 
advised. Always read the label. Do not use while operating a motor vehicle or 
heavy equipment. Do not stamp. Breaking seal constitutes acceptance of 
agreement. Contains non-milk fat. Date as postmark. Lost ticket pays maximum 
rate. Use only in well-ventilated area. Price does not include taxes. Not for 
resale. Hand wash only. Keep away from sunlight. For a limited time only. No 
preservatives or additives. Keep away from pets and small children. Safety 
goggles required during use. If rash, irritation, redness, or swelling 
develops, discontinue use. Do not fold, spindle or mutilate. Please remain 
seated until the web page has come to a complete stop. Refrigerate after 
opening. Flammable. Must be 18 years or older. Seat backs and tray tables must 
be in the upright position. Repeat as necessary. Do not look directly into 
light. Avoid extreme temperatures and store in a cool dry place. No salt, MSG, 
artificial
  colouring or flavoring added. Reproduction strictly prohibited. Pregnant 
women, the elderly, and children should avoid prolonged exposure to this 
product. If ingested, do not induce vomiting. May contain nuts. Objects in 
mirror may be closer than they appear. Do not use if safety seal is broken.

Apply only to affected area. Do not use this product if you have high blood 
pressure, heart disease, diabetes, thyroid disease, asthma, glaucoma, or 
difficulty in urination. May be too intense for some viewers. In case of 
accidental ingestion, seek professional assistance or contact a poison control 
center immediately. Many suitcases look alike. Post office will not deliver 
without postage. Not the Beatles. Products are not authorized for use as 
critical components in life support devices or systems. Driver does not carry 
cash. Do not puncture or incinerate. Do not play your headset at high volume. 
Discontinue use of this product if any of the following occurs: itching, 
aching, vertigo, dizziness, ringing in your ears, vomiting, giddiness, aural or 
visual hallucinations, tingling in extremities, loss of balance or 
coordination, slurred speech, temporary blindness, drowsiness, insomnia, 
profuse sweating, shivering, or heart palpitations. Video+ and Video- are at 
ECL voltage le
 vels, HSYNC and VSYNC are at TTL voltage levels. It is a violation of federal 
law to use this product in a manner inconsistent with its labeling. Intentional 
misuse by deliberately concentrating and inhaling the contents can be harmful 
or fatal. This product has been shown to cause cancer in laboratory rats. Do 
not use the AC adaptor provided with this player for other products.

Warranty does not cover normal wear and tear, misuse, accident, lightning, 
flood, hail storm, tornado, tsunami, volcanic eruption, avalanche, earthquake 
or tremor, hurricane, solar activity, meteorite strike, nearby supernova and 
other Acts of God, neglect, damage from improper or unauthorised use, incorrect 
line voltage, unauthorised use, unauthorised repair, improper installation, 
typographical errors, broken antenna or marred cabinet, missing or altered 
serial numbers, electromagnetic radiation from nuclear blasts, microwave ovens 
or mobile phones, sonic boom vibrations, ionising radiation, customer 
adjustments that are not covered in this list, and incidents owing to an 
airplane crash, ship sinking or taking on water, motor vehicle crashing, 
dropping the item, falling rocks, leaky roof, broken glass, disk failure, 
accidental file deletions, mud slides, forest fire, riots or other civil 
unrest, acts of terrorism or war, whether declared or not, explosive devices or 
project
 iles (which can include, but may not be limited to, arrows, crossbow bolts, 
air gun pellets, bullets, shot, cannon balls, BBs, shrapnel, lasers, napalm, 
torpedoes, ICBMs, or emissions of electromagnetic radiation such as radio 
waves, microwaves, infra-red radiation, visible light, UV, X-rays, alpha, beta 
and gamma rays, neutrons, neutrinos, positrons, N-rays, knives, stones, bricks, 
spit-wads, spears, javelins etc.).

Other restrictions may apply. Breach of these conditions is likely to cause 
unquantifiable loss that may not be capable of remedy by the payment of damages.





-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to