That is a very general question. What are you trying to capture? CPU and memory are at the OS level. Perhaps a basic UNIX book would help you assess the problem deep enough to ask a Perl-centric question about accessing it.
Or if you don't want to learn UNIX and Perl, you could just hire a consultant... there's a zillion of us around...
-- Snazzy tagline here
Comment on Re: capture cpu and memory usage of JVM using Perl