I want to time how long it takes to compile the latest version of Red Hat Enterprise Linux 6. I have downloaded the SRPMs from the Red Hat's FTP server.

How do I time how long it takes to compile all of the packages?

  • Having read the comments below I see no relation to the scope of serverfault. Please read our faq.
    – user9517
    Commented Apr 6, 2012 at 17:16

2 Answers 2


I'm not going to blow up my workstation for days on end by testing this, but given a directory of SRPMS I don't see why this wouldn't work:

time (for RPM in $(ls *.srpm); do rpmbuild --rebuild $RPM; done)

  • 1
    ls *.rpm might exceed max. length of the input. I'd suggest time find $BASEDIR -type f -name '*.srpm' -exec rpmbuild --rebuild {} \; Commented May 15, 2014 at 20:25

Create a build environment and and set up a long chain of rpmbuild --rebuild packagename.srpm commands...

But the better* approach is to simply go to CentOS.org. Download the ISO images for the current release from a local mirror server.

*Assuming you're not modifying any packages.

  • 3
    There's no reason to compile your own version of the operating system. CentOS is available in pre-compiled form. The build process involved with compiling the entire OS is involved and requires a lot of space and CPU time to accomplish. Why would you want to do this?
    – ewwhite
    Commented Apr 6, 2012 at 15:27
  • 4
    If you're looking to test CPU utilization on a machine or generate an artificial load, download the stress utility as detailed here: serverfault.com/a/209894/13325
    – ewwhite
    Commented Apr 6, 2012 at 15:30
  • 4
    @PeterPenzov For future reference, your question is how to generate CPU load on a system, not how to compile Red Hat from source. You'll get to the easiest solution the quickest if you just stick to the original problem. Commented Apr 6, 2012 at 15:44
  • 1
    He is focusing on the question, specifically, trying to figure out why you'd want to do this. Don't be rude.
    – ceejayoz
    Commented Apr 6, 2012 at 16:09
  • 4
    @PeterPenzov You're not providing us the full details. We're trying to focus on your question, but it feels like a moving target at the moment. You should edit your original question posting to provide as much detail as you can. Commented Apr 6, 2012 at 16:10

Not the answer you're looking for? Browse other questions tagged .