Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gathering Process Information.

Status
Not open for further replies.

pmking

IS-IT--Management
Mar 1, 2006
59
0
0
US
Hi,

I have written scripts before, but I am not a full timer script person anymore and I have forgotten so much. It has been over 24 months since I touched a script. I am starting from scratch here.

I would like to create a shell script that will gather CPU, Memory, IO, and other performance related information for a certain process.

If I have a third party tool on my Unix box, I would like to gather the performance numbers for this specific third party software i.e. How much CPU it is using, Memory, IO, Network and other related performance information that the standard Unix system will provide.

If script runs on one box, I also need help on how to connect to a remote box via this script to gather the performance information, and have it display in a presentable format. Or have this performance collecting script run on all boxes.

More than likely this script will run in the background, and be running constantly to capture performance information and write to a flat file.

From here a report creation script will be used to run against the flat file to produce and email requested performance information about this third party tool.

A Report script will utilize the flat file to gather information for reporting purposes.

EXAMPLE of OUTPUT REPORT FILE THAT CAN BE EMAILED VIA SENDMAIL:

User should have option to produce a 1/2 hour, hourly, daily, weekly, monthly report.

Performance Information for: Third Party Software Name
Running on system: "Node Name"
Statistics for "Date"
Time slice "1/2hour, 1/2 hour, hourly, daily, weekly, monthly"

CPU Utilization
Memory
Paging/Swapping

And so on.

I am starting from scratch here and all your expertise is greatly appreciated.

With regard to type of shell, I will leave that up to you all. Our systems do work with allstandard shells.

Thank you.


ps. I hope I am asking the right questions in order to get the right answers...
 
If you're asking us to do your job for you and write the whole thing to the specs you gave, then you're asking the wrong question.

Have you tried anything? What do you have so far? Please post anything you have done so far and we will gladly help with any problems and make all kinds of suggestions.

 
Thanks.

When I am fully done, I will post all my scripts for people to use. And would love to help you all with the same questions to get started and even maybe do your work for you. You can analyze my scripts and learn from them. My scripts work, and of course there are other programmers who will have a better solution, but I am one who will post my results here because this is a nice site and very helpful.

With that said, my specs changed. Now I will write to a Oracle database.

I built a sql script/DDL, and will run this in order to create the tables on the database.

My question is, anybody know how to send shell output to an Oracle database having 6 tables? If so, can you at least send me to a link or something so I know where to start?

Currently I have 6 shell scripts that will produce SAR info, third party tool info. I have 6 tables with various columns that will be populated by each shell script.

Hope my question made sense. Please ask if you need clarification with my post. Thanks to all who help..

Thank you.

 
Have a look here:
faq822-2218

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you PHV,

It looks like this script (the example link you sent me) will create the table every time the script is executed.

I have the tables in place now, since dba's won't allow tables to be created on the fly..

My question is, how do I get my shell script output to populate the existing tables and rows that I have created via a sql script.

Hope I didn't misstate your link, if I am not understanding the body of the link you sent, please let me know. I will re-read it again..

My basic shell scripts will run every 1 minute, and the goal is to populate the 6 tables with the output from the shell script, we will keep historical data for a while (time uncertain as of yet)in each table, and have time_date as PK.

I am trying to do a search for this via google and this site, but it looks like I am using bad search strings since nothing is coming up.

Thanks.
 
As the tables are already created in the DB, then simply use INSERT INTO sql statements.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top