20040807 Saturday August 07, 2004

Answer - Solaris Quiz #2 (Which File)


The prize (when I find one) goes out to William Hathaway for his answer which is exactly what I used in the following situation.

A customer had raised a call with us complaining that his Oracle database was running extremely slowly. We suspected a problem with the external array, but copying large files around seemed fine. Using iostat we found that most of the activity was going to the internal disks where the oracle binaries were stored. Since we were reading the database to create an export file on the array I couldn't explain the writes to the internal disks. In the end we truss'd the exp process and using the method described found that exp was writing to a file xxx.trc Immediately the DBA realised this was a trace file that had become HUGE due to some Oracle tracing he had forgotten to turn off. Once this trace was removed the test query went from 4 minutes to 10 seconds.

In Solaris 10, things are somewhat simpler, since the enhancements to pfiles, means we get the filenames displayed right in the pfiles output.

garyli@noddy[/home/garyli] $pfiles $$
11289:  -ksh
  Current rlimit: 256 file descriptors
   0: S_IFCHR mode:0620 dev:267,0 ino:12582950 uid:90712 gid:7 rdev:24,17
      O_RDWR
      /devices/pseudo/pts@0:17
   1: S_IFCHR mode:0620 dev:267,0 ino:12582950 uid:90712 gid:7 rdev:24,17
      O_RDWR
      /devices/pseudo/pts@0:17
   2: S_IFCHR mode:0620 dev:267,0 ino:12582950 uid:90712 gid:7 rdev:24,17
      O_RDWR
      /devices/pseudo/pts@0:17
  63: S_IFREG mode:0600 dev:279,228 ino:7709959 uid:90712 gid:15 size:2228
      O_RDWR|O_APPEND|O_CREAT|O_LARGEFILE FD_CLOEXEC
      /home/garyli/.sh_history
( Aug 07 2004, 09:03:02 AM BST ) Permalink