Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am running RedHat Linux 6.1 64bit in a virtual environment. 2 CPUs 4GB RAM.
I have been seeing 12 to 14 hour spikes in CPU utilization, but have not been able to pinpoint WHAT process(s) is using the CPU.
Can sar give me this information> If so, can someone give me an example command, and how to interpret the output?
If sar cannot give me this information, is there another tool that can?
OK, sorry, my last reply was a bit curt, but I was in a bit of a hurry; here are a few more fragments;
if you look at the top man page, there is a non-interactive option, and that writes an ordinary top page, but only a single page, and it sounds as if that is what you want, and you probably want to append that to your capture file
you also probably want to write something that tells you what things looked like, from a system point of view, at the time; one possibility is to write an accompanying 'uptime' to the file; while it doesn't sound as if you are interested in the uptime, per se, uptime also contains the clock time and the load average numbers, and those you are interested in
so, my impression is that you might want to append an 'uptime' and a 'top' from a script, and maybe run the script that does this again and again from a cron job, say every fifteen minutes (or faster or slower, depending on how much resolution you need and how big a file that you feel like building...with time periods like this, it probably isn't a big problem, if you are looking for, say, sub 100 mS pulses, everything changes, both because of the amount of data, if you leave it for a couple of days, and because you probably wouldn't want to use the cron job option, in that case)
an alternative would just be send the script to sleep, rather than a cron job