[hobbit] Minor tweak for the HP-UX client, possibly others for df output

lars ebeling lars.ebeling at leopg9.no-ip.org
Wed Oct 5 16:01:28 CEST 2005


Minor tweak for the HP-UX client, possibly others for df outputExtract from bdf manpage:

If file system names are too long, the output for a given entry is   
displayed on two lines.                                              
                                                                     
Regards
Lars
  ----- Original Message ----- 
  From: Brookins, Neil (YBUSA-KOP) 
  To: hobbit at hswn.dk 
  Sent: Wednesday, October 05, 2005 3:48 PM
  Subject: RE: [hobbit] Minor tweak for the HP-UX client, possibly others for df output


  On HP-UX there are two versions of "df". One is called "df" the other is called "bdf". I think that bdf with the appropriate flags will always give output onto a single line; therefore eliminating the need to use "sed". I would think a solution that results in a single output line without needing sed would be preferred. (faster running, cleaner code)

  I don't have an HP-UX box handy to test bdf on right now; I'm stating this information from memory.



  Linux boxes using the GNU df command always output a single line when used with the "-P" option. Sed is not needed on Linux.



  Neil G. Brookins




------------------------------------------------------------------------------

  From: Deiss, Mark [mailto:Mark.Deiss at acs-inc.com] 
  Sent: Wednesday, October 05, 2005 7:03 AM
  To: 'hobbit at hswn.dk'
  Subject: [hobbit] Minor tweak for the HP-UX client, possibly others for df output





  Some sites that have 'df" filesystem listings that span multiple lines may need to consolidate each filesystem listing onto a single line.   Noticed that the Hobbit rrd entries for our HPs have some "interesting" results ...

  Just add the sed filter listed below to clean up the lines. Multiple lines can occur on HP-UX servers that have long volume group names, think it may also happen on some versions of Linux boxes, AIX boxes. Filter below is what is incorporated in BB. 



  in hobbitclient-hpux.sh file: 

  Before - 

  echo "[df]" 
  /usr/bin/df -Pk 



  After - 

  echo "[df]" 
  /usr/bin/df -Pk | sed -e '/^[^  ][^     ]*$/{ 
  N 
  s/[     ]*\n[   ]*/ / 
  }' 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20051005/e6ad7793/attachment.html>


More information about the Xymon mailing list