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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting resource info out of UNIX kernels generically

Status
Not open for further replies.

BrettM

Technical User
May 26, 2002
2
AU
I have been asked to pull out, on a regular basis, information from the UNIX (and NT) kernel using PERL. These may include basic performance metrics, etc., and CPU info ... The problem is that I have been asked to do it generically for MOST flavours of UNIX and worst of all, NT. Does anyone know if this is possible?

My thought processes so far ...
-> /dev/kmem ... but you would need to break down the memory into its components... Are these published?
-> libraries for PERL but I have not found any yet.

Thanks in advance.
 
Yes, it's possible - I am going through the same process. If you need to do this for multple UNIX platforms then may I suggest that /dev/kmem may not be the way to go.

I am extracting information from UNIX systems using the output of standard utilities (df, vmstat, ps). Different versions of UNIX are catered for by placing all of the operating system dependant code in a module and just calling a sub in that module which returns data in a standard format no matter what OS the machine is running.

For NT I am using Win32::File, Win32::Driveinfo, Win32::perflib

Perflib is proving quite difficult to use, but I'm getting there. Mike
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
forgot to say -- using Perl for all scripts Mike
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top