<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<title>Minor tweak for the HP-UX client, possibly others for df output</title>
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
p
        {margin-right:0in;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>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)</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I don’t have an HP-UX box handy to
test bdf on right now; I’m stating this information from memory.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Linux boxes using the GNU df command
always output a single line when used with the “-P” option. Sed is
not needed on Linux.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<div>

<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Neil G. Brookins</span></font></p>

</div>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Deiss, Mark
[mailto:Mark.Deiss@acs-inc.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, October 05, 2005 7:03
AM<br>
<b><span style='font-weight:bold'>To:</span></b> 'hobbit@hswn.dk'<br>
<b><span style='font-weight:bold'>Subject:</span></b> [hobbit] Minor tweak for
the HP-UX client, possibly others for df output</span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>

<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>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 ...</span></font></p>

<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>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. </span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>

<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>in hobbitclient-hpux.sh
file:</span></font> </p>

<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>Before -</span></font>
</p>

<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>echo
"[df]"</span></font> <br>
<font size=2><span style='font-size:10.0pt'>/usr/bin/df -Pk </span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>

<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>After -</span></font>
</p>

<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>echo
"[df]"</span></font> <br>
<font size=2><span style='font-size:10.0pt'>/usr/bin/df -Pk | sed -e
'/^[^  ][^     ]*$/{</span></font> <br>
<font size=2><span style='font-size:10.0pt'>N</span></font> <br>
<font size=2><span style='font-size:10.0pt'>s/[    
]*\n[   ]*/ /</span></font> <br>
<font size=2><span style='font-size:10.0pt'>}'</span></font> </p>

</div>

</body>

</html>