- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Perl and statpack
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2004 10:48 PM
тАО05-05-2004 10:48 PM
Just to get started : how do you get the stuff between two pattern for various file and process the output ?
I want to write a perl script wich take various Oracle statpack reports and produce a sum / average / top-bottom analysis of the waited events.
... or does anybody already have something alike ?
Thanks for help,
Nicolas
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2004 10:54 PM
тАО05-05-2004 10:54 PM
Re: Perl and statpack
# perl -ne'/pat1/ .. /pat2/ and print'
or
# perl -ne'/pat1/ ... /pat2/ and print'
see 'man perlop' under 'range operators' for the difference between them.
I don't know about statpack, so your question is to vague for me in that respect.
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2004 12:35 AM
тАО05-06-2004 12:35 AM
Re: Perl and statpack
why don't you take the information at source i.e.in the perfstat schema as yuo would have all the relevant data ?
Regards,
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2004 01:54 AM
тАО05-06-2004 01:54 AM
SolutionStill, I appreciate that in several circumstances you just have the reports to work with.
Pike procura wrote, is it nice to use a 'range'. The thing to know about statspack is that the various regions are deleimited by a line starting with (in perl use anchor ^) a form-feed character (in perl special cased as \f) followed by a unique title.
So to just print the wait events you can use:
perl -ne '/^\fWai/.../^\fBac/ and print' sp.lst
In a procedure you probably will end up using something like:
while (<>) {
if (/^\fWa/.../^\fBac/) { # in the range?
s/,//g; #clean up large numbers
if (/(\d+)\s+(\d+)/) { #two numbers on the line?
$waits += $1;
$timeo += $2;
}
}
}
print "Total: $waits Waits, $timeo Timeouts\n";
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2004 03:30 AM
тАО05-06-2004 03:30 AM
Re: Perl and statpack
especially Hein !
Cheers
Nicolas