I came across the following post that discusses some of the thermal issues currently found in the macbook pros. According to the poster, Apple (or their suppliers) is incorrectly applying thermal paste to the CPU dies in the macbook pros, which is leading to higher than expected operating termperatures. The picture he presents from one of Apple’s training manuals is amusing, and if they are following the suggestion in the picture, they are clearly misappropriating thermal grease. Great post, and good analysis!

Posted by matty, filed under Apple. Date: April 30, 2006, 9:24 pm | No Comments »

While surfing the web this weekend, I came across the following procedure for reinstalling grub from the command line:

1. Boot the system from an installation boot medium.

2. Type linux rescue at the installation boot prompt to enter the rescue environment.

3. Type chroot /mnt/sysimage to mount the root partition.

4. Type /sbin/grub-install /dev/hda to reinstall the GRUB boot loader, where /dev/hda is the boot partition.

5. Review the /boot/grub/grub.conf file, as additional entries may be needed for GRUB to control additional operating systems.

6. Reboot the system.

This is useful stuff, and having it handy can save you time you get into a bind.

Posted by matty, filed under Linux Recovery. Date: April 30, 2006, 9:06 pm | No Comments »

I just came across the objdump “–source” option, which will display the C source code from a program along with the assembly instructions that were generated from the C code. The following example shows a snippet of what is produced during a typical run:

$ objdump –source curl

08050ed0 <homedir >:

/* return the home directory of the current user as an allocated string */
char *homedir(void)
{
 8050ed0:       55                      push   %ebp
  char *home;

  home = GetEnv("CURL_HOME", FALSE);
 8050ed1:       31 d2                   xor    %edx,%edx
 8050ed3:       89 e5                   mov    %esp,%ebp
 8050ed5:       b8 01 d0 05 08          mov    $0x805d001,%eax
 8050eda:       53                      push   %ebx
 8050edb:       83 ec 04                sub    $0x4,%esp
 8050ede:       e8 bd ff ff ff          call   8050ea0 
  if(home)
 8050ee3:       85 c0                   test   %eax,%eax
 8050ee5:       89 c3                   mov    %eax,%ebx
 8050ee7:       74 08                   je     8050ef1 
    return home;

  home = GetEnv(”HOME”, FALSE);
  if(home)
    return home;

#if defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
 {
   struct passwd *pw = getpwuid(geteuid());

   if (pw) {
#ifdef VMS
     home = decc$translate_vms(pw->pw_dir);
#else
     home = pw->pw_dir;
#endif
     if (home && home[0])
       home = strdup(home);
   }
 }
#endif /* PWD-stuff */
#ifdef WIN32
  home = GetEnv(”APPDATA”, TRUE);
  if(!home)
    home = GetEnv(”%USERPROFILE%\\Application Data”, TRUE); /* Normally only
                                                               on Win-2K/XP */
#endif /* WIN32 */
  return home;
}
 8050ee9:       89 d8                   mov    %ebx,%eax
 8050eeb:       83 c4 04                add    $0×4,%esp
 8050eee:       5b                      pop    %ebx
 8050eef:       5d                      pop    %ebp
 8050ef0:       c3                      ret
 8050ef1:       31 d2                   xor    %edx,%edx
 8050ef3:       b8 06 d0 05 08          mov    $0×805d006,%eax
 8050ef8:       e8 a3 ff ff ff          call   8050ea0 
 8050efd:       85 c0                   test   %eax,%eax
 8050eff:       89 c3                   mov    %eax,%ebx
 8050f01:       75 e6                   jne    8050ee9 
 8050f03:       e8 3c 89 ff ff          call   8049844 
 8050f08:       89 04 24                mov    %eax,(%esp)
 8050f0b:       e8 54 85 ff ff          call   8049464 
 8050f10:       85 c0                   test   %eax,%eax
 8050f12:       74 d5                   je     8050ee9 
 8050f14:       8b 58 14                mov    0×14(%eax),%ebx
 8050f17:       85 db                   test   %ebx,%ebx
 8050f19:       74 ce                   je     8050ee9 
 8050f1b:       80 3b 00                cmpb   $0×0,(%ebx)
 8050f1e:       89 f6                   mov    %esi,%esi
 8050f20:       74 c7                   je     8050ee9 
 8050f22:       89 1c 24                mov    %ebx,(%esp)
 8050f25:       e8 7a 87 ff ff          call   80496a4 <__strdup@plt>
 8050f2a:       89 c3                   mov    %eax,%ebx
 8050f2c:       eb bb                   jmp    8050ee9 
 8050f2e:       90                      nop
 8050f2f:       90                      nop

