Operating System - HP-UX
1833187 Members
2807 Online
110051 Solutions
New Discussion

Re: HP-UX system nfo collecting script

 
Bill McNAMARA_1
Honored Contributor

HP-UX system nfo collecting script

Hi all,
attached is a script I've been modifying to include some of my needs.. it should work on all platforms.. I'm only seeing one error now and again that I don't understand.. it seems to come from the netfmt command, which works from commandline but not always (sometimes yes) in the script. The error I get is "There is not enough memory available now".. I've got over a gig?.. in any case tell me what you think or what should be added..

See attached script named .txt for attachment reasons (unix formated, rename on your hosts) and licence below:

Later,
Bill
###############################################################################
#
# Copyright 1996 - 1999 Robert Sakic, HP
# ALL RIGHTS RESERVED.
#
# Permission granted to use this script so long as the copyright above
# is maintained, and credit is given for any use of the script.
#
###############################################################################
#
# Copyright (C) 1996,1997,1998,1999 Hewlett-Packard Company
#
# The enclosed software and documention includes copyrighted works of
# Hewlett-Packard Co. For as long as you comply with the following
# limitations, you are hereby authorized to (i) use, reproduce, and
# modify the software and documentation, and to (ii) distribute the
# software and documentation, including modifications, for
# non-commercial purposes only.
#
# 1. The enclosed software and documentation is made available at no
# charge in order to advance the general development of support of
# networking products.
#
# 2. You may not delete any copyright notices contained in the
# software or documentation. All hard copies, and copies in
# source code or object code form, of the software or
# documentation (including modifications) must contain at least
# one of the copyright notices.
#
# 3. The enclosed software and documentation has not been subjected
# to testing and quality control and is not a Hewlett-Packard Co.
# product. At a future time, Hewlett-Packard Co. may or may not
# offer a version of the software and documentation as a product.
#
# 4. THE SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS".
# HEWLETT-PACKARD COMPANY DOES NOT WARRANT THAT THE USE,
# REPRODUCTION, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR
# DOCUMENTATION WILL NOT INFRINGE A THIRD PARTY'S INTELLECTUAL
# PROPERTY RIGHTS. HP DOES NOT WARRANT THAT THE SOFTWARE OR
# DOCUMENTATION IS ERROR FREE. HP DISCLAIMS ALL WARRANTIES,
# EXPRESS AND IMPLIED, WITH REGARD TO THE SOFTWARE AND THE
# DOCUMENTATION. HP SPECIFICALLY DISCLAIMS ALL WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# 5. HEWLETT-PACKARD COMPANY WILL NOT IN ANY EVENT BE LIABLE FOR ANY
# DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
# (INCLUDING LOST PROFITS) RELATED TO ANY USE, REPRODUCTION,
# MODIFICATION, OR DISTRIBUTION OF THE SOFTWARE OR DOCUMENTATION.
It works for me (tm)
13 REPLIES 13
Joseph C. Denman
Honored Contributor

Re: HP-UX system nfo collecting script

Thanks Bill. I'll check it out!!

Joe...
If I had only read the instructions first??
Sachin Patel
Honored Contributor

Re: HP-UX system nfo collecting script

Hi Bill,
I run your script. I got .tar.gz file. I gunzip it then I got .tar file. But when I run
# tar xvg systeminfo.tar :got nothing.

Sachin
Is photography a hobby or another way to spend $
nancy rippey
Trusted Contributor

Re: HP-UX system nfo collecting script

Hi,
I am having the same problem as Sachin.
nrip
Thierry Poels_1
Honored Contributor

Re: HP-UX system nfo collecting script

Hi,
just tried it on an old H50 box (never trust the unknown ;) and it worked perfectly.
well perfectly ... did the gunzip on the unix box - ftp to local PC (no web services on the unix box) - winzipped the tarfile - started Explorer and bingo. nice "little" proggie!

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Bill McNAMARA_1
Honored Contributor

Re: HP-UX system nfo collecting script

mmm.

I've just downloaded it and it works on mine..
the only conditions the script imposes are 10.20/11.00 and you need to be root.

