[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Determining if system has multiple processors in %post section

Thanks for all the ideas on how to tackle this problem!!

My plan is to first try out  the suggestion below.   What directories can
the post-install script execute?   My script never even shows up when I
copy it to /tmp, /usr, /var  or /etc.


                    "Seth D. Alford"                                                                                       
                    <setha plaza ds adp c        To:     kickstart-list redhat com                                         
                    om>                          cc:                                                                       
                    Sent by:                     Subject:     Re: Determining if system has multiple processors in %post   
                    kickstart-list-admin@        section                                                                   
                    02/07/2002 03:37 PM                                                                                    
                    Please respond to                                                                                      

Here's a small python script, smp.py, that I use with RH 7.1:

#! /usr/bin/python
# $Id: smp.py /main/2 2001/08/13 11:38:02 setha Exp $
import isys
import sys

----end of script----

This script uses the isys module, which is what anaconda uses internally.

To use this in a post-install environment, you have to put the script
in directory where your post-install script can execute it.  Your post
script will have to enable a PYTHONPATH.  Here's what I use for my


I'm not sure that the PYTHONPATH is correct.  And I assume that the isys
module knows how to do the right thing.

--Seth Alford
setha plaza ds adp com

On Thu, Feb 07, 2002 at 03:00:35PM -0600, Rebecca R Hepper seagate com
> Hello list,
> In the %post section I need to determine how many processors my system
> If there is one processor I will install my recompiled kernel, otherwise
> I'll let the default be the smp-kernel.  I thought I could grep the
> /proc/cpuinfo file to determine the number of processors but during
> kickstart it only shows one processor even though my system has two.  The
> file doesn't seem to get updated with information for the second
> until the system boots into the smp-kernel.  Any thoughts/hints on how I
> could determine the number of processors in the system?  How does
> automagically know when there are multiple processors?
> Thank you.
> Rebecca

Kickstart-list mailing list
Kickstart-list redhat com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]