This is neat!

Posted by matty, filed under Linux Utilities. Date: April 30, 2006, 9:03 pm | No Comments »

I met up this week with one of my friends that I haven’t seen in a while. We chatted about life, work and eventually started chatting about Linux and Solaris (we are both SysAdmins). My friend mentioned that his company had decided to quit buying Sun hardware in favor of Dell servers running Redhat Linux Advanced Server. I was shocked to hear this since my friend had actively pushed Solaris in the past, and was one of the folks I regularly got together with to discuss new technologies merged into Nevada. His company has numerous concerns surrounding Solaris 10 manageability and Sun’s lack of ACTIVE support for commonly used opensource packages. We chatted about this for hours over cocktails, and both came to the conclusion that Sun needs to do something to address the following problems with Solaris:

1. Solaris doesn’t ship with a working and supported LAMP stack (I should probably say SAMP stack). My friend’s company is frustrated with having to manually download and build Apache, MySQL, and PHP on their Solaris boxes, and chose to move to Redhat Advanced server to get a working and SUPPORTED LAMP solution out of the box. I am not sure why Sun can’t ship a working and supported SAMP stack with Solaris. This seems like a no brainer to me.

2. Several of the developers at my friends company have transitioned to Fedora Core on their desktops, since the desktop looks pleasant, wireless works out of the box for most chipsets, eclipse is an installation option, and there is a full suite of applications available after the installation. The Fedora Core desktop is quite a bit more usable that JDS (if you don’t believe me, install Fedora Core 5 side-by-side with JDS), so developers have jumped all over it (at least those that don’t use Windows). Sun really needs to do something to improve desktop usability, and they should use the GNOME release from gnome.org versus their own variant. They also need to do something to address package management, either by adopting blastwave or developing a decent remotely-accessible package repository.

3. Redhat Linux ships and provides regular updates for numerous opensource software (e.g., postgres, MySQL, Apache, Samba, Bind, Sendmail, openssh, openssl, etc), where Sun keeps trying to sell customers the Sun Java One stack, “modifies” an opensource package and diverges the product from what is available everywhere else, and fails to provide timely bug fixes and security patches for the opensource packages that are shipped (Apache, MySQL and Samba are perfect examples) with Solaris. Sun really needs to get some folks focused on supporting the opensource solutions people use, versus shipping opensource software and letting the bits rot.

4. Several key ISVs are pushing Linux and Windows over Solaris, and have switched from Solaris to Linux as their tier I development platform. This typically means that developers will squash more platform-specific bugs in their product prior to shipping it, since they are using that platform daily. Sun needs to do more to get developers writing code on Solaris, since this helps Sun customers in the end.

5. Managing applications and patches on Solaris systems is a disaster, and redhat’s up2date utility is not only efficient, but has numerous options to control the patch notification and update process. This can also be used along with Redhat’s satellite server to provide Enterprise wide patch and application management. While Sun kicked off an effort to address the patch and installation process, I wonder if it will be too little too late.

6. Staying on the cutting edge with Nevada is difficult, since there is currently no way to easily and automatically upgrade from one release of Nevada to another. On Fedora Core servers, you can run ‘yum upgrade’ to get the latest bits. Having to download archives and BFU is tedious, and most admins don’t want to spend their few spare cycles BFU’ing to new releases.

7. Zones are unusable at my friend’s site, since there is currently no way to filter traffic between zones, apply QOS measures to memory, I/O and network resources, and patching a box with zones can take days in some cases (I have experienced this first hand. If you want to see, install Solaris 10, create 25 non-sparse zones, and run smpatch update). Addressing these items would allow SysAdmins to actually patch their systems, and would allow folks to sleep at night knowing that the QOS measures will protect rogue applications from taking down their servers.

