<?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: A script challange  for everyone !! =) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586086#M857201</link>
    <description>There is a -k flag for du which reports the results in 1024 byte blocks, i.e. kb.&lt;BR /&gt;&lt;BR /&gt;-Santosh</description>
    <pubDate>Wed, 03 Oct 2001 16:36:54 GMT</pubDate>
    <dc:creator>Santosh Nair_1</dc:creator>
    <dc:date>2001-10-03T16:36:54Z</dc:date>
    <item>
      <title>A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586071#M857186</link>
      <description>Hey everyone .. &lt;BR /&gt;As most of you know I am a wanna be "king" script writter ! And I am working on it and getting better. But I have ran into a problem I can write scripts when I have a problem and I try to write a script. But I have not had to write a script latley. So I need a challange. I would like someone to give me a project a shell script and a perl script nothing too hard because I am still learning. But tell me what we need the script to do. Then once I have that info I will write a script to do what you have asked. And that is where the fun begins after that you can tear it up and help me correct the problems with it. Everyone who is intrested in script writting should take this challange it would be intresting to see how many differnt scripts we can come up with. &lt;BR /&gt;Let me know what you guys think.&lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Thu, 27 Sep 2001 14:05:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586071#M857186</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-09-27T14:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586072#M857187</link>
      <description>Hello Richard,&lt;BR /&gt;&lt;BR /&gt;Sounds like a good idea.  How about this one?  All my Oracle developers have their home directories located under /home/oradev.  Every so often (about once a week!) one of them will get the bright idea of copying hundreds of megabytes of files into their home directory for one reason or another.  Can you write a script that will find the ten largest files in the /home/oradev directory tree, and then list the top ten disk users by directory?&lt;BR /&gt;&lt;BR /&gt;(I've written a similar script here.  I got tired of cleaning it up for them, so my script generates the output, which I then send to ALL of the developers.  Peer pressure is a wonderful thing.  When a bunch of them can't do any work because /home is full, they will go find the culprit at the top of the list.  I usually don't have to do another thing!)&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Sep 2001 14:14:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586072#M857187</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2001-09-27T14:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586073#M857188</link>
      <description>Hey John &lt;BR /&gt;I like thats thats pretty good. &lt;BR /&gt;Ok here is what I got so far. This command/script will list the top ten biggest files in  /home  and tell you what dir path they are in.&lt;BR /&gt; &lt;BR /&gt;find /home/* -type f -size +10000c | xargs ll | sort -n +4.0 |&lt;BR /&gt;awk '{print $5,$6,$7,$8,$9}'|tail&lt;BR /&gt;&lt;BR /&gt;Now when you say you want the top ten disk users by directory just in /home ? Can you give me a little bit of an idea of the output you are looking for..&lt;BR /&gt;&lt;BR /&gt;Richard&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Sep 2001 15:16:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586073#M857188</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-09-27T15:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586074#M857189</link>
      <description>Richard,&lt;BR /&gt;&lt;BR /&gt;This will help you a lot in your daily routine. Most of the times, we may want to find the LVM configuration in different views.&lt;BR /&gt;&lt;BR /&gt;A script that gives a quick overview of the volume groups, logical volumes, PVs, free disks. It should give the output based on the argument passed.&lt;BR /&gt;&lt;BR /&gt;For ex.,&lt;BR /&gt;&lt;BR /&gt;#vgview PV &lt;BR /&gt;&lt;BR /&gt;PV Name         LV    Size   Type  Mount Point&lt;BR /&gt;c0t0d0-vg01    lvol1  200    LV    /test1&lt;BR /&gt;               lvol2  300    RAW   -&lt;BR /&gt;               FREE  2000     -    -&lt;BR /&gt;C0t0d1-vg02    lvol1   1000    LV   /mnt1&lt;BR /&gt;               FREE    1000   -     -&lt;BR /&gt;c0t0d2         FREE   4096    -     -&lt;BR /&gt;&lt;BR /&gt;#vgview lv&lt;BR /&gt;&lt;BR /&gt;LV Name VG  Size   Type   Mount Point  PV&lt;BR /&gt;lvol1  vg01  200   LV     /test1       c0t0d0&lt;BR /&gt;lvol2  vg01  300    RAW    /test2       c0t0d0&lt;BR /&gt;lvol1  vg02  200   LV      /mnt1       c0t0d1&lt;BR /&gt;&lt;BR /&gt;#vgview vg&lt;BR /&gt;&lt;BR /&gt;vg Name  LV   SIZE  Type  Mount Point   PV&lt;BR /&gt;vg01    lvol1 200    LV   /test1       c0t0d0&lt;BR /&gt;        lvol2 300    RAW  /test2       c0t0d0&lt;BR /&gt;        lvol3 400    SWAP /test3       c0t0d5&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;What do you say?&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Thu, 27 Sep 2001 15:34:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586074#M857189</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-09-27T15:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586075#M857190</link>
      <description>Richard, why not enhance John Poff's request.  Find the largest abusers...you have their home directories, can you write a script that will output  their listing of files in their home directory to a file, then email this file as an attachment directly to them from your UNIX box. Hmmmm.....&lt;BR /&gt;&lt;BR /&gt;Here's another one (I had to write something for this, so I'll be interested in how you solve it..)&lt;BR /&gt;Disk Arrays often have utilities to list the hardware addresses and the vg that the disk has been assigned to.  But OFTEN these utilities can not handle and thus do not report disks that are raw devices.  One disk array attached to multiple servers, this can create a challenge when adding disks to any vg on any server.&lt;BR /&gt;So try and write a script to report the raw devices and the vg they are attached to.....Hmmmm....&lt;BR /&gt;&lt;BR /&gt;Have fun !!  &lt;BR /&gt;Rita&lt;BR /&gt;&lt;BR /&gt;...I bet you love working on 10,000 piece puzzles too. ha ha</description>
      <pubDate>Thu, 27 Sep 2001 16:10:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586075#M857190</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2001-09-27T16:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586076#M857191</link>
      <description>Hello Richard,&lt;BR /&gt;&lt;BR /&gt;how about a pure "sh" script, which is doing&lt;BR /&gt;interactive dialogs to users, reacting on each&lt;BR /&gt;single (!) keypress (well, except for function&lt;BR /&gt;keys, of course ;-) and sends the collected&lt;BR /&gt;input via e-mail?&lt;BR /&gt;&lt;BR /&gt;You will have to do this "portable", of course,&lt;BR /&gt;which means using "terminfo" for cursor control&lt;BR /&gt;and screen formatting... and you would like to&lt;BR /&gt;get that information in a config-file, right?&lt;BR /&gt;&lt;BR /&gt;You could look into Lee Binkley's script site,&lt;BR /&gt;but that would not be sportive, would it?&lt;BR /&gt;&lt;BR /&gt;The next (or first - as you like it) could be&lt;BR /&gt;DOS-like "tree" command (yes, I admit - I know&lt;BR /&gt;M$-DOS...), perhaps with a "-sum" option to&lt;BR /&gt;calculate the amount of space used *inside* a&lt;BR /&gt;directory? With error-checking for directries&lt;BR /&gt;where you do NOT have proper permissions for&lt;BR /&gt;reading/cd-ing ;-)&lt;BR /&gt;&lt;BR /&gt;BTW, I am sure you do not play with those&lt;BR /&gt;10.000 pieces puzzles for some years now - they&lt;BR /&gt;do sell 100.000 pieces puzzles, though AFAIK...&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch</description>
      <pubDate>Thu, 27 Sep 2001 16:53:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586076#M857191</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2001-09-27T16:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586077#M857192</link>
      <description>Richard comes with very interesting questions that I have seen so far in this forum.&lt;BR /&gt;&lt;BR /&gt;Here is from me.&lt;BR /&gt;On server1&lt;BR /&gt;#ps -ef &lt;BR /&gt;sachin 16216 15546  0 09:23:42 ttys3     0:00 remsh darwin -n rfslave 'CC(port:64475,host:server1)'&lt;BR /&gt;&lt;BR /&gt;rfslave is program that creates tcp/ip port between server1 and client&lt;BR /&gt;&lt;BR /&gt;on client (darwin)&lt;BR /&gt;sachin  2624  2523  0 09:23:44 ?  0:00 rfslave CC(port:64475,host:server1)&lt;BR /&gt;sachin  2523  2522  0 09:23:42 ?  0:00 csh -c rfslave 'CC(port:64475,host:server1)&lt;BR /&gt;&lt;BR /&gt;* Some time remsh from server is finished but I still have rfslave running on client that is not valid now. I do want to find that and report it or kill it.&lt;BR /&gt;&lt;BR /&gt;*we have 50 servers and all servers are client for another 49 sytems.&lt;BR /&gt;&lt;BR /&gt;Sachin&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Sep 2001 17:22:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586077#M857192</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2001-09-27T17:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586078#M857193</link>
      <description>Hello Richard,&lt;BR /&gt;&lt;BR /&gt;Here is something like what I had in mind:&lt;BR /&gt;&lt;BR /&gt;The top 10 disk users in /home/users are:&lt;BR /&gt;&lt;BR /&gt;Blocks (1Kb)       User Name&lt;BR /&gt;============      ===========&lt;BR /&gt;     93792        John Poff&lt;BR /&gt;     43191        Richard&lt;BR /&gt;     16589        Bill Gates&lt;BR /&gt;     14948        Larry Ellison&lt;BR /&gt;     14265        Carly Fiorina&lt;BR /&gt;      5583        Sridhar Bhaskarla&lt;BR /&gt;      4645        Rita C. Workman&lt;BR /&gt;      4505        Wodisch&lt;BR /&gt;      3236        Sachin Patel&lt;BR /&gt;      2925        Newbie User&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Instead of just listing the account name (jpoff) you can grab the user name out of /etc/passwd so that the list makes a little more sense.  (Sorry about using everybody's name from this post, but I was running out of names!)&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Sep 2001 17:50:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586078#M857193</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2001-09-27T17:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586079#M857194</link>
      <description>but Bill, Carly and Larry did not reply ;-)</description>
      <pubDate>Thu, 27 Sep 2001 19:07:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586079#M857194</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2001-09-27T19:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586080#M857195</link>
      <description>Hmm...&lt;BR /&gt;&lt;BR /&gt;Larry, Carly, and Moe?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;No, I won't go there.     ;)&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Sep 2001 19:28:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586080#M857195</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2001-09-27T19:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586081#M857196</link>
      <description>FYI .. im working on these issue and doing some research .. Some of the stuff that you are asking  I don?t know how to do .. what a great experience I can learn!! If I totally can?t figure it out I will break .. but until then I am going to do what I can!&lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Thu, 27 Sep 2001 19:55:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586081#M857196</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-09-27T19:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586082#M857197</link>
      <description>HI Richard&lt;BR /&gt;In my setup I have  hp machines connected to same EMC box on multiple (4 to 6) fiber channels. So for each disk on EMC box we have multiple device files on server (ALT links.)&lt;BR /&gt;&lt;BR /&gt;Whenever I need to add/extend file system, finding out free disk, becomes important and complex for me.&lt;BR /&gt;&lt;BR /&gt;I would like to run script to get out put some thing like..&lt;BR /&gt;PV_Name::ALT_PV1::ALT_PV2::ALT_PV3::VG/LV/FS&lt;BR /&gt;c11t0d0::c9t0d0::c15t0d0::c17t0d0::vg1/lv1 /u01&lt;BR /&gt;c19t0d1::c22t0d0::c5t0d0::c8t0d0:: FREE&lt;BR /&gt;&lt;BR /&gt;Thanks..&lt;BR /&gt;Prashant.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Sep 2001 20:03:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586082#M857197</guid>
      <dc:creator>Deshpande Prashant</dc:creator>
      <dc:date>2001-09-27T20:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586083#M857198</link>
      <description>Richard,&lt;BR /&gt;   Here's one you might want to try. I've been beating my brain on it for a while and still don't have a good solution, but then I don't know all the tricks that can be played with text manipulation tools.&lt;BR /&gt;&lt;BR /&gt;Anyway, I have a script that is used to create all the tables and indexes in an Oracle database schema. The script consists of CREATE TABLE or CREATE INDEX statements with the STORAGE clauses all set to (initial 1M next 1M). What I need to do is change the storage clauses so the initial size is the current size of the object and the next size is 10% of the initial. The data for the initial size can be gotten by either querying Oracle's dictionary or generating a listing of sizes before processing the script.&lt;BR /&gt;I have tried using awk to do this but find I don't know enough about awk's capabilities (if any) of merging data from other files.&lt;BR /&gt;&lt;BR /&gt;Any suggestions that can point me in the right direction would be greatly appreciated. Every time we rebuild that schema for reload it takes me upwards of 2 hours to manually edit that script with the correct sizing information and it has become a real drag.&lt;BR /&gt;&lt;BR /&gt;Thanks for any assistance you can give.</description>
      <pubDate>Fri, 28 Sep 2001 11:12:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586083#M857198</guid>
      <dc:creator>Don Spare</dc:creator>
      <dc:date>2001-09-28T11:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586084#M857199</link>
      <description>Hi Don,&lt;BR /&gt;&lt;BR /&gt;I can tell you at least, how to collect a storage clause, may be you can post your script that creates the "CREATE TABLE.." statements, may be I can integrate the STORAGE part.&lt;BR /&gt;&lt;BR /&gt;Volker&lt;BR /&gt;&lt;BR /&gt;SVRMGR&amp;gt; select segment_name, segment_type, 'STORAGE ( INITAL ' || round(bytes/1024) ||&lt;BR /&gt;     2&amp;gt; 'K NEXT ' || round(bytes/10240) || 'K )' from dba_segments where &lt;BR /&gt;     3&amp;gt; segment_name='BNKA';&lt;BR /&gt;     &lt;BR /&gt;SEGMENT_NAME   SEGMENT_TYPE      'STORAGE(INITAL'||ROUND(BYTES/1024)||'KNEXT'||ROUND(BYTES/10240)||'K)'          &lt;BR /&gt;------------   ----------------- --------------------------------------------------------------------------------&lt;BR /&gt;BNKA           TABLE             STORAGE ( INITAL 5784K NEXT 578K )                                              &lt;BR /&gt;&lt;BR /&gt;1 row selected.&lt;BR /&gt;SVRMGR&amp;gt;</description>
      <pubDate>Fri, 28 Sep 2001 12:55:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586084#M857199</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2001-09-28T12:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586085#M857200</link>
      <description>Hey everyone .. &lt;BR /&gt;Fist off I want to thank everyone for your input this is a great thing for me because I can learn allot from all the projects everyone is giving me. But I am working them one by one in the order they came in. =)&lt;BR /&gt;&lt;BR /&gt;John .. I have ran into a problem I dont know how to get the totals per directory. So far all I have is &lt;BR /&gt;&lt;BR /&gt; du -s /home/* | more&lt;BR /&gt; du -s /home/*/* | more&lt;BR /&gt;&lt;BR /&gt;but that is not in kb. &lt;BR /&gt;How about a hint here?&lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Wed, 03 Oct 2001 16:06:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586085#M857200</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-10-03T16:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: A script challange  for everyone !! =)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586086#M857201</link>
      <description>There is a -k flag for du which reports the results in 1024 byte blocks, i.e. kb.&lt;BR /&gt;&lt;BR /&gt;-Santosh</description>
      <pubDate>Wed, 03 Oct 2001 16:36:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-challange-for-everyone/m-p/2586086#M857201</guid>
      <dc:creator>Santosh Nair_1</dc:creator>
      <dc:date>2001-10-03T16:36:54Z</dc:date>
    </item>
  </channel>
</rss>

