<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: I need a simple shell program! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358558#M193635</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you can try&lt;BR /&gt;&lt;BR /&gt;lvdisplay /dev/vgxx/lvolx | egrep "(LV Status|IO Timeout)"&lt;BR /&gt;(where x should be replaced by the number)&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Franky</description>
    <pubDate>Tue, 17 Aug 2004 03:04:34 GMT</pubDate>
    <dc:creator>Franky_1</dc:creator>
    <dc:date>2004-08-17T03:04:34Z</dc:date>
    <item>
      <title>I need a simple shell program!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358556#M193633</link>
      <description>I want to check my machine information,when we use "lvdisplay" to list the detail.I just want to get the special notes,if the 'VG Status' is 'stale' or 'IO Timeout (Seconds)' is not 'default',I can get the 'dev/vg00/lvolx' warning information after the shell runs.thanks!</description>
      <pubDate>Tue, 17 Aug 2004 02:18:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358556#M193633</guid>
      <dc:creator>SHENFENG_1</dc:creator>
      <dc:date>2004-08-17T02:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: I need a simple shell program!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358557#M193634</link>
      <description>Hi,&lt;BR /&gt;See if this works for you:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;var1=`lvdisplay /dev/vg00/lvol4 | grep Status | awk '{ print $3 }'`&lt;BR /&gt;if [ $var1 -ne "stale" ]&lt;BR /&gt;then&lt;BR /&gt;echo " LV is fine "&lt;BR /&gt;else&lt;BR /&gt;echo " LV in Error "&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Modify it as per your requiremnt.&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;ps.Remember in var1 assignment i have used back quotes at the begining and end.&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Aug 2004 02:58:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358557#M193634</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-08-17T02:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: I need a simple shell program!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358558#M193635</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you can try&lt;BR /&gt;&lt;BR /&gt;lvdisplay /dev/vgxx/lvolx | egrep "(LV Status|IO Timeout)"&lt;BR /&gt;(where x should be replaced by the number)&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Franky</description>
      <pubDate>Tue, 17 Aug 2004 03:04:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358558#M193635</guid>
      <dc:creator>Franky_1</dc:creator>
      <dc:date>2004-08-17T03:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: I need a simple shell program!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358559#M193636</link>
      <description>IF you want get the Volume group status then, directly use vgdisplay.&lt;BR /&gt;&lt;BR /&gt; vgdisplay | grep -E 'Name |Status'&lt;BR /&gt;VG Name                     /dev/vg00&lt;BR /&gt;VG Status                   available&lt;BR /&gt;VG Name                     /dev/vgscu&lt;BR /&gt;VG Status                   available&lt;BR /&gt;&lt;BR /&gt; It will give you the full status of all volume groups to keep track&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Aug 2004 03:10:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358559#M193636</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-08-17T03:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: I need a simple shell program!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358560#M193637</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt; try the attached script; you might need to adapt it.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Tue, 17 Aug 2004 07:00:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358560#M193637</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2004-08-17T07:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: I need a simple shell program!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358561#M193638</link>
      <description>And here's yet another script:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;# Identifies and displays stale extends on all system volume groups.&lt;BR /&gt;# Useful to determine defect harddisks in mirrored enviroments&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;vgdisplay -v | awk '/LV Name/ { print $3 }' | xargs lvdisplay -v | grep -i -e "lv name" -e "lv status" -e stale -e '?'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Tue, 17 Aug 2004 07:34:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358561#M193638</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-08-17T07:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: I need a simple shell program!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358562#M193639</link>
      <description>here is one that we used to build multiple vgs for several different school districts we manage. I'm a lazy admin, I don't like typing when there is a bunch of redundancy.. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# more volbuild&lt;BR /&gt;&lt;BR /&gt;echo 'This script will build and create database space,&lt;BR /&gt;      Please not you should know about how much disk space is required&lt;BR /&gt;      and available.. Below is a listing of free space in existing&lt;BR /&gt;      Volume Groups'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;echo "Enter Enter District ID:"&lt;BR /&gt;read district&lt;BR /&gt;for vg in `grep "LV Name" vg.txt |awk '{print $3}' |grep dbs |grep -v vg00 |grep -v log |grep -v root |grep -v tmp |grep&lt;BR /&gt; $district`&lt;BR /&gt; do&lt;BR /&gt;        vgrp=`lvdisplay $vg |grep "VG Name"|awk '{print $3}'`&lt;BR /&gt;                echo -------- Logical Volume `lvdisplay $vg |grep "LV Name"` --------&lt;BR /&gt;                                lvdisplay $vg |grep "LV Name"&lt;BR /&gt;                                echo $vgrp&lt;BR /&gt;                                lvdisplay $vg |grep "LV Size"&lt;BR /&gt;                                vgdisplay $vgrp |grep Free&lt;BR /&gt;export dbspace=`lvdisplay $vg |grep "LV Name" |awk '{print substr($3, 11, 6)}'`&lt;BR /&gt;export  vgrp=`lvdisplay $vg |grep "VG Name"|awk '{print $3}'`&lt;BR /&gt;export nvol=`lvdisplay $vg |grep "LV Name" |awk '{print substr($3, 17, 1)}'`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if [ -z "$nvol" ]&lt;BR /&gt;        then export nvol=0&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;        export i=`expr $nvol + 1`&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;echo "Enter Size of Volume"&lt;BR /&gt;read size&lt;BR /&gt;export size&lt;BR /&gt;echo lvcreate -L $size -n $dbspace$i $vgrp&lt;BR /&gt;cd $vgrp&lt;BR /&gt;echo chown informix:informix r$dbspace$i&lt;BR /&gt;echo chmod 660 r$dbspace$i&lt;BR /&gt;export fname=r$dbspace$i&lt;BR /&gt;&lt;BR /&gt;cd /dev/online&lt;BR /&gt;#&lt;BR /&gt;ls $fname&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;echo ln -s $vgrp/$fname $dbspace$i&lt;BR /&gt;echo onspaces -a $dbspace$i -p /dev/online/$fname -o 0 -s "$size"000</description>
      <pubDate>Tue, 17 Aug 2004 08:55:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-simple-shell-program/m-p/3358562#M193639</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2004-08-17T08:55:09Z</dc:date>
    </item>
  </channel>
</rss>

