[conspire] idle computer

Rick Moen rick at linuxmafia.com
Mon Jul 11 14:47:10 PDT 2011


Quoting Paul Zander (paulz at ieee.org):

> When is a computer idle or "not in use"? 

Paul --

In general terms, you're basically asking 'How do I tell what my machine
is busy doing?', right?  

There's no one single tool.  There are, instead, quite a lot of tools.  
The 'ps' and 'top' utilities give you snapshots of all currently running
processes, how much CPU they're taking, how much RAM (of a couple of
different sorts) they're taking, when they spawned, etc.  The 'sar'
utility gives a number of different sorts of reports on running
processes.  The 'vmstat' utility gives information about processes uses
of virtual memory (thus, 'vm'), and also of CPU, disks, etc.
System-wide traffic to and from the various devices within the machine
can be looked into using 'iostat'.  And so on.

On a Linux (or other Unix) host, at any given time, there may be any
number of background service threads, cronjobs, etc.  Those of course
will show up in 'ps' and 'top' output, if you're curious about what the
confounded machine is so busy grinding on that it seems to have few
cycles left over for _your_ job.  

The 'nice' and 'renice' utilities can be used to set and reset priority
of processes relative to normal tasking.

If you have the recurring impression that your machine might be
bottlenecked on some critical hardware or software resource, you might
be right.  That often is indeed the case -- and tracking down what is
bottlenecking your system is one of the more subtle but potentially
rewarding tasks you can set yourself.  Sometimes it becomes really
obvious -- obviously CPU, obviously RAM, obviously disk I/O, obviously
network I/O -- when you look carefully at tasks using the above tools.
And then you get to decide what if anything to do about it, e.g., turn
off KDE whizzing effects, add more RAM, etc.  

In the Linux world, speaking generally, I'm most often seeing systems
that are bottlenecked on either disk I/O or RAM.  

Again, speaking generally, it's extremely useful to be familiar with
your system's cronjobs, the way Linux uses disk cache, and the activity
of background system daemons such as syslog.


I'm afraid I'm a little non-plussed by the questions at the end of your
posting.

> * Are ACPI settings written by Windows stored where they would effect
> the Linux install?

Can you explain what you mean by 'ACPI settings written by Windows'?  I
am not very familiar with what MS-Windows might be doing.  Also, I'm
unclear on what this question has to do with the rest of your post.

> Why does a computer that is busy copying files think it is "not in
> use"?

I honestly don't know what you're referring to, when you say the
computer thinks it's not in use.

> Am I the only person that uses a computer for something other than
> email | Facebook | watching videos?

I think all of us who run servers would qualify.  ;->

Bottlenecking on disk I/O is one of the reasons many of us system
administrators became SCSI bigots for any task involving significant
multitasking / multithreading / multiuser aspects.  (That's a huge
discussion in itself.)

> * Is there a way to check for lack of disk and CPU usage before going
> to idle | standby | hibernate | screen-saver ?

The aforementioned system tools give you a very rich menu of data to
'check on' all running processes and the state of the system as a whole.
But I have a feeling I'm not understanding your question.





More information about the conspire mailing list