try tar -xvf file.tar

just in case that was a typo

I did in fact have to

# dos2ux attachment.txt > script
# chmod +x script
before executing it.

Does the archive get created?
You should see some output when running the script..
Has the tar file a size

Don't use any arguments and run it from /tmp

use gunzip to unzip..
It works for me (tm)
Sachin Patel
Honored Contributor

Re: HP-UX system nfo collecting script

Hi Bill
#dos2us systeminfo.txt >/tmp/systeminfo
#cd /tmp
#./systeminfo
Some display..............
Files created with .gz
#gunzip ???.tar.gz
#tar xvf ???.tar

It works great only from /tmp directory. It is not working from my home directory.

suggestion: 1. can you put option at the end that may be user want to gunzip and tar it.
do you want to gunzip[y/n]
do you want to tar xvf [y/n]

Good I like it.

Sachin
Is photography a hobby or another way to spend $
Bill McNAMARA_1
Honored Contributor

Re: HP-UX system nfo collecting script

There should be an option if your run the script with the -? option... although I've not really tested it fully!

Later,
Bill
It works for me (tm)
Bill McNAMARA_1
Honored Contributor

Re: HP-UX system nfo collecting script

Congratulations on getting your Graduate cap Sachin!

Hope to welcome you to Royalty soon (If I can ever get the last 100 or so points!)

Later,
Bill
It works for me (tm)
Sachin Patel
Honored Contributor

Re: HP-UX system nfo collecting script

Hi Bill,
Thank you for giving me that cap. You the one who assign me that last point to push me from 4xx to 5xx. Thanks
I love this forum. I am solving more problem by just reading you guys answers.

I am editing your script little. because I don't want big log files to check. We have sometimes logfiles more then couple hundred megs.

Sachin
Is photography a hobby or another way to spend $
someone_4
Honored Contributor

Re: HP-UX system nfo collecting script

Hello,

I copied your script and ran it. It works great. It looks allot like the nickel script on the outside. But yours has allot more great information.I am going to play with it a little more. I have the great nickel script on few boxes. But in the future I might replace it with this script. I am sure when the word gets around about this script im sure people start to use it. Nice tool very nice.
Can you tell me how long it took you to write this script?


Richard
Bill McNAMARA_1
Honored Contributor

Re: HP-UX system nfo collecting script

In fact it is the nickel script just with some of my modifications, mainly related to the telecom software, kernel modules, java, env and ioscan -fnk rather than fn (for speed) and tgz rather than shar.

If you look at my 1st posting I include the licence of the nicke script from Robert Sakic www.grc.hp.com/docs/nickel/

I'm going to add the superdome and partitioning to it soon, but for the moment I've just added telecom. This took around a week to understand and script.. it's actualy very well structured so easy enough to learn.

I've emailed Robert to tell him of my modifications, but of course you're free to modify it and add to it for your purposes, but it's probably best to make it mainline so you can take advantage of any additions...

Thanks for the feedback,
Later,
Bill
It works for me (tm)
Tim D Fulford
Honored Contributor

Re: HP-UX system nfo collecting script

HI

I had problems with the script!!!

* stm is duff on some my machines & this hangs the program. After I fixed stm it ran fine (except the memory message!). I have regularly seen stm (well cstm) not work properly so this could be a complaint.

I do not know if you are able to set a trap for this but the program just hangs unless stm works!

The error I got from cstm was

-- Error --
The process for retrieving device maps from the current test system failed for
an unknown reason.
The process will be restarted the next time a system is made the current test
system.
Please Refer to the UI Activity Log for more details.

-- Information --
Support Tools Manager


Version A.20.00

:
:
:


I hope the above helps

Tim

Tim

-
Bill McNAMARA_1
Honored Contributor

Re: HP-UX system nfo collecting script

Thanks for that Tim, I think I'll add a test before cstm is issued verifying that stm is at a relatively recent revision.. if it's not I'll give the url to download it from.

Thanks again,
Later,
Bill
It works for me (tm)