Operating System - HP-UX
1835685 Members
2841 Online
110082 Solutions
New Discussion

run collect sysinfo file in each server.

 
Wortiz
Advisor

run collect sysinfo file in each server.

I need to run a collect sysinfo file in a lote servers. So, first I need to copy this file and then run it in each sever. I think I have to use the ftp to send and bring the file.

Can someone help me to do that.
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: run collect sysinfo file in each server.

To collect the data, you need a script.

Attaching docsys.sh

You could run it like this:

docsys.sh | mailx -s youraddress@yourdomain.com

Then all the data is in your mailbox.

You will have to use ftp to get the script out or:

export the filesystem in nfs that the script is on.

lets say its on /doc

vi /etc/exports/
/doc

save the file

exportfs -a

Now the systems can execute this script without having a real copy. If this is going to be run on a regular basis, I recommend using ftp or scp or sftp to have a copy in /usr/contrib/bin

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bryan D. Quinn
Respected Contributor

Re: run collect sysinfo file in each server.

Hello,

I have a directory under each of my servers called something like hostname_config. I use the cfg2html script, which can be downloaded from the following web site:
http://groups.yahoo.com/group/cfg2html/
Note I beleive you have to join the group to be able to download it. I placed the job in cron and it runs at a "quiet" time on each server. I modified the script to place the output files in my hostname_config directory. I download the html file to my PC and I can navigate the information in my web browser, with hotlinks etc.. It also creates a text file which can be viewed from the server.
I have never had any problems with this script and it dumps a great deal of information into the output files it creates.

-Bryan
Bryan D. Quinn
Respected Contributor

Re: run collect sysinfo file in each server.

Hello again,

NO POINTS here, just an add on to my previous post.

We keep copies of these html files for all of our boxes (16 total) on the network. We burn this information onto a CD and keep an updated copy of the CD in each of our Disaster Recovery boxes. They go right along with our weekly, nightly and Ignite backups. That way if I have to recover, everything is right there.

Just a little more info, hope it helps!

-Bryan
Wortiz
Advisor

Re: run collect sysinfo file in each server.

Thanks for the replys.

But, I have my file called "sysinfo159" and I need to run in each server to cellect info. I want to run a script that copy this file in each server and execute it and bring me the out.

Thanks.
Wortiz
Advisor

Re: run collect sysinfo file in each server.

Thanks for the replys.

But, I have my file called "sysinfo159" and I need to run in each server to cellect info. I want to run a script from a server that copy this file in each server and execute it and bring me the out.

Thanks.
Sridhar Bhaskarla
Honored Contributor

Re: run collect sysinfo file in each server.

Hi,

You can do it in the following ways. Pushing the server is important first. This can be achieved by following means.

1. If you have a management server that manages your servers, you can push this script and have it run through it. For ex., Openview ITO/VPO or tivoli.
3. Trusting the other hosts by means of ssh public/private keys.
4. Any batch scheduling software like control-M or Autosys that is already setup.

If you don't have anything, then you have to use tools like expect or perl to perform non-interactive sessions for you. There are options to store the passwords in memory rather than hardcoded in scripts so it is slightly better secured.

If there is no other way, then you have only one way which I don't suggest to use. You can use 'rexec' and 'ftp' with .netrc. Look at those man pages. Create an account on your workstation and put + root in it's .rhosts file. Write a wrapper script that untars sysinfo bundle, runs sysinfo and rcps the output to the account on your workstation. Copy both wrapper script and the sysinfo bundle
using ftp and rexec. Look at your .netrc on the syntax. Once you are done running sysinfo, wipe out your .netrc file and .rhosts. Again, this is to be done only as a last resort.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Anders Gullberg
Frequent Advisor

Re: run collect sysinfo file in each server.

Hi,

I do like this,
On each server i run the collect script in cron. (see attachment) each week. it sends the output to a collect server. On the server its saved 2 version and locally 4 versions. On the collect server i made a html script( see attachment) so i just click on the server i need to see.
Hope this will help you. for us its work great.

Regards
Anders
Anders Gullberg
Frequent Advisor

Re: run collect sysinfo file in each server.

Hi,

Here are next attachment...:)


//Anders
Doug Burton
Respected Contributor

Re: run collect sysinfo file in each server.

A quick note about cfg2html.

You do have to become a yahoo group member. Another thing is the files cfg2html will use to create it's final html oputput -

/opt/cfg2html/plugins/head01.html, and
/opt/cfg2html/plugins/head02.html

will add advertising junk to your final output.

You can also redirect the placement of the final output by editing the "OUTDIR" variable found in the /opt/cfg2html/cfg2html_hpux.sh file.