8. The Solaris opensource movement was great, but in our opinions it is very much closed to the outside world. How many people outside of Sun have actually done ARC reviews, code reviews, or applied a putback to the kernel source tree (there may be cases, but I can’t find them on opensolaris.org)? This is definitely not something that can happen overnight, but people who have to wait in a queue for a sponsor, or worse yet are ignored (I filed a bug 3-months ago and asked to work on it, and have yet to hear back from Sun) when they try to fix something, will cause people to join communities where their voice actually matters.

That said, Solaris 10 is an awesome Operating System, and comes with some incredible technologies (e.g., ZFS, DTrace, FMA, etc). I truly do hope that Sun takes some steps to address these issues, since it will hopefully lead to further adoption of Solaris.

Posted by matty, filed under Rants, Solaris Misc. Date: April 30, 2006, 11:42 am | 11 Comments »

I came across OOPS! An Introduction to Linux Kernel Debugging while surfing the web, and found the presentation interesting. The information on sysinfo and sysrq was especially interesting, since these modules can be valuable tools for determing why a specific version of the Linux kernel decided to bite the dust!

Posted by matty, filed under Linux Kernel. Date: April 23, 2006, 5:37 pm | 1 Comment »

While reading through RFC 1813 (NFSv3 RFC), I came across the following interesting NFS error:

NFS3ERR_JUKEBOX

     The server initiated the request, but was not able to
     complete it in a timely fashion. The client should wait
     and then try the request with a new RPC transaction ID.
     For example, this error should be returned from a server
     that supports hierarchical storage and receives a request
     to process a file that has been migrated. In this case,
     the server should start the immigration process and
     respond to client with this error.

This is nifty, and leads me to wonder if any NFS-based HSM solutions are utilizing this.

Posted by matty, filed under NFSv3. Date: April 22, 2006, 11:53 am | 1 Comment »

22  Apr
DTrace timestamps

While rereading several sections in the Solaris DTrace user guide, I came across the following descriptions for the timestamp and vtimestamp variables:

uint64_t timestamp: The current value of a nanosecond timestamp counter. This counter increments from an arbitrary point in the past and should only be used for relative computations.

uint64_t vtimestamp: The current value of a nanosecond timestamp counter that is virtualized to the amount of time that the current thread has been running on a CPU, minus the time spent in DTrace predicates and actions. This counter increments from an arbitrary point in the past and should only be used for relative time computations.

After reading this, it dawned on me that some of the scripts I wrote should have used vtimestamp instead of timestamp (blocking operations can really skew the results). Luckily I foudn this now, so I can take advatnage of it whiel debugging problems in the future.

Posted by matty, filed under Solaris DTrace. Date: April 22, 2006, 11:47 am | No Comments »

If you have ever had to deal with a sick Redhat server, you may be familiar with the rescue, emergency and singler-user modes of operation. I have heard people refer to rescue modes incorrectly, which can sometimes lead to some interesting stories (there are several slight subtleties between them). To clear up any confusion surrounding these terms, here are the official descriptions from the Redhat administration guide:

Rescue mode:

Rescue mode provides the ability to boot a small Red Hat Enterprise Linux environment entirely from CD-ROM, or some other boot method, instead of the system’s hard drive. As the name implies, rescue mode is provided to rescue you from something. During normal operation, your Red Hat Enterprise Linux system uses files located on your system’s hard drive to do everything — run programs, store your files, and more.

Emergency Mode:

In emergency mode, you are booted into the most minimal environment possible. The root file system is mounted read-only and almost nothing is set up. The main advantage of emergency mode over single-user mode is that the init files are not loaded. If init is corrupted or not working, you can still mount file systems to recover data that could be lost during a re-installation.

Single-User mode:

In single-user mode, your computer boots to runlevel 1. Your local file systems are mounted, but your network is not activated. You have a usable system maintenance shell. Unlike rescue mode, single-user mode automatically tries to mount your file system. Do not use single-user mode if your file system cannot be mounted successfully. You cannot use single-user mode if the runlevel 1 configuration on your system is corrupted.

Posted by matty, filed under Linux Recovery. Date: April 22, 2006, 11:35 am | No Comments »

« Previous Entries